From e3cb8ed74aa3a25e1301203906fe7a61303edcfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 29 Oct 2025 14:38:56 +0100 Subject: [PATCH 01/46] chore: use Pydantic to generate OpenAPI schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes the need for the strong_typing and pyopenapi packages and purely use Pydantic for schema generation. Our generator now purely relies on Pydantic and FastAPI, it is available at `scripts/fastapi_generator.py`, you can run it like so: ``` uv run ./scripts/run_openapi_generator.sh ``` The generator will: * Generate the deprecated, experimental, stable and combined specs * Validate all the spec it generates against OpenAPI standards A few changes in the schema required for oasdiff some updates so I've made the following ignore rules. The new Pydantic-based generator is likely more correct and follows OpenAPI standards better than the old pyopenapi generator. Instead of trying to make the new generator match the old one's quirks, we should focus on what's actually correct according to OpenAPI standards. These are non-critical changes: * response-property-became-nullable: Backward compatible: existing non-null values still work, now also accepts null * response-required-property-removed: oasdiff reports a false positive because it doesn't resolve $refs inside anyOf; we could use tool like 'redocly' to flatten the schema to a single file. * response-property-type-changed: properties are still object types, but oasdiff doesn't resolve $refs, so it flags the missing inline type: object even though the referenced schemas define type: object * request-property-one-of-removed: These are false positives caused by schema restructuring (wrapping in anyOf for nullability, using -Input variants, or simplifying nested oneOf structures) that don't change the actual API contract - the same data types are still accepted, just represented differently in the schema. * request-parameter-enum-value-removed: These are false positives caused by oasdiff not resolving $refs - the enum values (asc, desc, assistants, batch) are still present in the referenced schemas (Order and OpenAIFilePurpose), just represented via schema references instead of inline enums. * request-property-enum-value-removed: this is a false positive caused by oasdiff not resolving $refs - the enum values (llm, embedding, rerank) are still present in the referenced ModelType schema, just represented via schema reference instead of inline enums. * request-property-type-changed: These are schema quality issues where type information is missing (due to Any fallback in dynamic model creation), but the API contract remains unchanged - properties still exist with correct names and defaults, so the same requests will work. * response-body-type-changed: These are false positives caused by schema representation changes (from inferred/empty types to explicit $ref schemas, or vice versa) - the actual response types an API contract remain unchanged, just how they're represented in the OpenAPI spec. * response-media-type-removed: This is a false positive caused by FastAPI's OpenAPI generator not documenting union return types with AsyncIterator - the streaming functionality with text/event-stream media type still works when stream=True is passed, it's just not reflected in the generated OpenAPI spec. * request-body-type-changed: This is a schema correction - the old spec incorrectly represented the request body as an object, but the function signature shows chunks: list[Chunk], so the new spec correctly shows it as an array, matching the actual API implementation. Signed-off-by: Sébastien Han --- .github/workflows/conformance.yml | 22 +- .pre-commit-config.yaml | 14 +- client-sdks/stainless/openapi.yml | 23302 +++++++++++----- docs/openapi_generator/README.md | 1 - docs/openapi_generator/generate.py | 134 - docs/openapi_generator/pyopenapi/README.md | 1 - docs/openapi_generator/pyopenapi/__init__.py | 5 - docs/openapi_generator/pyopenapi/generator.py | 1175 - .../openapi_generator/pyopenapi/operations.py | 459 - docs/openapi_generator/pyopenapi/options.py | 78 - .../pyopenapi/specification.py | 269 - .../openapi_generator/pyopenapi/template.html | 41 - docs/openapi_generator/pyopenapi/utility.py | 287 - .../run_openapi_generator.sh | 34 - docs/static/deprecated-llama-stack-spec.yaml | 5567 +++- .../static/experimental-llama-stack-spec.yaml | 6132 +++- docs/static/llama-stack-spec.yaml | 14755 +++++++--- docs/static/stainless-llama-stack-spec.yaml | 23302 +++++++++++----- pyproject.toml | 24 +- scripts/fastapi_generator.py | 1591 ++ scripts/run_openapi_generator.sh | 19 + scripts/validate_openapi.py | 290 + src/llama_stack/core/library_client.py | 12 +- src/llama_stack/core/utils/type_inspection.py | 45 + src/llama_stack_api/inspect.py | 1 + src/llama_stack_api/openai_responses.py | 1 + src/llama_stack_api/schema_utils.py | 43 +- src/llama_stack_api/strong_typing/__init__.py | 19 - .../strong_typing/auxiliary.py | 229 - src/llama_stack_api/strong_typing/classdef.py | 440 - src/llama_stack_api/strong_typing/core.py | 46 - .../strong_typing/deserializer.py | 872 - .../strong_typing/docstring.py | 410 - .../strong_typing/exception.py | 23 - .../strong_typing/inspection.py | 1104 - src/llama_stack_api/strong_typing/mapping.py | 39 - src/llama_stack_api/strong_typing/name.py | 188 - src/llama_stack_api/strong_typing/schema.py | 791 - .../strong_typing/serialization.py | 97 - .../strong_typing/serializer.py | 494 - src/llama_stack_api/strong_typing/slots.py | 27 - .../strong_typing/topological.py | 90 - src/llama_stack_api/tools.py | 1 + src/llama_stack_api/vector_io.py | 3 +- uv.lock | 155 +- 45 files changed, 55311 insertions(+), 27321 deletions(-) delete mode 100644 docs/openapi_generator/README.md delete mode 100644 docs/openapi_generator/generate.py delete mode 100644 docs/openapi_generator/pyopenapi/README.md delete mode 100644 docs/openapi_generator/pyopenapi/__init__.py delete mode 100644 docs/openapi_generator/pyopenapi/generator.py delete mode 100644 docs/openapi_generator/pyopenapi/operations.py delete mode 100644 docs/openapi_generator/pyopenapi/options.py delete mode 100644 docs/openapi_generator/pyopenapi/specification.py delete mode 100644 docs/openapi_generator/pyopenapi/template.html delete mode 100644 docs/openapi_generator/pyopenapi/utility.py delete mode 100755 docs/openapi_generator/run_openapi_generator.sh create mode 100755 scripts/fastapi_generator.py create mode 100755 scripts/run_openapi_generator.sh create mode 100755 scripts/validate_openapi.py create mode 100644 src/llama_stack/core/utils/type_inspection.py delete mode 100644 src/llama_stack_api/strong_typing/__init__.py delete mode 100644 src/llama_stack_api/strong_typing/auxiliary.py delete mode 100644 src/llama_stack_api/strong_typing/classdef.py delete mode 100644 src/llama_stack_api/strong_typing/core.py delete mode 100644 src/llama_stack_api/strong_typing/deserializer.py delete mode 100644 src/llama_stack_api/strong_typing/docstring.py delete mode 100644 src/llama_stack_api/strong_typing/exception.py delete mode 100644 src/llama_stack_api/strong_typing/inspection.py delete mode 100644 src/llama_stack_api/strong_typing/mapping.py delete mode 100644 src/llama_stack_api/strong_typing/name.py delete mode 100644 src/llama_stack_api/strong_typing/schema.py delete mode 100644 src/llama_stack_api/strong_typing/serialization.py delete mode 100644 src/llama_stack_api/strong_typing/serializer.py delete mode 100644 src/llama_stack_api/strong_typing/slots.py delete mode 100644 src/llama_stack_api/strong_typing/topological.py diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 73e9678b21..718cd12616 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -129,12 +129,32 @@ jobs: echo "Will compare: ${BASE_SPEC} -> ${CURRENT_SPEC}" + - name: Write ignore file + run: | + cat < ignore-oasdiff + response-property-became-nullable none + response-property-list-of-types-widened none + request-parameter-default-value-added none + request-property-min-items-increased none + response-property-became-optional none + response-required-property-removed none + response-property-one-of-added none + response-property-type-changed none + request-property-one-of-removed none + request-parameter-enum-value-removed none + request-property-enum-value-removed none + request-property-type-changed none + response-body-type-changed none + response-media-type-removed none + request-body-type-changed none + EOF + # Run oasdiff to detect breaking changes in the API specification # This step will fail if incompatible changes are detected, preventing breaking changes from being merged - name: Run OpenAPI Breaking Change Diff if: steps.skip-check.outputs.skip != 'true' run: | - oasdiff breaking --fail-on ERR $BASE_SPEC $CURRENT_SPEC --match-path '^/v1/' + oasdiff breaking --fail-on ERR --severity-levels ignore-oasdiff $BASE_SPEC $CURRENT_SPEC --match-path '^/v1/' # Report when test is skipped - name: Report skip reason diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c60440173a..ddc27e01eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,7 +42,6 @@ repos: hooks: - id: ruff args: [ --fix ] - exclude: ^(src/llama_stack_api/strong_typing/.*)$ - id: ruff-format - repo: https://github.com/adamchainz/blacken-docs @@ -111,11 +110,20 @@ repos: name: API Spec Codegen additional_dependencies: - uv==0.7.8 - entry: sh -c './scripts/uv-run-with-index.sh run ./docs/openapi_generator/run_openapi_generator.sh > /dev/null' + 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/|^docs/openapi_generator/ + 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 65a255c173..76bb8b08dd 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -1,19 +1,19 @@ openapi: 3.1.0 info: - title: >- - Llama Stack Specification - Stable & Experimental APIs - version: v1 - description: >- + title: Llama Stack Specification - Stable & Experimental APIs + 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. + 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. + **🔗 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: v1 servers: - - url: http://any-hosted-llama-stack.com +- url: http://any-hosted-llama-stack.com paths: /v1/batches: get: @@ -1406,90 +1406,82 @@ paths: deprecated: false /v1/providers/{provider_id}: get: + tags: + - Providers + summary: Inspect Provider + description: |- + Get provider. + + Get detailed information about a specific provider. + operationId: inspect_provider_v1_providers__provider_id__get responses: '200': - description: >- - A ProviderInfo object containing the provider's details. + description: A ProviderInfo object containing the provider's details. content: application/json: schema: $ref: '#/components/schemas/ProviderInfo' '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: - - Providers - summary: Get provider. - description: >- - Get provider. - - Get detailed information about a specific provider. parameters: - - name: provider_id - in: path - description: The ID of the provider to inspect. - required: true - schema: - type: string - deprecated: false - /v1/responses: + - name: provider_id + in: path + required: true + schema: + type: string + description: 'Path parameter: provider_id' + /v1/providers: get: + tags: + - Providers + summary: List Providers + description: |- + List providers. + + List all available providers. + operationId: list_providers_v1_providers_get responses: '200': - description: A ListOpenAIResponseObject. + description: A ListProvidersResponse containing information about all providers. content: application/json: schema: - $ref: '#/components/schemas/ListOpenAIResponseObject' + $ref: '#/components/schemas/ListProvidersResponse' '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: List all responses. - description: List all responses. - parameters: - - name: after - in: query - description: The ID of the last response to return. - required: false - schema: - type: string - - name: limit - in: query - description: The number of responses to return. - required: false - schema: - type: integer - - name: model - in: query - description: The model to filter responses by. - required: false - schema: - type: string - - name: order - in: query - description: >- - The order to sort responses by when sorted by created_at ('asc' or 'desc'). - required: false - schema: - $ref: '#/components/schemas/Order' - deprecated: false + /v1/responses: post: + tags: + - Agents + summary: Create Openai Response + description: Create a model response. + operationId: create_openai_response_v1_responses_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_responses_Request' responses: '200': description: An OpenAIResponseObject. @@ -1497,226 +1489,314 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIResponseObject' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIResponseObjectStream' '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 a model response. - description: Create a model response. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateOpenaiResponseRequest' - required: true - deprecated: false - x-llama-stack-extra-body-params: - - name: guardrails - schema: - type: array - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ResponseGuardrailSpec' - description: >- - List of guardrails to apply during response generation. Guardrails provide - safety and content moderation. - required: false - /v1/responses/{response_id}: + description: Default Response get: + tags: + - Agents + summary: List Openai Responses + description: List all responses. + operationId: list_openai_responses_v1_responses_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 50 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order responses: '200': - description: An OpenAIResponseObject. + description: A ListOpenAIResponseObject. content: application/json: schema: - $ref: '#/components/schemas/OpenAIResponseObject' + $ref: '#/components/schemas/ListOpenAIResponseObject' '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' + description: Default Response + /v1/responses/{response_id}: + get: tags: - - Agents - summary: Get a model response. + - Agents + summary: Get Openai Response description: Get a model response. - parameters: - - name: response_id - in: path - description: >- - The ID of the OpenAI response to retrieve. - required: true - schema: - type: string - deprecated: false - delete: + operationId: get_openai_response_v1_responses__response_id__get responses: '200': - description: An OpenAIDeleteResponseObject + description: An OpenAIResponseObject. content: application/json: schema: - $ref: '#/components/schemas/OpenAIDeleteResponseObject' + $ref: '#/components/schemas/OpenAIResponseObject' '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: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + delete: tags: - - Agents - summary: Delete a response. + - Agents + summary: Delete Openai Response description: Delete a response. - parameters: - - name: response_id - in: path - description: The ID of the OpenAI response to delete. - required: true - schema: - type: string - deprecated: false - /v1/responses/{response_id}/input_items: - get: + operationId: delete_openai_response_v1_responses__response_id__delete responses: '200': - description: An ListOpenAIResponseInputItem. + description: An OpenAIDeleteResponseObject content: application/json: schema: - $ref: '#/components/schemas/ListOpenAIResponseInputItem' + $ref: '#/components/schemas/OpenAIDeleteResponseObject' '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: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + /v1/responses/{response_id}/input_items: + get: tags: - - Agents - summary: List input items. + - Agents + summary: List Openai Response Input Items description: List input items. + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get parameters: - - name: response_id - in: path - description: >- - The ID of the response to retrieve input items for. - required: true - schema: - type: string - - name: after - in: query - description: >- - An item ID to list items after, used for pagination. - required: false - schema: - type: string - - name: before - in: query - description: >- - An item ID to list items before, used for pagination. - required: false - schema: - type: string - - name: include - in: query - description: >- - Additional fields to include in the response. - required: false - schema: - type: array - items: - type: string - - name: limit - in: query - description: >- - A limit on the number of objects to be returned. Limit can range between - 1 and 100, and the default is 20. - required: false - schema: - type: integer - - name: order - in: query - description: >- - The order to return the input items in. Default is desc. - required: false - schema: - $ref: '#/components/schemas/Order' - deprecated: false - /v1/safety/run-shield: - post: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + requestBody: + content: + application/json: + schema: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Include responses: '200': - description: A RunShieldResponse. + description: An ListOpenAIResponseInputItem. content: application/json: schema: - $ref: '#/components/schemas/RunShieldResponse' + $ref: '#/components/schemas/ListOpenAIResponseInputItem' '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' + description: Default Response + /v1/chat/completions/{completion_id}: + get: tags: - - Safety - summary: Run shield. - description: >- - Run shield. + - Inference + summary: Get Chat Completion + description: |- + Get chat completion. - Run a shield. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunShieldRequest' - required: true - deprecated: false - /v1/scoring-functions: - get: + Describe a chat completion by its ID. + operationId: get_chat_completion_v1_chat_completions__completion_id__get responses: '200': - description: A ListScoringFunctionsResponse. + description: A OpenAICompletionWithInputMessages. content: application/json: schema: - $ref: '#/components/schemas/ListScoringFunctionsResponse' + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' '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: completion_id + in: path + required: true + schema: + type: string + description: 'Path parameter: completion_id' + /v1/chat/completions: + get: + tags: + - Inference + summary: List Chat Completions + description: List chat completions. + operationId: list_chat_completions_v1_chat_completions_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + 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' tags: @@ -1755,19 +1835,20 @@ paths: get: responses: '200': - description: A ScoringFn. + description: An OpenAIChatCompletion. content: application/json: schema: - $ref: '#/components/schemas/ScoringFn' + $ref: '#/components/schemas/OpenAIChatCompletion' '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: @@ -1811,85 +1892,73 @@ paths: deprecated: true /v1/scoring/score: post: - responses: - '200': - description: >- - A ScoreResponse object containing rows and aggregated results. - content: - application/json: - schema: - $ref: '#/components/schemas/ScoreResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - Scoring - summary: Score a list of rows. - description: Score a list of rows. - parameters: [] + - Inference + summary: Openai Completion + description: |- + Create completion. + + Generate an OpenAI-compatible completion for the given prompt using the specified model. + operationId: openai_completion_v1_completions_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/ScoreRequest' + $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' required: true - deprecated: false - /v1/scoring/score-batch: - post: responses: '200': - description: A ScoreBatchResponse. + description: An OpenAICompletion. content: application/json: schema: - $ref: '#/components/schemas/ScoreBatchResponse' + $ref: '#/components/schemas/OpenAICompletion' '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/embeddings: + post: tags: - - Scoring - summary: Score a batch of rows. - description: Score a batch of rows. - parameters: [] + - Inference + summary: Openai Embeddings + description: |- + Create embeddings. + + Generate OpenAI-compatible embeddings for the given input using the specified model. + operationId: openai_embeddings_v1_embeddings_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/ScoreBatchRequest' + $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' required: true - deprecated: false - /v1/shields: - get: responses: '200': - description: A ListShieldsResponse. + description: An OpenAIEmbeddingsResponse containing the embeddings. content: application/json: schema: - $ref: '#/components/schemas/ListShieldsResponse' + $ref: '#/components/schemas/OpenAIEmbeddingsResponse' '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: - Shields @@ -1931,21 +2000,25 @@ paths: get: responses: '200': - description: A Shield. + description: RerankResponse with indices sorted by relevance score (descending). content: application/json: schema: - $ref: '#/components/schemas/Shield' + $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' + /v1/health: + get: tags: - Shields summary: Get a shield by its identifier. @@ -1987,58 +2060,30 @@ paths: deprecated: true /v1/tool-runtime/invoke: post: - responses: - '200': - description: A ToolInvocationResult. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolInvocationResult' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - ToolRuntime - summary: Run a tool with the given arguments. - description: Run a tool with the given arguments. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeToolRequest' - required: true - deprecated: false - /v1/tool-runtime/list-tools: - get: + - Batches + summary: Cancel Batch + description: Cancel a batch that is in progress. + operationId: cancel_batch_v1_batches__batch_id__cancel_post responses: '200': - description: A ListToolDefsResponse. + description: The updated batch object. content: application/json: schema: - $ref: '#/components/schemas/ListToolDefsResponse' + $ref: '#/components/schemas/Batch' '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: - - ToolRuntime - summary: List all tools in the runtime. - description: List all tools in the runtime. parameters: - name: tool_group_id in: query @@ -2228,5445 +2273,13348 @@ paths: deprecated: false /v1/vector-io/insert: post: - 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: - - VectorIO - summary: Insert chunks into a vector database. + - Vector Io + summary: Insert Chunks description: Insert chunks into a vector database. - parameters: [] + operationId: insert_chunks_v1_vector_io_insert_post requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/InsertChunksRequest' - required: true - deprecated: false - /v1/vector-io/query: - post: + type: array + items: + $ref: '#/components/schemas/Chunk-Input' + title: Chunks responses: '200': - description: A QueryChunksResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/QueryChunksResponse' + 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' + description: Default Response + /v1/vector_stores/{vector_store_id}/files: + post: tags: - - VectorIO - summary: Query chunks from a vector database. - description: Query chunks from a vector database. - parameters: [] + - Vector Io + summary: Openai Attach File To Vector Store + description: Attach a file to a vector store. + 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/QueryChunksRequest' - required: true - deprecated: false - /v1/vector_stores: - get: + $ref: '#/components/schemas/_vector_stores_vector_store_id_files_Request' responses: '200': - description: >- - A VectorStoreListResponse containing the list of vector stores. + description: A VectorStoreFileObject representing the attached file. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreListResponse' + $ref: '#/components/schemas/VectorStoreFileObject' '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' + description: Default Response + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + get: tags: - - VectorIO - summary: Returns a list of vector stores. - description: Returns a list of vector stores. + - Vector Io + summary: Openai List Files In Vector Store + description: List files in a vector store. + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get parameters: - - name: limit - in: query - description: >- - A limit on the number of objects to be returned. Limit can range between - 1 and 100, and the default is 20. - required: false - schema: - type: integer - - name: order - in: query - description: >- - Sort order by the `created_at` timestamp of the objects. `asc` for ascending - order and `desc` for descending order. - required: false - schema: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: filter + in: query + required: false + schema: + anyOf: + - const: completed type: string - - name: after - in: query - description: >- - A cursor for use in pagination. `after` is an object ID that defines your - place in the list. - required: false - schema: + - const: in_progress type: string - - name: before - in: query - description: >- - A cursor for use in pagination. `before` is an object ID that defines - your place in the list. - required: false - schema: + - const: cancelled type: string - deprecated: false + - const: failed + type: string + - type: 'null' + title: Filter + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + 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 + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: post: + tags: + - Vector Io + summary: Openai Cancel Vector Store File Batch + description: Cancels a vector store file batch. + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post responses: '200': - description: >- - A VectorStoreObject representing the created vector store. + description: A VectorStoreFileBatchObject representing the cancelled file batch. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '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: 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: + post: tags: - - VectorIO - summary: Creates a vector store. - description: >- + - Vector Io + summary: Openai Create Vector Store + description: |- Creates a vector store. Generate an OpenAI-compatible vector store with the given parameters. - parameters: [] + operationId: openai_create_vector_store_v1_vector_stores_post requestBody: + required: true content: application/json: schema: $ref: '#/components/schemas/OpenAICreateVectorStoreRequestWithExtraBody' - required: true - deprecated: false - /v1/vector_stores/{vector_store_id}: - get: responses: '200': - description: >- - A VectorStoreObject representing the vector store. + 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 + $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' + description: Default Response + get: tags: - - VectorIO - summary: Retrieves a vector store. - description: Retrieves a vector store. + - Vector Io + summary: Openai List Vector Stores + description: Returns a list of vector stores. + operationId: openai_list_vector_stores_v1_vector_stores_get parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to retrieve. - required: true - schema: - type: string - deprecated: false - post: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order responses: '200': - description: >- - A VectorStoreObject representing the updated vector store. + description: A VectorStoreListResponse containing the list of vector stores. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: '#/components/schemas/VectorStoreListResponse' '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' + description: Default Response + /v1/vector_stores/{vector_store_id}/file_batches: + post: tags: - - VectorIO - summary: Updates a vector store. - description: Updates a vector store. - parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to update. - required: true - schema: - type: string + - Vector Io + summary: Openai Create Vector Store File Batch + description: |- + Create a vector store file batch. + + Generate an OpenAI-compatible vector store file batch for the given vector store. + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenaiUpdateVectorStoreRequest' + $ref: '#/components/schemas/OpenAICreateVectorStoreFileBatchRequestWithExtraBody' required: true - deprecated: false - delete: responses: '200': - description: >- - A VectorStoreDeleteResponse indicating the deletion status. + description: A VectorStoreFileBatchObject representing the created file batch. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreDeleteResponse' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '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: - - VectorIO - summary: Delete a vector store. - description: Delete a vector store. parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to delete. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/file_batches: - post: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}: + get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store + description: Retrieves a vector store. + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get responses: '200': - description: >- - A VectorStoreFileBatchObject representing the created file batch. + description: A VectorStoreObject representing the vector store. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: '#/components/schemas/VectorStoreObject' '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: - - VectorIO - summary: Create a vector store file batch. - description: >- - Create a vector store file batch. - - Generate an OpenAI-compatible vector store file batch for the given vector - store. parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store to create the file batch for. - required: true - schema: - type: string + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + post: + tags: + - Vector Io + summary: Openai Update Vector Store + description: Updates a vector store. + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenAICreateVectorStoreFileBatchRequestWithExtraBody' + $ref: '#/components/schemas/_vector_stores_vector_store_id_Request' required: true - deprecated: false - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: - get: responses: '200': - description: >- - A VectorStoreFileBatchObject representing the file batch. + description: A VectorStoreObject representing the updated vector store. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: '#/components/schemas/VectorStoreObject' '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: - - VectorIO - summary: Retrieve a vector store file batch. - description: Retrieve a vector store file batch. parameters: - - name: batch_id - in: path - description: The ID of the file batch to retrieve. - required: true - schema: - type: string - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file batch. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: - post: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + delete: + tags: + - Vector Io + summary: Openai Delete Vector Store + description: Delete a vector store. + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete responses: '200': - description: >- - A VectorStoreFileBatchObject representing the cancelled file batch. + description: A VectorStoreDeleteResponse indicating the deletion status. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: '#/components/schemas/VectorStoreDeleteResponse' '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: - - VectorIO - summary: Cancels a vector store file batch. - description: Cancels a vector store file batch. parameters: - - name: batch_id - in: path - description: The ID of the file batch to cancel. - required: true - schema: - type: string - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file batch. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: + - 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}: get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store File + description: Retrieves a vector store file. + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get responses: '200': - description: >- - A VectorStoreFilesListInBatchResponse containing the list of files in - the batch. + description: A VectorStoreFileObject representing the file. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' + $ref: '#/components/schemas/VectorStoreFileObject' '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: - - VectorIO - summary: >- - Returns a list of vector store files in a batch. - description: >- - Returns a list of vector store files in a batch. parameters: - - name: batch_id - in: path - description: >- - The ID of the file batch to list files from. - required: true - schema: - type: string - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file batch. - required: true - schema: - type: string - - name: after - in: query - description: >- - A cursor for use in pagination. `after` is an object ID that defines your - place in the list. - required: false - schema: - type: string - - name: before - in: query - description: >- - A cursor for use in pagination. `before` is an object ID that defines - your place in the list. - required: false - schema: - type: string - - name: filter - in: query - description: >- - Filter by file status. One of in_progress, completed, failed, cancelled. - required: false - schema: - type: string - - name: limit - in: query - description: >- - A limit on the number of objects to be returned. Limit can range between - 1 and 100, and the default is 20. - required: false - schema: - type: integer - - name: order - in: query - description: >- - Sort order by the `created_at` timestamp of the objects. `asc` for ascending - order and `desc` for descending order. - required: false - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/files: - get: + - 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' + post: + tags: + - Vector Io + summary: Openai Update Vector Store File + description: Updates a vector store file. + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_files_file_id_Request' + required: true responses: '200': - description: >- - A VectorStoreListFilesResponse containing the list of files. + description: A VectorStoreFileObject representing the updated file. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreListFilesResponse' + $ref: '#/components/schemas/VectorStoreFileObject' '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: 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' + delete: tags: - - VectorIO - summary: List files in a vector store. - description: List files in a vector store. + - Vector Io + summary: Openai Delete Vector Store File + description: Delete a vector store file. + operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete + responses: + '200': + description: A VectorStoreFileDeleteResponse indicating the deletion status. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileDeleteResponse' + '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 - description: >- - The ID of the vector store to list files from. - required: true - schema: - type: string - - name: limit - in: query - description: >- - (Optional) A limit on the number of objects to be returned. Limit can - range between 1 and 100, and the default is 20. - required: false - schema: - type: integer - - name: order - in: query - description: >- - (Optional) Sort order by the `created_at` timestamp of the objects. `asc` - for ascending order and `desc` for descending order. - required: false - schema: - type: string - - name: after - in: query - description: >- - (Optional) A cursor for use in pagination. `after` is an object ID that - defines your place in the list. - required: false - schema: - type: string - - name: before - in: query - description: >- - (Optional) A cursor for use in pagination. `before` is an object ID that - defines your place in the list. - required: false - schema: - type: string - - name: filter - in: query - description: >- - (Optional) Filter by file status to only return files with the specified - status. - required: false - schema: - $ref: '#/components/schemas/VectorStoreFileStatus' - deprecated: false - post: + - 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}/file_batches/{batch_id}/files: + get: + tags: + - Vector Io + summary: Openai List Files In Vector Store File Batch + description: Returns a list of vector store files in a batch. + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: filter + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Filter + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order + - 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' responses: '200': - description: >- - A VectorStoreFileObject representing the attached file. + description: A VectorStoreFilesListInBatchResponse containing the list of files in the batch. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' '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: - - VectorIO - summary: Attach a file to a vector store. - description: Attach a file to a vector store. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store to attach the file to. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenaiAttachFileToVectorStoreRequest' - required: true - deprecated: false - /v1/vector_stores/{vector_store_id}/files/{file_id}: + description: Default Response + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store File Batch + description: Retrieve a vector store file batch. + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get responses: '200': - description: >- - A VectorStoreFileObject representing the file. + description: A VectorStoreFileBatchObject representing the file batch. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '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: - - VectorIO - summary: Retrieves a vector store file. - description: Retrieves a vector store file. parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to retrieve. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to retrieve. - required: true - schema: - type: string - deprecated: false - post: + - 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}/files/{file_id}/content: + get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store File Contents + description: Retrieves the contents of a vector store file. + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get responses: '200': - description: >- - A VectorStoreFileObject representing the updated file. + description: A list of InterleavedContent representing the file contents. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $ref: '#/components/schemas/VectorStoreFileContentsResponse' '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: - - VectorIO - summary: Updates a vector store file. - description: Updates a vector store file. parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to update. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to update. - required: true - schema: - type: string + - 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}/search: + post: + tags: + - Vector Io + summary: Openai Search Vector Store + description: |- + Search for chunks in a vector store. + + Searches a vector store for relevant chunks based on a query and optional file attribute filters. + operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenaiUpdateVectorStoreFileRequest' + $ref: '#/components/schemas/_vector_stores_vector_store_id_search_Request' required: true - deprecated: false - delete: responses: '200': - description: >- - A VectorStoreFileDeleteResponse indicating the deletion status. + description: A VectorStoreSearchResponse containing the search results. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileDeleteResponse' + $ref: '#/components/schemas/VectorStoreSearchResponsePage' '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: - - VectorIO - summary: Delete a vector store file. - description: Delete a vector store file. parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to delete. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to delete. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/files/{file_id}/content: - get: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector-io/query: + post: + tags: + - Vector Io + summary: Query Chunks + description: Query chunks from a vector database. + 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: >- - File contents, optionally with embeddings and metadata based on query - parameters. + description: A QueryChunksResponse. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileContentResponse' + $ref: '#/components/schemas/QueryChunksResponse' '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/models/{model_id}: + get: tags: - - VectorIO - summary: >- - Retrieves the contents of a vector store file. - description: >- - Retrieves the contents of a vector store file. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to retrieve. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to retrieve. - required: true - schema: - type: string - - name: include_embeddings - in: query - description: >- - Whether to include embedding vectors in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - - name: include_metadata - in: query - description: >- - Whether to include chunk metadata in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - deprecated: false - /v1/vector_stores/{vector_store_id}/search: - post: + - Models + summary: Get Model + description: |- + Get model. + + Get a model by its identifier. + operationId: get_model_v1_models__model_id__get responses: '200': - description: >- - A VectorStoreSearchResponse containing the search results. + description: A Model. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreSearchResponsePage' + $ref: '#/components/schemas/Model' '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: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' + delete: tags: - - VectorIO - summary: Search for chunks in a vector store. - description: >- - Search for chunks in a vector store. + - Models + summary: Unregister Model + description: |- + Unregister model. - Searches a vector store for relevant chunks based on a query and optional - file attribute filters. - parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to search. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenaiSearchVectorStoreRequest' - required: true - deprecated: false - /v1/version: - get: + Unregister a model. + operationId: unregister_model_v1_models__model_id__delete responses: '200': - description: >- - Version information containing the service version number. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VersionInfo' + schema: {} '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: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' + /v1/models: + get: tags: - - Inspect - summary: Get version. - description: >- - Get version. - - Get the version of the service. - parameters: [] - deprecated: false - /v1beta/datasetio/append-rows/{dataset_id}: - post: + - Models + summary: Openai List Models + description: List models using the OpenAI API. + operationId: openai_list_models_v1_models_get responses: '200': - description: OK + description: A OpenAIListModelsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIListModelsResponse' '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' + post: tags: - - DatasetIO - summary: Append rows to a dataset. - description: Append rows to a dataset. - parameters: - - name: dataset_id - in: path - description: >- - The ID of the dataset to append the rows to. - required: true - schema: - type: string + - Models + summary: Register Model + description: |- + Register model. + + Register a model. + operationId: register_model_v1_models_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/AppendRowsRequest' + $ref: '#/components/schemas/_models_Request' required: true - deprecated: false - /v1beta/datasetio/iterrows/{dataset_id}: - get: responses: '200': - description: A PaginatedResponse. + description: A Model. content: application/json: schema: - $ref: '#/components/schemas/PaginatedResponse' + $ref: '#/components/schemas/Model' '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/moderations: + post: 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. + - Safety + summary: Run Moderation + description: |- + Create moderation. - - has_more: Whether there are more items available after this set. - parameters: - - name: dataset_id - in: path - description: >- - The ID of the dataset to get the rows from. - required: true - schema: - type: string - - name: start_index - in: query - description: >- - Index into dataset for the first row to get. Get all rows if None. - required: false - schema: - type: integer - - name: limit - in: query - description: The number of rows to get. - required: false - schema: - type: integer - deprecated: false - /v1beta/datasets: - get: + Classifies if text and/or image inputs are potentially harmful. + operationId: run_moderation_v1_moderations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_moderations_Request' + required: true responses: '200': - description: A ListDatasetsResponse. + description: A moderation object. content: application/json: schema: - $ref: '#/components/schemas/ListDatasetsResponse' + $ref: '#/components/schemas/ModerationObject' '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. - parameters: [] - deprecated: false + /v1/safety/run-shield: 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. - parameters: [] + - Safety + summary: Run Shield + description: |- + Run shield. + + Run a shield. + operationId: run_shield_v1_safety_run_shield_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/RegisterDatasetRequest' + $ref: '#/components/schemas/_safety_run_shield_Request' required: true - deprecated: true - /v1beta/datasets/{dataset_id}: - get: responses: '200': - description: A Dataset. + description: A RunShieldResponse. 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: Get a dataset by its ID. - description: Get a dataset by its ID. - parameters: - - name: dataset_id - in: path - description: The ID of the dataset to get. - required: true - schema: - type: string - deprecated: false - delete: - responses: - '200': - description: OK + $ref: '#/components/schemas/RunShieldResponse' '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: Unregister a dataset by its ID. - description: Unregister a dataset by its ID. - parameters: - - name: dataset_id - in: path - description: The ID of the dataset to unregister. - required: true - schema: - type: string - deprecated: true - /v1alpha/eval/benchmarks: + /v1/shields/{identifier}: get: + tags: + - Shields + summary: Get Shield + description: Get a shield by its identifier. + operationId: get_shield_v1_shields__identifier__get responses: '200': - description: A ListBenchmarksResponse. + description: A Shield. content: application/json: schema: - $ref: '#/components/schemas/ListBenchmarksResponse' + $ref: '#/components/schemas/Shield' '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: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + delete: tags: - - Benchmarks - summary: List all benchmarks. - description: List all benchmarks. - parameters: [] - deprecated: false - post: + - Shields + summary: Unregister Shield + description: Unregister a shield. + operationId: unregister_shield_v1_shields__identifier__delete responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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: - - Benchmarks - summary: Register a benchmark. - description: Register a benchmark. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterBenchmarkRequest' + parameters: + - name: identifier + in: path required: true - deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}: + schema: + type: string + description: 'Path parameter: identifier' + /v1/shields: get: + tags: + - Shields + summary: List Shields + description: List all shields. + operationId: list_shields_v1_shields_get responses: '200': - description: A Benchmark. + description: >- + File contents, optionally with embeddings and metadata based on query + parameters. content: application/json: schema: - $ref: '#/components/schemas/Benchmark' + $ref: '#/components/schemas/VectorStoreFileContentResponse' '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' +<<<<<<< HEAD tags: - - Benchmarks - summary: Get a benchmark by its ID. - description: Get a benchmark by its ID. - parameters: - - name: benchmark_id + - VectorIO + summary: >- + Retrieves the contents of a vector store file. + description: >- + Retrieves the contents of a vector store file. + parameters: + - name: vector_store_id in: path - description: The ID of the benchmark to get. + description: >- + The ID of the vector store containing the file to retrieve. required: true schema: type: string - 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. - parameters: - - name: benchmark_id + - name: file_id in: path - description: The ID of the benchmark to unregister. + description: The ID of the file to retrieve. required: true schema: type: string - deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + - name: include_embeddings + in: query + description: >- + Whether to include embedding vectors in the response. + required: false + schema: + $ref: '#/components/schemas/bool' + - name: include_metadata + in: query + description: >- + Whether to include chunk metadata in the response. + required: false + schema: + $ref: '#/components/schemas/bool' + deprecated: false + /v1/vector_stores/{vector_store_id}/search: +======= +>>>>>>> a84647350 (chore: use Pydantic to generate OpenAPI schema) post: + tags: + - Shields + summary: Register Shield + description: Register a shield. + operationId: register_shield_v1_shields_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_shields_Request' + required: true responses: '200': - description: >- - EvaluateResponse object containing generations and scores. + description: A Shield. content: application/json: schema: - $ref: '#/components/schemas/EvaluateResponse' + $ref: '#/components/schemas/Shield' '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' + /v1beta/datasetio/append-rows/{dataset_id}: + post: tags: - - Eval - summary: Evaluate a list of rows on a benchmark. - description: Evaluate a list of rows on a benchmark. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string + - Datasetio + summary: Append Rows + description: Append rows to a dataset. + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post requestBody: content: application/json: schema: - $ref: '#/components/schemas/EvaluateRowsRequest' + items: + additionalProperties: true + type: object + type: array + title: Rows required: true - deprecated: false - /v1alpha/eval/benchmarks/{benchmark_id}/jobs: - post: responses: '200': - description: >- - The job that was created to run the evaluation. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Job' + schema: {} '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: Run an evaluation on a benchmark. - description: Run an evaluation on a benchmark. parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunEvalRequest' + - name: dataset_id + in: path required: true - deprecated: false - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasetio/iterrows/{dataset_id}: get: + tags: + - Datasetio + summary: Iterrows + 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. + operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get + parameters: + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Limit + - name: start_index + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Start Index + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' responses: '200': - description: The status of the evaluation job. + description: A PaginatedResponse. content: application/json: schema: - $ref: '#/components/schemas/Job' + $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' + description: Default Response + /v1beta/datasets/{dataset_id}: + get: tags: - - Eval - summary: Get the status of a job. - description: Get the status of a job. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to get the status of. - required: true - schema: - type: string - deprecated: false - delete: + - Datasets + summary: Get Dataset + description: Get a dataset by its ID. + operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': - description: OK + description: A Dataset. + content: + application/json: + schema: + $ref: '#/components/schemas/Dataset' '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: Cancel a job. - description: Cancel a job. parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to cancel. - required: true - schema: - type: string - deprecated: false - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: - get: + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + delete: + tags: + - Datasets + summary: Unregister Dataset + description: Unregister a dataset by its ID. + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete responses: '200': - description: The result of the job. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' + schema: {} '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: Get the result of a job. - description: Get the result of a job. parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to get the result of. - required: true - schema: - type: string - deprecated: false - /v1alpha/inference/rerank: - post: + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasets: + get: + tags: + - Datasets + summary: List Datasets + description: List all datasets. + operationId: list_datasets_v1beta_datasets_get responses: '200': - description: >- - RerankResponse with indices sorted by relevance score (descending). + description: A ListDatasetsResponse. content: application/json: schema: - $ref: '#/components/schemas/RerankResponse' + $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' + post: 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. - parameters: [] + - Datasets + summary: Register Dataset + description: Register a new dataset. + operationId: register_dataset_v1beta_datasets_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/RerankRequest' + $ref: '#/components/schemas/_datasets_Request' required: true - deprecated: false - /v1alpha/post-training/job/artifacts: + deprecated: true + /v1beta/datasets/{dataset_id}: get: responses: '200': - description: A PostTrainingJobArtifactsResponse. + description: A Dataset. content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + $ref: '#/components/schemas/Dataset' '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 the artifacts of a training job. - description: Get the artifacts of a training job. - parameters: - - name: job_uuid - in: query - description: >- - The UUID of the job to get the artifacts of. - required: true - schema: - type: string - deprecated: false - /v1alpha/post-training/job/cancel: + /v1/scoring/score: post: + tags: + - Scoring + summary: Score + description: Score a list of rows. + operationId: score_v1_scoring_score_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_scoring_score_Request' + required: true responses: '200': - description: OK + 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': - $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: Cancel a training job. - description: Cancel a training job. - parameters: [] + /v1/scoring/score-batch: + post: + tags: + - Scoring + summary: Score Batch + description: Score a batch of rows. + operationId: score_batch_v1_scoring_score_batch_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/CancelTrainingJobRequest' + $ref: '#/components/schemas/_scoring_score_batch_Request' required: true - deprecated: false - /v1alpha/post-training/job/status: + 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/scoring-functions/{scoring_fn_id}: get: + tags: + - Scoring Functions + summary: Get Scoring Function + description: Get a scoring function by its ID. + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': - description: A PostTrainingJobStatusResponse. + description: A ScoringFn. content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJobStatusResponse' + $ref: '#/components/schemas/ScoringFn' '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: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' + delete: tags: - - PostTraining (Coming Soon) - summary: Get the status of a training job. - description: Get the status of a training job. + - Scoring Functions + summary: Unregister Scoring Function + description: Unregister a scoring function. + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: job_uuid - in: query - description: >- - The UUID of the job to get the status of. - required: true - schema: - type: string - deprecated: false - /v1alpha/post-training/jobs: + - name: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' + /v1/scoring-functions: get: + tags: + - Scoring Functions + summary: List Scoring Functions + description: List all scoring functions. + operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': - description: A ListPostTrainingJobsResponse. + description: A ListScoringFunctionsResponse. content: application/json: schema: - $ref: '#/components/schemas/ListPostTrainingJobsResponse' + $ref: '#/components/schemas/ListScoringFunctionsResponse' '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 all training jobs. - description: Get all training jobs. - parameters: [] - deprecated: false - /v1alpha/post-training/preference-optimize: + description: Default Response post: + tags: + - Scoring Functions + summary: Register Scoring Function + description: Register a scoring function. + operationId: register_scoring_function_v1_scoring_functions_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' responses: '200': - description: A PostTrainingJob. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' + 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' + description: Default Response + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + post: tags: - - PostTraining (Coming Soon) - summary: Run preference optimization of a model. - description: Run preference optimization of a model. - parameters: [] + - Eval + summary: Evaluate Rows + description: Evaluate a list of rows on a benchmark. + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/PreferenceOptimizeRequest' + $ref: '#/components/schemas/_eval_benchmarks_benchmark_id_evaluations_Request' required: true - deprecated: false - /v1alpha/post-training/supervised-fine-tune: - post: responses: '200': - description: A PostTrainingJob. + description: EvaluateResponse object containing generations and scores. content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJob' + $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' + parameters: + - name: dataset_id + in: path + description: The ID of the dataset to unregister. + required: true + schema: + type: string + deprecated: true + /v1alpha/eval/benchmarks: + get: tags: - - PostTraining (Coming Soon) - summary: Run supervised fine-tuning of a model. - description: Run supervised fine-tuning of a model. - parameters: [] + - Benchmarks + summary: List Benchmarks + description: List all benchmarks. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get + responses: + '200': + description: A ListBenchmarksResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListBenchmarksResponse' + '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: + - Benchmarks + summary: Register Benchmark + description: Register a benchmark. + operationId: register_benchmark_v1alpha_eval_benchmarks_post requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/SupervisedFineTuneRequest' + $ref: '#/components/schemas/RegisterBenchmarkRequest' required: true + deprecated: true + /v1alpha/eval/benchmarks/{benchmark_id}: + get: + 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: + - Benchmarks + summary: Get a benchmark by its ID. + description: Get a benchmark by its ID. + parameters: + - name: benchmark_id + in: path + description: The ID of the benchmark to get. + required: true + schema: + type: string deprecated: false -jsonSchemaDialect: >- - https://json-schema.org/draft/2020-12/schema -components: - schemas: - Error: - type: object - properties: - status: - type: integer - description: HTTP status code - title: + 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. + parameters: + - name: benchmark_id + in: path + description: The ID of the benchmark to unregister. + required: true + schema: + type: string + deprecated: true + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + post: + tags: + - Post Training + summary: Cancel Training Job + description: Cancel a training job. + operationId: cancel_training_job_v1alpha_post_training_job_cancel_post + parameters: + - name: job_uuid + in: query + required: true + schema: type: string - description: >- - Error title, a short summary of the error which is invariant for an error - type - detail: + title: Job Uuid + 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 + /v1alpha/post-training/job/artifacts: + get: + tags: + - Post Training + summary: Get Training Job Artifacts + description: Get the artifacts of a training job. + operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get + parameters: + - name: job_uuid + in: query + required: true + schema: type: string - description: >- - Error detail, a longer human-readable description of the error - instance: + title: Job Uuid + responses: + '200': + description: A PostTrainingJobArtifactsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + '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 + /v1alpha/post-training/job/status: + get: + tags: + - Post Training + summary: Get Training Job Status + description: Get the status of a training job. + operationId: get_training_job_status_v1alpha_post_training_job_status_get + parameters: + - name: job_uuid + in: query + required: true + schema: type: string - description: >- - (Optional) A URL which can be used to retrieve more information about - the specific occurrence of the error - additionalProperties: false - required: - - status - - title - - detail - title: Error - description: >- - Error response from the API. Roughly follows RFC 7807. - ListBatchesResponse: - type: object - properties: + title: Job Uuid + responses: + '200': + description: A PostTrainingJobStatusResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobStatusResponse' + '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 + /v1alpha/post-training/jobs: + get: + tags: + - Post Training + summary: Get Training Jobs + description: Get all training jobs. + operationId: get_training_jobs_v1alpha_post_training_jobs_get + responses: + '200': + description: A ListPostTrainingJobsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPostTrainingJobsResponse' + '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' + /v1alpha/post-training/preference-optimize: + post: + tags: + - Post Training + summary: Preference Optimize + description: Run preference optimization of a model. + operationId: preference_optimize_v1alpha_post_training_preference_optimize_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_post_training_preference_optimize_Request' + required: true + responses: + '200': + description: A PostTrainingJob. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJob' + '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' + /v1alpha/post-training/supervised-fine-tune: + post: + tags: + - Post Training + summary: Supervised Fine Tune + description: Run supervised fine-tuning of a model. + operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_post_training_supervised_fine_tune_Request' + required: true + responses: + '200': + description: A PostTrainingJob. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJob' + '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/tools/{tool_name}: + get: + tags: + - Tool Groups + summary: Get Tool + description: Get a tool by its name. + operationId: get_tool_v1_tools__tool_name__get + responses: + '200': + description: A ToolDef. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDef' + '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: tool_name + in: path + required: true + schema: + type: string + description: 'Path parameter: tool_name' + /v1/toolgroups/{toolgroup_id}: + get: + tags: + - Tool Groups + summary: Get Tool Group + description: Get a tool group by its ID. + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get + responses: + '200': + description: A ToolGroup. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolGroup' + '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: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' + delete: + tags: + - Tool Groups + summary: Unregister Toolgroup + description: Unregister a tool group. + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' + /v1/toolgroups: + get: + tags: + - Tool Groups + summary: List Tool Groups + description: List tool groups with optional provider. + 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: + - Tool Groups + summary: Register Tool Group + description: Register a tool group. + operationId: register_tool_group_v1_toolgroups_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' + 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/tools: + get: + tags: + - Tool Groups + summary: List Tools + description: List tools with optional tool group. + operationId: list_tools_v1_tools_get + parameters: + - name: toolgroup_id + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + 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/tool-runtime/invoke: + post: + tags: + - Tool Runtime + summary: Invoke Tool + description: Run a tool with the given arguments. + 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: + - Tool Runtime + summary: List Runtime Tools + description: List all tools in the runtime. + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + parameters: + - name: tool_group_id + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Tool Group Id + requestBody: + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + title: Mcp Endpoint + 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/files/{file_id}: + get: + tags: + - Files + summary: Openai Retrieve File + description: |- + Retrieve file. + + Returns information about a specific file. + operationId: openai_retrieve_file_v1_files__file_id__get + responses: + '200': + description: An OpenAIFileObject containing file information. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileObject' + '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: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + delete: + tags: + - Files + summary: Openai Delete File + description: Delete file. + operationId: openai_delete_file_v1_files__file_id__delete + responses: + '200': + description: An OpenAIFileDeleteResponse indicating successful deletion. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileDeleteResponse' + '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: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + /v1/files: + get: + tags: + - Files + summary: Openai List Files + description: |- + List files. + + Returns a list of files that belong to the user's organization. + operationId: openai_list_files_v1_files_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 10000 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + - name: purpose + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/OpenAIFilePurpose' + - type: 'null' + title: Purpose + 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: + - Files + summary: Openai Upload File + description: |- + Upload file. + + Upload a file that can be used across various endpoints. + + The file upload should be a multipart form request with: + - file: The File object (not file name) to be uploaded. + - purpose: The intended purpose of the uploaded file. + - expires_after: Optional form values describing expiration for the file. + operationId: openai_upload_file_v1_files_post + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_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}/content: + get: + tags: + - Files + summary: Openai Retrieve File Content + description: |- + Retrieve file content. + + Returns the contents of the specified file. + operationId: openai_retrieve_file_content_v1_files__file_id__content_get + responses: + '200': + description: The raw file content as a binary response. + content: + application/json: + schema: {} + '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: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + /v1/prompts: + get: + tags: + - Prompts + summary: List Prompts + description: List all prompts. + 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: + - Prompts + summary: Create Prompt + description: |- + Create prompt. + + Create a new prompt. + 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: + - Prompts + summary: Delete Prompt + description: |- + Delete prompt. + + Delete a prompt. + operationId: delete_prompt_v1_prompts__prompt_id__delete + 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 + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + get: + tags: + - Prompts + summary: Get Prompt + description: |- + Get prompt. + + Get a prompt by its identifier and optional version. + operationId: get_prompt_v1_prompts__prompt_id__get + parameters: + - name: version + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Version + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + 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: + - Prompts + summary: Update Prompt + description: |- + Update prompt. + + Update an existing prompt (increments version). + 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: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/versions: + get: + tags: + - Prompts + summary: List Prompt Versions + description: |- + List prompt versions. + + List all versions of a specific prompt. + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get + responses: + '200': + description: A ListPromptsResponse containing all versions of the prompt. + 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' + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/set-default-version: + post: + tags: + - Prompts + summary: Set Default Version + description: |- + Set prompt version. + + Set which version of a prompt should be the default in get_prompt (latest). + 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/conversations/{conversation_id}/items: + post: + tags: + - Conversations + summary: Add Items + description: |- + Create items. + + Create items in the conversation. + 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' + get: + tags: + - Conversations + summary: List Items + description: |- + List items. + + List items in the conversation. + operationId: list_items_v1_conversations__conversation_id__items_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - enum: + - asc + - desc + type: string + - type: 'null' + title: Order + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + requestBody: + content: + application/json: + schema: + anyOf: + - type: array + items: + $ref: '#/components/schemas/ConversationItemInclude' + - type: 'null' + title: Include + 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 + /v1/conversations: + post: + tags: + - Conversations + summary: Create Conversation + description: |- + Create a conversation. + + Create a conversation. + 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}: + get: + tags: + - Conversations + summary: Get Conversation + description: |- + Retrieve a conversation. + + Get a conversation with the given ID. + operationId: get_conversation_v1_conversations__conversation_id__get + responses: + '200': + description: The 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' + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + post: + tags: + - Conversations + summary: Update Conversation + description: |- + Update a conversation. + + Update a conversation's metadata with the given ID. + operationId: update_conversation_v1_conversations__conversation_id__post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_conversations_conversation_id_Request' + required: true + responses: + '200': + description: The updated 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' + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + delete: + tags: + - Conversations + summary: Openai Delete Conversation + description: |- + Delete a conversation. + + Delete a conversation with the given ID. + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete + responses: + '200': + description: The deleted conversation resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationDeletedResource' + '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: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items/{item_id}: + get: + tags: + - Conversations + summary: Retrieve + description: |- + Retrieve an item. + + Retrieve a conversation item. + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get + responses: + '200': + description: The conversation item. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseMessage' + '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: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + - name: item_id + in: path + required: true + schema: + type: string + description: 'Path parameter: item_id' + delete: + tags: + - Conversations + summary: Openai Delete Conversation Item + description: |- + Delete an item. + + Delete a conversation item. + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete + responses: + '200': + description: The deleted item resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationItemDeletedResource' + '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: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + - name: item_id + in: path + required: true + schema: + type: string + description: 'Path parameter: item_id' +components: + schemas: + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: Types of aggregation functions for scoring results. + AllowedToolsFilter: + properties: + tool_names: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Tool Names + type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ArrayType: + properties: + type: + type: string + const: array + title: Type + default: array + type: object + title: ArrayType + description: Parameter type for array values. + 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. + 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: + anyOf: + - type: integer + - type: 'null' + title: Cancelled At + cancelling_at: + anyOf: + - type: integer + - type: 'null' + title: Cancelling At + completed_at: + anyOf: + - type: integer + - type: 'null' + title: Completed At + error_file_id: + anyOf: + - type: string + - type: 'null' + title: Error File Id + errors: + anyOf: + - $ref: '#/components/schemas/Errors' + - type: 'null' + expired_at: + anyOf: + - type: integer + - type: 'null' + title: Expired At + expires_at: + anyOf: + - type: integer + - type: 'null' + title: Expires At + failed_at: + anyOf: + - type: integer + - type: 'null' + title: Failed At + finalizing_at: + anyOf: + - type: integer + - type: 'null' + title: Finalizing At + in_progress_at: + anyOf: + - type: integer + - type: 'null' + title: In Progress At + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + model: + anyOf: + - type: string + - type: 'null' + title: Model + output_file_id: + anyOf: + - type: string + - type: 'null' + title: Output File Id + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + - type: 'null' + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + - type: 'null' + additionalProperties: true + type: object + required: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + BatchError: + properties: + code: + anyOf: + - type: string + - type: 'null' + title: Code + line: + anyOf: + - type: integer + - type: 'null' + title: Line + message: + anyOf: + - type: string + - type: 'null' + title: Message + param: + anyOf: + - type: string + - type: 'null' + title: Param + 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: + anyOf: + - type: string + - type: 'null' + title: Provider Resource Id + description: Unique identifier for this resource in the provider + 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. + BenchmarkConfig: + properties: + eval_candidate: + $ref: '#/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: + 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: object + required: + - eval_candidate + title: BenchmarkConfig + description: A benchmark configuration for evaluation. + Body_openai_upload_file_v1_files_post: + properties: + file: + type: string + format: binary + title: File + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + expires_after: + anyOf: + - $ref: '#/components/schemas/ExpiresAfter' + - type: 'null' + type: object + required: + - file + - purpose + title: Body_openai_upload_file_v1_files_post + Body_register_benchmark_v1alpha_eval_benchmarks_post: + properties: + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + type: object + required: + - scoring_functions + title: Body_register_benchmark_v1alpha_eval_benchmarks_post + Body_register_scoring_function_v1_scoring_functions_post: + properties: + return_type: + anyOf: + - $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' + title: Return Type + 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 + type: object + required: + - return_type + title: Body_register_scoring_function_v1_scoring_functions_post + Body_register_tool_group_v1_toolgroups_post: + properties: + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + type: object + title: Body_register_tool_group_v1_toolgroups_post + BooleanType: + properties: + type: + type: string + const: boolean + title: Type + default: boolean + type: object + title: BooleanType + description: Parameter type for boolean values. + 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. + Chunk-Input: + 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 + title: Content + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Embedding + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + 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: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Embedding + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + ChunkMetadata: + 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 + type: object + title: 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. + CompletionInputType: + properties: + type: + type: string + const: completion_input + title: Type + default: completion_input + type: object + title: CompletionInputType + description: Parameter type for 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: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + 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. + items: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + title: Items + description: Initial items to include in the conversation context. You may add up to 20 items at a time. + type: object + required: + - id + - created_at + title: Conversation + description: OpenAI-compatible conversation object. + ConversationDeletedResource: + properties: + id: + type: string + title: Id + description: The deleted conversation identifier + object: + type: string + title: Object + description: Object type + default: conversation.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object + required: + - id + title: ConversationDeletedResource + description: Response for deleted conversation. + ConversationItemDeletedResource: + properties: + id: + type: string + title: Id + description: The deleted item identifier + object: + type: string + title: Object + description: Object type + default: conversation.item.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object + required: + - id + title: ConversationItemDeletedResource + description: Response for deleted conversation item. + 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: + anyOf: + - type: string + - type: 'null' + title: First Id + description: The ID of the first item in the list + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + description: The ID of the last item in the list + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Validation Dataset Id + packed: + anyOf: + - type: boolean + - type: 'null' + title: Packed + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + title: Train On Input + default: false + type: object + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: Configuration for training data and data loading. + Dataset: + properties: + identifier: + type: string + 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 + 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. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + 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. + EfficiencyConfig: + properties: + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + title: Enable Activation Checkpointing + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + title: Enable Activation Offloading + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + title: Memory Efficient Fsdp Wrap + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + title: Fsdp Cpu Offload + default: false + type: object + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. + Errors: + properties: + data: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + title: Data + object: + anyOf: + - type: string + - type: 'null' + title: Object + 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. + ExpiresAfter: + properties: + anchor: + type: string + const: created_at + title: Anchor + seconds: + type: integer + maximum: 2592000.0 + minimum: 3600.0 + title: Seconds + type: object + required: + - anchor + - seconds + title: 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) + 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. + HealthInfo: + properties: + status: + $ref: '#/components/schemas/HealthStatus' + type: object + required: + - status + title: HealthInfo + description: Health status information for 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 + 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 + 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. + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. + JsonType: + properties: + type: + type: string + const: json + title: Type + default: json + type: object + title: JsonType + description: Parameter type for JSON values. + LLMAsJudgeScoringFnParams: + properties: + type: + type: string + const: llm_as_judge + title: Type + default: llm_as_judge + judge_model: + type: string + title: Judge Model + prompt_template: + anyOf: + - type: string + - type: 'null' + title: Prompt Template + 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. + 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. + 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. + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + 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. + LoraFinetuningConfig: + properties: + type: + type: string + const: LoRA + title: Type + default: LoRA + lora_attn_modules: + items: + type: string + type: array + title: Lora Attn Modules + apply_lora_to_mlp: + type: boolean + title: Apply Lora To Mlp + apply_lora_to_output: + type: boolean + title: Apply Lora To Output + rank: + type: integer + title: Rank + alpha: + type: integer + title: Alpha + use_dora: + anyOf: + - type: boolean + - type: 'null' + title: Use Dora + default: false + quantize_base: + anyOf: + - type: boolean + - type: 'null' + title: Quantize Base + default: false + type: object + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + Model: + properties: + identifier: + type: string + 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 + 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. + ModelCandidate: + properties: + type: + type: string + const: model + title: Type + default: model + model: + type: string + title: Model + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + - type: 'null' + type: object + required: + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + ModelType: + type: string + enum: + - llm + - embedding + - rerank + title: ModelType + description: Enumeration of supported model types in Llama Stack. + 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. + ModerationObjectResults: + properties: + flagged: + type: boolean + title: Flagged + categories: + anyOf: + - additionalProperties: + type: boolean + type: object + - type: 'null' + title: Categories + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + title: Category Applied Input Types + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + title: Category Scores + user_message: + anyOf: + - type: string + - type: 'null' + title: User Message + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - flagged + title: ModerationObjectResults + description: A moderation object. + NumberType: + properties: + type: + type: string + const: number + title: Type + default: number + type: object + title: NumberType + description: Parameter type for numeric values. + ObjectType: + properties: + type: + type: string + const: object + title: Type + default: object + type: object + title: ObjectType + description: Parameter type for object values. + OpenAIAssistantMessageParam-Input: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + type: object + required: + - id + - choices + - created + - model + title: OpenAIChatCompletion + description: Response from an OpenAI-compatible chat completion request. + 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. + 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. + 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: + anyOf: + - type: number + - type: 'null' + title: Frequency Penalty + 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 + type: object + - type: 'null' + title: Logit Bias + logprobs: + anyOf: + - type: boolean + - type: 'null' + title: Logprobs + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Completion Tokens + max_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + n: + anyOf: + - type: integer + - type: 'null' + title: N + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + title: Parallel Tool Calls + presence_penalty: + anyOf: + - type: number + - type: 'null' + title: Presence Penalty + 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 + seed: + anyOf: + - type: integer + - type: 'null' + title: Seed + stop: + anyOf: + - type: string + - items: + type: string + type: array + - type: 'null' + title: Stop + stream: + anyOf: + - type: boolean + - type: 'null' + title: Stream + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Stream Options + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + 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 + top_logprobs: + anyOf: + - type: integer + - type: 'null' + title: Top Logprobs + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + user: + anyOf: + - type: string + - type: 'null' + title: User + additionalProperties: true + type: object + required: + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible chat completion endpoint. + OpenAIChatCompletionToolCall: + properties: + index: + anyOf: + - type: integer + - type: 'null' + title: Index + id: + anyOf: + - type: string + - type: 'null' + title: Id + type: + type: string + const: function + title: Type + default: function + function: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + - type: 'null' + type: object + title: OpenAIChatCompletionToolCall + description: Tool call specification for OpenAI-compatible chat completion responses. + OpenAIChatCompletionToolCallFunction: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + arguments: + anyOf: + - type: string + - type: 'null' + title: Arguments + type: object + title: OpenAIChatCompletionToolCallFunction + description: Function call details for OpenAI-compatible tool calls. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + - type: 'null' + completion_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + - type: 'null' + type: object + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage + description: Usage information for OpenAI chat completion. + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + title: Reasoning Tokens + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + title: Cached Tokens + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + - type: 'null' + type: object + required: + - message + - finish_reason + - index + title: OpenAIChoice + description: A choice from an OpenAI-compatible chat completion response. + OpenAIChoiceLogprobs-Output: + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + type: object + title: OpenAIChoiceLogprobs + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + 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. + + :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" + OpenAICompletionChoice-Output: + properties: + finish_reason: + type: string + title: Finish Reason + text: + type: string + title: Text + index: + type: integer + title: Index + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + - type: 'null' + type: object + required: + - finish_reason + - text + - index + title: 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 + 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: + anyOf: + - type: integer + - type: 'null' + title: Best Of + echo: + anyOf: + - type: boolean + - type: 'null' + title: Echo + frequency_penalty: + anyOf: + - type: number + - type: 'null' + title: Frequency Penalty + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + title: Logit Bias + logprobs: + anyOf: + - type: boolean + - type: 'null' + title: Logprobs + max_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + n: + anyOf: + - type: integer + - type: 'null' + title: N + presence_penalty: + anyOf: + - type: number + - type: 'null' + title: Presence Penalty + seed: + anyOf: + - type: integer + - type: 'null' + title: Seed + stop: + anyOf: + - type: string + - items: + type: string + type: array + - type: 'null' + title: Stop + stream: + anyOf: + - type: boolean + - type: 'null' + title: Stream + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Stream Options + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + user: + anyOf: + - type: string + - type: 'null' + title: User + suffix: + anyOf: + - type: string + - type: 'null' + title: Suffix + additionalProperties: true + type: object + required: + - model + - prompt + title: OpenAICompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible completion endpoint. + OpenAICompletionWithInputMessages: + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + input_messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + 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' + type: array + title: Input Messages + type: object + required: + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + properties: + file_ids: + items: + type: string + type: array + title: File Ids + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Attributes + 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 + additionalProperties: true + type: object + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + description: Request to create a vector store file batch with extra_body support. + OpenAICreateVectorStoreRequestWithExtraBody: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + file_ids: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: File Ids + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + 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 + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + additionalProperties: true + type: object + title: OpenAICreateVectorStoreRequestWithExtraBody + description: Request to create a vector store with extra_body support. + OpenAIDeleteResponseObject: + properties: + id: + type: string + title: Id + object: + type: string + const: response + title: Object + default: response + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: OpenAIDeleteResponseObject + description: Response object confirming deletion of an OpenAI response. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAIDeveloperMessageParam + description: A message from the developer in an OpenAI-compatible chat completion request. + 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. + 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. + OpenAIEmbeddingsRequestWithExtraBody: + properties: + model: + type: string + title: Model + input: + anyOf: + - type: string + - items: + type: string + type: array + title: Input + encoding_format: + anyOf: + - type: string + - type: 'null' + title: Encoding Format + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' + title: Dimensions + user: + anyOf: + - type: string + - type: 'null' + title: User + additionalProperties: true + type: object + required: + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody + description: Request parameters for OpenAI-compatible embeddings endpoint. + 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. + OpenAIFile: + properties: + type: + type: string + const: file + title: Type + default: file + file: + $ref: '#/components/schemas/OpenAIFileFile' + type: object + required: + - file + title: OpenAIFile + OpenAIFileDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + const: file + title: Object + default: file + deleted: + type: boolean + title: Deleted + type: object + required: + - id + - deleted + title: OpenAIFileDeleteResponse + description: Response for deleting a file in OpenAI Files API. + 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 + 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. + OpenAIFilePurpose: + type: string + enum: + - assistants + - batch + title: OpenAIFilePurpose + description: Valid purpose values for OpenAI Files API. + OpenAIImageURL: + properties: + url: + type: string + title: Url + detail: + anyOf: + - type: string + - type: 'null' + title: Detail + type: object + required: + - url + title: OpenAIImageURL + description: Image URL specification for OpenAI-compatible chat completion messages. + OpenAIJSONSchema: + properties: + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + strict: + anyOf: + - type: boolean + - type: 'null' + title: Strict + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Schema + type: object + title: OpenAIJSONSchema + description: JSON schema specification for OpenAI-compatible structured response format. + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + type: array + title: Data + type: object + required: + - data + title: OpenAIListModelsResponse + OpenAIModel: + properties: + id: + type: string + title: Id + object: + type: string + const: model + title: Object + default: model + created: + type: integer + title: Created + owned_by: + type: string + title: Owned By + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Custom Metadata + type: object + required: + - id + - created + - owned_by + title: OpenAIModel + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata + 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. + 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. + 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. + 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. + 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. + 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. + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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: + anyOf: + - type: string + - type: 'null' + title: File Data + file_id: + anyOf: + - type: string + - type: 'null' + title: File Id + file_url: + anyOf: + - type: string + - type: 'null' + title: File Url + filename: + anyOf: + - type: string + - type: 'null' + title: Filename + type: object + title: OpenAIResponseInputMessageContentFile + description: File content for input messages in OpenAI response format. + 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: + anyOf: + - type: string + - type: 'null' + title: File Id + image_url: + anyOf: + - type: string + - type: 'null' + title: Image Url + type: object + title: OpenAIResponseInputMessageContentImage + description: Image content for input messages in OpenAI response format. + 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. + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + max_num_results: + anyOf: + - type: integer + maximum: 50.0 + minimum: 1.0 + - type: 'null' + title: Max Num Results + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + - type: 'null' + type: object + required: + - vector_store_ids + title: OpenAIResponseInputToolFileSearch + description: File search tool configuration for OpenAI response inputs. + OpenAIResponseInputToolFunction: + properties: + type: + type: string + const: function + title: Type + default: function + name: + type: string + title: Name + 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 + type: object + required: + - name + - parameters + title: OpenAIResponseInputToolFunction + description: Function tool configuration for OpenAI response inputs. + OpenAIResponseInputToolWebSearch: + properties: + type: + anyOf: + - type: string + const: web_search + - type: string + const: web_search_preview + - type: string + const: web_search_preview_2025_03_11 + - type: string + const: web_search_2025_08_26 + title: Type + default: web_search + search_context_size: + anyOf: + - type: string + pattern: ^low|medium|high$ + - type: 'null' + title: Search Context Size + default: medium + type: object + title: OpenAIResponseInputToolWebSearch + description: Web search tool configuration for OpenAI response inputs. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + reason: + anyOf: + - type: string + - type: 'null' + title: Reason + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + tools: + anyOf: + - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' + title: Tools + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + type: object + required: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject + description: Complete OpenAI response object containing generation results and metadata. + 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: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array + - type: 'null' + title: Results + type: object + required: + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall + description: File search tool call output message for OpenAI responses. + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + type: object + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + description: Function tool call output message for OpenAI responses. + 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: + anyOf: + - type: string + - type: 'null' + title: Error + output: + anyOf: + - type: string + - type: 'null' + title: Output + type: object + required: + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + description: Model Context Protocol (MCP) call output message for OpenAI responses. + 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. + 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. + OpenAIResponsePrompt: + properties: + id: + 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 + version: + anyOf: + - type: string + - type: 'null' + title: Version + type: object + required: + - id + title: OpenAIResponsePrompt + description: OpenAI compatible Prompt object that is used in OpenAI responses. + OpenAIResponseText: + properties: + format: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + - type: 'null' + type: object + title: OpenAIResponseText + description: Text response configuration for OpenAI responses. + OpenAIResponseTextFormat: + properties: + type: + anyOf: + - type: string + const: text + - type: string + const: json_schema + - type: string + const: json_object + 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 + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + 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' + - type: 'null' + title: Allowed Tools + type: object + required: + - server_label + title: OpenAIResponseToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + - type: 'null' + output_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + - type: 'null' + type: object + required: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage + description: Usage information for OpenAI response. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + title: Cached Tokens + type: object + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + title: Reasoning Tokens + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAISystemMessageParam + description: A system message providing instructions or context to the model. + OpenAITokenLogProb: + properties: + token: + type: string + title: Token + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Bytes + 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. + + :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 + 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. + OpenAITopLogProb: + properties: + token: + type: string + title: Token + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Bytes + 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. + + :token: The token + :bytes: (Optional) The bytes for the token + :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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + 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. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: Available optimizer algorithms for training. + Order: + type: string + enum: + - asc + - desc + title: Order + description: Sort order for paginated responses. + 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: + anyOf: + - type: string + - type: 'null' + title: Prompt + description: The system prompt with variable placeholders + 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. + 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. + QATFinetuningConfig: + properties: + type: + type: string + const: QAT + title: Type + default: QAT + quantizer_name: + type: string + title: Quantizer Name + group_size: + type: integer + title: Group Size + type: object + required: + - quantizer_name + - group_size + title: QATFinetuningConfig + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. + 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. + 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. + 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. + RerankResponse: + properties: + data: + items: + $ref: '#/components/schemas/RerankData' + type: array + title: Data + type: object + required: + - data + title: RerankResponse + description: Response from a reranking request. + 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. + RunShieldResponse: + properties: + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + - type: 'null' + type: object + title: RunShieldResponse + description: Response from running a safety shield. + SafetyViolation: + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + anyOf: + - type: string + - type: 'null' + title: User Message + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - violation_level + title: SafetyViolation + description: Details of a safety violation detected by content moderation. + 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: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + repetition_penalty: + anyOf: + - type: number + - type: 'null' + title: Repetition Penalty + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Stop + type: object + title: SamplingParams + description: Sampling parameters. + ScoreBatchResponse: + properties: + dataset_id: + anyOf: + - type: string + - type: 'null' + title: Dataset Id + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreBatchResponse + description: Response from batch scoring operations on datasets. + ScoreResponse: + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreResponse + description: The response from scoring. + ScoringFn: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - type: string + - type: 'null' + title: Description + 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' + title: Return Type + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + 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: + 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 + type: object + required: + - identifier + - provider_id + - return_type + title: ScoringFn + description: A scoring function resource for evaluating model outputs. + 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. + SearchRankingOptions: + properties: + ranker: + anyOf: + - type: string + - type: 'null' + title: Ranker + score_threshold: + anyOf: + - type: number + - type: 'null' + title: Score Threshold + default: 0.0 + type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + Shield: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - identifier + - provider_id + title: Shield + description: A safety shield resource that can be used to check content. + StringType: + properties: + type: + type: string + const: string + title: Type + default: string + type: object + title: StringType + description: Parameter type for string values. + 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. + 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 + ToolDef: + properties: + toolgroup_id: + anyOf: + - type: string + - type: 'null' + title: Toolgroup Id + name: + type: string + title: Name + 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 + type: object + required: + - name + title: ToolDef + description: Tool definition used in runtime contexts. + ToolGroup: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + type: object + required: + - identifier + - provider_id + title: ToolGroup + description: A group of related tools managed together. + 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 + - type: 'null' + title: Content + error_message: + anyOf: + - type: string + - type: 'null' + title: Error Message + error_code: + anyOf: + - type: integer + - type: 'null' + title: Error Code + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + type: object + title: ToolInvocationResult + description: Result of a tool invocation. + 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. + TopPSamplingStrategy: + properties: + type: + type: string + const: top_p + title: Type + default: top_p + temperature: + anyOf: + - type: number + minimum: 0.0 + - type: 'null' + title: Temperature + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + default: 0.95 + type: object + required: + - temperature + title: TopPSamplingStrategy + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. + 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: + anyOf: + - type: integer + - type: 'null' + title: Max Validation Steps + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + - type: 'null' + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + - type: 'null' + efficiency_config: + anyOf: + - $ref: '#/components/schemas/EfficiencyConfig' + - type: 'null' + dtype: + anyOf: + - type: string + - type: 'null' + title: Dtype + default: bf16 + type: object + required: + - n_epochs + title: TrainingConfig + description: Comprehensive configuration for the training process. + 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. + URL: + properties: + uri: + type: string + title: Uri + type: object + required: + - uri + title: URL + description: A URL reference to external content. + UnionType: + properties: + type: + type: string + const: union + title: Type + default: union + type: object + title: UnionType + description: Parameter type for union values. + VectorStoreChunkingStrategyAuto: + properties: + type: + type: string + const: auto + title: Type + default: auto + type: object + title: VectorStoreChunkingStrategyAuto + description: Automatic chunking strategy for vector store files. + 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. + 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. + 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. + VectorStoreDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.deleted + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: VectorStoreDeleteResponse + description: Response from deleting a vector store. + 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. + VectorStoreFileContentsResponse: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + attributes: + additionalProperties: true + type: object + title: Attributes + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + type: array + title: Content + type: object + required: + - file_id + - filename + - attributes + - content + title: VectorStoreFileContentsResponse + description: Response from retrieving the contents of a vector store file. + 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. + VectorStoreFileDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.file.deleted + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: VectorStoreFileDeleteResponse + description: Response from deleting a vector store file. + 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. + 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: + anyOf: + - $ref: '#/components/schemas/VectorStoreFileLastError' + - type: 'null' + 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. + VectorStoreObject: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store + created_at: + type: integer + title: Created At + name: + anyOf: + - type: string + - type: 'null' + title: Name + usage_bytes: + type: integer + title: Usage Bytes + default: 0 + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + type: string + title: Status + default: completed + 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 + type: object + title: Metadata + type: object + required: + - id + - created_at + - file_counts + title: VectorStoreObject + description: OpenAI Vector Store object. + VectorStoreSearchResponse: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + score: + type: number + title: Score + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + type: object + - type: 'null' + title: Attributes + 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. + VectorStoreSearchResponsePage: + 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: + title: Object + default: vector_store.search_results.page + search_query: + items: + type: string + type: array + title: Search Query + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + type: array + title: Data + has_more: + type: boolean + title: Has More + default: false + next_page: + anyOf: + - type: string + - type: 'null' + title: Next Page + type: object + required: + - search_query + - data + title: VectorStoreSearchResponsePage + description: Paginated response from searching a vector store. + VersionInfo: + properties: + version: + type: string + title: Version + type: object + required: + - version + title: VersionInfo + description: Version information for the service. + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: Severity level of a safety violation. + _URLOrData: + properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + data: + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + title: Data + type: object + title: _URLOrData + description: A URL or a base64 encoded string + _batches_Request: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + const: 24h + title: Completion Window + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + idempotency_key: + anyOf: + - type: string + - type: 'null' + title: Idempotency Key + type: object + required: + - input_file_id + - endpoint + - completion_window + title: _batches_Request + _conversations_Request: + properties: + items: + anyOf: + - 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' + 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' + type: array + - type: 'null' + title: Items + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + type: object + title: _conversations_Request + _conversations_conversation_id_Request: + properties: + metadata: + additionalProperties: + type: string + type: object + title: Metadata + type: object + required: + - metadata + title: _conversations_conversation_id_Request + _conversations_conversation_id_items_Request: + properties: + items: + 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' + 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' + type: array + title: Items + type: object + required: + - items + title: _conversations_conversation_id_items_Request + _datasets_Request: + properties: + purpose: + title: Purpose + source: + title: Source + metadata: + title: Metadata + dataset_id: + title: Dataset Id + type: object + required: + - purpose + - source + title: _datasets_Request + _eval_benchmarks_benchmark_id_evaluations_Request: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + type: object + required: + - input_rows + - scoring_functions + - benchmark_config + title: _eval_benchmarks_benchmark_id_evaluations_Request + _inference_rerank_Request: + properties: + model: + type: string + title: Model + query: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: Query + items: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + type: array + title: Items + max_num_results: + anyOf: + - type: integer + - type: 'null' + title: Max Num Results + type: object + required: + - model + - query + - items + title: _inference_rerank_Request + _models_Request: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + anyOf: + - type: string + - type: 'null' + title: Provider Model Id + provider_id: + anyOf: + - type: string + - type: 'null' + title: Provider Id + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + model_type: + anyOf: + - $ref: '#/components/schemas/ModelType' + - type: 'null' + type: object + required: + - model_id + title: _models_Request + _moderations_Request: + properties: + input: + anyOf: + - type: string + - items: + type: string + type: array + title: Input + model: + anyOf: + - type: string + - type: 'null' + title: Model + type: object + required: + - input + title: _moderations_Request + _post_training_preference_optimize_Request: + properties: + job_uuid: + type: string + title: Job Uuid + finetuned_model: + type: string + title: Finetuned Model + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: _post_training_preference_optimize_Request + _post_training_supervised_fine_tune_Request: + properties: + job_uuid: + type: string + title: Job Uuid + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + model: + anyOf: + - type: string + - type: 'null' + title: Model + description: Model descriptor for training if not in provider config` + checkpoint_dir: + anyOf: + - type: string + - type: 'null' + title: Checkpoint Dir + algorithm_config: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + - $ref: '#/components/schemas/QATFinetuningConfig' + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + - type: 'null' + title: Algorithm Config + type: object + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: _post_training_supervised_fine_tune_Request + _prompts_Request: + properties: + prompt: + type: string + title: Prompt + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Variables + type: object + required: + - prompt + title: _prompts_Request + _prompts_prompt_id_Request: + properties: + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Variables + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt + - version + title: _prompts_prompt_id_Request + _prompts_prompt_id_set_default_version_Request: + properties: + version: + type: integer + title: Version + type: object + required: + - version + title: _prompts_prompt_id_set_default_version_Request + _responses_Request: + properties: + input: + title: Input + model: + title: Model + prompt: + title: Prompt + instructions: + title: Instructions + previous_response_id: + title: Previous Response Id + conversation: + title: Conversation + store: + title: Store + default: true + stream: + title: Stream + default: false + temperature: + title: Temperature + text: + title: Text + tools: + title: Tools + include: + title: Include + max_infer_iters: + title: Max Infer Iters + default: 10 + guardrails: + title: Guardrails + type: object + required: + - input + - model + title: _responses_Request + _scoring_score_Request: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + additionalProperties: + 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' + type: object + 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: + additionalProperties: + 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' + type: object + 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: + anyOf: + - type: string + - type: 'null' + title: Provider Shield Id + provider_id: + anyOf: + - type: string + - type: 'null' + title: Provider Id + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - shield_id + title: _shields_Request + _tool_runtime_invoke_Request: + properties: + tool_name: + type: string + title: Tool Name + kwargs: + additionalProperties: true + type: object + title: Kwargs + type: object + required: + - tool_name + - kwargs + title: _tool_runtime_invoke_Request + _vector_io_query_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + 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: Query + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - vector_store_id + - query + title: _vector_io_query_Request + _vector_stores_vector_store_id_Request: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + type: object + title: _vector_stores_vector_store_id_Request + _vector_stores_vector_store_id_files_Request: + properties: + file_id: + type: string + title: File Id + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Attributes + 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 + type: object + required: + - file_id + title: _vector_stores_vector_store_id_files_Request + _vector_stores_vector_store_id_files_file_id_Request: + properties: + attributes: + additionalProperties: true + type: object + title: Attributes + type: object + required: + - attributes + title: _vector_stores_vector_store_id_files_file_id_Request + _vector_stores_vector_store_id_search_Request: + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: Query + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + max_num_results: + anyOf: + - type: integer + - type: 'null' + title: Max Num Results + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + - type: 'null' + rewrite_query: + anyOf: + - type: boolean + - type: 'null' + title: Rewrite Query + default: false + search_mode: + anyOf: + - type: string + - type: 'null' + title: Search Mode + default: vector + type: object + required: + - query + title: _vector_stores_vector_store_id_search_Request + Error: + description: Error response from the API. Roughly follows RFC 7807. + properties: + status: + title: Status + type: integer + title: + title: Title + type: string + detail: + title: Detail + type: string + instance: + anyOf: + - type: string + - type: 'null' + title: Instance + nullable: true + required: + - status + - title + - detail + title: Error + type: object + ImageContentItem: + description: A image content item + properties: + type: + const: image + default: image + title: Type + type: string + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + BuiltinTool: + enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + title: BuiltinTool + type: string + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string + required: + - image + title: ImageDelta + type: object + TextDelta: + description: A text content delta for streaming responses. + properties: + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: TextDelta + type: object + ToolCall: + properties: + call_id: + title: Call Id + type: string + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + arguments: + title: Arguments + type: string + required: + - call_id + - tool_name + - arguments + title: ToolCall + type: object + ToolCallDelta: + description: A tool call content delta for streaming responses. + properties: + type: + const: tool_call + default: tool_call + title: Type + type: string + tool_call: + anyOf: + - type: string + - $ref: '#/components/schemas/ToolCall' + title: Tool Call + parse_status: + $ref: '#/components/schemas/ToolCallParseStatus' + required: + - tool_call + - parse_status + title: ToolCallDelta + type: object + ToolCallParseStatus: + description: Status of tool call parsing during streaming. + enum: + - started + - in_progress + - failed + - succeeded + title: ToolCallParseStatus + type: string + ContentDelta: + discriminator: + mapping: + image: '#/components/schemas/ImageDelta' + text: '#/components/schemas/TextDelta' + tool_call: '#/components/schemas/ToolCallDelta' + propertyName: type + oneOf: + - $ref: '#/components/schemas/TextDelta' + - $ref: '#/components/schemas/ImageDelta' + - $ref: '#/components/schemas/ToolCallDelta' + ToolDefinition: + properties: + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + nullable: true + input_schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Input Schema + nullable: true + output_schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Output Schema + nullable: true + required: + - tool_name + title: ToolDefinition + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + CompletionMessage: + description: A message containing the model's (assistant) response in a chat conversation. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + stop_reason: + $ref: '#/components/schemas/StopReason' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/ToolCall' + type: array + - type: 'null' + title: Tool Calls + required: + - content + - stop_reason + title: CompletionMessage + type: object + StopReason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + title: StopReason + type: string + ToolResponseMessage: + description: A message representing the result of a tool invocation. + properties: + role: + const: tool + default: tool + title: Role + type: string + call_id: + title: Call Id + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + required: + - call_id + - content + title: ToolResponseMessage + type: object + UserMessage: + description: A message from the user in a chat conversation. + properties: + role: + const: user + default: user + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + - type: 'null' + title: Context + nullable: true + required: + - content + title: UserMessage + type: object + Message: + discriminator: + mapping: + assistant: '#/components/schemas/CompletionMessage' + system: '#/components/schemas/SystemMessage' + tool: '#/components/schemas/ToolResponseMessage' + user: '#/components/schemas/UserMessage' + propertyName: role + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/SystemMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + - $ref: '#/components/schemas/CompletionMessage' + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + OpenAIChatCompletionContentPartParam: + 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' + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + nullable: true + name: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + nullable: true + title: OpenAIAssistantMessageParam + type: object + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object + OpenAIMessageParam: + 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' + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + VectorStoreFileStatus: + anyOf: + - const: completed + type: string + - const: in_progress + type: string + - const: cancelled + type: string + - const: failed + type: string + OpenAIResponseInputMessageContent: + 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' + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + 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: + anyOf: + - type: string + - type: 'null' + title: Id + nullable: true + status: + anyOf: + - type: string + - type: 'null' + title: Status + nullable: true + required: + - content + - role + title: OpenAIResponseMessage + type: object + OpenAIResponseOutput: + 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' + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Always + nullable: true + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Never + nullable: true + title: ApprovalFilter + type: object + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + properties: + type: + const: mcp + default: mcp + title: Type + type: string + server_label: + title: Server Label + type: string + server_url: + title: Server Url + type: string + headers: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Headers + nullable: true + require_approval: + anyOf: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + default: never + title: Require Approval + allowed_tools: + anyOf: + - items: + type: string + type: array + - $ref: '#/components/schemas/AllowedToolsFilter' + - type: 'null' + title: Allowed Tools + nullable: true + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + type: object + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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/OpenAIResponseInputToolMCP' + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. + properties: + type: + const: output_text + default: output_text + title: Type + type: string + text: + title: Text + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: Annotations + type: array + logprobs: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + title: Logprobs + nullable: true + required: + - text + title: OpenAIResponseContentPartOutputText + type: object + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. + properties: + type: + const: reasoning_text + default: reasoning_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningText + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. + properties: + type: + const: summary_text + default: summary_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningSummary + type: object + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.completed + default: response.completed + title: Type + type: string + required: + - response + title: OpenAIResponseObjectStreamResponseCompleted + type: object + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. + properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: Part + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.added + default: response.content_part.added + title: Type + type: string + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded + type: object + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. + properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: Part + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.done + default: response.content_part.done + title: Type + type: string + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone + type: object + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.created + default: response.created + title: Type + type: string + required: + - response + title: OpenAIResponseObjectStreamResponseCreated + type: object + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.failed + default: response.failed + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed + type: object + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. + properties: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type + type: string + required: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress + type: object + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.incomplete + default: response.incomplete + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + properties: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type + type: string + required: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.failed + default: response.mcp_call.failed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed + type: object + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + type: object + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + type: object + OpenAIResponseObjectStreamResponseMcpListToolsFailed: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + type: object + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. + properties: + response_id: + title: Response Id + type: string + item: + 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: Item + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.added + default: response.output_item.added + title: Type + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded + type: object + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. + properties: + response_id: + title: Response Id type: string - last_id: + item: + 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: Item + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done + title: Type 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: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. properties: - input_file_id: + item_id: + title: Item Id type: string - description: >- - The ID of an uploaded file containing requests for the batch. - endpoint: + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: Annotation + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.annotation.added + default: response.output_text.annotation.added + title: Type type: string - description: >- - The endpoint to be used for all requests in the batch. - completion_window: + required: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + type: object + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. + properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta 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: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.delta + default: response.output_text.delta + title: Type type: string - description: >- - Optional idempotency key. When provided, enables idempotent behavior. - additionalProperties: false required: - - input_file_id - - endpoint - - completion_window - title: CreateBatchRequest - Batch: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta type: object + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. properties: - id: + content_index: + title: Content Index + type: integer + text: + title: Text type: string - completion_window: + item_id: + title: Item Id type: string - created_at: + output_index: + title: Output Index type: integer - endpoint: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done + title: Type type: string - input_file_id: + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. + properties: + item_id: + title: Item Id type: string - object: + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type type: string - const: batch - status: + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. + properties: + item_id: + title: Item Id type: string - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - cancelled_at: + output_index: + title: Output Index type: integer - cancelling_at: + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number type: integer - completed_at: + summary_index: + title: Summary Index type: integer - error_file_id: + type: + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done + title: Type 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: + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - expires_at: + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. + properties: + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done + title: Type + type: string + required: + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. + properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.delta + default: response.reasoning_text.delta + title: Type + type: string + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. + properties: + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done + title: Type + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone + type: object + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. + properties: + content_index: + title: Content Index type: integer - failed_at: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - finalizing_at: + sequence_number: + title: Sequence Number type: integer - in_progress_at: + type: + const: response.refusal.delta + default: response.refusal.delta + title: Type + type: string + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta + type: object + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. + properties: + content_index: + title: Content Index type: integer - metadata: - type: object - additionalProperties: - type: string - model: + refusal: + title: Refusal type: string - output_file_id: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.done + default: response.refusal.done + title: Type 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: + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone type: object + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. properties: - data: - type: array - items: - type: object - properties: - id: - type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChoice' - description: List of choices - object: - type: string - const: chat.completion - default: chat.completion - description: >- - The object type, which will be "chat.completion" - created: - type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: - type: string - description: >- - The model that was used to generate the chat completion - usage: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - description: >- - Token usage information for the completion - input_messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - additionalProperties: false - required: - - id - - choices - - object - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - description: >- - List of chat completion objects with their input messages - has_more: - type: boolean - description: >- - Whether there are more completions available beyond this list - first_id: - type: string - description: ID of the first completion in this list - last_id: + item_id: + title: Item Id type: string - description: ID of the last completion in this list - object: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type type: string - const: list - default: list - description: >- - Must be "list" to identify this as a list response - additionalProperties: false required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIChatCompletionResponse - description: >- - Response from listing OpenAI-compatible chat completions. - OpenAIAssistantMessageParam: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted type: object + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. properties: - role: + item_id: + title: Item Id type: string - const: assistant - default: assistant - description: >- - Must be "assistant" to identify this as the model's response - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - description: The content of the model's response - name: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress + title: Type type: string - description: >- - (Optional) The name of the assistant message participant. - tool_calls: - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - description: >- - List of tool calls. Each tool call is an OpenAIChatCompletionToolCall - object. - additionalProperties: false required: - - role - title: OpenAIAssistantMessageParam - description: >- - A message containing the model's (assistant) response in an OpenAI-compatible - chat completion request. - "OpenAIChatCompletionContentPartImageParam": + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress type: object + OpenAIResponseObjectStreamResponseWebSearchCallSearching: properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type type: string - const: image_url - default: image_url - description: >- - Must be "image_url" to identify this as image content - image_url: - $ref: '#/components/schemas/OpenAIImageURL' - description: >- - Image URL specification and processing details - additionalProperties: false required: - - type - - image_url - title: >- - OpenAIChatCompletionContentPartImageParam - description: >- - Image content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionContentPartParam: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - - $ref: '#/components/schemas/OpenAIFile' + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + type: object + OpenAIResponseObjectStream: discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + OpenAIResponseInput: + 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' + ConversationItem: + discriminator: mapping: - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - file: '#/components/schemas/OpenAIFile' - OpenAIChatCompletionContentPartTextParam: + 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: text - default: text + const: url_citation + default: url_citation description: >- - Must be "text" to identify this as text content - text: - type: string - description: The text content of the message - additionalProperties: false - required: - - type - - text - title: OpenAIChatCompletionContentPartTextParam - description: >- - Text content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionToolCall: - type: object - properties: - index: + Annotation type identifier, always "url_citation" + end_index: type: integer description: >- - (Optional) Index of the tool call in the list - id: - type: string + End position of the citation span in the content + start_index: + type: integer description: >- - (Optional) Unique identifier for the tool call - type: + Start position of the citation span in the content + title: type: string - const: function - default: function - description: >- - Must be "function" to identify this as a function call - function: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - description: (Optional) Function call details + description: Title of the referenced web resource + url: + type: string + description: URL of the referenced web resource additionalProperties: false required: - type - title: OpenAIChatCompletionToolCall + - end_index + - start_index + - title + - url + title: OpenAIResponseAnnotationCitation description: >- - Tool call specification for OpenAI-compatible chat completion responses. - OpenAIChatCompletionToolCallFunction: + URL citation annotation for referencing external web resources. + "OpenAIResponseAnnotationContainerFileCitation": type: object properties: - name: + type: type: string - description: (Optional) Name of the function to call - arguments: + const: container_file_citation + default: container_file_citation + container_id: type: string - description: >- - (Optional) Arguments to pass to the function as a JSON string - additionalProperties: false - title: OpenAIChatCompletionToolCallFunction - description: >- - Function call details for OpenAI-compatible tool calls. - OpenAIChatCompletionUsage: - type: object - properties: - prompt_tokens: - type: integer - description: Number of tokens in the prompt - completion_tokens: + end_index: type: integer - description: Number of tokens in the completion - total_tokens: + file_id: + type: string + filename: + type: string + start_index: type: integer - description: Total tokens used (prompt + completion) - prompt_tokens_details: - type: object - properties: - cached_tokens: - type: integer - description: Number of tokens retrieved from cache - additionalProperties: false - title: >- - OpenAIChatCompletionUsagePromptTokensDetails - description: >- - Token details for prompt tokens in OpenAI chat completion usage. - completion_tokens_details: - type: object - properties: - reasoning_tokens: - type: integer - description: >- - Number of tokens used for reasoning (o1/o3 models) - additionalProperties: false - title: >- - OpenAIChatCompletionUsageCompletionTokensDetails - description: >- - Token details for output tokens in OpenAI chat completion usage. additionalProperties: false required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - description: >- - Usage information for OpenAI chat completion. - OpenAIChoice: + - type + - container_id + - end_index + - file_id + - filename + - start_index + title: >- + OpenAIResponseAnnotationContainerFileCitation + OpenAIResponseAnnotationFileCitation: type: object properties: - message: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam' - - $ref: '#/components/schemas/OpenAISystemMessageParam' - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - - $ref: '#/components/schemas/OpenAIToolMessageParam' - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - discriminator: - propertyName: role - mapping: - user: '#/components/schemas/OpenAIUserMessageParam' - system: '#/components/schemas/OpenAISystemMessageParam' - assistant: '#/components/schemas/OpenAIAssistantMessageParam' - tool: '#/components/schemas/OpenAIToolMessageParam' - developer: '#/components/schemas/OpenAIDeveloperMessageParam' - description: The message from the model - finish_reason: + 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: The reason the model stopped generating + description: Name of the referenced file index: type: integer - description: The index of the choice - logprobs: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' description: >- - (Optional) The log probabilities for the tokens in the message + Position index of the citation within the content additionalProperties: false required: - - message - - finish_reason + - type + - file_id + - filename - index - title: OpenAIChoice + title: OpenAIResponseAnnotationFileCitation description: >- - A choice from an OpenAI-compatible chat completion response. - OpenAIChoiceLogprobs: + File citation annotation for referencing specific files in response content. + OpenAIResponseAnnotationFilePath: type: object properties: - content: - type: array - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - description: >- - (Optional) The log probabilities for the tokens in the message - refusal: - type: array - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - description: >- - (Optional) The log probabilities for the tokens in the message + type: + type: string + const: file_path + default: file_path + file_id: + type: string + index: + type: integer additionalProperties: false - title: OpenAIChoiceLogprobs - description: >- - The log probabilities for the tokens in the message from an OpenAI-compatible - chat completion response. - OpenAIDeveloperMessageParam: + 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: - role: + type: type: string - const: developer - default: developer + const: refusal + default: refusal description: >- - Must be "developer" to identify this as a developer message - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - description: The content of the developer message - name: + Content part type identifier, always "refusal" + refusal: type: string - description: >- - (Optional) The name of the developer message participant. + description: Refusal text supplied by the model additionalProperties: false required: - - role - - content - title: OpenAIDeveloperMessageParam + - type + - refusal + title: OpenAIResponseContentPartRefusal description: >- - A message from the developer in an OpenAI-compatible chat completion request. - OpenAIFile: + Refusal content within a streamed response part. + "OpenAIResponseInputFunctionToolCallOutput": type: object properties: + call_id: + type: string + output: + type: string type: type: string - const: file - default: file - file: - $ref: '#/components/schemas/OpenAIFileFile' + const: function_call_output + default: function_call_output + id: + type: string + status: + type: string additionalProperties: false required: + - call_id + - output - type - - file - title: OpenAIFile - OpenAIFileFile: + 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 - filename: - type: string - additionalProperties: false - title: OpenAIFileFile - OpenAIImageURL: - type: object - properties: - url: + description: >- + (Optional) The ID of the file to be sent to the model. + file_url: type: string description: >- - URL of the image to include in the message - detail: + The URL of the file to be sent to the model. + filename: type: string description: >- - (Optional) Level of detail for image processing. Can be "low", "high", - or "auto" + The name of the file to be sent to the model. additionalProperties: false required: - - url - title: OpenAIImageURL + - type + title: OpenAIResponseInputMessageContentFile description: >- - Image URL specification for OpenAI-compatible chat completion messages. - OpenAIMessageParam: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam' - - $ref: '#/components/schemas/OpenAISystemMessageParam' - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - - $ref: '#/components/schemas/OpenAIToolMessageParam' - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - discriminator: - propertyName: role - mapping: - user: '#/components/schemas/OpenAIUserMessageParam' - system: '#/components/schemas/OpenAISystemMessageParam' - assistant: '#/components/schemas/OpenAIAssistantMessageParam' - tool: '#/components/schemas/OpenAIToolMessageParam' - developer: '#/components/schemas/OpenAIDeveloperMessageParam' - OpenAISystemMessageParam: + File content for input messages in OpenAI response format. + OpenAIResponseInputMessageContentImage: type: object properties: - role: - type: string - const: system - default: system - description: >- - Must be "system" to identify this as a system message - content: + detail: oneOf: - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + 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: >- - 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). - name: + Content type identifier, always "input_image" + file_id: type: string description: >- - (Optional) The name of the system message participant. + (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: - - role - - content - title: OpenAISystemMessageParam + - detail + - type + title: OpenAIResponseInputMessageContentImage description: >- - A system message providing instructions or context to the model. - OpenAITokenLogProb: + Image content for input messages in OpenAI response format. + OpenAIResponseInputMessageContentText: type: object properties: - token: + text: type: string - bytes: - type: array - items: - type: integer - logprob: - type: number - top_logprobs: - type: array - items: - $ref: '#/components/schemas/OpenAITopLogProb' + 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: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb + - text + - type + title: OpenAIResponseInputMessageContentText description: >- - The log probability for a token from an OpenAI-compatible chat completion - response. - OpenAIToolMessageParam: + Text content for input messages in OpenAI response format. + OpenAIResponseMCPApprovalRequest: type: object properties: - role: + arguments: type: string - const: tool - default: tool - description: >- - Must be "tool" to identify this as a tool response - tool_call_id: + id: type: string - description: >- - Unique identifier for the tool call this response is for - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - description: The response content from the tool + name: + type: string + server_label: + type: string + type: + type: string + const: mcp_approval_request + default: mcp_approval_request additionalProperties: false required: - - role - - tool_call_id - - content - title: OpenAIToolMessageParam + - arguments + - id + - name + - server_label + - type + title: OpenAIResponseMCPApprovalRequest description: >- - A message representing the result of a tool invocation in an OpenAI-compatible - chat completion request. - OpenAITopLogProb: + A request for human approval of a tool invocation. + OpenAIResponseMCPApprovalResponse: type: object properties: - token: + approval_request_id: + type: string + approve: + type: boolean + type: + type: string + const: mcp_approval_response + default: mcp_approval_response + id: + type: string + reason: type: string - bytes: - type: array - items: - type: integer - logprob: - type: number additionalProperties: false required: - - token - - logprob - title: OpenAITopLogProb - description: >- - The top log probability for a token from an OpenAI-compatible chat completion - response. - OpenAIUserMessageParam: + - approval_request_id + - approve + - type + title: OpenAIResponseMCPApprovalResponse + description: A response to an MCP approval request. + OpenAIResponseMessage: type: object properties: - role: - type: string - const: user - default: user - description: >- - Must be "user" to identify this as a user message content: oneOf: - type: string - type: array items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartParam' - description: >- - The content of the message, which can include text and other media - name: + $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 - description: >- - (Optional) The name of the user message participant. - additionalProperties: false - required: - - role - - content - title: OpenAIUserMessageParam - description: >- - A message from the user in an OpenAI-compatible chat completion request. - OpenAIJSONSchema: - type: object - properties: - name: + const: message + default: message + id: type: string - description: Name of the schema - description: + status: type: string - description: (Optional) Description of the schema - strict: - type: boolean - description: >- - (Optional) Whether to enforce strict adherence to the schema - schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The JSON schema definition additionalProperties: false required: - - name - title: OpenAIJSONSchema + - content + - role + - type + title: OpenAIResponseMessage description: >- - JSON schema specification for OpenAI-compatible structured response format. - OpenAIResponseFormatJSONObject: + 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: json_object - default: json_object - description: >- - Must be "json_object" to indicate generic JSON object response format + const: output_text + default: output_text + annotations: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseAnnotations' additionalProperties: false required: + - text - type - title: OpenAIResponseFormatJSONObject - description: >- - JSON object response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatJSONSchema: + - 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: json_schema - default: json_schema + const: file_search_call + default: file_search_call description: >- - Must be "json_schema" to indicate structured JSON response format - json_schema: - $ref: '#/components/schemas/OpenAIJSONSchema' + Tool call type identifier, always "file_search_call" + results: + type: array + items: + 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: >- - The JSON schema specification for the response + (Optional) Search results returned by the file search operation additionalProperties: false required: + - id + - queries + - status - type - - json_schema - title: OpenAIResponseFormatJSONSchema + title: >- + OpenAIResponseOutputMessageFileSearchToolCall description: >- - JSON schema response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatParam: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - discriminator: - propertyName: type - mapping: - text: '#/components/schemas/OpenAIResponseFormatText' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - OpenAIResponseFormatText: + File search tool call output message for OpenAI responses. + "OpenAIResponseOutputMessageFunctionToolCall": type: object properties: + 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: text - default: text + 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: >- - Must be "text" to indicate plain text response format + (Optional) Current status of the function call execution additionalProperties: false required: + - call_id + - name + - arguments - type - title: OpenAIResponseFormatText + title: >- + OpenAIResponseOutputMessageFunctionToolCall description: >- - Text response format for OpenAI-compatible chat completion requests. - OpenAIChatCompletionRequestWithExtraBody: + Function tool call output message for OpenAI responses. + OpenAIResponseOutputMessageMCPCall: type: object properties: - model: + id: type: string + description: Unique identifier for this MCP call + type: + type: string + const: mcp_call + default: mcp_call description: >- - The identifier of the model to use. The model must be registered with - Llama Stack and available via the /models endpoint. - messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - description: List of messages in the conversation. - frequency_penalty: - type: number - description: >- - (Optional) The penalty for repeated tokens. - function_call: - oneOf: - - type: string - - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The function call to use. - functions: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) List of functions to use. - logit_bias: - type: object - additionalProperties: - type: number - description: (Optional) The logit bias to use. - logprobs: - type: boolean - description: (Optional) The log probabilities to use. - max_completion_tokens: - type: integer - description: >- - (Optional) The maximum number of tokens to generate. - max_tokens: - type: integer - description: >- - (Optional) The maximum number of tokens to generate. - n: - type: integer - description: >- - (Optional) The number of completions to generate. - parallel_tool_calls: - type: boolean - description: >- - (Optional) Whether to parallelize tool calls. - presence_penalty: - type: number + Tool call type identifier, always "mcp_call" + arguments: + type: string description: >- - (Optional) The penalty for repeated tokens. - response_format: - $ref: '#/components/schemas/OpenAIResponseFormatParam' - description: (Optional) The response format to use. - seed: - type: integer - description: (Optional) The seed to use. - stop: - oneOf: - - type: string - - type: array - items: - type: string - description: (Optional) The stop tokens to use. - stream: - type: boolean + JSON string containing the MCP call arguments + name: + type: string + description: Name of the MCP method being called + server_label: + type: string description: >- - (Optional) Whether to stream the response. - stream_options: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The stream options to use. - temperature: - type: number - description: (Optional) The temperature to use. - tool_choice: - oneOf: - - type: string - - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The tool choice to use. - tools: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The tools to use. - top_logprobs: - type: integer + Label identifying the MCP server handling the call + error: + type: string description: >- - (Optional) The top log probabilities to use. - top_p: - type: number - description: (Optional) The top p to use. - user: + (Optional) Error message if the MCP call failed + output: type: string - description: (Optional) The user to use. + description: >- + (Optional) Output result from the successful MCP call additionalProperties: false required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody + - id + - type + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall description: >- - Request parameters for OpenAI-compatible chat completion endpoint. - OpenAIChatCompletion: + Model Context Protocol (MCP) call output message for OpenAI responses. + OpenAIResponseOutputMessageMCPListTools: type: object properties: id: type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChoice' - description: List of choices - object: - type: string - const: chat.completion - default: chat.completion description: >- - The object type, which will be "chat.completion" - created: - type: integer + Unique identifier for this MCP list tools operation + type: + type: string + const: mcp_list_tools + default: mcp_list_tools description: >- - The Unix timestamp in seconds when the chat completion was created - model: + Tool call type identifier, always "mcp_list_tools" + server_label: type: string description: >- - The model that was used to generate the chat completion - usage: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + 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: >- - Token usage information for the completion + List of available tools provided by the MCP server additionalProperties: false required: - id - - choices - - object - - created - - model - title: OpenAIChatCompletion + - type + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools description: >- - Response from an OpenAI-compatible chat completion request. - OpenAIChatCompletionChunk: + MCP list tools output message containing available tools from an MCP server. + "OpenAIResponseOutputMessageWebSearchToolCall": type: object properties: - id: - type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChunkChoice' - description: List of choices - object: - type: string - const: chat.completion.chunk - default: chat.completion.chunk - description: >- - The object type, which will be "chat.completion.chunk" - created: - type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: + id: + type: string + description: Unique identifier for this tool call + status: type: string description: >- - The model that was used to generate the chat completion - usage: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + Current status of the web search operation + type: + type: string + const: web_search_call + default: web_search_call description: >- - Token usage information (typically included in final chunk with stream_options) + Tool call type identifier, always "web_search_call" additionalProperties: false required: - id - - choices - - object - - created - - model - title: OpenAIChatCompletionChunk + - status + - type + title: >- + OpenAIResponseOutputMessageWebSearchToolCall description: >- - Chunk from a streaming response to an OpenAI-compatible chat completion request. - OpenAIChoiceDelta: + Web search tool call output message for OpenAI responses. + CreateConversationRequest: type: object properties: - content: - type: string - description: (Optional) The content of the delta - refusal: - type: string - description: (Optional) The refusal of the delta - role: - type: string - description: (Optional) The role of the delta - tool_calls: + items: type: array items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - description: (Optional) The tool calls of the delta - reasoning_content: - type: string + $ref: '#/components/schemas/ConversationItem' description: >- - (Optional) The reasoning content from the model (non-standard, for o1/o3 - models) - additionalProperties: false - title: OpenAIChoiceDelta - description: >- - A delta from an OpenAI-compatible chat completion streaming response. - OpenAIChunkChoice: - type: object - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - description: The delta from the chunk - finish_reason: - type: string - description: The reason the model stopped generating - index: - type: integer - description: The index of the choice - logprobs: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + Initial items to include in the conversation context. + metadata: + type: object + additionalProperties: + type: string description: >- - (Optional) The log probabilities for the tokens in the message + Set of key-value pairs that can be attached to an object. additionalProperties: false - required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice - description: >- - A chunk choice from an OpenAI-compatible chat completion streaming response. - OpenAICompletionWithInputMessages: + title: CreateConversationRequest + Conversation: type: object properties: id: type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChoice' - description: List of choices object: type: string - const: chat.completion - default: chat.completion - description: >- - The object type, which will be "chat.completion" - created: + const: conversation + default: conversation + created_at: type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: - type: string - description: >- - The model that was used to generate the chat completion - usage: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - description: >- - Token usage information for the completion - input_messages: + metadata: + type: object + additionalProperties: + type: string + items: type: array items: - $ref: '#/components/schemas/OpenAIMessageParam' + type: object + title: dict + description: >- + dict() -> new empty dictionary dict(mapping) -> new dictionary initialized + from a mapping object's (key, value) pairs dict(iterable) -> new + dictionary initialized as if via: d = {} for k, v in iterable: d[k] + = v dict(**kwargs) -> new dictionary initialized with the name=value + pairs in the keyword argument list. For example: dict(one=1, two=2) additionalProperties: false required: - id - - choices - object - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - OpenAICompletionRequestWithExtraBody: + - created_at + title: Conversation + description: OpenAI-compatible conversation object. + UpdateConversationRequest: type: object properties: - model: - type: string - description: >- - The identifier of the model to use. The model must be registered with - Llama Stack and available via the /models endpoint. - prompt: - oneOf: - - type: string - - type: array - items: - type: string - - type: array - items: - type: integer - - type: array - items: - type: array - items: - type: integer - description: The prompt to generate a completion for. - best_of: - type: integer - description: >- - (Optional) The number of completions to generate. - echo: - type: boolean - description: (Optional) Whether to echo the prompt. - frequency_penalty: - type: number - description: >- - (Optional) The penalty for repeated tokens. - logit_bias: - type: object - additionalProperties: - type: number - description: (Optional) The logit bias to use. - logprobs: - type: boolean - description: (Optional) The log probabilities to use. - max_tokens: - type: integer - description: >- - (Optional) The maximum number of tokens to generate. - n: - type: integer - description: >- - (Optional) The number of completions to generate. - presence_penalty: - type: number - description: >- - (Optional) The penalty for repeated tokens. - seed: - type: integer - description: (Optional) The seed to use. - stop: - oneOf: - - type: string - - type: array - items: - type: string - description: (Optional) The stop tokens to use. - stream: - type: boolean - description: >- - (Optional) Whether to stream the response. - stream_options: + metadata: type: object additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The stream options to use. - temperature: - type: number - description: (Optional) The temperature to use. - top_p: - type: number - description: (Optional) The top p to use. - user: - type: string - description: (Optional) The user to use. - suffix: - type: string + type: string description: >- - (Optional) The suffix that should be appended to the completion. + Set of key-value pairs that can be attached to an object. additionalProperties: false required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody - description: >- - Request parameters for OpenAI-compatible completion endpoint. - OpenAICompletion: + - metadata + title: UpdateConversationRequest + ConversationDeletedResource: type: object properties: id: type: string - choices: - type: array - items: - $ref: '#/components/schemas/OpenAICompletionChoice' - created: - type: integer - model: - type: string object: type: string - const: text_completion - default: text_completion + default: conversation.deleted + deleted: + type: boolean + default: true additionalProperties: false required: - id - - choices - - created - - model - object - title: OpenAICompletion - description: >- - Response from an OpenAI-compatible completion request. - OpenAICompletionChoice: - 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: + - deleted + title: ConversationDeletedResource + description: Response for deleted conversation. + ConversationItemList: type: object properties: - type: + object: 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: + default: list + data: + type: array + items: + $ref: '#/components/schemas/ConversationItem' + first_id: type: string - description: Title of the referenced web resource - url: + last_id: type: string - description: URL of the referenced web resource + has_more: + type: boolean + default: false additionalProperties: false required: - - type - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation + - object + - data + - has_more + title: ConversationItemList description: >- - URL citation annotation for referencing external web resources. - "OpenAIResponseAnnotationContainerFileCitation": + List of conversation items with pagination. + AddItemsRequest: type: object properties: - type: - type: string - const: container_file_citation - default: container_file_citation - container_id: - type: string - end_index: - type: integer - file_id: + items: + type: array + items: + $ref: '#/components/schemas/ConversationItem' + description: >- + Items to include in the conversation context. + additionalProperties: false + required: + - items + title: AddItemsRequest + ConversationItemDeletedResource: + type: object + properties: + id: type: string - filename: + object: type: string - start_index: - type: integer + default: conversation.item.deleted + deleted: + type: boolean + default: true additionalProperties: false required: - - type - - container_id - - end_index - - file_id - - filename - - start_index - title: >- - OpenAIResponseAnnotationContainerFileCitation - OpenAIResponseAnnotationFileCitation: + - id + - object + - deleted + title: ConversationItemDeletedResource + description: Response for deleted conversation item. + OpenAIEmbeddingsRequestWithExtraBody: type: object properties: - type: + model: 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: + The identifier of the model to use. The model must be an embedding model + registered with Llama Stack and available via the /models endpoint. + input: + oneOf: + - type: string + - type: array + items: + type: string + description: >- + 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. + encoding_format: type: string - description: Name of the referenced file - index: + default: float + description: >- + (Optional) The format to return the embeddings in. Can be either "float" + or "base64". Defaults to "float". + dimensions: type: integer description: >- - Position index of the citation within the content + (Optional) The number of dimensions the resulting output embeddings should + have. Only supported in text-embedding-3 and later models. + user: + type: string + description: >- + (Optional) A unique identifier representing your end-user, which can help + OpenAI to monitor and detect abuse. additionalProperties: false required: - - type - - file_id - - filename - - index - title: OpenAIResponseAnnotationFileCitation + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody description: >- - File citation annotation for referencing specific files in response content. - OpenAIResponseAnnotationFilePath: + Request parameters for OpenAI-compatible embeddings endpoint. + OpenAIEmbeddingData: type: object properties: - type: - type: string - const: file_path - default: file_path - file_id: + object: type: string + const: embedding + default: embedding + description: >- + The object type, which will be "embedding" + embedding: + oneOf: + - type: array + items: + type: number + - type: string + description: >- + The embedding vector as a list of floats (when encoding_format="float") + or as a base64-encoded string (when encoding_format="base64") index: type: integer + description: >- + The index of the embedding in the input list additionalProperties: false required: - - type - - file_id + - object + - embedding - 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: + title: OpenAIEmbeddingData + description: >- + A single embedding data object from an OpenAI-compatible embeddings response. + OpenAIEmbeddingUsage: 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 + prompt_tokens: + type: integer + description: The number of tokens in the input + total_tokens: + type: integer + description: The total number of tokens used additionalProperties: false required: - - type - - refusal - title: OpenAIResponseContentPartRefusal + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage description: >- - Refusal content within a streamed response part. - "OpenAIResponseInputFunctionToolCallOutput": + Usage information for an OpenAI-compatible embeddings response. + OpenAIEmbeddingsResponse: type: object properties: - call_id: - type: string - output: - type: string - type: - type: string - const: function_call_output - default: function_call_output - id: + object: type: string - status: + const: list + default: list + description: The object type, which will be "list" + data: + type: array + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + description: List of embedding data objects + model: type: string + description: >- + The model that was used to generate the embeddings + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' + description: Usage information additionalProperties: false required: - - call_id - - output - - type - title: >- - OpenAIResponseInputFunctionToolCallOutput + - object + - data + - model + - usage + title: OpenAIEmbeddingsResponse 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 + Response from an OpenAI-compatible embeddings request. + OpenAIFilePurpose: + type: string + enum: + - assistants + - batch + title: OpenAIFilePurpose + description: >- + Valid purpose values for OpenAI Files API. + ListOpenAIFileResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/OpenAIFileObject' + description: List of file objects + has_more: + type: boolean description: >- - The data of the file to be sent to the model. - file_id: + Whether there are more files available beyond this page + first_id: type: string description: >- - (Optional) The ID of the file to be sent to the model. - file_url: + ID of the first file in the list for pagination + last_id: type: string description: >- - The URL of the file to be sent to the model. - filename: + ID of the last file in the list for pagination + object: type: string - description: >- - The name of the file to be sent to the model. + const: list + default: list + description: The object type, which is always "list" additionalProperties: false required: - - type - title: OpenAIResponseInputMessageContentFile + - data + - has_more + - first_id + - last_id + - object + title: ListOpenAIFileResponse description: >- - File content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentImage: + Response for listing files in OpenAI Files API. + OpenAIFileObject: 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: + object: type: string - const: input_image - default: input_image - description: >- - Content type identifier, always "input_image" - file_id: + const: file + default: file + description: The object type, which is always "file" + id: type: string description: >- - (Optional) The ID of the file to be sent to the model. - image_url: + The file identifier, which can be referenced in the API endpoints + bytes: + type: integer + description: The size of the file, in bytes + created_at: + type: integer + description: >- + The Unix timestamp (in seconds) for when the file was created + expires_at: + type: integer + description: >- + The Unix timestamp (in seconds) for when the file expires + filename: type: string - description: (Optional) URL of the image content + description: The name of the file + purpose: + type: string + enum: + - assistants + - batch + description: The intended purpose of the file additionalProperties: false required: - - detail - - type - title: OpenAIResponseInputMessageContentImage + - object + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject description: >- - Image content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentText: + OpenAI File object as defined in the OpenAI Files API. + ExpiresAfter: type: object properties: - text: - type: string - description: The text content of the input message - type: + anchor: type: string - const: input_text - default: input_text - description: >- - Content type identifier, always "input_text" + const: created_at + seconds: + type: integer additionalProperties: false required: - - text - - type - title: OpenAIResponseInputMessageContentText + - anchor + - seconds + title: ExpiresAfter description: >- - Text content for input messages in OpenAI response format. - OpenAIResponseMCPApprovalRequest: + Control expiration of uploaded files. + + Params: + - anchor, must be "created_at" + - seconds, must be int between 3600 and 2592000 (1 hour to 30 days) + OpenAIFileDeleteResponse: type: object properties: - arguments: - type: string id: type: string - name: - type: string - server_label: - type: string - type: + description: The file identifier that was deleted + object: type: string - const: mcp_approval_request - default: mcp_approval_request + const: file + default: file + description: The object type, which is always "file" + deleted: + type: boolean + description: >- + Whether the file was successfully deleted additionalProperties: false required: - - arguments - id - - name - - server_label - - type - title: OpenAIResponseMCPApprovalRequest + - object + - deleted + title: OpenAIFileDeleteResponse description: >- - A request for human approval of a tool invocation. - OpenAIResponseMCPApprovalResponse: + Response for deleting a file in OpenAI Files API. + Response: + type: object + title: Response + HealthInfo: type: object properties: - approval_request_id: - type: string - approve: - type: boolean - type: - type: string - const: mcp_approval_response - default: mcp_approval_response - id: - type: string - reason: + status: type: string + enum: + - OK + - Error + - Not Implemented + description: Current health status of the service additionalProperties: false required: - - approval_request_id - - approve - - type - title: OpenAIResponseMCPApprovalResponse - description: A response to an MCP approval request. - OpenAIResponseMessage: + - status + title: HealthInfo + description: >- + Health status information for the service. + RouteInfo: type: object 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: + route: type: string - status: + description: The API endpoint path + method: type: string + description: HTTP method for the route + provider_types: + type: array + items: + type: string + description: >- + List of provider types that implement this route additionalProperties: false required: - - content - - role - - type - title: OpenAIResponseMessage + - route + - method + - provider_types + title: RouteInfo 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": + Information about an API route including its path, method, and implementing + providers. + ListRoutesResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/RouteInfo' + description: >- + List of available route information objects + additionalProperties: false + required: + - data + title: ListRoutesResponse + description: >- + Response containing a list of all available API routes. + OpenAIModel: type: object properties: - text: + id: type: string - type: + object: type: string - const: output_text - default: output_text - annotations: + const: model + default: model + created: + type: integer + owned_by: + type: string + custom_metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + additionalProperties: false + required: + - id + - object + - created + - owned_by + title: OpenAIModel + description: A model from OpenAI. + OpenAIListModelsResponse: + type: object + properties: + data: type: array items: - $ref: '#/components/schemas/OpenAIResponseAnnotations' + $ref: '#/components/schemas/OpenAIModel' additionalProperties: false required: - - text - - type - - annotations - title: >- - OpenAIResponseOutputMessageContentOutputText - "OpenAIResponseOutputMessageFileSearchToolCall": + - data + title: OpenAIListModelsResponse + Model: type: object properties: - id: + identifier: type: string - description: Unique identifier for this tool call - queries: - type: array - items: - type: string - description: List of search queries executed - status: + description: >- + Unique identifier for this resource in llama stack + provider_resource_id: type: string description: >- - Current status of the file search operation + Unique identifier for this resource in the provider + provider_id: + type: string + description: >- + ID of the provider that owns this resource type: type: string - const: file_search_call - default: file_search_call + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: model + default: model description: >- - Tool call type identifier, always "file_search_call" - results: - type: array - items: - 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. + The resource type, always 'model' for model resources + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Any additional metadata for this model + model_type: + $ref: '#/components/schemas/ModelType' + default: llm description: >- - (Optional) Search results returned by the file search operation + The type of model (LLM or embedding model) additionalProperties: false required: - - id - - queries - - status + - identifier + - provider_id - type - title: >- - OpenAIResponseOutputMessageFileSearchToolCall + - metadata + - model_type + title: Model description: >- - File search tool call output message for OpenAI responses. - "OpenAIResponseOutputMessageFunctionToolCall": + A model resource representing an AI model registered in Llama Stack. + ModelType: + type: string + enum: + - llm + - embedding + - rerank + title: ModelType + description: >- + Enumeration of supported model types in Llama Stack. + RunModerationRequest: type: object properties: - call_id: - type: string - description: Unique identifier for the function call - name: - type: string - description: Name of the function being called - arguments: - type: string + input: + oneOf: + - type: string + - type: array + items: + type: string description: >- - JSON string containing the function arguments - type: + Input (or inputs) to classify. Can be a single string, an array of strings, + or an array of multi-modal input objects similar to other models. + model: type: string - const: function_call - default: function_call description: >- - Tool call type identifier, always "function_call" + (Optional) The content moderation model you would like to use. + additionalProperties: false + required: + - input + title: RunModerationRequest + ModerationObject: + type: object + properties: id: type: string description: >- - (Optional) Additional identifier for the tool call - status: + The unique identifier for the moderation request. + model: type: string description: >- - (Optional) Current status of the function call execution + The model used to generate the moderation results. + results: + type: array + items: + $ref: '#/components/schemas/ModerationObjectResults' + description: A list of moderation objects additionalProperties: false required: - - call_id - - name - - arguments - - type - title: >- - OpenAIResponseOutputMessageFunctionToolCall - description: >- - Function tool call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPCall: + - id + - model + - results + title: ModerationObject + description: A moderation object. + ModerationObjectResults: type: object properties: - id: - type: string - description: Unique identifier for this MCP call - type: - type: string - const: mcp_call - default: mcp_call + flagged: + type: boolean description: >- - Tool call type identifier, always "mcp_call" - arguments: - type: string + Whether any of the below categories are flagged. + categories: + type: object + additionalProperties: + type: boolean description: >- - JSON string containing the MCP call arguments - name: - type: string - description: Name of the MCP method being called - server_label: - type: string + A list of the categories, and whether they are flagged or not. + category_applied_input_types: + type: object + additionalProperties: + type: array + items: + type: string description: >- - Label identifying the MCP server handling the call - error: - type: string + A list of the categories along with the input type(s) that the score applies + to. + category_scores: + type: object + additionalProperties: + type: number description: >- - (Optional) Error message if the MCP call failed - output: + A list of the categories along with their scores as predicted by model. + user_message: type: string - description: >- - (Optional) Output result from the successful MCP call + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object additionalProperties: false required: - - id - - type - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - description: >- - Model Context Protocol (MCP) call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPListTools: + - flagged + - metadata + title: ModerationObjectResults + description: A moderation object. + Prompt: type: object properties: - id: + prompt: type: string description: >- - Unique identifier for this MCP list tools operation - type: - type: string - const: mcp_list_tools - default: mcp_list_tools + The system prompt text with variable placeholders. Variables are only + supported when using the Responses API. + version: + type: integer description: >- - Tool call type identifier, always "mcp_list_tools" - server_label: + Version (integer starting at 1, incremented on save) + prompt_id: type: string description: >- - Label identifying the MCP server providing the tools - tools: + Unique identifier formatted as 'pmpt_<48-digit-hash>' + variables: 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. + type: string description: >- - List of available tools provided by the MCP server + List of prompt variable names that can be used in the prompt template + is_default: + type: boolean + default: false + description: >- + Boolean indicating whether this version is the default version for this + prompt additionalProperties: false required: - - id - - type - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools + - version + - prompt_id + - variables + - is_default + title: Prompt description: >- - MCP list tools output message containing available tools from an MCP server. - "OpenAIResponseOutputMessageWebSearchToolCall": + A prompt resource representing a stored OpenAI Compatible prompt template + in Llama Stack. + ListPromptsResponse: 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" + data: + type: array + items: + $ref: '#/components/schemas/Prompt' additionalProperties: false required: - - id - - status - - type - title: >- - OpenAIResponseOutputMessageWebSearchToolCall - description: >- - Web search tool call output message for OpenAI responses. - CreateConversationRequest: + - data + title: ListPromptsResponse + description: Response model to list prompts. + CreatePromptRequest: type: object properties: - items: + prompt: + type: string + description: >- + The prompt text content with variable placeholders. + variables: type: array items: - $ref: '#/components/schemas/ConversationItem' - description: >- - Initial items to include in the conversation context. - metadata: - type: object - additionalProperties: type: string description: >- - Set of key-value pairs that can be attached to an object. + List of variable names that can be used in the prompt template. additionalProperties: false - title: CreateConversationRequest - Conversation: + required: + - prompt + title: CreatePromptRequest + UpdatePromptRequest: type: object properties: - id: - type: string - object: + prompt: type: string - const: conversation - default: conversation - created_at: + description: The updated prompt text content. + version: type: integer - metadata: - type: object - additionalProperties: - type: string - items: + description: >- + The current version of the prompt being updated. + variables: type: array items: - type: object - title: dict - description: >- - dict() -> new empty dictionary dict(mapping) -> new dictionary initialized - from a mapping object's (key, value) pairs dict(iterable) -> new - dictionary initialized as if via: d = {} for k, v in iterable: d[k] - = v dict(**kwargs) -> new dictionary initialized with the name=value - pairs in the keyword argument list. For example: dict(one=1, two=2) + type: string + description: >- + Updated list of variable names that can be used in the prompt template. + set_as_default: + type: boolean + description: >- + Set the new version as the default (default=True). additionalProperties: false required: - - id - - object - - created_at - title: Conversation - description: OpenAI-compatible conversation object. - UpdateConversationRequest: + - prompt + - version + - set_as_default + title: UpdatePromptRequest + SetDefaultVersionRequest: type: object properties: - metadata: - type: object - additionalProperties: - type: string - description: >- - Set of key-value pairs that can be attached to an object. + version: + type: integer + description: The version to set as default. additionalProperties: false required: - - metadata - title: UpdateConversationRequest - ConversationDeletedResource: + - version + title: SetDefaultVersionRequest + ProviderInfo: type: object properties: - id: + api: type: string - object: + description: The API name this provider implements + provider_id: type: string - default: conversation.deleted - deleted: - type: boolean - default: true + description: Unique identifier for the provider + provider_type: + type: string + description: The type of provider implementation + config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Configuration parameters for the provider + health: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Current health status of the provider additionalProperties: false required: - - id - - object - - deleted - title: ConversationDeletedResource - description: Response for deleted conversation. - ConversationItemList: + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo + description: >- + Information about a registered provider including its configuration and health + status. + ListProvidersResponse: type: object properties: - object: - type: string - default: list data: type: array items: - $ref: '#/components/schemas/ConversationItem' - first_id: - type: string - last_id: - type: string - has_more: - type: boolean - default: false + $ref: '#/components/schemas/ProviderInfo' + description: List of provider information objects additionalProperties: false required: - - object - data - - has_more - title: ConversationItemList + title: ListProvidersResponse description: >- - List of conversation items with pagination. - AddItemsRequest: + Response containing a list of all available providers. + ListOpenAIResponseObject: type: object properties: - items: + data: type: array items: - $ref: '#/components/schemas/ConversationItem' + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' description: >- - Items to include in the conversation context. - additionalProperties: false - required: - - items - title: AddItemsRequest - ConversationItemDeletedResource: - type: object - properties: - id: + List of response objects with their input context + has_more: + type: boolean + description: >- + Whether there are more results available beyond this page + first_id: + type: string + description: >- + Identifier of the first item in this page + last_id: type: string + description: Identifier of the last item in this page object: type: string - default: conversation.item.deleted - deleted: - type: boolean - default: true + const: list + default: list + description: Object type identifier, always "list" additionalProperties: false required: - - id + - data + - has_more + - first_id + - last_id - object - - deleted - title: ConversationItemDeletedResource - description: Response for deleted conversation item. - OpenAIEmbeddingsRequestWithExtraBody: + title: ListOpenAIResponseObject + description: >- + Paginated list of OpenAI response objects with navigation metadata. + OpenAIResponseError: type: object properties: - model: - type: string - description: >- - The identifier of the model to use. The model must be an embedding model - registered with Llama Stack and available via the /models endpoint. - input: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - 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. - encoding_format: + code: type: string - default: float - description: >- - (Optional) The format to return the embeddings in. Can be either "float" - or "base64". Defaults to "float". - dimensions: - type: integer description: >- - (Optional) The number of dimensions the resulting output embeddings should - have. Only supported in text-embedding-3 and later models. - user: + Error code identifying the type of failure + message: type: string description: >- - (Optional) A unique identifier representing your end-user, which can help - OpenAI to monitor and detect abuse. + Human-readable error message describing the failure additionalProperties: false required: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody + - code + - message + title: OpenAIResponseError description: >- - Request parameters for OpenAI-compatible embeddings endpoint. - OpenAIEmbeddingData: + 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: - object: + type: type: string - const: embedding - default: embedding + const: file_search + default: file_search description: >- - The object type, which will be "embedding" - embedding: - oneOf: - - type: array - items: - type: number - - type: string + Tool type identifier, always "file_search" + vector_store_ids: + type: array + items: + type: string description: >- - The embedding vector as a list of floats (when encoding_format="float") - or as a base64-encoded string (when encoding_format="base64") - index: + 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: >- - The index of the embedding in the input list + (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: - - object - - embedding - - index - title: OpenAIEmbeddingData + - type + - vector_store_ids + title: OpenAIResponseInputToolFileSearch description: >- - A single embedding data object from an OpenAI-compatible embeddings response. - OpenAIEmbeddingUsage: + File search tool configuration for OpenAI response inputs. + OpenAIResponseInputToolFunction: type: object properties: - prompt_tokens: - type: integer - description: The number of tokens in the input - total_tokens: - type: integer - description: The total number of tokens used + 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: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage + - type + - name + title: OpenAIResponseInputToolFunction description: >- - Usage information for an OpenAI-compatible embeddings response. - OpenAIEmbeddingsResponse: + Function tool configuration for OpenAI response inputs. + OpenAIResponseInputToolWebSearch: type: object properties: - object: - type: string - const: list - default: list - description: The object type, which will be "list" - data: - type: array - items: - $ref: '#/components/schemas/OpenAIEmbeddingData' - description: List of embedding data objects - model: - type: string - description: >- - The model that was used to generate the embeddings - usage: - $ref: '#/components/schemas/OpenAIEmbeddingUsage' - description: Usage information + type: + oneOf: + - type: string + const: web_search + - type: string + const: web_search_preview + - type: string + const: web_search_preview_2025_03_11 + - type: string + const: web_search_2025_08_26 + 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: - - object - - data - - model - - usage - title: OpenAIEmbeddingsResponse - description: >- - Response from an OpenAI-compatible embeddings request. - OpenAIFilePurpose: - type: string - enum: - - assistants - - batch - title: OpenAIFilePurpose + - type + title: OpenAIResponseInputToolWebSearch description: >- - Valid purpose values for OpenAI Files API. - ListOpenAIFileResponse: + Web search tool configuration for OpenAI response inputs. + OpenAIResponseObjectWithInput: type: object properties: - data: + 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/OpenAIFileObject' - description: List of file objects - has_more: + $ref: '#/components/schemas/OpenAIResponseOutput' + description: >- + List of generated output items (messages, tool calls, etc.) + parallel_tool_calls: type: boolean + default: false description: >- - Whether there are more files available beyond this page - first_id: + Whether tool calls can be executed in parallel + previous_response_id: type: string description: >- - ID of the first file in the list for pagination - last_id: - type: string + (Optional) ID of the previous response in a conversation + prompt: + $ref: '#/components/schemas/OpenAIResponsePrompt' description: >- - ID of the last file in the list for pagination - object: + (Optional) Reference to a prompt template and its variables. + status: type: string - const: list - default: list - description: The object type, which is always "list" - additionalProperties: false - required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIFileResponse - description: >- - Response for listing files in OpenAI Files API. - OpenAIFileObject: - type: object - properties: - object: + 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 - const: file - default: file - description: The object type, which is always "file" - id: + 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: >- - The file identifier, which can be referenced in the API endpoints - bytes: - type: integer - description: The size of the file, in bytes - created_at: + (Optional) System message inserted into the model's context + max_tool_calls: type: integer description: >- - The Unix timestamp (in seconds) for when the file was created - expires_at: - type: integer + (Optional) Max number of total calls to built-in tools that can be processed + in a response + input: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseInput' description: >- - The Unix timestamp (in seconds) for when the file expires - filename: - type: string - description: The name of the file - purpose: - type: string - enum: - - assistants - - batch - description: The intended purpose of the file + List of input items that led to this response additionalProperties: false required: - - object - - id - - bytes - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject + - id + - model + - object + - output + - parallel_tool_calls + - status + - text + - input + title: OpenAIResponseObjectWithInput description: >- - OpenAI File object as defined in the OpenAI Files API. - ExpiresAfter: + 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' + propertyName: type + 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' + DataSource: + discriminator: + mapping: + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + OpenAIResponseInputToolMCP: type: object properties: - anchor: + type: type: string - const: created_at - seconds: - type: integer + 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: - - anchor - - seconds - title: ExpiresAfter + - type + - server_label + - server_url + - require_approval + title: OpenAIResponseInputToolMCP 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) - OpenAIFileDeleteResponse: + Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + CreateOpenaiResponseRequest: type: object properties: - id: - type: string - description: The file identifier that was deleted - object: + input: + oneOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/OpenAIResponseInput' + description: Input message(s) to create the response. + model: type: string - const: file - default: file - description: The object type, which is always "file" - deleted: - type: boolean + description: The underlying LLM used for completions. + prompt: + $ref: '#/components/schemas/OpenAIResponsePrompt' description: >- - Whether the file was successfully deleted - additionalProperties: false - required: - - id - - object - - deleted - title: OpenAIFileDeleteResponse - description: >- - Response for deleting a file in OpenAI Files API. - Response: - type: object - title: Response - HealthInfo: - type: object - properties: - status: + (Optional) Prompt object with ID, version, and variables. + instructions: type: string - enum: - - OK - - Error - - Not Implemented - description: Current health status of the service - additionalProperties: false - required: - - status - title: HealthInfo - description: >- - Health status information for the service. - RouteInfo: - type: object - properties: - route: + previous_response_id: type: string - description: The API endpoint path - method: + 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: HTTP method for the route - provider_types: + 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: - type: string - description: >- - List of provider types that implement this route - additionalProperties: false - required: - - route - - method - - provider_types - title: RouteInfo - description: >- - Information about an API route including its path, method, and implementing - providers. - ListRoutesResponse: - type: object - properties: - data: + $ref: '#/components/schemas/OpenAIResponseInputTool' + include: type: array items: - $ref: '#/components/schemas/RouteInfo' + type: string description: >- - List of available route information objects + (Optional) Additional fields to include in the response. + max_infer_iters: + type: integer + max_tool_calls: + type: integer + description: >- + (Optional) Max number of total calls to built-in tools that can be processed + in a response. additionalProperties: false required: - - data - title: ListRoutesResponse - description: >- - Response containing a list of all available API routes. - OpenAIModel: + - input + - model + title: CreateOpenaiResponseRequest + OpenAIResponseObject: 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 - object: + description: Unique identifier for this response + model: type: string - const: model - default: model - created: - type: integer - owned_by: + description: Model identifier used for generation + object: type: string - custom_metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - additionalProperties: false - required: - - id - - object - - created - - owned_by - title: OpenAIModel - description: A model from OpenAI. - OpenAIListModelsResponse: - type: object - properties: - data: + const: response + default: response + description: >- + Object type identifier, always "response" + output: type: array items: - $ref: '#/components/schemas/OpenAIModel' - additionalProperties: false - required: - - data - title: OpenAIListModelsResponse - Model: - type: object - properties: - identifier: + $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: >- - Unique identifier for this resource in llama stack - provider_resource_id: + (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: >- - Unique identifier for this resource in the provider - provider_id: + 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: >- - ID of the provider that owns this resource + (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 + max_tool_calls: + type: integer + description: >- + (Optional) Max number of total calls to built-in tools that can be processed + in a response + additionalProperties: false + required: + - created_at + - id + - model + - object + - output + - parallel_tool_calls + - status + - text + title: OpenAIResponseObject + description: >- + Complete OpenAI response object containing generation results and metadata. + OpenAIResponseContentPartOutputText: + type: object + properties: type: type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: model - default: model + const: output_text + default: output_text description: >- - The resource type, always 'model' for model resources - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Any additional metadata for this model - model_type: - $ref: '#/components/schemas/ModelType' - default: llm + Content part type identifier, always "output_text" + text: + type: string + description: Text emitted for this content part + annotations: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseAnnotations' description: >- - The type of model (LLM or embedding model) + Structured annotations associated with the text + logprobs: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: (Optional) Token log probability details additionalProperties: false required: - - identifier - - provider_id - type - - metadata - - model_type - title: Model - description: >- - A model resource representing an AI model registered in Llama Stack. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType + - text + - annotations + title: OpenAIResponseContentPartOutputText description: >- - Enumeration of supported model types in Llama Stack. - RunModerationRequest: + Text content within a streamed response part. + "OpenAIResponseContentPartReasoningSummary": type: object properties: - input: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - Input (or inputs) to classify. Can be a single string, an array of strings, - or an array of multi-modal input objects similar to other models. - model: + type: type: string + const: summary_text + default: summary_text description: >- - (Optional) The content moderation model you would like to use. + Content part type identifier, always "summary_text" + text: + type: string + description: Summary text additionalProperties: false required: - - input - title: RunModerationRequest - ModerationObject: + - type + - text + title: >- + OpenAIResponseContentPartReasoningSummary + description: >- + Reasoning summary part in a streamed response. + OpenAIResponseContentPartReasoningText: type: object properties: - id: + type: type: string + const: reasoning_text + default: reasoning_text description: >- - The unique identifier for the moderation request. - model: + Content part type identifier, always "reasoning_text" + text: type: string - description: >- - The model used to generate the moderation results. - results: - type: array - items: - $ref: '#/components/schemas/ModerationObjectResults' - description: A list of moderation objects + description: Reasoning text supplied by the model additionalProperties: false required: - - id - - model - - results - title: ModerationObject - description: A moderation object. - ModerationObjectResults: + - type + - text + title: OpenAIResponseContentPartReasoningText + description: >- + Reasoning text emitted as part of a streamed response. + OpenAIResponseObjectStream: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + discriminator: + propertyName: type + mapping: + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + "OpenAIResponseObjectStreamResponseCompleted": type: object properties: - flagged: - type: boolean - description: >- - Whether any of the below categories are flagged. - categories: - type: object - additionalProperties: - type: boolean - description: >- - A list of the categories, and whether they are flagged or not. - category_applied_input_types: - type: object - additionalProperties: - type: array - items: - type: string - description: >- - A list of the categories along with the input type(s) that the score applies - to. - category_scores: - type: object - additionalProperties: - type: number - description: >- - A list of the categories along with their scores as predicted by model. - user_message: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + description: Completed response object + type: type: string - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + const: response.completed + default: response.completed + description: >- + Event type identifier, always "response.completed" additionalProperties: false - required: - - flagged - - metadata - title: ModerationObjectResults - description: A moderation object. - Prompt: + required: + - response + - type + title: >- + OpenAIResponseObjectStreamResponseCompleted + description: >- + Streaming event indicating a response has been completed. + "OpenAIResponseObjectStreamResponseContentPartAdded": type: object properties: - prompt: - type: string - description: >- - The system prompt text with variable placeholders. Variables are only - supported when using the Responses API. - version: + content_index: type: integer description: >- - Version (integer starting at 1, incremented on save) - prompt_id: + Index position of the part within the content array + response_id: type: string description: >- - Unique identifier formatted as 'pmpt_<48-digit-hash>' - variables: - type: array - items: - type: string + Unique identifier of the response containing this content + item_id: + type: string description: >- - List of prompt variable names that can be used in the prompt template - is_default: - type: boolean - default: false + Unique identifier of the output item containing this content part + output_index: + type: integer description: >- - Boolean indicating whether this version is the default version for this - prompt + Index position of the output item in the response + part: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + description: The content part that was added + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.content_part.added + default: response.content_part.added + description: >- + Event type identifier, always "response.content_part.added" additionalProperties: false required: - - version - - prompt_id - - variables - - is_default - title: Prompt + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseContentPartAdded description: >- - A prompt resource representing a stored OpenAI Compatible prompt template - in Llama Stack. - ListPromptsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Prompt' - additionalProperties: false - required: - - data - title: ListPromptsResponse - description: Response model to list prompts. - CreatePromptRequest: + Streaming event for when a new content part is added to a response item. + "OpenAIResponseObjectStreamResponseContentPartDone": type: object properties: - prompt: + content_index: + type: integer + description: >- + Index position of the part within the content array + response_id: type: string description: >- - The prompt text content with variable placeholders. - variables: - type: array - items: - type: string + Unique identifier of the response containing this content + item_id: + type: string description: >- - List of variable names that can be used in the prompt template. + Unique identifier of the output item containing this content part + output_index: + type: integer + description: >- + Index position of the output item in the response + part: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + description: The completed content part + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.content_part.done + default: response.content_part.done + description: >- + Event type identifier, always "response.content_part.done" additionalProperties: false required: - - prompt - title: CreatePromptRequest - UpdatePromptRequest: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseContentPartDone + description: >- + Streaming event for when a content part is completed. + "OpenAIResponseObjectStreamResponseCreated": type: object properties: - prompt: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + description: The response object that was created + type: type: string - description: The updated prompt text content. - version: - type: integer - description: >- - The current version of the prompt being updated. - variables: - type: array - items: - type: string - description: >- - Updated list of variable names that can be used in the prompt template. - set_as_default: - type: boolean + const: response.created + default: response.created description: >- - Set the new version as the default (default=True). + Event type identifier, always "response.created" additionalProperties: false required: - - prompt - - version - - set_as_default - title: UpdatePromptRequest - SetDefaultVersionRequest: + - response + - type + title: >- + OpenAIResponseObjectStreamResponseCreated + description: >- + Streaming event indicating a new response has been created. + OpenAIResponseObjectStreamResponseFailed: type: object properties: - version: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + description: Response object describing the failure + sequence_number: type: integer - description: The version to set as default. + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.failed + default: response.failed + description: >- + Event type identifier, always "response.failed" additionalProperties: false required: - - version - title: SetDefaultVersionRequest - ProviderInfo: + - response + - sequence_number + - type + title: OpenAIResponseObjectStreamResponseFailed + description: >- + Streaming event emitted when a response fails. + "OpenAIResponseObjectStreamResponseFileSearchCallCompleted": type: object properties: - api: - type: string - description: The API name this provider implements - provider_id: + item_id: type: string - description: Unique identifier for the provider - provider_type: + description: >- + Unique identifier of the completed file search call + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: type: string - description: The type of provider implementation - config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + const: response.file_search_call.completed + default: response.file_search_call.completed description: >- - Configuration parameters for the provider - health: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Current health status of the provider + Event type identifier, always "response.file_search_call.completed" additionalProperties: false required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseFileSearchCallCompleted description: >- - Information about a registered provider including its configuration and health - status. - ListProvidersResponse: + Streaming event for completed file search calls. + "OpenAIResponseObjectStreamResponseFileSearchCallInProgress": type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/ProviderInfo' - description: List of provider information objects + item_id: + type: string + description: >- + Unique identifier of the file search call + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + description: >- + Event type identifier, always "response.file_search_call.in_progress" additionalProperties: false required: - - data - title: ListProvidersResponse + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseFileSearchCallInProgress description: >- - Response containing a list of all available providers. - ListOpenAIResponseObject: + Streaming event for file search calls in progress. + "OpenAIResponseObjectStreamResponseFileSearchCallSearching": type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput' + item_id: + type: string description: >- - List of response objects with their input context - has_more: - type: boolean + Unique identifier of the file search call + output_index: + type: integer description: >- - Whether there are more results available beyond this page - first_id: - type: string + Index position of the item in the output list + sequence_number: + type: integer description: >- - Identifier of the first item in this page - last_id: - type: string - description: Identifier of the last item in this page - object: + Sequential number for ordering streaming events + type: type: string - const: list - default: list - description: Object type identifier, always "list" + const: response.file_search_call.searching + default: response.file_search_call.searching + description: >- + Event type identifier, always "response.file_search_call.searching" additionalProperties: false required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIResponseObject + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseFileSearchCallSearching description: >- - Paginated list of OpenAI response objects with navigation metadata. - OpenAIResponseError: + Streaming event for file search currently searching. + "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta": type: object properties: - code: + delta: type: string description: >- - Error code identifying the type of failure - message: + Incremental function call arguments being added + item_id: type: string description: >- - Human-readable error message describing the failure + Unique identifier of the function call being updated + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + description: >- + Event type identifier, always "response.function_call_arguments.delta" additionalProperties: false required: - - code - - message - title: OpenAIResponseError + - delta + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta 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: + Streaming event for incremental function call argument updates. + "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone": type: object properties: - type: + arguments: type: string - const: file_search - default: file_search description: >- - Tool type identifier, always "file_search" - vector_store_ids: - type: array - items: - type: string + Final complete arguments JSON string for the function call + item_id: + 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 + Unique identifier of the completed function call + output_index: + type: integer description: >- - (Optional) Additional filters to apply to the search - max_num_results: + Index position of the item in the output list + sequence_number: 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 + Sequential number for ordering streaming events + type: + type: string + const: response.function_call_arguments.done + default: response.function_call_arguments.done description: >- - (Optional) Options for ranking and scoring search results + Event type identifier, always "response.function_call_arguments.done" additionalProperties: false required: + - arguments + - item_id + - output_index + - sequence_number - type - - vector_store_ids - title: OpenAIResponseInputToolFileSearch + title: >- + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone description: >- - File search tool configuration for OpenAI response inputs. - OpenAIResponseInputToolFunction: + Streaming event for when function call arguments are completed. + "OpenAIResponseObjectStreamResponseInProgress": type: object properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + description: Current response state while in progress + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events 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 + const: response.in_progress + default: response.in_progress 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 + Event type identifier, always "response.in_progress" + additionalProperties: false + required: + - response + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseInProgress + description: >- + Streaming event indicating the response remains in progress. + "OpenAIResponseObjectStreamResponseIncomplete": + type: object + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' description: >- - (Optional) JSON schema defining the function's parameters - strict: - type: boolean + Response object describing the incomplete state + sequence_number: + type: integer description: >- - (Optional) Whether to enforce strict parameter validation + Sequential number for ordering streaming events + type: + type: string + const: response.incomplete + default: response.incomplete + description: >- + Event type identifier, always "response.incomplete" additionalProperties: false required: + - response + - sequence_number - type - - name - title: OpenAIResponseInputToolFunction + title: >- + OpenAIResponseObjectStreamResponseIncomplete description: >- - Function tool configuration for OpenAI response inputs. - OpenAIResponseInputToolWebSearch: + Streaming event emitted when a response ends in an incomplete state. + "OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta": type: object properties: + delta: + type: string + item_id: + type: string + output_index: + type: integer + sequence_number: + type: integer type: - oneOf: - - type: string - const: web_search - - type: string - const: web_search_preview - - type: string - const: web_search_preview_2025_03_11 - - type: string - const: web_search_2025_08_26 - 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" + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta additionalProperties: false required: + - delta + - item_id + - output_index + - sequence_number - type - title: OpenAIResponseInputToolWebSearch - description: >- - Web search tool configuration for OpenAI response inputs. - OpenAIResponseObjectWithInput: + title: >- + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + "OpenAIResponseObjectStreamResponseMcpCallArgumentsDone": 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: + arguments: type: string - description: >- - (Optional) Truncation strategy applied to the response - usage: - $ref: '#/components/schemas/OpenAIResponseUsage' - description: >- - (Optional) Token usage information for the response - instructions: + item_id: type: string - description: >- - (Optional) System message inserted into the model's context - max_tool_calls: + output_index: type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response - input: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: >- - List of input items that led to this response + sequence_number: + type: integer + type: + type: string + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done 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: + - arguments + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + "OpenAIResponseObjectStreamResponseMcpCallCompleted": type: object properties: - id: - type: string - description: Unique identifier of the prompt template - variables: - type: object - additionalProperties: - $ref: '#/components/schemas/OpenAIResponseInputMessageContent' + sequence_number: + type: integer 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: + Sequential number for ordering streaming events + type: type: string + const: response.mcp_call.completed + default: response.mcp_call.completed description: >- - Version number of the prompt to use (defaults to latest if not specified) + Event type identifier, always "response.mcp_call.completed" additionalProperties: false required: - - id - title: OpenAIResponsePrompt - description: >- - OpenAI compatible Prompt object that is used in OpenAI responses. - OpenAIResponseText: + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpCallCompleted + description: Streaming event for completed MCP calls. + "OpenAIResponseObjectStreamResponseMcpCallFailed": 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 + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.mcp_call.failed + default: response.mcp_call.failed description: >- - (Optional) Text format configuration specifying output format requirements + Event type identifier, always "response.mcp_call.failed" 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: + required: + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpCallFailed + description: Streaming event for failed MCP calls. + "OpenAIResponseObjectStreamResponseMcpCallInProgress": type: object properties: + item_id: + type: string + description: Unique identifier of the MCP call + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events 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. + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress description: >- - (Optional) Restriction on which tools can be used from this server + Event type identifier, always "response.mcp_call.in_progress" additionalProperties: false required: + - item_id + - output_index + - sequence_number - type - - server_label - title: OpenAIResponseToolMCP + title: >- + OpenAIResponseObjectStreamResponseMcpCallInProgress description: >- - Model Context Protocol (MCP) tool configuration for OpenAI response object. - OpenAIResponseUsage: + Streaming event for MCP calls in progress. + "OpenAIResponseObjectStreamResponseMcpListToolsCompleted": 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: + sequence_number: 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 + type: + type: string + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed additionalProperties: false required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - description: Usage information for OpenAI response. - ResponseGuardrailSpec: + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpListToolsCompleted + "OpenAIResponseObjectStreamResponseMcpListToolsFailed": type: object properties: + sequence_number: + type: integer type: type: string - description: The type/identifier of the guardrail. + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed additionalProperties: false required: + - sequence_number - 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: + title: >- + OpenAIResponseObjectStreamResponseMcpListToolsFailed + "OpenAIResponseObjectStreamResponseMcpListToolsInProgress": type: object properties: + sequence_number: + type: integer 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: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + additionalProperties: false + required: + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpListToolsInProgress + "OpenAIResponseObjectStreamResponseOutputItemAdded": + type: object + properties: + response_id: 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: + Unique identifier of the response containing this output + item: 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 + - $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' 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. + The output item that was added (message, tool call, etc.) + output_index: + type: integer description: >- - (Optional) Restriction on which tools can be used from this server + Index position of this item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.output_item.added + default: response.output_item.added + description: >- + Event type identifier, always "response.output_item.added" additionalProperties: false required: + - response_id + - item + - output_index + - sequence_number - type - - server_label - - server_url - - require_approval - title: OpenAIResponseInputToolMCP + title: >- + OpenAIResponseObjectStreamResponseOutputItemAdded + description: >- + Streaming event for when a new output item is added to the response. + "OpenAIResponseObjectStreamResponseOutputItemDone": + type: object + properties: + response_id: + type: string + description: >- + Unique identifier of the response containing this output + item: + 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' + description: >- + The completed output item (message, tool call, etc.) + output_index: + type: integer + description: >- + Index position of this item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.output_item.done + default: response.output_item.done + description: >- + Event type identifier, always "response.output_item.done" + additionalProperties: false + required: + - response_id + - item + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseOutputItemDone description: >- - Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - CreateOpenaiResponseRequest: + Streaming event for when an output item is completed. + "OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded": 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: + item_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 + Unique identifier of the item to which the annotation is being added + output_index: + type: integer 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 + Index position of the output item in the response's output array + content_index: + type: integer description: >- - (Optional) Additional fields to include in the response. - max_infer_iters: + Index position of the content part within the output item + annotation_index: type: integer - max_tool_calls: + description: >- + Index of the annotation within the content part + annotation: + 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' + description: The annotation object being added + sequence_number: type: integer description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response. + Sequential number for ordering streaming events + type: + type: string + const: response.output_text.annotation.added + default: response.output_text.annotation.added + description: >- + Event type identifier, always "response.output_text.annotation.added" additionalProperties: false required: - - input - - model - title: CreateOpenaiResponseRequest - OpenAIResponseObject: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + description: >- + Streaming event for when an annotation is added to output text. + "OpenAIResponseObjectStreamResponseOutputTextDelta": type: object properties: - created_at: + content_index: 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: + description: Index position within the text content + delta: type: string - description: Model identifier used for generation - object: + description: Incremental text content being added + item_id: 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 + Unique identifier of the output item being updated + output_index: + type: integer description: >- - (Optional) ID of the previous response in a conversation - prompt: - $ref: '#/components/schemas/OpenAIResponsePrompt' + Index position of the item in the output list + sequence_number: + type: integer description: >- - (Optional) Reference to a prompt template and its variables. - status: + Sequential number for ordering streaming events + type: type: string + const: response.output_text.delta + default: response.output_text.delta description: >- - Current status of the response generation - temperature: - type: number - description: >- - (Optional) Sampling temperature used for generation + Event type identifier, always "response.output_text.delta" + additionalProperties: false + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseOutputTextDelta + description: >- + Streaming event for incremental text content updates. + "OpenAIResponseObjectStreamResponseOutputTextDone": + type: object + properties: + content_index: + type: integer + description: Index position within the text content 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: + Final complete text content of the output item + item_id: type: string description: >- - (Optional) System message inserted into the model's context - max_tool_calls: + Unique identifier of the completed output item + output_index: type: integer description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response - additionalProperties: false - required: - - created_at - - id - - model - - object - - output - - parallel_tool_calls - - status - - text - title: OpenAIResponseObject - description: >- - Complete OpenAI response object containing generation results and metadata. - OpenAIResponseContentPartOutputText: - type: object - properties: - type: - type: string - const: output_text - default: output_text + Index position of the item in the output list + sequence_number: + type: integer description: >- - Content part type identifier, always "output_text" - text: + Sequential number for ordering streaming events + type: type: string - description: Text emitted for this content part - annotations: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseAnnotations' + const: response.output_text.done + default: response.output_text.done description: >- - Structured annotations associated with the text - logprobs: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) Token log probability details + Event type identifier, always "response.output_text.done" additionalProperties: false required: - - type + - content_index - text - - annotations - title: OpenAIResponseContentPartOutputText + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseOutputTextDone description: >- - Text content within a streamed response part. - "OpenAIResponseContentPartReasoningSummary": + Streaming event for when text output is completed. + "OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded": type: object properties: - type: + item_id: type: string - const: summary_text - default: summary_text + description: Unique identifier of the output item + output_index: + type: integer + description: Index position of the output item + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + description: The summary part that was added + sequence_number: + type: integer description: >- - Content part type identifier, always "summary_text" - text: + Sequential number for ordering streaming events + summary_index: + type: integer + description: >- + Index of the summary part within the reasoning summary + type: type: string - description: Summary text + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + description: >- + Event type identifier, always "response.reasoning_summary_part.added" additionalProperties: false required: + - item_id + - output_index + - part + - sequence_number + - summary_index - type - - text title: >- - OpenAIResponseContentPartReasoningSummary + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded description: >- - Reasoning summary part in a streamed response. - OpenAIResponseContentPartReasoningText: + Streaming event for when a new reasoning summary part is added. + "OpenAIResponseObjectStreamResponseReasoningSummaryPartDone": type: object properties: - type: + item_id: type: string - const: reasoning_text - default: reasoning_text + description: Unique identifier of the output item + output_index: + type: integer + description: Index position of the output item + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + description: The completed summary part + sequence_number: + type: integer description: >- - Content part type identifier, always "reasoning_text" - text: + Sequential number for ordering streaming events + summary_index: + type: integer + description: >- + Index of the summary part within the reasoning summary + type: type: string - description: Reasoning text supplied by the model + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done + description: >- + Event type identifier, always "response.reasoning_summary_part.done" additionalProperties: false required: + - item_id + - output_index + - part + - sequence_number + - summary_index - type - - text - title: OpenAIResponseContentPartReasoningText + title: >- + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone description: >- - Reasoning text emitted as part of a streamed response. - OpenAIResponseObjectStream: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - discriminator: - propertyName: type - mapping: - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - "OpenAIResponseObjectStreamResponseCompleted": + Streaming event for when a reasoning summary part is completed. + "OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta": type: object properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Completed response object + delta: + type: string + description: Incremental summary text being added + item_id: + type: string + description: Unique identifier of the output item + output_index: + type: integer + description: Index position of the output item + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + summary_index: + type: integer + description: >- + Index of the summary part within the reasoning summary type: type: string - const: response.completed - default: response.completed + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta description: >- - Event type identifier, always "response.completed" + Event type identifier, always "response.reasoning_summary_text.delta" additionalProperties: false required: - - response + - delta + - item_id + - output_index + - sequence_number + - summary_index - type title: >- - OpenAIResponseObjectStreamResponseCompleted + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta description: >- - Streaming event indicating a response has been completed. - "OpenAIResponseObjectStreamResponseContentPartAdded": + Streaming event for incremental reasoning summary text updates. + "OpenAIResponseObjectStreamResponseReasoningSummaryTextDone": type: object properties: - content_index: - type: integer - description: >- - Index position of the part within the content array - response_id: + text: type: string - description: >- - Unique identifier of the response containing this content + description: Final complete summary text item_id: type: string - description: >- - Unique identifier of the output item containing this content part + description: Unique identifier of the output item output_index: type: integer - description: >- - Index position of the output item in the response - part: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - description: The content part that was added + description: Index position of the output item sequence_number: type: integer description: >- Sequential number for ordering streaming events + summary_index: + type: integer + description: >- + Index of the summary part within the reasoning summary type: type: string - const: response.content_part.added - default: response.content_part.added + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done description: >- - Event type identifier, always "response.content_part.added" + Event type identifier, always "response.reasoning_summary_text.done" additionalProperties: false required: - - content_index - - response_id + - text - item_id - output_index - - part - sequence_number + - summary_index - type title: >- - OpenAIResponseObjectStreamResponseContentPartAdded + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone description: >- - Streaming event for when a new content part is added to a response item. - "OpenAIResponseObjectStreamResponseContentPartDone": + Streaming event for when reasoning summary text is completed. + "OpenAIResponseObjectStreamResponseReasoningTextDelta": type: object properties: content_index: type: integer description: >- - Index position of the part within the content array - response_id: - type: string - description: >- - Unique identifier of the response containing this content + Index position of the reasoning content part + delta: + type: string + description: Incremental reasoning text being added item_id: type: string description: >- - Unique identifier of the output item containing this content part + Unique identifier of the output item being updated output_index: type: integer description: >- - Index position of the output item in the response - part: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - description: The completed content part + Index position of the item in the output list sequence_number: type: integer description: >- Sequential number for ordering streaming events type: type: string - const: response.content_part.done - default: response.content_part.done + const: response.reasoning_text.delta + default: response.reasoning_text.delta description: >- - Event type identifier, always "response.content_part.done" + Event type identifier, always "response.reasoning_text.delta" additionalProperties: false required: - content_index - - response_id + - delta - item_id - output_index - - part - sequence_number - type title: >- - OpenAIResponseObjectStreamResponseContentPartDone + OpenAIResponseObjectStreamResponseReasoningTextDelta description: >- - Streaming event for when a content part is completed. - "OpenAIResponseObjectStreamResponseCreated": + Streaming event for incremental reasoning text updates. + "OpenAIResponseObjectStreamResponseReasoningTextDone": type: object properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: The response object that was created - type: + content_index: + type: integer + description: >- + Index position of the reasoning content part + text: + type: string + description: Final complete reasoning text + item_id: type: string - const: response.created - default: response.created description: >- - Event type identifier, always "response.created" - additionalProperties: false - required: - - response - - type - title: >- - OpenAIResponseObjectStreamResponseCreated - description: >- - Streaming event indicating a new response has been created. - OpenAIResponseObjectStreamResponseFailed: - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Response object describing the failure + Unique identifier of the completed output item + output_index: + type: integer + description: >- + Index position of the item in the output list sequence_number: type: integer description: >- Sequential number for ordering streaming events type: type: string - const: response.failed - default: response.failed + const: response.reasoning_text.done + default: response.reasoning_text.done description: >- - Event type identifier, always "response.failed" + Event type identifier, always "response.reasoning_text.done" additionalProperties: false required: - - response + - content_index + - text + - item_id + - output_index - sequence_number - type - title: OpenAIResponseObjectStreamResponseFailed + title: >- + OpenAIResponseObjectStreamResponseReasoningTextDone description: >- - Streaming event emitted when a response fails. - "OpenAIResponseObjectStreamResponseFileSearchCallCompleted": + Streaming event for when reasoning text is completed. + "OpenAIResponseObjectStreamResponseRefusalDelta": type: object properties: + content_index: + type: integer + description: Index position of the content part + delta: + type: string + description: Incremental refusal text being added item_id: type: string - description: >- - Unique identifier of the completed file search call + description: Unique identifier of the output item output_index: type: integer description: >- @@ -7677,27 +15625,34 @@ components: Sequential number for ordering streaming events type: type: string - const: response.file_search_call.completed - default: response.file_search_call.completed + const: response.refusal.delta + default: response.refusal.delta description: >- - Event type identifier, always "response.file_search_call.completed" + Event type identifier, always "response.refusal.delta" additionalProperties: false required: + - content_index + - delta - item_id - output_index - sequence_number - type title: >- - OpenAIResponseObjectStreamResponseFileSearchCallCompleted + OpenAIResponseObjectStreamResponseRefusalDelta description: >- - Streaming event for completed file search calls. - "OpenAIResponseObjectStreamResponseFileSearchCallInProgress": + Streaming event for incremental refusal text updates. + "OpenAIResponseObjectStreamResponseRefusalDone": type: object properties: + content_index: + type: integer + description: Index position of the content part + refusal: + type: string + description: Final complete refusal text item_id: type: string - description: >- - Unique identifier of the file search call + description: Unique identifier of the output item output_index: type: integer description: >- @@ -7708,27 +15663,29 @@ components: Sequential number for ordering streaming events type: type: string - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress + const: response.refusal.done + default: response.refusal.done description: >- - Event type identifier, always "response.file_search_call.in_progress" + Event type identifier, always "response.refusal.done" additionalProperties: false required: + - content_index + - refusal - item_id - output_index - sequence_number - type title: >- - OpenAIResponseObjectStreamResponseFileSearchCallInProgress + OpenAIResponseObjectStreamResponseRefusalDone description: >- - Streaming event for file search calls in progress. - "OpenAIResponseObjectStreamResponseFileSearchCallSearching": + Streaming event for when refusal text is completed. + "OpenAIResponseObjectStreamResponseWebSearchCallCompleted": type: object properties: item_id: type: string description: >- - Unique identifier of the file search call + Unique identifier of the completed web search call output_index: type: integer description: >- @@ -7739,10 +15696,10 @@ components: Sequential number for ordering streaming events type: type: string - const: response.file_search_call.searching - default: response.file_search_call.searching + const: response.web_search_call.completed + default: response.web_search_call.completed description: >- - Event type identifier, always "response.file_search_call.searching" + Event type identifier, always "response.web_search_call.completed" additionalProperties: false required: - item_id @@ -7750,20 +15707,15 @@ components: - sequence_number - type title: >- - OpenAIResponseObjectStreamResponseFileSearchCallSearching + OpenAIResponseObjectStreamResponseWebSearchCallCompleted description: >- - Streaming event for file search currently searching. - "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta": + Streaming event for completed web search calls. + "OpenAIResponseObjectStreamResponseWebSearchCallInProgress": type: object properties: - delta: - type: string - description: >- - Incremental function call arguments being added item_id: type: string - description: >- - Unique identifier of the function call being updated + description: Unique identifier of the web search call output_index: type: integer description: >- @@ -7774,959 +15726,803 @@ components: Sequential number for ordering streaming events type: type: string - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress description: >- - Event type identifier, always "response.function_call_arguments.delta" + Event type identifier, always "response.web_search_call.in_progress" additionalProperties: false required: - - delta - item_id - output_index - sequence_number - type title: >- - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + OpenAIResponseObjectStreamResponseWebSearchCallInProgress description: >- - Streaming event for incremental function call argument updates. - "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone": + Streaming event for web search calls in progress. + "OpenAIResponseObjectStreamResponseWebSearchCallSearching": type: object properties: - arguments: - type: string - description: >- - Final complete arguments JSON string for the function call item_id: type: string - description: >- - Unique identifier of the completed function call output_index: type: integer - description: >- - Index position of the item in the output list sequence_number: type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.function_call_arguments.done - default: response.function_call_arguments.done - description: >- - Event type identifier, always "response.function_call_arguments.done" + const: response.web_search_call.searching + default: response.web_search_call.searching additionalProperties: false required: - - arguments - item_id - output_index - sequence_number - type title: >- - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + OpenAIResponseObjectStreamResponseWebSearchCallSearching + OpenAIDeleteResponseObject: + type: object + properties: + id: + type: string + description: >- + Unique identifier of the deleted response + object: + type: string + const: response + default: response + description: >- + Object type identifier, always "response" + deleted: + type: boolean + default: true + description: Deletion confirmation flag, always True + additionalProperties: false + required: + - id + - object + - deleted + title: OpenAIDeleteResponseObject description: >- - Streaming event for when function call arguments are completed. - "OpenAIResponseObjectStreamResponseInProgress": + Response object confirming deletion of an OpenAI response. + ListOpenAIResponseInputItem: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseInput' + description: List of input items + object: + type: string + const: list + default: list + description: Object type identifier, always "list" + additionalProperties: false + required: + - data + - object + title: ListOpenAIResponseInputItem + description: >- + List container for OpenAI response input items. + RunShieldRequest: + type: object + properties: + shield_id: + type: string + description: The identifier of the shield to run. + messages: + type: array + items: + $ref: '#/components/schemas/OpenAIMessageParam' + description: The messages to run the shield on. + params: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The parameters of the shield. + additionalProperties: false + required: + - shield_id + - messages + - params + title: RunShieldRequest + RunShieldResponse: type: object properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Current response state while in progress - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.in_progress - default: response.in_progress + violation: + $ref: '#/components/schemas/SafetyViolation' description: >- - Event type identifier, always "response.in_progress" + (Optional) Safety violation detected by the shield, if any additionalProperties: false - required: - - response - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseInProgress - description: >- - Streaming event indicating the response remains in progress. - "OpenAIResponseObjectStreamResponseIncomplete": + title: RunShieldResponse + description: Response from running a safety shield. + SafetyViolation: type: object properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: >- - Response object describing the incomplete state - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + description: Severity level of the violation + user_message: type: string - const: response.incomplete - default: response.incomplete description: >- - Event type identifier, always "response.incomplete" + (Optional) Message to convey to the user about the violation + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Additional metadata including specific violation codes for debugging and + telemetry additionalProperties: false required: - - response - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseIncomplete + - violation_level + - metadata + title: SafetyViolation description: >- - Streaming event emitted when a response ends in an incomplete state. - "OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta": + Details of a safety violation detected by content moderation. + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: Severity level of a safety violation. + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: >- + Types of aggregation functions for scoring results. + ArrayType: type: object properties: - delta: - type: string - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer type: type: string - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta + const: array + default: array + description: Discriminator type. Always "array" additionalProperties: false required: - - delta - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - "OpenAIResponseObjectStreamResponseMcpCallArgumentsDone": + title: ArrayType + description: Parameter type for array values. + BasicScoringFnParams: type: object properties: - arguments: - type: string - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer type: - type: string - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done + $ref: '#/components/schemas/ScoringFnParamsType' + const: basic + default: basic + description: >- + The type of scoring function parameters, always basic + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row additionalProperties: false required: - - arguments - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - "OpenAIResponseObjectStreamResponseMcpCallCompleted": + - aggregation_functions + title: BasicScoringFnParams + description: >- + Parameters for basic scoring function configuration. + BooleanType: type: object properties: - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.mcp_call.completed - default: response.mcp_call.completed - description: >- - Event type identifier, always "response.mcp_call.completed" + const: boolean + default: boolean + description: Discriminator type. Always "boolean" additionalProperties: false required: - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallCompleted - description: Streaming event for completed MCP calls. - "OpenAIResponseObjectStreamResponseMcpCallFailed": + title: BooleanType + description: Parameter type for boolean values. + ChatCompletionInputType: type: object properties: - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.mcp_call.failed - default: response.mcp_call.failed + const: chat_completion_input + default: chat_completion_input description: >- - Event type identifier, always "response.mcp_call.failed" + Discriminator type. Always "chat_completion_input" additionalProperties: false required: - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallFailed - description: Streaming event for failed MCP calls. - "OpenAIResponseObjectStreamResponseMcpCallInProgress": + title: ChatCompletionInputType + description: >- + Parameter type for chat completion input. + CompletionInputType: type: object properties: - item_id: - type: string - description: Unique identifier of the MCP call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress + const: completion_input + default: completion_input description: >- - Event type identifier, always "response.mcp_call.in_progress" + Discriminator type. Always "completion_input" additionalProperties: false required: - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallInProgress - description: >- - Streaming event for MCP calls in progress. - "OpenAIResponseObjectStreamResponseMcpListToolsCompleted": + title: CompletionInputType + description: Parameter type for completion input. + JsonType: type: object properties: - sequence_number: - type: integer type: type: string - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed + const: json + default: json + description: Discriminator type. Always "json" additionalProperties: false required: - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsCompleted - "OpenAIResponseObjectStreamResponseMcpListToolsFailed": + title: JsonType + description: Parameter type for JSON values. + LLMAsJudgeScoringFnParams: type: object properties: - sequence_number: - type: integer type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: llm_as_judge + default: llm_as_judge + description: >- + The type of scoring function parameters, always llm_as_judge + judge_model: type: string - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed + description: >- + Identifier of the LLM model to use as a judge for scoring + prompt_template: + type: string + description: >- + (Optional) Custom prompt template for the judge model + judge_score_regexes: + type: array + items: + type: string + description: >- + Regexes to extract the answer from generated response + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row additionalProperties: false required: - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsFailed - "OpenAIResponseObjectStreamResponseMcpListToolsInProgress": + - judge_model + - judge_score_regexes + - aggregation_functions + title: LLMAsJudgeScoringFnParams + description: >- + Parameters for LLM-as-judge scoring function configuration. + NumberType: type: object properties: - sequence_number: - type: integer type: type: string - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress + const: number + default: number + description: Discriminator type. Always "number" additionalProperties: false required: - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsInProgress - "OpenAIResponseObjectStreamResponseOutputItemAdded": + title: NumberType + description: Parameter type for numeric values. + ObjectType: type: object properties: - response_id: - type: string - description: >- - Unique identifier of the response containing this output - item: - 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' - description: >- - The output item that was added (message, tool call, etc.) - output_index: - type: integer - description: >- - Index position of this item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.output_item.added - default: response.output_item.added - description: >- - Event type identifier, always "response.output_item.added" + const: object + default: object + description: Discriminator type. Always "object" additionalProperties: false required: - - response_id - - item - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseOutputItemAdded - description: >- - Streaming event for when a new output item is added to the response. - "OpenAIResponseObjectStreamResponseOutputItemDone": + title: ObjectType + description: Parameter type for object values. + RegexParserScoringFnParams: type: object properties: - response_id: - type: string - description: >- - Unique identifier of the response containing this output - item: - 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' - description: >- - The completed output item (message, tool call, etc.) - output_index: - type: integer + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: regex_parser + default: regex_parser description: >- - Index position of this item in the output list - sequence_number: - type: integer + The type of scoring function parameters, always regex_parser + parsing_regexes: + type: array + items: + type: string description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_item.done - default: response.output_item.done + Regex to extract the answer from generated response + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' description: >- - Event type identifier, always "response.output_item.done" + Aggregation functions to apply to the scores of each row additionalProperties: false required: - - response_id - - item - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseOutputItemDone + - parsing_regexes + - aggregation_functions + title: RegexParserScoringFnParams description: >- - Streaming event for when an output item is completed. - "OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded": + Parameters for regex parser scoring function configuration. + ScoringFn: type: object properties: - item_id: + identifier: type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: scoring_function + default: scoring_function description: >- - Unique identifier of the item to which the annotation is being added - output_index: - type: integer - description: >- - Index position of the output item in the response's output array - content_index: - type: integer - description: >- - Index position of the content part within the output item - annotation_index: - type: integer - description: >- - Index of the annotation within the content part - annotation: + The resource type, always scoring_function + description: + type: string + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + return_type: oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + - $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' 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' - description: The annotation object being added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_text.annotation.added - default: response.output_text.annotation.added - description: >- - Event type identifier, always "response.output_text.annotation.added" + string: '#/components/schemas/StringType' + number: '#/components/schemas/NumberType' + boolean: '#/components/schemas/BooleanType' + array: '#/components/schemas/ArrayType' + object: '#/components/schemas/ObjectType' + json: '#/components/schemas/JsonType' + union: '#/components/schemas/UnionType' + chat_completion_input: '#/components/schemas/ChatCompletionInputType' + completion_input: '#/components/schemas/CompletionInputType' + params: + $ref: '#/components/schemas/ScoringFnParams' additionalProperties: false required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number + - identifier + - provider_id - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - metadata + - return_type + title: ScoringFn + description: >- + A scoring function resource for evaluating model outputs. + ScoringFnParams: + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + basic: '#/components/schemas/BasicScoringFnParams' + ScoringFnParamsType: + type: string + enum: + - llm_as_judge + - regex_parser + - basic + title: ScoringFnParamsType description: >- - Streaming event for when an annotation is added to output text. - "OpenAIResponseObjectStreamResponseOutputTextDelta": + Types of scoring function parameter configurations. + StringType: type: object properties: - content_index: - type: integer - description: Index position within the text content - delta: - type: string - description: Incremental text content being added - item_id: - type: string - description: >- - Unique identifier of the output item being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.output_text.delta - default: response.output_text.delta - description: >- - Event type identifier, always "response.output_text.delta" + const: string + default: string + description: Discriminator type. Always "string" additionalProperties: false required: - - content_index - - delta - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextDelta - description: >- - Streaming event for incremental text content updates. - "OpenAIResponseObjectStreamResponseOutputTextDone": + title: StringType + description: Parameter type for string values. + UnionType: type: object properties: - content_index: - type: integer - description: Index position within the text content - text: - type: string - description: >- - Final complete text content of the output item - item_id: - type: string - description: >- - Unique identifier of the completed output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.output_text.done - default: response.output_text.done - description: >- - Event type identifier, always "response.output_text.done" + const: union + default: union + description: Discriminator type. Always "union" additionalProperties: false required: - - content_index - - text - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextDone - description: >- - Streaming event for when text output is completed. - "OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded": + title: UnionType + description: Parameter type for union values. + ListScoringFunctionsResponse: type: object properties: - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - description: The summary part that was added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - description: >- - Event type identifier, always "response.reasoning_summary_part.added" + data: + type: array + items: + $ref: '#/components/schemas/ScoringFn' additionalProperties: false required: - - item_id - - output_index - - part - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - description: >- - Streaming event for when a new reasoning summary part is added. - "OpenAIResponseObjectStreamResponseReasoningSummaryPartDone": + - data + title: ListScoringFunctionsResponse + ScoreRequest: type: object properties: - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - description: The completed summary part - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done + input_rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to score. + scoring_functions: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/ScoringFnParams' + - type: 'null' description: >- - Event type identifier, always "response.reasoning_summary_part.done" + The scoring functions to use for the scoring. additionalProperties: false required: - - item_id - - output_index - - part - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - description: >- - Streaming event for when a reasoning summary part is completed. - "OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta": + - input_rows + - scoring_functions + title: ScoreRequest + ScoreResponse: type: object properties: - delta: - type: string - description: Incremental summary text being added - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta + results: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringResult' description: >- - Event type identifier, always "response.reasoning_summary_text.delta" + A map of scoring function name to ScoringResult. additionalProperties: false required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - description: >- - Streaming event for incremental reasoning summary text updates. - "OpenAIResponseObjectStreamResponseReasoningSummaryTextDone": + - results + title: ScoreResponse + description: The response from scoring. + ScoringResult: type: object properties: - text: - type: string - description: Final complete summary text - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done + score_rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - Event type identifier, always "response.reasoning_summary_text.done" + The scoring result for each row. Each row is a map of column name to value. + aggregated_results: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Map of metric name to aggregated value additionalProperties: false required: - - text - - item_id - - output_index - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - description: >- - Streaming event for when reasoning summary text is completed. - "OpenAIResponseObjectStreamResponseReasoningTextDelta": + - score_rows + - aggregated_results + title: ScoringResult + description: A scoring result for a single row. + ScoreBatchRequest: type: object properties: - content_index: - type: integer - description: >- - Index position of the reasoning content part - delta: - type: string - description: Incremental reasoning text being added - item_id: + dataset_id: type: string + description: The ID of the dataset to score. + scoring_functions: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/ScoringFnParams' + - type: 'null' description: >- - Unique identifier of the output item being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.reasoning_text.delta - default: response.reasoning_text.delta + The scoring functions to use for the scoring. + save_results_dataset: + type: boolean description: >- - Event type identifier, always "response.reasoning_text.delta" + Whether to save the results to a dataset. additionalProperties: false required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningTextDelta - description: >- - Streaming event for incremental reasoning text updates. - "OpenAIResponseObjectStreamResponseReasoningTextDone": + - dataset_id + - scoring_functions + - save_results_dataset + title: ScoreBatchRequest + ScoreBatchResponse: type: object properties: - content_index: - type: integer - description: >- - Index position of the reasoning content part - text: - type: string - description: Final complete reasoning text - item_id: + dataset_id: type: string description: >- - Unique identifier of the completed output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.reasoning_text.done - default: response.reasoning_text.done + (Optional) The identifier of the dataset that was scored + results: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringResult' description: >- - Event type identifier, always "response.reasoning_text.done" + A map of scoring function name to ScoringResult additionalProperties: false required: - - content_index - - text - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningTextDone + - results + title: ScoreBatchResponse description: >- - Streaming event for when reasoning text is completed. - "OpenAIResponseObjectStreamResponseRefusalDelta": + Response from batch scoring operations on datasets. + Shield: type: object properties: - content_index: - type: integer - description: Index position of the content part - delta: + identifier: type: string - description: Incremental refusal text being added - item_id: + provider_resource_id: + type: string + provider_id: type: string - description: Unique identifier of the output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.refusal.delta - default: response.refusal.delta + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: shield + default: shield + description: The resource type, always shield + params: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - Event type identifier, always "response.refusal.delta" + (Optional) Configuration parameters for the shield additionalProperties: false required: - - content_index - - delta - - item_id - - output_index - - sequence_number + - identifier + - provider_id - type - title: >- - OpenAIResponseObjectStreamResponseRefusalDelta + title: Shield description: >- - Streaming event for incremental refusal text updates. - "OpenAIResponseObjectStreamResponseRefusalDone": + A safety shield resource that can be used to check content. + ListShieldsResponse: type: object properties: - content_index: - type: integer - description: Index position of the content part - refusal: - type: string - description: Final complete refusal text - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.refusal.done - default: response.refusal.done - description: >- - Event type identifier, always "response.refusal.done" + data: + type: array + items: + $ref: '#/components/schemas/Shield' additionalProperties: false required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseRefusalDone - description: >- - Streaming event for when refusal text is completed. - "OpenAIResponseObjectStreamResponseWebSearchCallCompleted": + - data + title: ListShieldsResponse + InvokeToolRequest: type: object properties: - item_id: - type: string - description: >- - Unique identifier of the completed web search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: + tool_name: type: string - const: response.web_search_call.completed - default: response.web_search_call.completed + description: The name of the tool to invoke. + kwargs: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - Event type identifier, always "response.web_search_call.completed" + A dictionary of arguments to pass to the tool. additionalProperties: false required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallCompleted - description: >- - Streaming event for completed web search calls. - "OpenAIResponseObjectStreamResponseWebSearchCallInProgress": + - tool_name + - kwargs + title: InvokeToolRequest + ImageContentItem: type: object properties: - item_id: - type: string - description: Unique identifier of the web search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress + const: image + default: image description: >- - Event type identifier, always "response.web_search_call.in_progress" + Discriminator type of the content item. Always "image" + image: + type: object + properties: + url: + $ref: '#/components/schemas/URL' + description: >- + A URL of the image or data URL in the format of data:image/{type};base64,{data}. + Note that URL could have length limits. + data: + type: string + contentEncoding: base64 + description: base64 encoded image data as string + additionalProperties: false + description: >- + Image as a base64 encoded string or an URL additionalProperties: false required: - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallInProgress - description: >- - Streaming event for web search calls in progress. - "OpenAIResponseObjectStreamResponseWebSearchCallSearching": + - image + title: ImageContentItem + description: A image content item + InterleavedContent: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - type: array + items: + $ref: '#/components/schemas/InterleavedContentItem' + InterleavedContentItem: + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + TextContentItem: type: object properties: - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer type: type: string - const: response.web_search_call.searching - default: response.web_search_call.searching + const: text + default: text + description: >- + Discriminator type of the content item. Always "text" + text: + type: string + description: Text content additionalProperties: false required: - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallSearching - OpenAIDeleteResponseObject: + - text + title: TextContentItem + description: A text content item + ToolInvocationResult: type: object properties: - id: - type: string + content: + $ref: '#/components/schemas/InterleavedContent' description: >- - Unique identifier of the deleted response - object: + (Optional) The output content from the tool execution + error_message: type: string - const: response - default: response description: >- - Object type identifier, always "response" - deleted: - type: boolean - default: true - description: Deletion confirmation flag, always True + (Optional) Error message if the tool execution failed + error_code: + type: integer + description: >- + (Optional) Numeric error code if the tool execution failed + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata about the tool execution additionalProperties: false - required: - - id - - object - - deleted - title: OpenAIDeleteResponseObject - description: >- - Response object confirming deletion of an OpenAI response. - ListOpenAIResponseInputItem: + title: ToolInvocationResult + description: Result of a tool invocation. + URL: type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: List of input items - object: + uri: type: string - const: list - default: list - description: Object type identifier, always "list" + description: The URL string pointing to the resource additionalProperties: false required: - - data - - object - title: ListOpenAIResponseInputItem - description: >- - List container for OpenAI response input items. - RunShieldRequest: + - uri + title: URL + description: A URL reference to external content. + ToolDef: type: object properties: - shield_id: + toolgroup_id: type: string - description: The identifier of the shield to run. - messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - description: The messages to run the shield on. - params: + description: >- + (Optional) ID of the tool group this tool belongs to + name: + type: string + description: Name of the tool + description: + type: string + description: >- + (Optional) Human-readable description of what the tool does + input_schema: type: object additionalProperties: oneOf: @@ -8736,34 +16532,81 @@ components: - type: string - type: array - type: object - description: The parameters of the shield. + description: >- + (Optional) JSON Schema for tool inputs (MCP inputSchema) + output_schema: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) JSON Schema for tool outputs (MCP outputSchema) + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata about the tool additionalProperties: false required: - - shield_id - - messages - - params - title: RunShieldRequest - RunShieldResponse: + - name + title: ToolDef + description: >- + Tool definition used in runtime contexts. + ListToolDefsResponse: type: object properties: - violation: - $ref: '#/components/schemas/SafetyViolation' - description: >- - (Optional) Safety violation detected by the shield, if any + data: + type: array + items: + $ref: '#/components/schemas/ToolDef' + description: List of tool definitions additionalProperties: false - title: RunShieldResponse - description: Response from running a safety shield. - SafetyViolation: + required: + - data + title: ListToolDefsResponse + description: >- + Response containing a list of tool definitions. + ToolGroup: type: object properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - description: Severity level of the violation - user_message: + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: tool_group + default: tool_group + description: Type of resource, always 'tool_group' + mcp_endpoint: + $ref: '#/components/schemas/URL' description: >- - (Optional) Message to convey to the user about the violation - metadata: + (Optional) Model Context Protocol endpoint for remote tools + args: type: object additionalProperties: oneOf: @@ -8774,244 +16617,319 @@ components: - type: array - type: object description: >- - Additional metadata including specific violation codes for debugging and - telemetry + (Optional) Additional arguments for the tool group additionalProperties: false required: - - violation_level - - metadata - title: SafetyViolation - description: >- - Details of a safety violation detected by content moderation. - ViolationLevel: - type: string - enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType + - identifier + - provider_id + - type + title: ToolGroup description: >- - Types of aggregation functions for scoring results. - ArrayType: + A group of related tools managed together. + ListToolGroupsResponse: type: object properties: - type: - type: string - const: array - default: array - description: Discriminator type. Always "array" + data: + type: array + items: + $ref: '#/components/schemas/ToolGroup' + description: List of tool groups additionalProperties: false required: - - type - title: ArrayType - description: Parameter type for array values. - BasicScoringFnParams: + - data + title: ListToolGroupsResponse + description: >- + Response containing a list of tool groups. + Chunk: type: object properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: basic - default: basic + content: + $ref: '#/components/schemas/InterleavedContent' description: >- - The type of scoring function parameters, always basic - aggregation_functions: + 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: - $ref: '#/components/schemas/AggregationFunctionType' + type: number description: >- - Aggregation functions to apply to the scores of each row + 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: - - type - - aggregation_functions - title: BasicScoringFnParams + - content + - chunk_id + - metadata + title: Chunk description: >- - Parameters for basic scoring function configuration. - BooleanType: + A chunk of content that can be inserted into a vector database. + ChunkMetadata: type: object properties: - type: + chunk_id: type: string - const: boolean - default: boolean - description: Discriminator type. Always "boolean" - additionalProperties: false - required: - - type - title: BooleanType - description: Parameter type for boolean values. - ChatCompletionInputType: - type: object - properties: - type: + description: >- + The ID of the chunk. If not set, it will be generated based on the document + ID and content. + document_id: type: string - const: chat_completion_input - default: chat_completion_input description: >- - Discriminator type. Always "chat_completion_input" + The ID of the document this chunk belongs to. + source: + type: string + description: >- + The source of the content, such as a URL, file path, or other identifier. + created_timestamp: + type: integer + description: >- + An optional timestamp indicating when the chunk was created. + updated_timestamp: + type: integer + description: >- + An optional timestamp indicating when the chunk was last updated. + chunk_window: + type: string + description: >- + The window of the chunk, which can be used to group related chunks together. + chunk_tokenizer: + type: string + description: >- + The tokenizer used to create the chunk. Default is Tiktoken. + chunk_embedding_model: + type: string + description: >- + The embedding model used to create the chunk's embedding. + chunk_embedding_dimension: + type: integer + description: >- + The dimension of the embedding vector for the chunk. + content_token_count: + type: integer + description: >- + The number of tokens in the content of the chunk. + metadata_token_count: + type: integer + description: >- + The number of tokens in the metadata of the chunk. additionalProperties: false - required: - - type - title: ChatCompletionInputType + title: ChunkMetadata description: >- - Parameter type for chat completion input. - CompletionInputType: + `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. + InsertChunksRequest: type: object properties: - type: + vector_store_id: type: string - const: completion_input - default: completion_input description: >- - Discriminator type. Always "completion_input" + The identifier of the vector database to insert the chunks into. + chunks: + type: array + items: + $ref: '#/components/schemas/Chunk' + description: >- + The chunks to insert. Each `Chunk` should contain content which can be + interleaved text, images, or other types. `metadata`: `dict[str, Any]` + and `embedding`: `List[float]` are optional. If `metadata` is provided, + you configure how Llama Stack formats the chunk during generation. If + `embedding` is not provided, it will be computed later. + ttl_seconds: + type: integer + description: The time to live of the chunks. additionalProperties: false required: - - type - title: CompletionInputType - description: Parameter type for completion input. - JsonType: + - vector_store_id + - chunks + title: InsertChunksRequest + QueryChunksRequest: type: object properties: - type: + vector_store_id: type: string - const: json - default: json - description: Discriminator type. Always "json" + description: >- + The identifier of the vector database to query. + query: + $ref: '#/components/schemas/InterleavedContent' + description: The query to search for. + params: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The parameters of the query. additionalProperties: false required: - - type - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: + - vector_store_id + - query + title: QueryChunksRequest + QueryChunksResponse: type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: llm_as_judge - default: llm_as_judge - description: >- - The type of scoring function parameters, always llm_as_judge - judge_model: - type: string - description: >- - Identifier of the LLM model to use as a judge for scoring - prompt_template: - type: string - description: >- - (Optional) Custom prompt template for the judge model - judge_score_regexes: + properties: + chunks: type: array items: - type: string + $ref: '#/components/schemas/Chunk' description: >- - Regexes to extract the answer from generated response - aggregation_functions: + List of content chunks returned from the query + scores: type: array items: - $ref: '#/components/schemas/AggregationFunctionType' + type: number description: >- - Aggregation functions to apply to the scores of each row + Relevance scores corresponding to each returned chunk additionalProperties: false required: - - type - - judge_model - - judge_score_regexes - - aggregation_functions - title: LLMAsJudgeScoringFnParams + - chunks + - scores + title: QueryChunksResponse description: >- - Parameters for LLM-as-judge scoring function configuration. - NumberType: + Response from querying chunks in a vector database. + VectorStoreFileCounts: type: object properties: - type: - type: string - const: number - default: number - description: Discriminator type. Always "number" + completed: + type: integer + description: >- + Number of files that have been successfully processed + cancelled: + type: integer + description: >- + Number of files that had their processing cancelled + failed: + type: integer + description: Number of files that failed to process + in_progress: + type: integer + description: >- + Number of files currently being processed + total: + type: integer + description: >- + Total number of files in the vector store additionalProperties: false required: - - type - title: NumberType - description: Parameter type for numeric values. - ObjectType: + - completed + - cancelled + - failed + - in_progress + - total + title: VectorStoreFileCounts + description: >- + File processing status counts for a vector store. + VectorStoreListResponse: type: object properties: - type: + object: type: string - const: object - default: object - description: Discriminator type. Always "object" - additionalProperties: false - required: - - type - title: ObjectType - description: Parameter type for object values. - RegexParserScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: regex_parser - default: regex_parser - description: >- - The type of scoring function parameters, always regex_parser - parsing_regexes: + default: list + description: Object type identifier, always "list" + data: type: array items: - type: string + $ref: '#/components/schemas/VectorStoreObject' + description: List of vector store objects + first_id: + type: string description: >- - Regex to extract the answer from generated response - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' + (Optional) ID of the first vector store in the list for pagination + last_id: + type: string description: >- - Aggregation functions to apply to the scores of each row + (Optional) ID of the last vector store in the list for pagination + has_more: + type: boolean + default: false + description: >- + Whether there are more vector stores available beyond this page additionalProperties: false required: - - type - - parsing_regexes - - aggregation_functions - title: RegexParserScoringFnParams - description: >- - Parameters for regex parser scoring function configuration. - ScoringFn: + - object + - data + - has_more + title: VectorStoreListResponse + description: Response from listing vector stores. + VectorStoreObject: type: object properties: - identifier: - type: string - provider_resource_id: + id: type: string - provider_id: + description: Unique identifier for the vector store + object: type: string - type: + default: vector_store + description: >- + Object type identifier, always "vector_store" + created_at: + type: integer + description: >- + Timestamp when the vector store was created + name: type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: scoring_function - default: scoring_function + description: (Optional) Name of the vector store + usage_bytes: + type: integer + default: 0 description: >- - The resource type, always scoring_function - description: + Storage space used by the vector store in bytes + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + description: >- + File processing status counts for the vector store + status: type: string + default: completed + description: Current status of the vector store + expires_after: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Expiration policy for the vector store + expires_at: + type: integer + description: >- + (Optional) Timestamp when the vector store will expire + last_active_at: + type: integer + description: >- + (Optional) Timestamp of last activity on the vector store metadata: type: object additionalProperties: @@ -9022,159 +16940,103 @@ components: - type: string - type: array - type: object - 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' - discriminator: - propertyName: type - mapping: - string: '#/components/schemas/StringType' - number: '#/components/schemas/NumberType' - boolean: '#/components/schemas/BooleanType' - array: '#/components/schemas/ArrayType' - object: '#/components/schemas/ObjectType' - json: '#/components/schemas/JsonType' - union: '#/components/schemas/UnionType' - chat_completion_input: '#/components/schemas/ChatCompletionInputType' - completion_input: '#/components/schemas/CompletionInputType' - params: - $ref: '#/components/schemas/ScoringFnParams' + description: >- + Set of key-value pairs that can be attached to the vector store additionalProperties: false required: - - identifier - - provider_id - - type + - id + - object + - created_at + - usage_bytes + - file_counts + - status - metadata - - return_type - title: ScoringFn - description: >- - A scoring function resource for evaluating model outputs. - ScoringFnParams: + title: VectorStoreObject + description: OpenAI Vector Store object. + VectorStoreChunkingStrategy: oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' - - $ref: '#/components/schemas/BasicScoringFnParams' + - $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' + ScoringFnParams: discriminator: - propertyName: type mapping: - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - basic: '#/components/schemas/BasicScoringFnParams' - ScoringFnParamsType: - type: string - enum: - - llm_as_judge - - regex_parser - - basic - title: ScoringFnParamsType - description: >- - Types of scoring function parameter configurations. - StringType: - type: object - properties: - type: - type: string - const: string - default: string - description: Discriminator type. Always "string" - additionalProperties: false - required: - - type - title: StringType - description: Parameter type for string values. - UnionType: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + VectorStoreChunkingStrategyAuto: type: object properties: type: type: string - const: union - default: union - description: Discriminator type. Always "union" + const: auto + default: auto + description: >- + Strategy type, always "auto" for automatic chunking additionalProperties: false required: - type - title: UnionType - description: Parameter type for union values. - ListScoringFunctionsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ScoringFn' - additionalProperties: false - required: - - data - title: ListScoringFunctionsResponse - ScoreRequest: + title: VectorStoreChunkingStrategyAuto + description: >- + Automatic chunking strategy for vector store files. + VectorStoreChunkingStrategyStatic: type: object properties: - input_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to score. - scoring_functions: - type: object - additionalProperties: - oneOf: - - $ref: '#/components/schemas/ScoringFnParams' - - type: 'null' + type: + type: string + const: static + default: static description: >- - The scoring functions to use for the scoring. + Strategy type, always "static" for static chunking + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + description: >- + Configuration parameters for the static chunking strategy additionalProperties: false required: - - input_rows - - scoring_functions - title: ScoreRequest - ScoreResponse: + - type + - static + title: VectorStoreChunkingStrategyStatic + description: >- + Static chunking strategy with configurable parameters. + VectorStoreChunkingStrategyStaticConfig: type: object properties: - results: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' + chunk_overlap_tokens: + type: integer + default: 400 description: >- - A map of scoring function name to ScoringResult. + Number of tokens to overlap between adjacent chunks + max_chunk_size_tokens: + type: integer + default: 800 + description: >- + Maximum number of tokens per chunk, must be between 100 and 4096 additionalProperties: false required: - - results - title: ScoreResponse - description: The response from scoring. - ScoringResult: + - chunk_overlap_tokens + - max_chunk_size_tokens + title: VectorStoreChunkingStrategyStaticConfig + description: >- + Configuration for static chunking strategy. + "OpenAICreateVectorStoreRequestWithExtraBody": type: object properties: - score_rows: + name: + type: string + description: (Optional) A name for the vector store + file_ids: type: array items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + type: string description: >- - The scoring result for each row. Each row is a map of column name to value. - aggregated_results: + List of file IDs to include in the vector store + expires_after: type: object additionalProperties: oneOf: @@ -9184,81 +17046,48 @@ components: - type: string - type: array - type: object - description: Map of metric name to aggregated value - additionalProperties: false - required: - - score_rows - - aggregated_results - title: ScoringResult - description: A scoring result for a single row. - ScoreBatchRequest: - type: object - properties: - dataset_id: - type: string - description: The ID of the dataset to score. - scoring_functions: + description: >- + (Optional) Expiration policy for the vector store + chunking_strategy: + $ref: '#/components/schemas/VectorStoreChunkingStrategy' + description: >- + (Optional) Strategy for splitting files into chunks + metadata: type: object additionalProperties: oneOf: - - $ref: '#/components/schemas/ScoringFnParams' - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - The scoring functions to use for the scoring. - save_results_dataset: - type: boolean - description: >- - Whether to save the results to a dataset. + Set of key-value pairs that can be attached to the vector store additionalProperties: false - required: - - dataset_id - - scoring_functions - - save_results_dataset - title: ScoreBatchRequest - ScoreBatchResponse: + title: >- + OpenAICreateVectorStoreRequestWithExtraBody + description: >- + Request to create a vector store with extra_body support. + OpenaiUpdateVectorStoreRequest: type: object properties: - dataset_id: + name: type: string - description: >- - (Optional) The identifier of the dataset that was scored - results: + description: The name of the vector store. + expires_after: type: object additionalProperties: - $ref: '#/components/schemas/ScoringResult' + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - A map of scoring function name to ScoringResult - additionalProperties: false - required: - - results - title: ScoreBatchResponse - description: >- - Response from batch scoring operations on datasets. - Shield: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: shield - default: shield - description: The resource type, always shield - params: + The expiration policy for a vector store. + metadata: type: object additionalProperties: oneOf: @@ -9269,33 +17098,43 @@ components: - type: array - type: object description: >- - (Optional) Configuration parameters for the shield + Set of 16 key-value pairs that can be attached to an object. additionalProperties: false - required: - - identifier - - provider_id - - type - title: Shield - description: >- - A safety shield resource that can be used to check content. - ListShieldsResponse: + title: OpenaiUpdateVectorStoreRequest + VectorStoreDeleteResponse: type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/Shield' + id: + type: string + description: >- + Unique identifier of the deleted vector store + object: + type: string + default: vector_store.deleted + description: >- + Object type identifier for the deletion response + deleted: + type: boolean + default: true + description: >- + Whether the deletion operation was successful additionalProperties: false required: - - data - title: ListShieldsResponse - InvokeToolRequest: + - id + - object + - deleted + title: VectorStoreDeleteResponse + description: Response from deleting a vector store. + "OpenAICreateVectorStoreFileBatchRequestWithExtraBody": type: object properties: - tool_name: - type: string - description: The name of the tool to invoke. - kwargs: + file_ids: + type: array + items: + type: string + description: >- + A list of File IDs that the vector store should use + attributes: type: object additionalProperties: oneOf: @@ -9306,92 +17145,100 @@ components: - type: array - type: object description: >- - A dictionary of arguments to pass to the tool. + (Optional) Key-value attributes to store with the files + chunking_strategy: + $ref: '#/components/schemas/VectorStoreChunkingStrategy' + description: >- + (Optional) The chunking strategy used to chunk the file(s). Defaults to + auto additionalProperties: false required: - - tool_name - - kwargs - title: InvokeToolRequest - ImageContentItem: + - file_ids + title: >- + OpenAICreateVectorStoreFileBatchRequestWithExtraBody + description: >- + Request to create a vector store file batch with extra_body support. + VectorStoreFileBatchObject: type: object properties: - type: + id: type: string - const: image - default: image + description: Unique identifier for the file batch + object: + type: string + default: vector_store.file_batch description: >- - Discriminator type of the content item. Always "image" - image: - type: object - properties: - url: - $ref: '#/components/schemas/URL' - description: >- - A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - data: - type: string - contentEncoding: base64 - description: base64 encoded image data as string - additionalProperties: false + Object type identifier, always "vector_store.file_batch" + created_at: + type: integer description: >- - Image as a base64 encoded string or an URL + Timestamp when the file batch was created + vector_store_id: + type: string + description: >- + ID of the vector store containing the file batch + status: + $ref: '#/components/schemas/VectorStoreFileStatus' + description: >- + Current processing status of the file batch + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + description: >- + File processing status counts for the batch additionalProperties: false required: - - type - - image - title: ImageContentItem - description: A image content item - InterleavedContent: + - id + - object + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + description: OpenAI Vector Store File Batch object. + VectorStoreFileStatus: oneOf: - type: string - - $ref: '#/components/schemas/InterleavedContentItem' - - type: array - items: - $ref: '#/components/schemas/InterleavedContentItem' - InterleavedContentItem: - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - TextContentItem: + const: completed + - type: string + const: in_progress + - type: string + const: cancelled + - type: string + const: failed + VectorStoreFileLastError: type: object properties: - type: - type: string - const: text - default: text + code: + oneOf: + - type: string + const: server_error + - type: string + const: rate_limit_exceeded description: >- - Discriminator type of the content item. Always "text" - text: + Error code indicating the type of failure + message: type: string - description: Text content + description: >- + Human-readable error message describing the failure additionalProperties: false required: - - type - - text - title: TextContentItem - description: A text content item - ToolInvocationResult: + - code + - message + title: VectorStoreFileLastError + description: >- + Error information for failed vector store file processing. + VectorStoreFileObject: type: object properties: - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - (Optional) The output content from the tool execution - error_message: + id: type: string + description: Unique identifier for the file + object: + type: string + default: vector_store.file description: >- - (Optional) Error message if the tool execution failed - error_code: - type: integer - description: >- - (Optional) Numeric error code if the tool execution failed - metadata: + Object type identifier, always "vector_store.file" + attributes: type: object additionalProperties: oneOf: @@ -9402,48 +17249,124 @@ components: - type: array - type: object description: >- - (Optional) Additional metadata about the tool execution + Key-value attributes associated with the file + chunking_strategy: + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + description: >- + Strategy used for splitting the file into chunks + created_at: + type: integer + description: >- + Timestamp when the file was added to the vector store + last_error: + $ref: '#/components/schemas/VectorStoreFileLastError' + description: >- + (Optional) Error information if file processing failed + status: + $ref: '#/components/schemas/VectorStoreFileStatus' + description: Current processing status of the file + usage_bytes: + type: integer + default: 0 + description: Storage space used by this file in bytes + vector_store_id: + type: string + description: >- + ID of the vector store containing this file additionalProperties: false - title: ToolInvocationResult - description: Result of a tool invocation. - URL: + required: + - id + - object + - attributes + - chunking_strategy + - created_at + - status + - usage_bytes + - vector_store_id + title: VectorStoreFileObject + description: OpenAI Vector Store File object. + VectorStoreFilesListInBatchResponse: type: object properties: - uri: + object: type: string - description: The URL string pointing to the resource + default: list + description: Object type identifier, always "list" + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreFileObject' + description: >- + List of vector store file objects in the batch + first_id: + type: string + description: >- + (Optional) ID of the first file in the list for pagination + last_id: + type: string + description: >- + (Optional) ID of the last file in the list for pagination + has_more: + type: boolean + default: false + description: >- + Whether there are more files available beyond this page additionalProperties: false required: - - uri - title: URL - description: A URL reference to external content. - ToolDef: + - object + - data + - has_more + title: VectorStoreFilesListInBatchResponse + description: >- + Response from listing files in a vector store file batch. + VectorStoreListFilesResponse: type: object properties: - toolgroup_id: + object: type: string - description: >- - (Optional) ID of the tool group this tool belongs to - name: + default: list + description: Object type identifier, always "list" + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreFileObject' + description: List of vector store file objects + first_id: type: string - description: Name of the tool - description: + description: >- + (Optional) ID of the first file in the list for pagination + last_id: type: string description: >- - (Optional) Human-readable description of what the tool does - input_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + (Optional) ID of the last file in the list for pagination + has_more: + type: boolean + default: false + description: >- + Whether there are more files available beyond this page + additionalProperties: false + required: + - object + - data + - has_more + title: VectorStoreListFilesResponse + description: >- + Response from listing files in a vector store. + OpenaiAttachFileToVectorStoreRequest: + type: object + properties: + file_id: + type: string description: >- - (Optional) JSON Schema for tool inputs (MCP inputSchema) - output_schema: + The ID of the file to attach to the vector store. + attributes: type: object additionalProperties: oneOf: @@ -9454,8 +17377,19 @@ components: - type: array - type: object description: >- - (Optional) JSON Schema for tool outputs (MCP outputSchema) - metadata: + The key-value attributes stored with the file, which can be used for filtering. + chunking_strategy: + $ref: '#/components/schemas/VectorStoreChunkingStrategy' + description: >- + The chunking strategy to use for the file. + additionalProperties: false + required: + - file_id + title: OpenaiAttachFileToVectorStoreRequest + OpenaiUpdateVectorStoreFileRequest: + type: object + properties: + attributes: type: object additionalProperties: oneOf: @@ -9466,56 +17400,58 @@ components: - type: array - type: object description: >- - (Optional) Additional metadata about the tool + The updated key-value attributes to store with the file. additionalProperties: false required: - - name - title: ToolDef - description: >- - Tool definition used in runtime contexts. - ListToolDefsResponse: + - attributes + title: OpenaiUpdateVectorStoreFileRequest + VectorStoreFileDeleteResponse: type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/ToolDef' - description: List of tool definitions + id: + type: string + description: Unique identifier of the deleted file + object: + type: string + default: vector_store.file.deleted + description: >- + Object type identifier for the deletion response + deleted: + type: boolean + default: true + description: >- + Whether the deletion operation was successful additionalProperties: false required: - - data - title: ListToolDefsResponse + - id + - object + - deleted + title: VectorStoreFileDeleteResponse description: >- - Response containing a list of tool definitions. - ToolGroup: + Response from deleting a vector store file. + bool: + type: boolean + VectorStoreContent: type: object properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string type: type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: tool_group - default: tool_group - description: Type of resource, always 'tool_group' - mcp_endpoint: - $ref: '#/components/schemas/URL' + const: text description: >- - (Optional) Model Context Protocol endpoint for remote tools - args: + Content type, currently only "text" is supported + text: + type: string + description: The actual text content + embedding: + type: array + items: + type: number + description: >- + Optional embedding vector for this content chunk + chunk_metadata: + $ref: '#/components/schemas/ChunkMetadata' + description: Optional chunk metadata + metadata: type: object additionalProperties: oneOf: @@ -9525,43 +17461,56 @@ components: - type: string - type: array - type: object - description: >- - (Optional) Additional arguments for the tool group + description: Optional user-defined metadata additionalProperties: false required: - - identifier - - provider_id - type - title: ToolGroup + - text + title: VectorStoreContent description: >- - A group of related tools managed together. - ListToolGroupsResponse: + Content item from a vector store file or search result. + VectorStoreFileContentResponse: type: object properties: + object: + type: string + const: vector_store.file_content.page + default: vector_store.file_content.page + description: >- + The object type, which is always `vector_store.file_content.page` data: type: array items: - $ref: '#/components/schemas/ToolGroup' - description: List of tool groups + $ref: '#/components/schemas/VectorStoreContent' + description: Parsed content of the file + has_more: + type: boolean + default: false + description: >- + Indicates if there are more content pages to fetch + next_page: + type: string + description: The token for the next page, if any additionalProperties: false required: + - object - data - title: ListToolGroupsResponse + - has_more + title: VectorStoreFileContentResponse description: >- - Response containing a list of tool groups. - Chunk: + Represents the parsed content of a vector store file. + OpenaiSearchVectorStoreRequest: 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 + query: + oneOf: + - type: string + - type: array + items: + type: string description: >- - Unique identifier for the chunk. Must be provided explicitly. - metadata: + The query string or array for performing the search. + filters: type: object additionalProperties: oneOf: @@ -9572,121 +17521,218 @@ components: - 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 + Filters based on file attributes to narrow the search results. + max_num_results: + type: integer description: >- - Optional embedding for the chunk. If not provided, it will be computed - later. - chunk_metadata: - $ref: '#/components/schemas/ChunkMetadata' + Maximum number of results to return (1 to 50 inclusive, default 10). + 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: >- - Metadata for the chunk that will NOT be used in the context during inference. - The `chunk_metadata` is required backend functionality. + Ranking options for fine-tuning the search results. + rewrite_query: + type: boolean + description: >- + Whether to rewrite the natural language query for vector search (default + false) + search_mode: + type: string + description: >- + The search mode to use - "keyword", "vector", or "hybrid" (default "vector") additionalProperties: false required: - - content - - chunk_id - - metadata - title: Chunk - description: >- - A chunk of content that can be inserted into a vector database. - ChunkMetadata: + - query + title: OpenaiSearchVectorStoreRequest + VectorStoreSearchResponse: type: object properties: - chunk_id: - type: string - description: >- - The ID of the chunk. If not set, it will be generated based on the document - ID and content. - document_id: - type: string - description: >- - The ID of the document this chunk belongs to. - source: + file_id: type: string description: >- - The source of the content, such as a URL, file path, or other identifier. - created_timestamp: - type: integer - description: >- - An optional timestamp indicating when the chunk was created. - updated_timestamp: - type: integer - description: >- - An optional timestamp indicating when the chunk was last updated. - chunk_window: + 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 + attributes: + type: object + additionalProperties: + oneOf: + - type: string + - type: number + - type: boolean description: >- - The window of the chunk, which can be used to group related chunks together. - chunk_tokenizer: - type: string + (Optional) Key-value attributes associated with the file + content: + type: array + items: + $ref: '#/components/schemas/VectorStoreContent' description: >- - The tokenizer used to create the chunk. Default is Tiktoken. - chunk_embedding_model: + List of content items matching the search query + additionalProperties: false + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + description: Response from searching a vector store. + VectorStoreSearchResponsePage: + type: object + properties: + object: type: string + default: vector_store.search_results.page description: >- - The embedding model used to create the chunk's embedding. - chunk_embedding_dimension: - type: integer + Object type identifier for the search results page + search_query: + type: array + items: + type: string description: >- - The dimension of the embedding vector for the chunk. - content_token_count: - type: integer + The original search query that was executed + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + description: List of search result objects + has_more: + type: boolean + default: false description: >- - The number of tokens in the content of the chunk. - metadata_token_count: - type: integer + Whether there are more results available beyond this page + next_page: + type: string description: >- - The number of tokens in the metadata of the chunk. + (Optional) Token for retrieving the next page of results additionalProperties: false - title: ChunkMetadata + required: + - object + - search_query + - data + - has_more + title: VectorStoreSearchResponsePage 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. - InsertChunksRequest: + Paginated response from searching a vector store. + VersionInfo: type: object properties: - vector_store_id: + version: type: string - description: >- - The identifier of the vector database to insert the chunks into. - chunks: + description: Version number of the service + additionalProperties: false + required: + - version + title: VersionInfo + description: Version information for the service. + AppendRowsRequest: + type: object + properties: + rows: type: array items: - $ref: '#/components/schemas/Chunk' + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to append to the dataset. + additionalProperties: false + required: + - rows + title: AppendRowsRequest + PaginatedResponse: + type: object + properties: + data: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The list of items for the current page + has_more: + type: boolean description: >- - The chunks to insert. Each `Chunk` should contain content which can be - interleaved text, images, or other types. `metadata`: `dict[str, Any]` - and `embedding`: `List[float]` are optional. If `metadata` is provided, - you configure how Llama Stack formats the chunk during generation. If - `embedding` is not provided, it will be computed later. - ttl_seconds: - type: integer - description: The time to live of the chunks. + Whether there are more items available after this set + url: + type: string + description: The URL for accessing this list additionalProperties: false required: - - vector_store_id - - chunks - title: InsertChunksRequest - QueryChunksRequest: + - data + - has_more + title: PaginatedResponse + description: >- + A generic paginated response that follows a simple format. + Dataset: type: object properties: - vector_store_id: + identifier: + type: string + provider_resource_id: type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: dataset + default: dataset description: >- - The identifier of the vector database to query. - query: - $ref: '#/components/schemas/InterleavedContent' - description: The query to search for. - params: + Type of resource, always 'dataset' for datasets + purpose: + type: string + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + description: >- + Purpose of the dataset indicating its intended use + source: + oneOf: + - $ref: '#/components/schemas/URIDataSource' + - $ref: '#/components/schemas/RowsDataSource' + discriminator: + propertyName: type + mapping: + uri: '#/components/schemas/URIDataSource' + rows: '#/components/schemas/RowsDataSource' + description: >- + Data source configuration for the dataset + metadata: type: object additionalProperties: oneOf: @@ -9696,149 +17742,113 @@ components: - type: string - type: array - type: object - description: The parameters of the query. + description: Additional metadata for the dataset additionalProperties: false required: - - vector_store_id - - query - title: QueryChunksRequest - QueryChunksResponse: + - identifier + - provider_id + - type + - purpose + - source + - metadata + title: Dataset + description: >- + Dataset resource for storing and accessing training or evaluation data. + RowsDataSource: type: object properties: - chunks: - type: array - items: - $ref: '#/components/schemas/Chunk' - description: >- - List of content chunks returned from the query - scores: + type: + type: string + const: rows + default: rows + rows: type: array items: - type: number + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - Relevance scores corresponding to each returned chunk + The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", + "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, + world!"}]} ] additionalProperties: false required: - - chunks - - scores - title: QueryChunksResponse - description: >- - Response from querying chunks in a vector database. - VectorStoreFileCounts: + - type + - rows + title: RowsDataSource + description: A dataset stored in rows. + URIDataSource: type: object properties: - completed: - type: integer - description: >- - Number of files that have been successfully processed - cancelled: - type: integer - description: >- - Number of files that had their processing cancelled - failed: - type: integer - description: Number of files that failed to process - in_progress: - type: integer - description: >- - Number of files currently being processed - total: - type: integer + type: + type: string + const: uri + default: uri + uri: + type: string description: >- - Total number of files in the vector store + The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" + - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" additionalProperties: false - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts + required: + - type + - uri + title: URIDataSource description: >- - File processing status counts for a vector store. - VectorStoreListResponse: + A dataset that can be obtained from a URI. + ListDatasetsResponse: type: object properties: - object: - type: string - default: list - description: Object type identifier, always "list" data: type: array items: - $ref: '#/components/schemas/VectorStoreObject' - description: List of vector store objects - first_id: - type: string - description: >- - (Optional) ID of the first vector store in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last vector store in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more vector stores available beyond this page + $ref: '#/components/schemas/Dataset' + description: List of datasets additionalProperties: false required: - - object - data - - has_more - title: VectorStoreListResponse - description: Response from listing vector stores. - VectorStoreObject: + title: ListDatasetsResponse + description: Response from listing datasets. + Benchmark: type: object properties: - id: + identifier: type: string - description: Unique identifier for the vector store - object: + provider_resource_id: type: string - default: vector_store - description: >- - Object type identifier, always "vector_store" - created_at: - type: integer - description: >- - Timestamp when the vector store was created - name: + provider_id: type: string - description: (Optional) Name of the vector store - usage_bytes: - type: integer - default: 0 - description: >- - Storage space used by the vector store in bytes - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the vector store - status: + type: + type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: benchmark + default: benchmark + description: The resource type, always benchmark + dataset_id: type: string - default: completed - description: Current status of the vector store - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Expiration policy for the vector store - expires_at: - type: integer description: >- - (Optional) Timestamp when the vector store will expire - last_active_at: - type: integer + Identifier of the dataset to use for the benchmark evaluation + scoring_functions: + type: array + items: + type: string description: >- - (Optional) Timestamp of last activity on the vector store + List of scoring function identifiers to apply during evaluation metadata: type: object additionalProperties: @@ -9849,511 +17859,482 @@ components: - type: string - type: array - type: object - description: >- - Set of key-value pairs that can be attached to the vector store + description: Metadata for this evaluation task additionalProperties: false required: - - id - - object - - created_at - - usage_bytes - - file_counts - - status + - identifier + - provider_id + - type + - dataset_id + - scoring_functions - metadata - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreChunkingStrategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - VectorStoreChunkingStrategyAuto: + title: Benchmark + description: >- + A benchmark resource for evaluating model performance. + ListBenchmarksResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Benchmark' + additionalProperties: false + required: + - data + title: ListBenchmarksResponse + BenchmarkConfig: + type: object + properties: + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + description: The candidate to evaluate. + scoring_params: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringFnParams' + description: >- + Map between scoring function id and parameters for each scoring function + you want to run + num_examples: + type: integer + description: >- + (Optional) The number of examples to evaluate. If not provided, all examples + in the dataset will be evaluated + additionalProperties: false + required: + - eval_candidate + - scoring_params + title: BenchmarkConfig + description: >- + A benchmark configuration for evaluation. + GreedySamplingStrategy: type: object properties: type: type: string - const: auto - default: auto + const: greedy + default: greedy description: >- - Strategy type, always "auto" for automatic chunking + Must be "greedy" to identify this sampling strategy additionalProperties: false required: - type - title: VectorStoreChunkingStrategyAuto + title: GreedySamplingStrategy description: >- - Automatic chunking strategy for vector store files. - VectorStoreChunkingStrategyStatic: + Greedy sampling strategy that selects the highest probability token at each + step. + ModelCandidate: type: object properties: type: type: string - const: static - default: static - description: >- - Strategy type, always "static" for static chunking - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + const: model + default: model + model: + type: string + description: The model ID to evaluate. + sampling_params: + $ref: '#/components/schemas/SamplingParams' + description: The sampling parameters for the model. + system_message: + $ref: '#/components/schemas/SystemMessage' description: >- - Configuration parameters for the static chunking strategy + (Optional) The system message providing instructions or context to the + model. additionalProperties: false required: - type - - static - title: VectorStoreChunkingStrategyStatic - description: >- - Static chunking strategy with configurable parameters. - VectorStoreChunkingStrategyStaticConfig: + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + SamplingParams: type: object properties: - chunk_overlap_tokens: + strategy: + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + description: The sampling strategy. + max_tokens: type: integer - default: 400 description: >- - Number of tokens to overlap between adjacent chunks - max_chunk_size_tokens: - type: integer - default: 800 + 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. + repetition_penalty: + type: number + default: 1.0 description: >- - Maximum number of tokens per chunk, must be between 100 and 4096 + 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. + stop: + type: array + items: + type: string + description: >- + Up to 4 sequences where the API will stop generating further tokens. The + returned text will not contain the stop sequence. additionalProperties: false required: - - chunk_overlap_tokens - - max_chunk_size_tokens - title: VectorStoreChunkingStrategyStaticConfig - description: >- - Configuration for static chunking strategy. - "OpenAICreateVectorStoreRequestWithExtraBody": + - strategy + title: SamplingParams + description: Sampling parameters. + SystemMessage: type: object properties: - name: + role: type: string - description: (Optional) A name for the vector store - file_ids: - type: array - items: - type: string - description: >- - List of file IDs to include in the vector store - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Expiration policy for the vector store - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' + const: system + default: system description: >- - (Optional) Strategy for splitting files into chunks - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + Must be "system" to identify this as a system message + content: + $ref: '#/components/schemas/InterleavedContent' description: >- - Set of key-value pairs that can be attached to the vector store + 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). additionalProperties: false - title: >- - OpenAICreateVectorStoreRequestWithExtraBody + required: + - role + - content + title: SystemMessage description: >- - Request to create a vector store with extra_body support. - OpenaiUpdateVectorStoreRequest: + A system message providing instructions or context to the model. + TopKSamplingStrategy: type: object properties: - name: + type: type: string - description: The name of the vector store. - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + const: top_k + default: top_k description: >- - The expiration policy for a vector store. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + Must be "top_k" to identify this sampling strategy + top_k: + type: integer description: >- - Set of 16 key-value pairs that can be attached to an object. + Number of top tokens to consider for sampling. Must be at least 1 additionalProperties: false - title: OpenaiUpdateVectorStoreRequest - VectorStoreDeleteResponse: + required: + - type + - top_k + title: TopKSamplingStrategy + description: >- + Top-k sampling strategy that restricts sampling to the k most likely tokens. + TopPSamplingStrategy: type: object properties: - id: + type: type: string + const: top_p + default: top_p description: >- - Unique identifier of the deleted vector store - object: - type: string - default: vector_store.deleted + Must be "top_p" to identify this sampling strategy + temperature: + type: number description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true + Controls randomness in sampling. Higher values increase randomness + top_p: + type: number + default: 0.95 description: >- - Whether the deletion operation was successful + Cumulative probability threshold for nucleus sampling. Defaults to 0.95 additionalProperties: false required: - - id - - object - - deleted - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - "OpenAICreateVectorStoreFileBatchRequestWithExtraBody": + - type + title: TopPSamplingStrategy + description: >- + Top-p (nucleus) sampling strategy that samples from the smallest set of tokens + with cumulative probability >= p. + EvaluateRowsRequest: type: object properties: - file_ids: + input_rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to evaluate. + scoring_functions: type: array items: type: string description: >- - A list of File IDs that the vector store should use - attributes: + The scoring functions to use for the evaluation. + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + description: The configuration for the benchmark. + additionalProperties: false + required: + - input_rows + - scoring_functions + - benchmark_config + title: EvaluateRowsRequest + EvaluateResponse: + type: object + properties: + generations: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The generations from the evaluation. + scores: type: object additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Key-value attributes to store with the files - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - (Optional) The chunking strategy used to chunk the file(s). Defaults to - auto + $ref: '#/components/schemas/ScoringResult' + description: The scores from the evaluation. additionalProperties: false required: - - file_ids - title: >- - OpenAICreateVectorStoreFileBatchRequestWithExtraBody - description: >- - Request to create a vector store file batch with extra_body support. - VectorStoreFileBatchObject: + - generations + - scores + title: EvaluateResponse + description: The response from an evaluation. + RunEvalRequest: type: object properties: - id: - type: string - description: Unique identifier for the file batch - object: - type: string - default: vector_store.file_batch - description: >- - Object type identifier, always "vector_store.file_batch" - created_at: - type: integer - description: >- - Timestamp when the file batch was created - vector_store_id: - type: string - description: >- - ID of the vector store containing the file batch - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: >- - Current processing status of the file batch - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the batch + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + description: The configuration for the benchmark. additionalProperties: false required: - - id - - object - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject - description: OpenAI Vector Store File Batch object. - VectorStoreFileStatus: - oneOf: - - type: string - const: completed - - type: string - const: in_progress - - type: string - const: cancelled - - type: string - const: failed - VectorStoreFileLastError: + - benchmark_config + title: RunEvalRequest + Job: type: object properties: - code: - oneOf: - - type: string - const: server_error - - type: string - const: rate_limit_exceeded - description: >- - Error code indicating the type of failure - message: + job_id: type: string - description: >- - Human-readable error message describing the failure + description: Unique identifier for the job + status: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + description: Current execution status of the job additionalProperties: false required: - - code - - message - title: VectorStoreFileLastError + - job_id + - status + title: Job description: >- - Error information for failed vector store file processing. - VectorStoreFileObject: + A job execution instance with status tracking. + RerankRequest: type: object properties: - id: - type: string - description: Unique identifier for the file - object: + model: type: string - default: vector_store.file description: >- - Object type identifier, always "vector_store.file" - attributes: - type: object - additionalProperties: + The identifier of the reranking model to use. + query: + oneOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + description: >- + 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. + items: + type: array + items: oneOf: - - type: 'null' - - type: boolean - - type: number - type: string - - type: array - - type: object - description: >- - Key-value attributes associated with the file - chunking_strategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' description: >- - Strategy used for splitting the file into chunks - created_at: + 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. + max_num_results: type: integer description: >- - Timestamp when the file was added to the vector store - last_error: - $ref: '#/components/schemas/VectorStoreFileLastError' - description: >- - (Optional) Error information if file processing failed - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: Current processing status of the file - usage_bytes: + (Optional) Maximum number of results to return. Default: returns all. + additionalProperties: false + required: + - model + - query + - items + title: RerankRequest + RerankData: + type: object + properties: + index: type: integer - default: 0 - description: Storage space used by this file in bytes - vector_store_id: - type: string description: >- - ID of the vector store containing this file + The original index of the document in the input list + relevance_score: + type: number + description: >- + The relevance score from the model output. Values are inverted when applicable + so that higher scores indicate greater relevance. additionalProperties: false required: - - id - - object - - attributes - - chunking_strategy - - created_at - - status - - usage_bytes - - vector_store_id - title: VectorStoreFileObject - description: OpenAI Vector Store File object. - VectorStoreFilesListInBatchResponse: + - index + - relevance_score + title: RerankData + description: >- + A single rerank result from a reranking response. + RerankResponse: type: object properties: - object: - type: string - default: list - description: Object type identifier, always "list" data: type: array items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: >- - List of vector store file objects in the batch - first_id: - type: string - description: >- - (Optional) ID of the first file in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false + $ref: '#/components/schemas/RerankData' description: >- - Whether there are more files available beyond this page + List of rerank result objects, sorted by relevance score (descending) additionalProperties: false required: - - object - data - - has_more - title: VectorStoreFilesListInBatchResponse - description: >- - Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: + title: RerankResponse + description: Response from a reranking request. + Checkpoint: type: object properties: - object: + identifier: type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: List of vector store file objects - first_id: + description: Unique identifier for the checkpoint + created_at: + type: string + format: date-time + description: >- + Timestamp when the checkpoint was created + epoch: + type: integer + description: >- + Training epoch when the checkpoint was saved + post_training_job_id: type: string description: >- - (Optional) ID of the first file in the list for pagination - last_id: + Identifier of the training job that created this checkpoint + path: type: string description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false + File system path where the checkpoint is stored + training_metrics: + $ref: '#/components/schemas/PostTrainingMetric' description: >- - Whether there are more files available beyond this page + (Optional) Training metrics associated with this checkpoint additionalProperties: false required: - - object - - data - - has_more - title: VectorStoreListFilesResponse - description: >- - Response from listing files in a vector store. - OpenaiAttachFileToVectorStoreRequest: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. + PostTrainingJobArtifactsResponse: type: object properties: - file_id: + job_uuid: type: string + description: Unique identifier for the training job + checkpoints: + type: array + items: + $ref: '#/components/schemas/Checkpoint' description: >- - The ID of the file to attach to the vector store. - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The key-value attributes stored with the file, which can be used for filtering. - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - The chunking strategy to use for the file. + List of model checkpoints created during training additionalProperties: false required: - - file_id - title: OpenaiAttachFileToVectorStoreRequest - OpenaiUpdateVectorStoreFileRequest: + - job_uuid + - checkpoints + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingMetric: type: object properties: - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + epoch: + type: integer + description: Training epoch number + train_loss: + type: number + description: Loss value on the training dataset + validation_loss: + type: number + description: Loss value on the validation dataset + perplexity: + type: number description: >- - The updated key-value attributes to store with the file. + Perplexity metric indicating model confidence additionalProperties: false required: - - attributes - title: OpenaiUpdateVectorStoreFileRequest - VectorStoreFileDeleteResponse: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: >- + Training metrics captured during post-training jobs. + CancelTrainingJobRequest: type: object properties: - id: - type: string - description: Unique identifier of the deleted file - object: + job_uuid: type: string - default: vector_store.file.deleted - description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true - description: >- - Whether the deletion operation was successful + description: The UUID of the job to cancel. additionalProperties: false required: - - id - - object - - deleted - title: VectorStoreFileDeleteResponse - description: >- - Response from deleting a vector store file. - bool: - type: boolean - VectorStoreContent: + - job_uuid + title: CancelTrainingJobRequest + PostTrainingJobStatusResponse: type: object properties: - type: + job_uuid: type: string - const: text + description: Unique identifier for the training job + status: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + description: Current status of the training job + scheduled_at: + type: string + format: date-time description: >- - Content type, currently only "text" is supported - text: + (Optional) Timestamp when the job was scheduled + started_at: type: string - description: The actual text content - embedding: - type: array - items: - type: number + format: date-time description: >- - Optional embedding vector for this content chunk - chunk_metadata: - $ref: '#/components/schemas/ChunkMetadata' - description: Optional chunk metadata - metadata: + (Optional) Timestamp when the job execution began + completed_at: + type: string + format: date-time + description: >- + (Optional) Timestamp when the job finished, if completed + resources_allocated: type: object additionalProperties: oneOf: @@ -10363,278 +18344,237 @@ components: - type: string - type: array - type: object - description: Optional user-defined metadata + description: >- + (Optional) Information about computational resources allocated to the + job + checkpoints: + type: array + items: + $ref: '#/components/schemas/Checkpoint' + description: >- + List of model checkpoints created during training additionalProperties: false required: - - type - - text - title: VectorStoreContent - description: >- - Content item from a vector store file or search result. - VectorStoreFileContentResponse: + - job_uuid + - status + - checkpoints + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + ListPostTrainingJobsResponse: type: object properties: - object: - type: string - const: vector_store.file_content.page - default: vector_store.file_content.page - description: >- - The object type, which is always `vector_store.file_content.page` data: type: array items: - $ref: '#/components/schemas/VectorStoreContent' - description: Parsed content of the file - has_more: - type: boolean - default: false - description: >- - Indicates if there are more content pages to fetch - next_page: - type: string - description: The token for the next page, if any + type: object + properties: + job_uuid: + type: string + additionalProperties: false + required: + - job_uuid + title: PostTrainingJob additionalProperties: false required: - - object - data - - has_more - title: VectorStoreFileContentResponse + title: ListPostTrainingJobsResponse + DPOAlignmentConfig: + type: object + properties: + beta: + type: number + description: Temperature parameter for the DPO loss + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid + description: The type of loss function to use for DPO + additionalProperties: false + required: + - beta + - loss_type + title: DPOAlignmentConfig description: >- - Represents the parsed content of a vector store file. - OpenaiSearchVectorStoreRequest: + Configuration for Direct Preference Optimization (DPO) alignment. + DPOLossType: + type: string + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + DataConfig: type: object properties: - query: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - The query string or array for performing the search. - filters: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + dataset_id: + type: string description: >- - Filters based on file attributes to narrow the search results. - max_num_results: + Unique identifier for the training dataset + batch_size: type: integer - description: >- - Maximum number of results to return (1 to 50 inclusive, default 10). - 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: >- - Ranking options for fine-tuning the search results. - rewrite_query: + description: Number of samples per training batch + shuffle: type: boolean description: >- - Whether to rewrite the natural language query for vector search (default - false) - search_mode: - type: string + Whether to shuffle the dataset during training + data_format: + $ref: '#/components/schemas/DatasetFormat' description: >- - The search mode to use - "keyword", "vector", or "hybrid" (default "vector") - additionalProperties: false - required: - - query - title: OpenaiSearchVectorStoreRequest - VectorStoreSearchResponse: - type: object - properties: - file_id: + Format of the dataset (instruct or dialog) + validation_dataset_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 - attributes: - type: object - additionalProperties: - oneOf: - - type: string - - type: number - - type: boolean + (Optional) Unique identifier for the validation dataset + packed: + type: boolean + default: false description: >- - (Optional) Key-value attributes associated with the file - content: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' + (Optional) Whether to pack multiple samples into a single sequence for + efficiency + train_on_input: + type: boolean + default: false description: >- - List of content items matching the search query + (Optional) Whether to compute loss on input tokens as well as output tokens additionalProperties: false required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - description: Response from searching a vector store. - VectorStoreSearchResponsePage: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: >- + Configuration for training data and data loading. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + EfficiencyConfig: type: object properties: - object: - type: string - default: vector_store.search_results.page + enable_activation_checkpointing: + type: boolean + default: false description: >- - Object type identifier for the search results page - search_query: - type: array - items: - type: string + (Optional) Whether to use activation checkpointing to reduce memory usage + enable_activation_offloading: + type: boolean + default: false description: >- - The original search query that was executed - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - description: List of search result objects - has_more: + (Optional) Whether to offload activations to CPU to save GPU memory + memory_efficient_fsdp_wrap: type: boolean default: false description: >- - Whether there are more results available beyond this page - next_page: - type: string + (Optional) Whether to use memory-efficient FSDP wrapping + fsdp_cpu_offload: + type: boolean + default: false description: >- - (Optional) Token for retrieving the next page of results + (Optional) Whether to offload FSDP parameters to CPU additionalProperties: false - required: - - object - - search_query - - data - - has_more - title: VectorStoreSearchResponsePage + title: EfficiencyConfig description: >- - Paginated response from searching a vector store. - VersionInfo: - type: object - properties: - version: - type: string - description: Version number of the service - additionalProperties: false - required: - - version - title: VersionInfo - description: Version information for the service. - AppendRowsRequest: + Configuration for memory and compute efficiency optimizations. + OptimizerConfig: type: object properties: - rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to append to the dataset. + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + description: >- + Type of optimizer to use (adam, adamw, or sgd) + lr: + type: number + description: Learning rate for the optimizer + weight_decay: + type: number + description: >- + Weight decay coefficient for regularization + num_warmup_steps: + type: integer + description: Number of steps for learning rate warmup additionalProperties: false required: - - rows - title: AppendRowsRequest - PaginatedResponse: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + description: >- + Configuration parameters for the optimization algorithm. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: >- + Available optimizer algorithms for training. + TrainingConfig: type: object properties: - data: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The list of items for the current page - has_more: - type: boolean + n_epochs: + type: integer + description: Number of training epochs to run + max_steps_per_epoch: + type: integer + default: 1 + description: Maximum number of steps to run per epoch + gradient_accumulation_steps: + type: integer + default: 1 description: >- - Whether there are more items available after this set - url: + Number of steps to accumulate gradients before updating + max_validation_steps: + type: integer + default: 1 + description: >- + (Optional) Maximum number of validation steps per epoch + data_config: + $ref: '#/components/schemas/DataConfig' + description: >- + (Optional) Configuration for data loading and formatting + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + description: >- + (Optional) Configuration for the optimization algorithm + efficiency_config: + $ref: '#/components/schemas/EfficiencyConfig' + description: >- + (Optional) Configuration for memory and compute optimizations + dtype: type: string - description: The URL for accessing this list + default: bf16 + description: >- + (Optional) Data type for model parameters (bf16, fp16, fp32) additionalProperties: false required: - - data - - has_more - title: PaginatedResponse + - n_epochs + - max_steps_per_epoch + - gradient_accumulation_steps + title: TrainingConfig description: >- - A generic paginated response that follows a simple format. - Dataset: + Comprehensive configuration for the training process. + PreferenceOptimizeRequest: type: object properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: + job_uuid: type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: dataset - default: dataset - description: >- - Type of resource, always 'dataset' for datasets - purpose: + description: The UUID of the job to create. + finetuned_model: type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - description: >- - Purpose of the dataset indicating its intended use - source: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - description: >- - Data source configuration for the dataset - metadata: + description: The model to fine-tune. + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + description: The algorithm configuration. + training_config: + $ref: '#/components/schemas/TrainingConfig' + description: The training configuration. + hyperparam_search_config: type: object additionalProperties: oneOf: @@ -10644,1001 +18584,1509 @@ components: - type: string - type: array - type: object - description: Additional metadata for the dataset + description: The hyperparam search configuration. + logger_config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The logger configuration. + additionalProperties: false + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: PreferenceOptimizeRequest + PostTrainingJob: + type: object + properties: + job_uuid: + type: string additionalProperties: false required: - - identifier - - provider_id - - type - - purpose - - source - - metadata - title: Dataset - description: >- - Dataset resource for storing and accessing training or evaluation data. - RowsDataSource: + - job_uuid + title: PostTrainingJob + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + - $ref: '#/components/schemas/QATFinetuningConfig' + SpanEndPayload: + description: Payload for a span end event. + properties: + type: + const: span_end + default: span_end + title: Type + type: string + status: + $ref: '#/components/schemas/SpanStatus' + required: + - status + title: SpanEndPayload type: object + SpanStartPayload: + description: Payload for a span start event. properties: type: + const: span_start + default: span_start + title: Type type: string - const: rows - default: rows - rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", - "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, - world!"}]} ] - additionalProperties: false + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + title: Parent Span Id + nullable: true required: - - type - - rows - title: RowsDataSource - description: A dataset stored in rows. - URIDataSource: + - name + title: SpanStartPayload type: object + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes type: + const: metric + default: metric + title: Type type: string - const: uri - default: uri - uri: + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: Value + unit: + title: Unit type: string - description: >- - The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" - - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" - additionalProperties: false required: - - type - - uri - title: URIDataSource - description: >- - A dataset that can be obtained from a URI. - ListDatasetsResponse: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. properties: - data: - type: array - items: - $ref: '#/components/schemas/Dataset' - description: List of datasets - additionalProperties: false + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + title: Payload required: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - Benchmark: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. properties: - identifier: + trace_id: + title: Trace Id type: string - provider_resource_id: + span_id: + title: Span Id type: string - provider_id: + timestamp: + format: date-time + title: Timestamp type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes type: + const: unstructured_log + default: unstructured_log + title: Type type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: benchmark - default: benchmark - description: The resource type, always benchmark - dataset_id: + message: + title: Message type: string - description: >- - Identifier of the dataset to use for the benchmark evaluation - scoring_functions: - type: array - items: - type: string - description: >- - List of scoring function identifiers to apply during evaluation - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Metadata for this evaluation task - additionalProperties: false + severity: + $ref: '#/components/schemas/LogSeverity' required: - - identifier - - provider_id - - type - - dataset_id - - scoring_functions - - metadata - title: Benchmark - description: >- - A benchmark resource for evaluating model performance. - ListBenchmarksResponse: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + - $ref: '#/components/schemas/MetricEvent' + - $ref: '#/components/schemas/StructuredLogEvent' + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. properties: data: - type: array items: - $ref: '#/components/schemas/Benchmark' - additionalProperties: false + 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: ListBenchmarksResponse - BenchmarkConfig: + - data + title: ListOpenAIResponseInputItem type: object + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - description: The candidate to evaluate. - scoring_params: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringFnParams' - description: >- - Map between scoring function id and parameters for each scoring function - you want to run - num_examples: + created_at: + title: Created At type: integer - description: >- - (Optional) The number of examples to evaluate. If not provided, all examples - in the dataset will be evaluated - additionalProperties: false + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + nullable: true + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + nullable: true + status: + title: Status + type: string + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + nullable: true + tools: + anyOf: + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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 + - type: 'null' + title: Tools + nullable: true + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + nullable: true + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + nullable: true + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + 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: - - eval_candidate - - scoring_params - title: BenchmarkConfig - description: >- - A benchmark configuration for evaluation. - GreedySamplingStrategy: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput + type: object + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. + 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 + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. properties: type: + title: Type type: string - const: greedy - default: greedy - description: >- - Must be "greedy" to identify this sampling strategy - additionalProperties: false required: - - type - title: GreedySamplingStrategy - description: >- - Greedy sampling strategy that selects the highest probability token at each - step. - ModelCandidate: + - type + title: ResponseGuardrailSpec type: object + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - type: - type: string - const: model - default: model - model: + object: + const: list + default: list + title: Object type: string - description: The model ID to evaluate. - sampling_params: - $ref: '#/components/schemas/SamplingParams' - description: The sampling parameters for the model. - system_message: - $ref: '#/components/schemas/SystemMessage' - description: >- - (Optional) The system message providing instructions or context to the - model. - additionalProperties: false + data: + description: List of batch objects + items: + $ref: '#/components/schemas/Batch' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + description: ID of the first batch in the list + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + description: ID of the last batch in the list + title: Last Id + nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean required: - - type - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - SamplingParams: + - data + title: ListBatchesResponse type: object + MetricInResponse: + description: A metric value included in API responses. properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - - $ref: '#/components/schemas/TopPSamplingStrategy' - - $ref: '#/components/schemas/TopKSamplingStrategy' - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - description: The sampling strategy. - max_tokens: - type: integer - description: >- - 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. - repetition_penalty: - type: number - default: 1.0 - description: >- - 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. - stop: - type: array + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: Value + unit: + anyOf: + - type: string + - type: 'null' + title: Unit + nullable: true + required: + - metric + - value + title: MetricInResponse + type: object + PaginatedResponse: + description: A generic paginated response that follows a simple format. + properties: + data: items: - type: string - description: >- - Up to 4 sequences where the API will stop generating further tokens. The - returned text will not contain the stop sequence. - additionalProperties: false + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + anyOf: + - type: string + - type: 'null' + title: Url + nullable: true required: - - strategy - title: SamplingParams - description: Sampling parameters. - SystemMessage: + - data + - has_more + title: PaginatedResponse type: object + PostTrainingMetric: + description: Training metrics captured during post-training jobs. properties: - role: - type: string - const: system - default: system - description: >- - Must be "system" to identify this as a system message - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - 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). - additionalProperties: false + 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: - - role - - content - title: SystemMessage - description: >- - A system message providing instructions or context to the model. - TopKSamplingStrategy: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric type: object + Checkpoint: + description: Checkpoint created during training runs. properties: - type: + identifier: + title: Identifier type: string - const: top_k - default: top_k - description: >- - Must be "top_k" to identify this sampling strategy - top_k: + created_at: + format: date-time + title: Created At + type: string + epoch: + title: Epoch type: integer - description: >- - Number of top tokens to consider for sampling. Must be at least 1 - additionalProperties: false + post_training_job_id: + title: Post Training Job Id + type: string + path: + title: Path + type: string + training_metrics: + anyOf: + - $ref: '#/components/schemas/PostTrainingMetric' + - type: 'null' + nullable: true required: - - type - - top_k - title: TopKSamplingStrategy - description: >- - Top-k sampling strategy that restricts sampling to the k most likely tokens. - TopPSamplingStrategy: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint type: object + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: type: + const: dialog + default: dialog + title: Type type: string - const: top_p - default: top_p - description: >- - Must be "top_p" to identify this sampling strategy - temperature: - type: number - description: >- - Controls randomness in sampling. Higher values increase randomness - top_p: - type: number - default: 0.95 - description: >- - Cumulative probability threshold for nucleus sampling. Defaults to 0.95 - additionalProperties: false - required: - - type - title: TopPSamplingStrategy - description: >- - Top-p (nucleus) sampling strategy that samples from the smallest set of tokens - with cumulative probability >= p. - EvaluateRowsRequest: + title: DialogType type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. properties: - input_rows: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: + 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' + 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/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + maxItems: 20 + title: Items type: array + required: + - items + title: ConversationItemCreateRequest + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content items: + additionalProperties: true type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to evaluate. - scoring_functions: + title: Content type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage + type: object + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. + properties: + data: items: - type: string - description: >- - The scoring functions to use for the evaluation. - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. - additionalProperties: false + $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: - - input_rows - - scoring_functions - - benchmark_config - title: EvaluateRowsRequest - EvaluateResponse: + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse + type: object + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). + properties: + type: + const: bf16 + default: bf16 + title: Type + type: string + title: Bf16QuantizationConfig + type: object + LogProbConfig: + description: '' + properties: + top_k: + anyOf: + - type: integer + - type: 'null' + default: 0 + title: Top K + title: LogProbConfig + type: object + SystemMessageBehavior: + description: Config for how to override the default system prompt. + enum: + - append + - replace + title: SystemMessageBehavior + 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. + enum: + - auto + - required + - none + title: ToolChoice + type: string + ToolConfig: + description: Configuration for tool use. + properties: + tool_choice: + anyOf: + - $ref: '#/components/schemas/ToolChoice' + - type: string + - type: 'null' + default: auto + title: Tool Choice + tool_prompt_format: + anyOf: + - $ref: '#/components/schemas/ToolPromptFormat' + - type: 'null' + nullable: true + system_message_behavior: + anyOf: + - $ref: '#/components/schemas/SystemMessageBehavior' + - type: 'null' + default: append + title: ToolConfig type: object + ToolPromptFormat: + description: Prompt format for calling custom / zero shot tools. + enum: + - json + - function_tag + - python_list + title: ToolPromptFormat + type: string + ChatCompletionRequest: properties: - generations: - type: array + model: + title: Model + type: string + messages: items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The generations from the evaluation. - scores: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: The scores from the evaluation. - additionalProperties: false + discriminator: + mapping: + assistant: '#/components/schemas/CompletionMessage' + system: '#/components/schemas/SystemMessage' + tool: '#/components/schemas/ToolResponseMessage' + user: '#/components/schemas/UserMessage' + propertyName: role + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/SystemMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + - $ref: '#/components/schemas/CompletionMessage' + title: Messages + type: array + sampling_params: + anyOf: + - $ref: '#/components/schemas/SamplingParams' + - type: 'null' + tools: + anyOf: + - items: + $ref: '#/components/schemas/ToolDefinition' + type: array + - type: 'null' + title: Tools + tool_config: + anyOf: + - $ref: '#/components/schemas/ToolConfig' + - type: 'null' + response_format: + anyOf: + - discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + - type: 'null' + title: Response Format + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Stream + logprobs: + anyOf: + - $ref: '#/components/schemas/LogProbConfig' + - type: 'null' + nullable: true required: - - generations - - scores - title: EvaluateResponse - description: The response from an evaluation. - RunEvalRequest: + - model + - messages + title: ChatCompletionRequest type: object + TokenLogProbs: + description: Log probabilities for generated tokens. properties: - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. - additionalProperties: false + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object required: - - benchmark_config - title: RunEvalRequest - Job: + - logprobs_by_token + title: TokenLogProbs type: object + ChatCompletionResponse: + description: Response from a chat completion request. properties: - job_id: - type: string - description: Unique identifier for the job - status: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current execution status of the job - additionalProperties: false + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + completion_message: + $ref: '#/components/schemas/CompletionMessage' + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true required: - - job_id - - status - title: Job - description: >- - A job execution instance with status tracking. - RerankRequest: + - completion_message + title: ChatCompletionResponse type: object + ChatCompletionResponseEventType: + description: Types of events that can occur during chat completion. + enum: + - start + - complete + - progress + title: ChatCompletionResponseEventType + type: string + ChatCompletionResponseEvent: + description: An event during chat completion generation. properties: - model: - type: string - description: >- - The identifier of the reranking model to use. - query: + event_type: + $ref: '#/components/schemas/ChatCompletionResponseEventType' + delta: + discriminator: + mapping: + image: '#/components/schemas/ImageDelta' + text: '#/components/schemas/TextDelta' + tool_call: '#/components/schemas/ToolCallDelta' + propertyName: type oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - description: >- - 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. - items: - type: array - items: - oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - description: >- - 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. - max_num_results: - type: integer - description: >- - (Optional) Maximum number of results to return. Default: returns all. - additionalProperties: false + - $ref: '#/components/schemas/TextDelta' + - $ref: '#/components/schemas/ImageDelta' + - $ref: '#/components/schemas/ToolCallDelta' + title: Delta + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true + stop_reason: + anyOf: + - $ref: '#/components/schemas/StopReason' + - type: 'null' + nullable: true required: - - model - - query - - items - title: RerankRequest - RerankData: + - event_type + - delta + title: ChatCompletionResponseEvent type: object + ChatCompletionResponseStreamChunk: + description: A chunk of a streamed chat completion response. properties: - index: - type: integer - description: >- - The original index of the document in the input list - relevance_score: - type: number - description: >- - The relevance score from the model output. Values are inverted when applicable - so that higher scores indicate greater relevance. - additionalProperties: false + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + event: + $ref: '#/components/schemas/ChatCompletionResponseEvent' required: - - index - - relevance_score - title: RerankData - description: >- - A single rerank result from a reranking response. - RerankResponse: + - event + title: ChatCompletionResponseStreamChunk type: object + CompletionResponse: + description: Response from a completion request. properties: - data: - type: array - items: - $ref: '#/components/schemas/RerankData' - description: >- - List of rerank result objects, sorted by relevance score (descending) - additionalProperties: false + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + content: + title: Content + type: string + stop_reason: + $ref: '#/components/schemas/StopReason' + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true required: - - data - title: RerankResponse - description: Response from a reranking request. - Checkpoint: + - content + - stop_reason + title: CompletionResponse type: object + CompletionResponseStreamChunk: + description: A chunk of a streamed completion response. properties: - identifier: - type: string - description: Unique identifier for the checkpoint - created_at: - type: string - format: date-time - description: >- - Timestamp when the checkpoint was created - epoch: - type: integer - description: >- - Training epoch when the checkpoint was saved - post_training_job_id: - type: string - description: >- - Identifier of the training job that created this checkpoint - path: + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + delta: + title: Delta type: string - description: >- - File system path where the checkpoint is stored - training_metrics: - $ref: '#/components/schemas/PostTrainingMetric' - description: >- - (Optional) Training metrics associated with this checkpoint - additionalProperties: false + stop_reason: + anyOf: + - $ref: '#/components/schemas/StopReason' + - type: 'null' + nullable: true + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - PostTrainingJobArtifactsResponse: + - delta + title: CompletionResponseStreamChunk type: object + EmbeddingsResponse: + description: Response containing generated embeddings. properties: - job_uuid: - type: string - description: Unique identifier for the training job - checkpoints: - type: array + embeddings: items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false + items: + type: number + type: array + title: Embeddings + type: array required: - - job_uuid - - checkpoints - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingMetric: + - embeddings + title: EmbeddingsResponse type: object + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. properties: - epoch: - type: integer - description: Training epoch number - train_loss: - type: number - description: Loss value on the training dataset - validation_loss: - type: number - description: Loss value on the validation dataset - perplexity: - type: number - description: >- - Perplexity metric indicating model confidence - additionalProperties: false - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: >- - Training metrics captured during post-training jobs. - CancelTrainingJobRequest: + type: + const: fp8_mixed + default: fp8_mixed + title: Type + type: string + title: Fp8QuantizationConfig type: object + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. properties: - job_uuid: + type: + const: int4_mixed + default: int4_mixed + title: Type + type: string + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Scheme + title: Int4QuantizationConfig + type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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 - description: The UUID of the job to cancel. - additionalProperties: false + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true required: - - job_uuid - title: CancelTrainingJobRequest - PostTrainingJobStatusResponse: + - 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. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + nullable: true + title: OpenAIChoiceLogprobs type: object + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. properties: - job_uuid: - type: string - description: Unique identifier for the training job - status: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current status of the training job - scheduled_at: + data: + items: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - format: date-time - description: >- - (Optional) Timestamp when the job was scheduled - started_at: + last_id: + title: Last Id type: string - format: date-time - description: >- - (Optional) Timestamp when the job execution began - completed_at: + object: + const: list + default: list + title: Object type: string - format: date-time - description: >- - (Optional) Timestamp when the job finished, if completed - resources_allocated: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Information about computational resources allocated to the - job - checkpoints: - type: array - items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false required: - - job_uuid - - status - - checkpoints - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - ListPostTrainingJobsResponse: + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse type: object + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. properties: - data: - type: array - items: - type: object - properties: - job_uuid: - type: string - additionalProperties: false - required: - - job_uuid - title: PostTrainingJob - additionalProperties: false - required: - - data - title: ListPostTrainingJobsResponse - DPOAlignmentConfig: + content: + anyOf: + - type: string + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - type: string + - type: 'null' + title: Refusal + nullable: true + role: + anyOf: + - type: string + - type: 'null' + title: Role + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + nullable: true + reasoning_content: + anyOf: + - type: string + - type: 'null' + title: Reasoning Content + nullable: true + title: OpenAIChoiceDelta type: object + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: - beta: - type: number - description: Temperature parameter for the DPO loss - loss_type: - $ref: '#/components/schemas/DPOLossType' - default: sigmoid - description: The type of loss function to use for DPO - additionalProperties: false + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true required: - - beta - - loss_type - title: DPOAlignmentConfig - description: >- - Configuration for Direct Preference Optimization (DPO) alignment. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: + - delta + - finish_reason + - index + title: OpenAIChunkChoice type: object + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: - dataset_id: + id: + title: Id type: string - description: >- - Unique identifier for the training dataset - batch_size: + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object + type: string + created: + title: Created type: integer - description: Number of samples per training batch - shuffle: - type: boolean - description: >- - Whether to shuffle the dataset during training - data_format: - $ref: '#/components/schemas/DatasetFormat' - description: >- - Format of the dataset (instruct or dialog) - validation_dataset_id: + model: + title: Model type: string - description: >- - (Optional) Unique identifier for the validation dataset - packed: - type: boolean - default: false - description: >- - (Optional) Whether to pack multiple samples into a single sequence for - efficiency - train_on_input: - type: boolean - default: false - description: >- - (Optional) Whether to compute loss on input tokens as well as output tokens - additionalProperties: false + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + nullable: true required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: >- - Configuration for training data and data loading. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - EfficiencyConfig: - type: object - properties: - enable_activation_checkpointing: - type: boolean - default: false - description: >- - (Optional) Whether to use activation checkpointing to reduce memory usage - enable_activation_offloading: - type: boolean - default: false - description: >- - (Optional) Whether to offload activations to CPU to save GPU memory - memory_efficient_fsdp_wrap: - type: boolean - default: false - description: >- - (Optional) Whether to use memory-efficient FSDP wrapping - fsdp_cpu_offload: - type: boolean - default: false - description: >- - (Optional) Whether to offload FSDP parameters to CPU - additionalProperties: false - title: EfficiencyConfig - description: >- - Configuration for memory and compute efficiency optimizations. - OptimizerConfig: + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk 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: - optimizer_type: - $ref: '#/components/schemas/OptimizerType' - description: >- - Type of optimizer to use (adam, adamw, or sgd) - lr: - type: number - description: Learning rate for the optimizer - weight_decay: - type: number - description: >- - Weight decay coefficient for regularization - num_warmup_steps: + finish_reason: + title: Finish Reason + type: string + text: + title: Text + type: string + index: + title: Index type: integer - description: Number of steps for learning rate warmup - additionalProperties: false + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: >- - Configuration parameters for the optimization algorithm. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: >- - Available optimizer algorithms for training. - TrainingConfig: + - finish_reason + - text + - index + title: OpenAICompletionChoice + type: object + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens + properties: + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Text Offset + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Token Logprobs + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Tokens + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + title: Top Logprobs + nullable: true + title: OpenAICompletionLogprobs type: object + ToolResponse: + description: Response from a tool invocation. properties: - n_epochs: - type: integer - description: Number of training epochs to run - max_steps_per_epoch: - type: integer - default: 1 - description: Maximum number of steps to run per epoch - gradient_accumulation_steps: - type: integer - default: 1 - description: >- - Number of steps to accumulate gradients before updating - max_validation_steps: - type: integer - default: 1 - description: >- - (Optional) Maximum number of validation steps per epoch - data_config: - $ref: '#/components/schemas/DataConfig' - description: >- - (Optional) Configuration for data loading and formatting - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - description: >- - (Optional) Configuration for the optimization algorithm - efficiency_config: - $ref: '#/components/schemas/EfficiencyConfig' - description: >- - (Optional) Configuration for memory and compute optimizations - dtype: + call_id: + title: Call Id type: string - default: bf16 - description: >- - (Optional) Data type for model parameters (bf16, fp16, fp32) - additionalProperties: false + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + nullable: true required: - - n_epochs - - max_steps_per_epoch - - gradient_accumulation_steps - title: TrainingConfig - description: >- - Comprehensive configuration for the training process. - PreferenceOptimizeRequest: + - call_id + - tool_name + - content + title: ToolResponse type: object + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - job_uuid: + route: + title: Route type: string - description: The UUID of the job to create. - finetuned_model: + method: + title: Method type: string - description: The model to fine-tune. - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - description: The algorithm configuration. - training_config: - $ref: '#/components/schemas/TrainingConfig' - description: The training configuration. - hyperparam_search_config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The hyperparam search configuration. - logger_config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The logger configuration. - additionalProperties: false + provider_types: + items: + type: string + title: Provider Types + type: array required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: PreferenceOptimizeRequest - PostTrainingJob: + - route + - method + - provider_types + title: RouteInfo + type: object + ListRoutesResponse: + description: Response containing a list of all available API routes. + properties: + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array + required: + - data + title: ListRoutesResponse type: object + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. properties: job_uuid: + title: Job Uuid type: string - additionalProperties: false + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - job_uuid - title: PostTrainingJob - AlgorithmConfig: - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - - $ref: '#/components/schemas/QATFinetuningConfig' - discriminator: - propertyName: type - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - LoraFinetuningConfig: + - job_uuid + title: PostTrainingJobArtifactsResponse type: object + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: - type: + job_uuid: + title: Job Uuid type: string - const: LoRA - default: LoRA - description: Algorithm type identifier, always "LoRA" - lora_attn_modules: - type: array + log_lines: items: type: string - description: >- - List of attention module names to apply LoRA to - apply_lora_to_mlp: - type: boolean - description: Whether to apply LoRA to MLP layers - apply_lora_to_output: - type: boolean - description: >- - Whether to apply LoRA to output projection layers - rank: - type: integer - description: >- - Rank of the LoRA adaptation (lower rank = fewer parameters) - alpha: - type: integer - description: >- - LoRA scaling parameter that controls adaptation strength - use_dora: - type: boolean - default: false - description: >- - (Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation) - quantize_base: - type: boolean - default: false - description: >- - (Optional) Whether to quantize the base model weights - additionalProperties: false + title: Log Lines + type: array required: - - type - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: >- - Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - QATFinetuningConfig: + - job_uuid + - log_lines + title: PostTrainingJobLogStream type: object + PostTrainingJobStatusResponse: + description: Status of a finetuning job. properties: - type: - type: string - const: QAT - default: QAT - description: Algorithm type identifier, always "QAT" - quantizer_name: + job_uuid: + title: Job Uuid type: string - description: >- - Name of the quantization algorithm to use - group_size: - type: integer - description: Size of groups for grouped quantization - additionalProperties: false + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Scheduled At + nullable: true + started_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Started At + nullable: true + completed_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Completed At + nullable: true + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Resources Allocated + nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - type - - quantizer_name - - group_size - title: QATFinetuningConfig - description: >- - Configuration for Quantization-Aware Training (QAT) fine-tuning. - SupervisedFineTuneRequest: + - job_uuid + - status + title: PostTrainingJobStatusResponse type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. properties: job_uuid: + title: Job Uuid type: string - description: The UUID of the job to create. + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' training_config: $ref: '#/components/schemas/TrainingConfig' - description: The training configuration. hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The hyperparam search configuration. logger_config: + additionalProperties: true + title: Logger Config type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The logger configuration. - model: - type: string - description: The model to fine-tune. - checkpoint_dir: - type: string - description: The directory to save checkpoint(s) to. - algorithm_config: - $ref: '#/components/schemas/AlgorithmConfig' - description: The algorithm configuration. - additionalProperties: false required: - job_uuid - training_config @@ -11906,8 +20354,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: @@ -11915,11 +20362,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: @@ -11927,127 +20372,10 @@ 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: $ref: '#/components/schemas/Error' - example: - status: 0 - title: Error - detail: An unexpected error occurred -security: - - Default: [] -tags: - - name: Agents - description: >- - APIs for creating and interacting with agentic systems. - x-displayName: Agents - - name: Batches - description: >- - The API is designed to allow use of openai client libraries for seamless integration. - - - This API provides the following extensions: - - idempotent batch creation - - Note: This API is currently under active development and may undergo changes. - x-displayName: >- - The Batches API enables efficient processing of multiple requests in a single - operation, particularly useful for processing large datasets, batch evaluation - workflows, and cost-effective inference at scale. - - name: Benchmarks - description: '' - - name: Conversations - description: >- - Protocol for conversation management operations. - x-displayName: Conversations - - name: DatasetIO - description: '' - - name: Datasets - description: '' - - name: Eval - description: >- - Llama Stack Evaluation API for running evaluations on model and agent candidates. - x-displayName: Evaluations - - name: Files - description: >- - This API is used to upload documents that can be used with other Llama Stack - APIs. - x-displayName: Files - - name: Inference - description: >- - Llama Stack Inference API for generating completions, chat completions, and - embeddings. - - - This API provides the raw interface to the underlying models. Three kinds of - models are supported: - - - LLM models: these models generate "raw" and "chat" (conversational) completions. - - - Embedding models: these models generate embeddings to be used for semantic - search. - - - Rerank models: these models reorder the documents based on their relevance - to a query. - x-displayName: Inference - - name: Inspect - description: >- - APIs for inspecting the Llama Stack service, including health status, available - API routes with methods and implementing providers. - x-displayName: Inspect - - name: Models - description: '' - - name: PostTraining (Coming Soon) - description: '' - - name: Prompts - description: >- - Protocol for prompt management operations. - x-displayName: Prompts - - name: Providers - description: >- - Providers API for inspecting, listing, and modifying providers and their configurations. - x-displayName: Providers - - name: Safety - description: OpenAI-compatible Moderations API. - x-displayName: Safety - - name: Scoring - description: '' - - name: ScoringFunctions - description: '' - - name: Shields - description: '' - - name: ToolGroups - description: '' - - name: ToolRuntime - description: '' - - name: VectorIO - description: '' -x-tagGroups: - - name: Operations - tags: - - Agents - - Batches - - Benchmarks - - Conversations - - DatasetIO - - Datasets - - Eval - - Files - - Inference - - Inspect - - Models - - PostTraining (Coming Soon) - - Prompts - - Providers - - Safety - - Scoring - - ScoringFunctions - - Shields - - ToolGroups - - ToolRuntime - - VectorIO diff --git a/docs/openapi_generator/README.md b/docs/openapi_generator/README.md deleted file mode 100644 index 85021d911e..0000000000 --- a/docs/openapi_generator/README.md +++ /dev/null @@ -1 +0,0 @@ -The RFC Specification (OpenAPI format) is generated from the set of API endpoints located in `llama_stack.core/server/endpoints.py` using the `generate.py` utility. diff --git a/docs/openapi_generator/generate.py b/docs/openapi_generator/generate.py deleted file mode 100644 index 769db32a74..0000000000 --- a/docs/openapi_generator/generate.py +++ /dev/null @@ -1,134 +0,0 @@ -# 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. - -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under the terms described found in the -# LICENSE file in the root directory of this source tree. - -from datetime import datetime -from pathlib import Path -import sys -import fire -import ruamel.yaml as yaml - -from llama_stack_api import LLAMA_STACK_API_V1 # noqa: E402 -from llama_stack.core.stack import LlamaStack # noqa: E402 - -from .pyopenapi.options import Options # noqa: E402 -from .pyopenapi.specification import Info, Server # noqa: E402 -from .pyopenapi.utility import Specification, validate_api # noqa: E402 - - -def str_presenter(dumper, data): - if data.startswith(f"/{LLAMA_STACK_API_V1}") or data.startswith( - "#/components/schemas/" - ): - style = None - else: - style = ">" if "\n" in data or len(data) > 40 else None - return dumper.represent_scalar("tag:yaml.org,2002:str", data, style=style) - - -def generate_spec(output_dir: Path, stability_filter: str = None, main_spec: bool = False, combined_spec: bool = False): - """Generate OpenAPI spec with optional stability filtering.""" - - if combined_spec: - # Special case for combined stable + experimental APIs - title_suffix = " - Stable & Experimental APIs" - filename_prefix = "stainless-" - description_suffix = "\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." - # Use the special "stainless" filter to include stable + experimental APIs - stability_filter = "stainless" - elif stability_filter: - title_suffix = { - "stable": " - Stable APIs" if not main_spec else "", - "experimental": " - Experimental APIs", - "deprecated": " - Deprecated APIs" - }.get(stability_filter, f" - {stability_filter.title()} APIs") - - # Use main spec filename for stable when main_spec=True - if main_spec and stability_filter == "stable": - filename_prefix = "" - else: - filename_prefix = f"{stability_filter}-" - - description_suffix = { - "stable": "\n\n**✅ STABLE**: Production-ready APIs with backward compatibility guarantees.", - "experimental": "\n\n**🧪 EXPERIMENTAL**: Pre-release APIs (v1alpha, v1beta) that may change before becoming stable.", - "deprecated": "\n\n**⚠️ DEPRECATED**: Legacy APIs that may be removed in future versions. Use for migration reference only." - }.get(stability_filter, "") - else: - title_suffix = "" - filename_prefix = "" - description_suffix = "" - - spec = Specification( - LlamaStack, - Options( - server=Server(url="http://any-hosted-llama-stack.com"), - info=Info( - title=f"Llama Stack Specification{title_suffix}", - version=LLAMA_STACK_API_V1, - description=f"""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.{description_suffix}""", - ), - include_standard_error_responses=True, - stability_filter=stability_filter, # Pass the filter to the generator - ), - ) - - yaml_filename = f"{filename_prefix}llama-stack-spec.yaml" - - with open(output_dir / yaml_filename, "w", encoding="utf-8") as fp: - y = yaml.YAML() - y.default_flow_style = False - y.block_seq_indent = 2 - y.map_indent = 2 - y.sequence_indent = 4 - y.sequence_dash_offset = 2 - y.width = 80 - y.allow_unicode = True - y.representer.add_representer(str, str_presenter) - - y.dump( - spec.get_json(), - fp, - ) - -def main(output_dir: str): - output_dir = Path(output_dir) - if not output_dir.exists(): - raise ValueError(f"Directory {output_dir} does not exist") - - # Validate API protocols before generating spec - return_type_errors = validate_api() - if return_type_errors: - print("\nAPI Method Return Type Validation Errors:\n") - for error in return_type_errors: - print(error, file=sys.stderr) - sys.exit(1) - - now = str(datetime.now()) - print(f"Converting the spec to YAML (openapi.yaml) and HTML (openapi.html) at {now}") - print("") - - # Generate main spec as stable APIs (llama-stack-spec.yaml) - print("Generating main specification (stable APIs)...") - generate_spec(output_dir, "stable", main_spec=True) - - print("Generating other stability-filtered specifications...") - generate_spec(output_dir, "experimental") - generate_spec(output_dir, "deprecated") - - print("Generating combined stable + experimental specification...") - generate_spec(output_dir, combined_spec=True) - - -if __name__ == "__main__": - fire.Fire(main) diff --git a/docs/openapi_generator/pyopenapi/README.md b/docs/openapi_generator/pyopenapi/README.md deleted file mode 100644 index 1b5fbce197..0000000000 --- a/docs/openapi_generator/pyopenapi/README.md +++ /dev/null @@ -1 +0,0 @@ -This is forked from https://github.com/hunyadi/pyopenapi diff --git a/docs/openapi_generator/pyopenapi/__init__.py b/docs/openapi_generator/pyopenapi/__init__.py deleted file mode 100644 index 756f351d88..0000000000 --- a/docs/openapi_generator/pyopenapi/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# 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. diff --git a/docs/openapi_generator/pyopenapi/generator.py b/docs/openapi_generator/pyopenapi/generator.py deleted file mode 100644 index 9b5f76e2a4..0000000000 --- a/docs/openapi_generator/pyopenapi/generator.py +++ /dev/null @@ -1,1175 +0,0 @@ -# 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. - -import hashlib -import inspect -import ipaddress -import os -import types -import typing -from dataclasses import make_dataclass -from pathlib import Path -from typing import Annotated, Any, Dict, get_args, get_origin, Set, Union - -from fastapi import UploadFile - -from llama_stack_api import ( - Docstring, - Error, - JsonSchemaGenerator, - JsonType, - Schema, - SchemaOptions, - get_schema_identifier, - is_generic_list, - is_type_optional, - is_type_union, - is_unwrapped_body_param, - json_dump_string, - object_to_json, - parse_type, - python_type_to_name, - register_schema, - unwrap_generic_list, - unwrap_optional_type, - unwrap_union_types, -) -from pydantic import BaseModel - -from .operations import ( - EndpointOperation, - get_endpoint_events, - get_endpoint_operations, - HTTPMethod, -) -from .options import * -from .specification import ( - Components, - Document, - Example, - ExampleRef, - ExtraBodyParameter, - MediaType, - Operation, - Parameter, - ParameterLocation, - PathItem, - RequestBody, - Response, - ResponseRef, - SchemaOrRef, - SchemaRef, - Tag, - TagGroup, -) - -register_schema( - ipaddress.IPv4Address, - schema={ - "type": "string", - "format": "ipv4", - "title": "IPv4 address", - "description": "IPv4 address, according to dotted-quad ABNF syntax as defined in RFC 2673, section 3.2.", - }, - examples=["192.0.2.0", "198.51.100.1", "203.0.113.255"], -) - -register_schema( - ipaddress.IPv6Address, - schema={ - "type": "string", - "format": "ipv6", - "title": "IPv6 address", - "description": "IPv6 address, as defined in RFC 2373, section 2.2.", - }, - examples=[ - "FEDC:BA98:7654:3210:FEDC:BA98:7654:3210", - "1080:0:0:0:8:800:200C:417A", - "1080::8:800:200C:417A", - "FF01::101", - "::1", - ], -) - - -def http_status_to_string(status_code: HTTPStatusCode) -> str: - "Converts an HTTP status code to a string." - - if isinstance(status_code, HTTPStatus): - return str(status_code.value) - elif isinstance(status_code, int): - return str(status_code) - elif isinstance(status_code, str): - return status_code - else: - raise TypeError("expected: HTTP status code") - - -class SchemaBuilder: - schema_generator: JsonSchemaGenerator - schemas: Dict[str, Schema] - - def __init__(self, schema_generator: JsonSchemaGenerator) -> None: - self.schema_generator = schema_generator - self.schemas = {} - - def classdef_to_schema(self, typ: type) -> Schema: - """ - Converts a type to a JSON schema. - For nested types found in the type hierarchy, adds the type to the schema registry in the OpenAPI specification section `components`. - """ - - type_schema, type_definitions = self.schema_generator.classdef_to_schema(typ) - - # append schema to list of known schemas, to be used in OpenAPI's Components Object section - for ref, schema in type_definitions.items(): - self._add_ref(ref, schema) - - return type_schema - - def classdef_to_named_schema(self, name: str, typ: type) -> Schema: - schema = self.classdef_to_schema(typ) - self._add_ref(name, schema) - return schema - - def classdef_to_ref(self, typ: type) -> SchemaOrRef: - """ - Converts a type to a JSON schema, and if possible, returns a schema reference. - For composite types (such as classes), adds the type to the schema registry in the OpenAPI specification section `components`. - """ - - type_schema = self.classdef_to_schema(typ) - if typ is str or typ is int or typ is float: - # represent simple types as themselves - return type_schema - - type_name = get_schema_identifier(typ) - if type_name is not None: - return self._build_ref(type_name, type_schema) - - try: - type_name = python_type_to_name(typ) - return self._build_ref(type_name, type_schema) - except TypeError: - pass - - return type_schema - - def _build_ref(self, type_name: str, type_schema: Schema) -> SchemaRef: - self._add_ref(type_name, type_schema) - return SchemaRef(type_name) - - def _add_ref(self, type_name: str, type_schema: Schema) -> None: - if type_name not in self.schemas: - self.schemas[type_name] = type_schema - - -class ContentBuilder: - schema_builder: SchemaBuilder - schema_transformer: Optional[Callable[[SchemaOrRef], SchemaOrRef]] - sample_transformer: Optional[Callable[[JsonType], JsonType]] - - def __init__( - self, - schema_builder: SchemaBuilder, - schema_transformer: Optional[Callable[[SchemaOrRef], SchemaOrRef]] = None, - sample_transformer: Optional[Callable[[JsonType], JsonType]] = None, - ) -> None: - self.schema_builder = schema_builder - self.schema_transformer = schema_transformer - self.sample_transformer = sample_transformer - - def build_content( - self, payload_type: type, examples: Optional[List[Any]] = None - ) -> Dict[str, MediaType]: - "Creates the content subtree for a request or response." - - def is_iterator_type(t): - return "StreamChunk" in str(t) or "OpenAIResponseObjectStream" in str(t) - - def get_media_type(t): - if is_generic_list(t): - return "application/jsonl" - elif is_iterator_type(t): - return "text/event-stream" - else: - return "application/json" - - if typing.get_origin(payload_type) in (typing.Union, types.UnionType): - media_types = [] - item_types = [] - for x in typing.get_args(payload_type): - media_types.append(get_media_type(x)) - item_types.append(x) - - if len(set(media_types)) == 1: - # all types have the same media type - return {media_types[0]: self.build_media_type(payload_type, examples)} - else: - # different types have different media types - return { - media_type: self.build_media_type(item_type, examples) - for media_type, item_type in zip(media_types, item_types) - } - - if is_generic_list(payload_type): - media_type = "application/jsonl" - item_type = unwrap_generic_list(payload_type) - else: - media_type = "application/json" - item_type = payload_type - - return {media_type: self.build_media_type(item_type, examples)} - - def build_media_type( - self, item_type: type, examples: Optional[List[Any]] = None - ) -> MediaType: - schema = self.schema_builder.classdef_to_ref(item_type) - if self.schema_transformer: - schema_transformer: Callable[[SchemaOrRef], SchemaOrRef] = ( - self.schema_transformer - ) - schema = schema_transformer(schema) - - if not examples: - return MediaType(schema=schema) - - if len(examples) == 1: - return MediaType(schema=schema, example=self._build_example(examples[0])) - - return MediaType( - schema=schema, - examples=self._build_examples(examples), - ) - - def _build_examples( - self, examples: List[Any] - ) -> Dict[str, Union[Example, ExampleRef]]: - "Creates a set of several examples for a media type." - - if self.sample_transformer: - sample_transformer: Callable[[JsonType], JsonType] = self.sample_transformer # type: ignore - else: - sample_transformer = lambda sample: sample - - results: Dict[str, Union[Example, ExampleRef]] = {} - for example in examples: - value = sample_transformer(object_to_json(example)) - - hash_string = ( - hashlib.sha256(json_dump_string(value).encode("utf-8")) - .digest() - .hex()[:16] - ) - name = f"ex-{hash_string}" - - results[name] = Example(value=value) - - return results - - def _build_example(self, example: Any) -> Any: - "Creates a single example for a media type." - - if self.sample_transformer: - sample_transformer: Callable[[JsonType], JsonType] = self.sample_transformer # type: ignore - else: - sample_transformer = lambda sample: sample - - return sample_transformer(object_to_json(example)) - - -@dataclass -class ResponseOptions: - """ - Configuration options for building a response for an operation. - - :param type_descriptions: Maps each response type to a textual description (if available). - :param examples: A list of response examples. - :param status_catalog: Maps each response type to an HTTP status code. - :param default_status_code: HTTP status code assigned to responses that have no mapping. - """ - - type_descriptions: Dict[type, str] - examples: Optional[List[Any]] - status_catalog: Dict[type, HTTPStatusCode] - default_status_code: HTTPStatusCode - - -@dataclass -class StatusResponse: - status_code: str - types: List[type] = dataclasses.field(default_factory=list) - examples: List[Any] = dataclasses.field(default_factory=list) - - -def create_docstring_for_request( - request_name: str, fields: List[Tuple[str, type, Any]], doc_params: Dict[str, str] -) -> str: - """Creates a ReST-style docstring for a dynamically generated request dataclass.""" - lines = ["\n"] # Short description - - # Add parameter documentation in ReST format - for name, type_ in fields: - desc = doc_params.get(name, "") - lines.append(f":param {name}: {desc}") - - return "\n".join(lines) - - -class ResponseBuilder: - content_builder: ContentBuilder - - def __init__(self, content_builder: ContentBuilder) -> None: - self.content_builder = content_builder - - def _get_status_responses( - self, options: ResponseOptions - ) -> Dict[str, StatusResponse]: - status_responses: Dict[str, StatusResponse] = {} - - for response_type in options.type_descriptions.keys(): - status_code = http_status_to_string( - options.status_catalog.get(response_type, options.default_status_code) - ) - - # look up response for status code - if status_code not in status_responses: - status_responses[status_code] = StatusResponse(status_code) - status_response = status_responses[status_code] - - # append response types that are assigned the given status code - status_response.types.append(response_type) - - # append examples that have the matching response type - if options.examples: - status_response.examples.extend( - example - for example in options.examples - if isinstance(example, response_type) - ) - - return dict(sorted(status_responses.items())) - - def build_response( - self, options: ResponseOptions - ) -> Dict[str, Union[Response, ResponseRef]]: - """ - Groups responses that have the same status code. - """ - - responses: Dict[str, Union[Response, ResponseRef]] = {} - status_responses = self._get_status_responses(options) - for status_code, status_response in status_responses.items(): - response_types = tuple(status_response.types) - if len(response_types) > 1: - composite_response_type: type = Union[response_types] # type: ignore - else: - (response_type,) = response_types - composite_response_type = response_type - - description = " **OR** ".join( - filter( - None, - ( - options.type_descriptions[response_type] - for response_type in response_types - ), - ) - ) - - responses[status_code] = self._build_response( - response_type=composite_response_type, - description=description, - examples=status_response.examples or None, - ) - - return responses - - def _build_response( - self, - response_type: type, - description: str, - examples: Optional[List[Any]] = None, - ) -> Response: - "Creates a response subtree." - - if response_type is not None: - return Response( - description=description, - content=self.content_builder.build_content(response_type, examples), - ) - else: - return Response(description=description) - - -def schema_error_wrapper(schema: SchemaOrRef) -> Schema: - "Wraps an error output schema into a top-level error schema." - - return { - "type": "object", - "properties": { - "error": schema, # type: ignore - }, - "additionalProperties": False, - "required": [ - "error", - ], - } - - -def sample_error_wrapper(error: JsonType) -> JsonType: - "Wraps an error output sample into a top-level error sample." - - return {"error": error} - - -class Generator: - endpoint: type - options: Options - schema_builder: SchemaBuilder - responses: Dict[str, Response] - - def __init__(self, endpoint: type, options: Options) -> None: - self.endpoint = endpoint - self.options = options - schema_generator = JsonSchemaGenerator( - SchemaOptions( - definitions_path="#/components/schemas/", - use_examples=self.options.use_examples, - property_description_fun=options.property_description_fun, - ) - ) - self.schema_builder = SchemaBuilder(schema_generator) - self.responses = {} - - # Create standard error responses - self._create_standard_error_responses() - - def _create_standard_error_responses(self) -> None: - """ - Creates standard error responses that can be reused across operations. - These will be added to the components.responses section of the OpenAPI document. - """ - # Get the Error schema - error_schema = self.schema_builder.classdef_to_ref(Error) - - # Create standard error responses - self.responses["BadRequest400"] = Response( - description="The request was invalid or malformed", - content={ - "application/json": MediaType( - schema=error_schema, - example={ - "status": 400, - "title": "Bad Request", - "detail": "The request was invalid or malformed", - }, - ) - }, - ) - - self.responses["TooManyRequests429"] = Response( - description="The client has sent too many requests in a given amount of time", - content={ - "application/json": MediaType( - schema=error_schema, - example={ - "status": 429, - "title": "Too Many Requests", - "detail": "You have exceeded the rate limit. Please try again later.", - }, - ) - }, - ) - - self.responses["InternalServerError500"] = Response( - description="The server encountered an unexpected error", - content={ - "application/json": MediaType( - schema=error_schema, - example={ - "status": 500, - "title": "Internal Server Error", - "detail": "An unexpected error occurred. Our team has been notified.", - }, - ) - }, - ) - - # Add a default error response for any unhandled error cases - self.responses["DefaultError"] = Response( - description="An unexpected error occurred", - content={ - "application/json": MediaType( - schema=error_schema, - example={ - "status": 0, - "title": "Error", - "detail": "An unexpected error occurred", - }, - ) - }, - ) - - def _build_type_tag(self, ref: str, schema: Schema) -> Tag: - # Don't include schema definition in the tag description because for one, - # it is not very valuable and for another, it causes string formatting - # discrepancies via the Stainless Studio. - # - # definition = f'' - title = typing.cast(str, schema.get("title")) - description = typing.cast(str, schema.get("description")) - return Tag( - name=ref, - description="\n\n".join(s for s in (title, description) if s is not None), - ) - - def _build_extra_tag_groups( - self, extra_types: Dict[str, Dict[str, type]] - ) -> Dict[str, List[Tag]]: - """ - Creates a dictionary of tag group captions as keys, and tag lists as values. - - :param extra_types: A dictionary of type categories and list of types in that category. - """ - - extra_tags: Dict[str, List[Tag]] = {} - - for category_name, category_items in extra_types.items(): - tag_list: List[Tag] = [] - - for name, extra_type in category_items.items(): - schema = self.schema_builder.classdef_to_schema(extra_type) - tag_list.append(self._build_type_tag(name, schema)) - - if tag_list: - extra_tags[category_name] = tag_list - - return extra_tags - - def _get_api_group_for_operation(self, op) -> str | None: - """ - Determine the API group for an operation based on its route path. - - Args: - op: The endpoint operation - - Returns: - The API group name derived from the route, or None if unable to determine - """ - if not hasattr(op, 'webmethod') or not op.webmethod or not hasattr(op.webmethod, 'route'): - return None - - route = op.webmethod.route - if not route or not route.startswith('/'): - return None - - # Extract API group from route path - # Examples: /v1/agents/list -> agents-api - # /v1/responses -> responses-api - # /v1/models -> models-api - path_parts = route.strip('/').split('/') - - if len(path_parts) < 2: - return None - - # Skip version prefix (v1, v1alpha, v1beta, etc.) - if path_parts[0].startswith('v1'): - if len(path_parts) < 2: - return None - api_segment = path_parts[1] - else: - api_segment = path_parts[0] - - # Convert to supplementary file naming convention - # agents -> agents-api, responses -> responses-api, etc. - return f"{api_segment}-api" - - def _load_supplemental_content(self, api_group: str | None) -> str: - """ - Load supplemental content for an API group based on stability level. - - Follows this resolution order: - 1. docs/supplementary/{stability}/{api_group}.md - 2. docs/supplementary/shared/{api_group}.md (fallback) - 3. Empty string if no files found - - Args: - api_group: The API group name (e.g., "agents-responses-api"), or None if no mapping exists - - Returns: - The supplemental content as markdown string, or empty string if not found - """ - if not api_group: - return "" - - base_path = Path(__file__).parent.parent.parent / "supplementary" - - # Try stability-specific content first if stability filter is set - if self.options.stability_filter: - stability_path = base_path / self.options.stability_filter / f"{api_group}.md" - if stability_path.exists(): - try: - return stability_path.read_text(encoding="utf-8") - except Exception as e: - print(f"Warning: Could not read stability-specific supplemental content from {stability_path}: {e}") - - # Fall back to shared content - shared_path = base_path / "shared" / f"{api_group}.md" - if shared_path.exists(): - try: - return shared_path.read_text(encoding="utf-8") - except Exception as e: - print(f"Warning: Could not read shared supplemental content from {shared_path}: {e}") - - # No supplemental content found - return "" - - def _build_operation(self, op: EndpointOperation) -> Operation: - if op.defining_class.__name__ in [ - "SyntheticDataGeneration", - "PostTraining", - ]: - op.defining_class.__name__ = f"{op.defining_class.__name__} (Coming Soon)" - print(op.defining_class.__name__) - - # TODO (xiyan): temporary fix for datasetio inner impl + datasets api - # if op.defining_class.__name__ in ["DatasetIO"]: - # op.defining_class.__name__ = "Datasets" - - doc_string = parse_type(op.func_ref) - doc_params = dict( - (param.name, param.description) for param in doc_string.params.values() - ) - - # parameters passed in URL component path - path_parameters = [ - Parameter( - name=param_name, - in_=ParameterLocation.Path, - description=doc_params.get(param_name), - required=True, - schema=self.schema_builder.classdef_to_ref(param_type), - ) - for param_name, param_type in op.path_params - ] - - # parameters passed in URL component query string - query_parameters = [] - for param_name, param_type in op.query_params: - if is_type_optional(param_type): - inner_type: type = unwrap_optional_type(param_type) - required = False - else: - inner_type = param_type - required = True - - query_parameter = Parameter( - name=param_name, - in_=ParameterLocation.Query, - description=doc_params.get(param_name), - required=required, - schema=self.schema_builder.classdef_to_ref(inner_type), - ) - query_parameters.append(query_parameter) - - # parameters passed anywhere - parameters = path_parameters + query_parameters - - # Build extra body parameters documentation - extra_body_parameters = [] - for param_name, param_type, description in op.extra_body_params: - if is_type_optional(param_type): - inner_type: type = unwrap_optional_type(param_type) - required = False - else: - inner_type = param_type - required = True - - # Use description from ExtraBodyField if available, otherwise from docstring - param_description = description or doc_params.get(param_name) - - extra_body_param = ExtraBodyParameter( - name=param_name, - schema=self.schema_builder.classdef_to_ref(inner_type), - description=param_description, - required=required, - ) - extra_body_parameters.append(extra_body_param) - - webmethod = getattr(op.func_ref, "__webmethod__", None) - raw_bytes_request_body = False - if webmethod: - raw_bytes_request_body = getattr(webmethod, "raw_bytes_request_body", False) - - # data passed in request body as raw bytes cannot have request parameters - if raw_bytes_request_body and op.request_params: - raise ValueError( - "Cannot have both raw bytes request body and request parameters" - ) - - # data passed in request body as raw bytes - if raw_bytes_request_body: - requestBody = RequestBody( - content={ - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary", - } - } - }, - required=True, - ) - # data passed in request body as multipart/form-data - elif op.multipart_params: - builder = ContentBuilder(self.schema_builder) - - # Create schema properties for multipart form fields - properties = {} - required_fields = [] - - for name, param_type in op.multipart_params: - if get_origin(param_type) is Annotated: - base_type = get_args(param_type)[0] - else: - base_type = param_type - - # Check if the type is optional - is_optional = is_type_optional(base_type) - if is_optional: - base_type = unwrap_optional_type(base_type) - - if base_type is UploadFile: - # File upload - properties[name] = {"type": "string", "format": "binary"} - else: - # All other types - generate schema reference - # This includes enums, BaseModels, and simple types - properties[name] = self.schema_builder.classdef_to_ref(base_type) - - if not is_optional: - required_fields.append(name) - - multipart_schema = { - "type": "object", - "properties": properties, - "required": required_fields, - } - - requestBody = RequestBody( - content={"multipart/form-data": {"schema": multipart_schema}}, - required=True, - ) - # data passed in payload as JSON and mapped to request parameters - elif op.request_params: - builder = ContentBuilder(self.schema_builder) - first = next(iter(op.request_params)) - request_name, request_type = first - - # Special case: if there's a single parameter with Body(embed=False) that's a BaseModel, - # unwrap it to show the flat structure in the OpenAPI spec - # Example: openai_chat_completion() - if (len(op.request_params) == 1 and is_unwrapped_body_param(request_type)): - pass - else: - op_name = "".join(word.capitalize() for word in op.name.split("_")) - request_name = f"{op_name}Request" - fields = [ - ( - name, - type_, - ) - for name, type_ in op.request_params - ] - request_type = make_dataclass( - request_name, - fields, - namespace={ - "__doc__": create_docstring_for_request( - request_name, fields, doc_params - ) - }, - ) - - requestBody = RequestBody( - content={ - "application/json": builder.build_media_type( - request_type, op.request_examples - ) - }, - description=doc_params.get(request_name), - required=True, - ) - else: - requestBody = None - - # success response types - if doc_string.returns is None and is_type_union(op.response_type): - # split union of return types into a list of response types - success_type_docstring: Dict[type, Docstring] = { - typing.cast(type, item): parse_type(item) - for item in unwrap_union_types(op.response_type) - } - success_type_descriptions = { - item: doc_string.short_description - for item, doc_string in success_type_docstring.items() - } - else: - # use return type as a single response type - success_type_descriptions = { - op.response_type: ( - doc_string.returns.description if doc_string.returns else "OK" - ) - } - - response_examples = op.response_examples or [] - success_examples = [ - example - for example in response_examples - if not isinstance(example, Exception) - ] - - content_builder = ContentBuilder(self.schema_builder) - response_builder = ResponseBuilder(content_builder) - response_options = ResponseOptions( - success_type_descriptions, - success_examples if self.options.use_examples else None, - self.options.success_responses, - "200", - ) - responses = response_builder.build_response(response_options) - - # failure response types - if doc_string.raises: - exception_types: Dict[type, str] = { - item.raise_type: item.description for item in doc_string.raises.values() - } - exception_examples = [ - example - for example in response_examples - if isinstance(example, Exception) - ] - - if self.options.error_wrapper: - schema_transformer = schema_error_wrapper - sample_transformer = sample_error_wrapper - else: - schema_transformer = None - sample_transformer = None - - content_builder = ContentBuilder( - self.schema_builder, - schema_transformer=schema_transformer, - sample_transformer=sample_transformer, - ) - response_builder = ResponseBuilder(content_builder) - response_options = ResponseOptions( - exception_types, - exception_examples if self.options.use_examples else None, - self.options.error_responses, - "500", - ) - responses.update(response_builder.build_response(response_options)) - - assert len(responses.keys()) > 0, f"No responses found for {op.name}" - - # Add standard error response references - if self.options.include_standard_error_responses: - if "400" not in responses: - responses["400"] = ResponseRef("BadRequest400") - if "429" not in responses: - responses["429"] = ResponseRef("TooManyRequests429") - if "500" not in responses: - responses["500"] = ResponseRef("InternalServerError500") - if "default" not in responses: - responses["default"] = ResponseRef("DefaultError") - - if op.event_type is not None: - builder = ContentBuilder(self.schema_builder) - callbacks = { - f"{op.func_name}_callback": { - "{$request.query.callback}": PathItem( - post=Operation( - requestBody=RequestBody( - content=builder.build_content(op.event_type) - ), - responses={"200": Response(description="OK")}, - ) - ) - } - } - - else: - callbacks = None - - # Build base description from docstring - base_description = "\n".join( - filter(None, [doc_string.short_description, doc_string.long_description]) - ) - - # Individual endpoints get clean descriptions only - description = base_description - - return Operation( - tags=[ - getattr(op.defining_class, "API_NAMESPACE", op.defining_class.__name__) - ], - summary=doc_string.short_description, - description=description, - parameters=parameters, - requestBody=requestBody, - responses=responses, - callbacks=callbacks, - deprecated=getattr(op.webmethod, "deprecated", False) - or "DEPRECATED" in op.func_name, - security=[] if op.public else None, - extraBodyParameters=extra_body_parameters if extra_body_parameters else None, - ) - - def _get_api_stability_priority(self, api_level: str) -> int: - """ - Return sorting priority for API stability levels. - Lower numbers = higher priority (appear first) - - :param api_level: The API level (e.g., "v1", "v1beta", "v1alpha") - :return: Priority number for sorting - """ - stability_order = { - "v1": 0, # Stable - highest priority - "v1beta": 1, # Beta - medium priority - "v1alpha": 2, # Alpha - lowest priority - } - return stability_order.get(api_level, 999) # Unknown levels go last - - def generate(self) -> Document: - paths: Dict[str, PathItem] = {} - endpoint_classes: Set[type] = set() - - # Collect all operations and filter by stability if specified - operations = list( - get_endpoint_operations( - self.endpoint, use_examples=self.options.use_examples - ) - ) - - # Filter operations by stability level if requested - if self.options.stability_filter: - filtered_operations = [] - for op in operations: - deprecated = ( - getattr(op.webmethod, "deprecated", False) - or "DEPRECATED" in op.func_name - ) - stability_level = op.webmethod.level - - if self.options.stability_filter == "stable": - # Include v1 non-deprecated endpoints - if stability_level == "v1" and not deprecated: - filtered_operations.append(op) - elif self.options.stability_filter == "experimental": - # Include v1alpha and v1beta endpoints (deprecated or not) - if stability_level in ["v1alpha", "v1beta"]: - filtered_operations.append(op) - elif self.options.stability_filter == "deprecated": - # Include only deprecated endpoints - if deprecated: - filtered_operations.append(op) - elif self.options.stability_filter == "stainless": - # Include stable (v1), deprecated (v1 deprecated), and experimental (v1alpha, v1beta) endpoints - if stability_level == "v1" or stability_level in ["v1alpha", "v1beta"]: - filtered_operations.append(op) - - operations = filtered_operations - print( - f"Filtered to {len(operations)} operations for stability level: {self.options.stability_filter}" - ) - - # Sort operations by multiple criteria for consistent ordering: - # 1. Stability level with deprecation handling (global priority): - # - Active stable (v1) comes first - # - Beta (v1beta) comes next - # - Alpha (v1alpha) comes next - # - Deprecated stable (v1 deprecated) comes last - # 2. Route path (group related endpoints within same stability level) - # 3. HTTP method (GET, POST, PUT, DELETE, PATCH) - # 4. Operation name (alphabetical) - def sort_key(op): - http_method_order = { - HTTPMethod.GET: 0, - HTTPMethod.POST: 1, - HTTPMethod.PUT: 2, - HTTPMethod.DELETE: 3, - HTTPMethod.PATCH: 4, - } - - # Enhanced stability priority for migration pattern support - deprecated = getattr(op.webmethod, "deprecated", False) - stability_priority = self._get_api_stability_priority(op.webmethod.level) - - # Deprecated versions should appear after everything else - # This ensures deprecated stable endpoints come last globally - if deprecated: - stability_priority += 10 # Push deprecated endpoints to the end - - return ( - stability_priority, # Global stability handling comes first - op.get_route( - op.webmethod - ), # Group by route path within stability level - http_method_order.get(op.http_method, 999), - op.func_name, - ) - - operations.sort(key=sort_key) - - # Debug output for migration pattern tracking - migration_routes = {} - for op in operations: - route_key = (op.get_route(op.webmethod), op.http_method) - if route_key not in migration_routes: - migration_routes[route_key] = [] - migration_routes[route_key].append( - (op.webmethod.level, getattr(op.webmethod, "deprecated", False)) - ) - - for route_key, versions in migration_routes.items(): - if len(versions) > 1: - print(f"Migration pattern detected for {route_key[1]} {route_key[0]}:") - for level, deprecated in versions: - status = "DEPRECATED" if deprecated else "ACTIVE" - print(f" - {level} ({status})") - - for op in operations: - endpoint_classes.add(op.defining_class) - - operation = self._build_operation(op) - - if op.http_method is HTTPMethod.GET: - pathItem = PathItem(get=operation) - elif op.http_method is HTTPMethod.PUT: - pathItem = PathItem(put=operation) - elif op.http_method is HTTPMethod.POST: - pathItem = PathItem(post=operation) - elif op.http_method is HTTPMethod.DELETE: - pathItem = PathItem(delete=operation) - elif op.http_method is HTTPMethod.PATCH: - pathItem = PathItem(patch=operation) - else: - raise NotImplementedError(f"unknown HTTP method: {op.http_method}") - - route = op.get_route(op.webmethod) - route = route.replace(":path", "") - print(f"route: {route}") - if route in paths: - paths[route].update(pathItem) - else: - paths[route] = pathItem - - operation_tags: List[Tag] = [] - for cls in endpoint_classes: - doc_string = parse_type(cls) - if hasattr(cls, "API_NAMESPACE") and cls.API_NAMESPACE != cls.__name__: - continue - - # Add supplemental content to tag pages - api_group = f"{cls.__name__.lower()}-api" - supplemental_content = self._load_supplemental_content(api_group) - - tag_description = doc_string.long_description or "" - if supplemental_content: - if tag_description: - tag_description = f"{tag_description}\n\n{supplemental_content}" - else: - tag_description = supplemental_content - - operation_tags.append( - Tag( - name=cls.__name__, - description=tag_description, - displayName=doc_string.short_description, - ) - ) - - # types that are emitted by events - event_tags: List[Tag] = [] - events = get_endpoint_events(self.endpoint) - for ref, event_type in events.items(): - event_schema = self.schema_builder.classdef_to_named_schema(ref, event_type) - event_tags.append(self._build_type_tag(ref, event_schema)) - - # types that are explicitly declared - extra_tag_groups: Dict[str, List[Tag]] = {} - if self.options.extra_types is not None: - if isinstance(self.options.extra_types, list): - extra_tag_groups = self._build_extra_tag_groups( - {"AdditionalTypes": self.options.extra_types} - ) - elif isinstance(self.options.extra_types, dict): - extra_tag_groups = self._build_extra_tag_groups( - self.options.extra_types - ) - else: - raise TypeError( - f"type mismatch for collection of extra types: {type(self.options.extra_types)}" - ) - - # list all operations and types - tags: List[Tag] = [] - tags.extend(operation_tags) - tags.extend(event_tags) - for extra_tag_group in extra_tag_groups.values(): - tags.extend(extra_tag_group) - - tags = sorted(tags, key=lambda t: t.name) - - tag_groups = [] - if operation_tags: - tag_groups.append( - TagGroup( - name=self.options.map("Operations"), - tags=sorted(tag.name for tag in operation_tags), - ) - ) - if event_tags: - tag_groups.append( - TagGroup( - name=self.options.map("Events"), - tags=sorted(tag.name for tag in event_tags), - ) - ) - for caption, extra_tag_group in extra_tag_groups.items(): - tag_groups.append( - TagGroup( - name=caption, - tags=sorted(tag.name for tag in extra_tag_group), - ) - ) - - if self.options.default_security_scheme: - securitySchemes = {"Default": self.options.default_security_scheme} - else: - securitySchemes = None - - return Document( - openapi=".".join(str(item) for item in self.options.version), - info=self.options.info, - jsonSchemaDialect=( - "https://json-schema.org/draft/2020-12/schema" - if self.options.version >= (3, 1, 0) - else None - ), - servers=[self.options.server], - paths=paths, - components=Components( - schemas=self.schema_builder.schemas, - responses=self.responses, - securitySchemes=securitySchemes, - ), - security=[{"Default": []}], - tags=tags, - tagGroups=tag_groups, - ) diff --git a/docs/openapi_generator/pyopenapi/operations.py b/docs/openapi_generator/pyopenapi/operations.py deleted file mode 100644 index 42a554f2c8..0000000000 --- a/docs/openapi_generator/pyopenapi/operations.py +++ /dev/null @@ -1,459 +0,0 @@ -# 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. - -import collections.abc -import enum -import inspect -import typing -from dataclasses import dataclass -from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union - -from termcolor import colored - -from typing import get_origin, get_args - -from fastapi import UploadFile -from fastapi.params import File, Form -from typing import Annotated - -from llama_stack_api import ( - ExtraBodyField, - LLAMA_STACK_API_V1, - LLAMA_STACK_API_V1ALPHA, - LLAMA_STACK_API_V1BETA, - get_signature, -) - - -def split_prefix( - s: str, sep: str, prefix: Union[str, Iterable[str]] -) -> Tuple[Optional[str], str]: - """ - Recognizes a prefix at the beginning of a string. - - :param s: The string to check. - :param sep: A separator between (one of) the prefix(es) and the rest of the string. - :param prefix: A string or a set of strings to identify as a prefix. - :return: A tuple of the recognized prefix (if any) and the rest of the string excluding the separator (or the entire string). - """ - - if isinstance(prefix, str): - if s.startswith(prefix + sep): - return prefix, s[len(prefix) + len(sep) :] - else: - return None, s - - for p in prefix: - if s.startswith(p + sep): - return p, s[len(p) + len(sep) :] - - return None, s - - -def _get_annotation_type(annotation: Union[type, str], callable: Callable) -> type: - "Maps a stringized reference to a type, as if using `from __future__ import annotations`." - - if isinstance(annotation, str): - return eval(annotation, callable.__globals__) - else: - return annotation - - -class HTTPMethod(enum.Enum): - "HTTP method used to invoke an endpoint operation." - - GET = "GET" - POST = "POST" - PUT = "PUT" - DELETE = "DELETE" - PATCH = "PATCH" - - -OperationParameter = Tuple[str, type] - - -class ValidationError(TypeError): - pass - - -@dataclass -class EndpointOperation: - """ - Type information and metadata associated with an endpoint operation. - - "param defining_class: The most specific class that defines the endpoint operation. - :param name: The short name of the endpoint operation. - :param func_name: The name of the function to invoke when the operation is triggered. - :param func_ref: The callable to invoke when the operation is triggered. - :param route: A custom route string assigned to the operation. - :param path_params: Parameters of the operation signature that are passed in the path component of the URL string. - :param query_params: Parameters of the operation signature that are passed in the query string as `key=value` pairs. - :param request_params: The parameter that corresponds to the data transmitted in the request body. - :param multipart_params: Parameters that indicate multipart/form-data request body. - :param extra_body_params: Parameters that arrive via extra_body and are documented but not in SDK. - :param event_type: The Python type of the data that is transmitted out-of-band (e.g. via websockets) while the operation is in progress. - :param response_type: The Python type of the data that is transmitted in the response body. - :param http_method: The HTTP method used to invoke the endpoint such as POST, GET or PUT. - :param public: True if the operation can be invoked without prior authentication. - :param request_examples: Sample requests that the operation might take. - :param response_examples: Sample responses that the operation might produce. - """ - - defining_class: type - name: str - func_name: str - func_ref: Callable[..., Any] - route: Optional[str] - path_params: List[OperationParameter] - query_params: List[OperationParameter] - request_params: Optional[OperationParameter] - multipart_params: List[OperationParameter] - extra_body_params: List[tuple[str, type, str | None]] - event_type: Optional[type] - response_type: type - http_method: HTTPMethod - public: bool - request_examples: Optional[List[Any]] = None - response_examples: Optional[List[Any]] = None - - def get_route(self, webmethod) -> str: - api_level = webmethod.level - - if self.route is not None: - return "/".join(["", api_level, self.route.lstrip("/")]) - - route_parts = ["", api_level, self.name] - for param_name, _ in self.path_params: - route_parts.append("{" + param_name + "}") - return "/".join(route_parts) - - -class _FormatParameterExtractor: - "A visitor to exract parameters in a format string." - - keys: List[str] - - def __init__(self) -> None: - self.keys = [] - - def __getitem__(self, key: str) -> None: - self.keys.append(key) - return None - - -def _get_route_parameters(route: str) -> List[str]: - extractor = _FormatParameterExtractor() - # Replace all occurrences of ":path" with empty string - route = route.replace(":path", "") - route.format_map(extractor) - return extractor.keys - - -def _get_endpoint_functions( - endpoint: type, prefixes: List[str] -) -> Iterator[Tuple[str, str, str, Callable]]: - if not inspect.isclass(endpoint): - raise ValueError(f"object is not a class type: {endpoint}") - - functions = inspect.getmembers(endpoint, inspect.isfunction) - for func_name, func_ref in functions: - webmethods = [] - - # Check for multiple webmethods (stacked decorators) - if hasattr(func_ref, "__webmethods__"): - webmethods = func_ref.__webmethods__ - - if not webmethods: - continue - - for webmethod in webmethods: - print(f"Processing {colored(func_name, 'white')}...") - operation_name = func_name - - if webmethod.method == "GET": - prefix = "get" - elif webmethod.method == "DELETE": - prefix = "delete" - elif webmethod.method == "POST": - prefix = "post" - elif operation_name.startswith("get_") or operation_name.endswith("/get"): - prefix = "get" - elif ( - operation_name.startswith("delete_") - or operation_name.startswith("remove_") - or operation_name.endswith("/delete") - or operation_name.endswith("/remove") - ): - prefix = "delete" - else: - # by default everything else is a POST - prefix = "post" - - yield prefix, operation_name, func_name, func_ref - - -def _get_defining_class(member_fn: str, derived_cls: type) -> type: - "Find the class in which a member function is first defined in a class inheritance hierarchy." - - # iterate in reverse member resolution order to find most specific class first - for cls in reversed(inspect.getmro(derived_cls)): - for name, _ in inspect.getmembers(cls, inspect.isfunction): - if name == member_fn: - return cls - - raise ValidationError( - f"cannot find defining class for {member_fn} in {derived_cls}" - ) - - -def get_endpoint_operations( - endpoint: type, use_examples: bool = True -) -> List[EndpointOperation]: - """ - Extracts a list of member functions in a class eligible for HTTP interface binding. - - These member functions are expected to have a signature like - ``` - async def get_object(self, uuid: str, version: int) -> Object: - ... - ``` - where the prefix `get_` translates to an HTTP GET, `object` corresponds to the name of the endpoint operation, - `uuid` and `version` are mapped to route path elements in "/object/{uuid}/{version}", and `Object` becomes - the response payload type, transmitted as an object serialized to JSON. - - If the member function has a composite class type in the argument list, it becomes the request payload type, - and the caller is expected to provide the data as serialized JSON in an HTTP POST request. - - :param endpoint: A class with member functions that can be mapped to an HTTP endpoint. - :param use_examples: Whether to return examples associated with member functions. - """ - - result = [] - - for prefix, operation_name, func_name, func_ref in _get_endpoint_functions( - endpoint, - [ - "create", - "delete", - "do", - "get", - "post", - "put", - "remove", - "set", - "update", - ], - ): - # Get all webmethods for this function - webmethods = getattr(func_ref, "__webmethods__", []) - - # Create one EndpointOperation for each webmethod - for webmethod in webmethods: - route = webmethod.route - route_params = _get_route_parameters(route) if route is not None else None - public = webmethod.public - request_examples = webmethod.request_examples - response_examples = webmethod.response_examples - - # inspect function signature for path and query parameters, and request/response payload type - signature = get_signature(func_ref) - - path_params = [] - query_params = [] - request_params = [] - multipart_params = [] - extra_body_params = [] - - for param_name, parameter in signature.parameters.items(): - param_type = _get_annotation_type(parameter.annotation, func_ref) - - # omit "self" for instance methods - if param_name == "self" and param_type is inspect.Parameter.empty: - continue - - # check if all parameters have explicit type - if parameter.annotation is inspect.Parameter.empty: - raise ValidationError( - f"parameter '{param_name}' in function '{func_name}' has no type annotation" - ) - - # Check if this is an extra_body parameter - is_extra_body, extra_body_desc = _is_extra_body_param(param_type) - if is_extra_body: - # Store in a separate list for documentation - extra_body_params.append((param_name, param_type, extra_body_desc)) - continue # Skip adding to request_params - - is_multipart = _is_multipart_param(param_type) - - if prefix in ["get", "delete"]: - if route_params is not None and param_name in route_params: - path_params.append((param_name, param_type)) - else: - query_params.append((param_name, param_type)) - else: - if route_params is not None and param_name in route_params: - path_params.append((param_name, param_type)) - elif is_multipart: - multipart_params.append((param_name, param_type)) - else: - request_params.append((param_name, param_type)) - - # check if function has explicit return type - if signature.return_annotation is inspect.Signature.empty: - raise ValidationError( - f"function '{func_name}' has no return type annotation" - ) - - return_type = _get_annotation_type(signature.return_annotation, func_ref) - - # operations that produce events are labeled as Generator[YieldType, SendType, ReturnType] - # where YieldType is the event type, SendType is None, and ReturnType is the immediate response type to the request - if typing.get_origin(return_type) is collections.abc.Generator: - event_type, send_type, response_type = typing.get_args(return_type) - if send_type is not type(None): - raise ValidationError( - f"function '{func_name}' has a return type Generator[Y,S,R] and therefore looks like an event but has an explicit send type" - ) - else: - event_type = None - - def process_type(t): - if typing.get_origin(t) is collections.abc.AsyncIterator: - # NOTE(ashwin): this is SSE and there is no way to represent it. either we make it a List - # or the item type. I am choosing it to be the latter - args = typing.get_args(t) - return args[0] - elif typing.get_origin(t) is typing.Union: - types = [process_type(a) for a in typing.get_args(t)] - return typing._UnionGenericAlias(typing.Union, tuple(types)) - else: - return t - - response_type = process_type(return_type) - - if prefix in ["delete", "remove"]: - http_method = HTTPMethod.DELETE - elif prefix == "post": - http_method = HTTPMethod.POST - elif prefix == "get": - http_method = HTTPMethod.GET - elif prefix == "set": - http_method = HTTPMethod.PUT - elif prefix == "update": - http_method = HTTPMethod.PATCH - else: - raise ValidationError(f"unknown prefix {prefix}") - - # Create an EndpointOperation for this specific webmethod - operation = EndpointOperation( - defining_class=_get_defining_class(func_name, endpoint), - name=operation_name, - func_name=func_name, - func_ref=func_ref, - route=route, - path_params=path_params, - query_params=query_params, - request_params=request_params, - multipart_params=multipart_params, - extra_body_params=extra_body_params, - event_type=event_type, - response_type=response_type, - http_method=http_method, - public=public, - request_examples=request_examples if use_examples else None, - response_examples=response_examples if use_examples else None, - ) - - # Store the specific webmethod with this operation - operation.webmethod = webmethod - result.append(operation) - - if not result: - raise ValidationError(f"no eligible endpoint operations in type {endpoint}") - - return result - - -def get_endpoint_events(endpoint: type) -> Dict[str, type]: - results = {} - - for decl in typing.get_type_hints(endpoint).values(): - # check if signature is Callable[...] - origin = typing.get_origin(decl) - if origin is None or not issubclass(origin, Callable): # type: ignore - continue - - # check if signature is Callable[[...], Any] - args = typing.get_args(decl) - if len(args) != 2: - continue - params_type, return_type = args - if not isinstance(params_type, list): - continue - - # check if signature is Callable[[...], None] - if not issubclass(return_type, type(None)): - continue - - # check if signature is Callable[[EventType], None] - if len(params_type) != 1: - continue - - param_type = params_type[0] - results[param_type.__name__] = param_type - - return results - - -def _is_multipart_param(param_type: type) -> bool: - """ - Check if a parameter type indicates multipart form data. - - Returns True if the type is: - - UploadFile - - Annotated[UploadFile, File()] - - Annotated[str, Form()] - - Annotated[Any, File()] - - Annotated[Any, Form()] - """ - if param_type is UploadFile: - return True - - # Check for Annotated types - origin = get_origin(param_type) - if origin is None: - return False - - if origin is Annotated: - args = get_args(param_type) - if len(args) < 2: - return False - - # Check the annotations for File() or Form() - for annotation in args[1:]: - if isinstance(annotation, (File, Form)): - return True - return False - - -def _is_extra_body_param(param_type: type) -> tuple[bool, str | None]: - """ - Check if parameter is marked as coming from extra_body. - - Returns: - (is_extra_body, description): Tuple of boolean and optional description - """ - origin = get_origin(param_type) - if origin is Annotated: - args = get_args(param_type) - for annotation in args[1:]: - if isinstance(annotation, ExtraBodyField): - return True, annotation.description - # Also check by type name for cases where import matters - if type(annotation).__name__ == 'ExtraBodyField': - return True, getattr(annotation, 'description', None) - return False, None diff --git a/docs/openapi_generator/pyopenapi/options.py b/docs/openapi_generator/pyopenapi/options.py deleted file mode 100644 index 53855b5b67..0000000000 --- a/docs/openapi_generator/pyopenapi/options.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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. - -import dataclasses -from dataclasses import dataclass -from http import HTTPStatus -from typing import Callable, ClassVar, Dict, List, Optional, Tuple, Union - -from .specification import ( - Info, - SecurityScheme, - SecuritySchemeAPI, - SecuritySchemeHTTP, - SecuritySchemeOpenIDConnect, - Server, -) - -HTTPStatusCode = Union[HTTPStatus, int, str] - - -@dataclass -class Options: - """ - :param server: Base URL for the API endpoint. - :param info: Meta-information for the endpoint specification. - :param version: OpenAPI specification version as a tuple of major, minor, revision. - :param default_security_scheme: Security scheme to apply to endpoints, unless overridden on a per-endpoint basis. - :param extra_types: Extra types in addition to those found in operation signatures. Use a dictionary to group related types. - :param use_examples: Whether to emit examples for operations. - :param success_responses: Associates operation response types with HTTP status codes. - :param error_responses: Associates error response types with HTTP status codes. - :param error_wrapper: True if errors are encapsulated in an error object wrapper. - :param property_description_fun: Custom transformation function to apply to class property documentation strings. - :param captions: User-defined captions for sections such as "Operations" or "Types", and (if applicable) groups of extra types. - :param include_standard_error_responses: Whether to include standard error responses (400, 429, 500, 503) in all operations. - """ - - server: Server - info: Info - version: Tuple[int, int, int] = (3, 1, 0) - default_security_scheme: Optional[SecurityScheme] = None - extra_types: Union[List[type], Dict[str, List[type]], None] = None - use_examples: bool = True - success_responses: Dict[type, HTTPStatusCode] = dataclasses.field( - default_factory=dict - ) - error_responses: Dict[type, HTTPStatusCode] = dataclasses.field( - default_factory=dict - ) - error_wrapper: bool = False - property_description_fun: Optional[Callable[[type, str, str], str]] = None - captions: Optional[Dict[str, str]] = None - include_standard_error_responses: bool = True - stability_filter: Optional[str] = None - - default_captions: ClassVar[Dict[str, str]] = { - "Operations": "Operations", - "Types": "Types", - "Events": "Events", - "AdditionalTypes": "Additional types", - } - - def map(self, id: str) -> str: - "Maps a language-neutral placeholder string to language-dependent text." - - if self.captions is not None: - caption = self.captions.get(id) - if caption is not None: - return caption - - caption = self.__class__.default_captions.get(id) - if caption is not None: - return caption - - raise KeyError(f"no caption found for ID: {id}") diff --git a/docs/openapi_generator/pyopenapi/specification.py b/docs/openapi_generator/pyopenapi/specification.py deleted file mode 100644 index bfa35f539e..0000000000 --- a/docs/openapi_generator/pyopenapi/specification.py +++ /dev/null @@ -1,269 +0,0 @@ -# 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. - -import dataclasses -import enum -from dataclasses import dataclass -from typing import Any, ClassVar, Dict, List, Optional, Union - -from llama_stack_api import JsonType, Schema, StrictJsonType - -URL = str - - -@dataclass -class Ref: - ref_type: ClassVar[str] - id: str - - def to_json(self) -> StrictJsonType: - return {"$ref": f"#/components/{self.ref_type}/{self.id}"} - - -@dataclass -class SchemaRef(Ref): - ref_type: ClassVar[str] = "schemas" - - -SchemaOrRef = Union[Schema, SchemaRef] - - -@dataclass -class ResponseRef(Ref): - ref_type: ClassVar[str] = "responses" - - -@dataclass -class ParameterRef(Ref): - ref_type: ClassVar[str] = "parameters" - - -@dataclass -class ExampleRef(Ref): - ref_type: ClassVar[str] = "examples" - - -@dataclass -class Contact: - name: Optional[str] = None - url: Optional[URL] = None - email: Optional[str] = None - - -@dataclass -class License: - name: str - url: Optional[URL] = None - - -@dataclass -class Info: - title: str - version: str - description: Optional[str] = None - termsOfService: Optional[str] = None - contact: Optional[Contact] = None - license: Optional[License] = None - - -@dataclass -class MediaType: - schema: Optional[SchemaOrRef] = None - example: Optional[Any] = None - examples: Optional[Dict[str, Union["Example", ExampleRef]]] = None - - -@dataclass -class RequestBody: - content: Dict[str, MediaType | Dict[str, Any]] - description: Optional[str] = None - required: Optional[bool] = None - - -@dataclass -class Response: - description: str - content: Optional[Dict[str, MediaType]] = None - - -class ParameterLocation(enum.Enum): - Query = "query" - Header = "header" - Path = "path" - Cookie = "cookie" - - -@dataclass -class Parameter: - name: str - in_: ParameterLocation - description: Optional[str] = None - required: Optional[bool] = None - schema: Optional[SchemaOrRef] = None - example: Optional[Any] = None - - -@dataclass -class ExtraBodyParameter: - """Represents a parameter that arrives via extra_body in the request.""" - name: str - schema: SchemaOrRef - description: Optional[str] = None - required: Optional[bool] = None - - -@dataclass -class Operation: - responses: Dict[str, Union[Response, ResponseRef]] - tags: Optional[List[str]] = None - summary: Optional[str] = None - description: Optional[str] = None - operationId: Optional[str] = None - parameters: Optional[List[Parameter]] = None - requestBody: Optional[RequestBody] = None - callbacks: Optional[Dict[str, "Callback"]] = None - security: Optional[List["SecurityRequirement"]] = None - deprecated: Optional[bool] = None - extraBodyParameters: Optional[List[ExtraBodyParameter]] = None - - -@dataclass -class PathItem: - summary: Optional[str] = None - description: Optional[str] = None - get: Optional[Operation] = None - put: Optional[Operation] = None - post: Optional[Operation] = None - delete: Optional[Operation] = None - options: Optional[Operation] = None - head: Optional[Operation] = None - patch: Optional[Operation] = None - trace: Optional[Operation] = None - - def update(self, other: "PathItem") -> None: - "Merges another instance of this class into this object." - - for field in dataclasses.fields(self.__class__): - value = getattr(other, field.name) - if value is not None: - setattr(self, field.name, value) - - -# maps run-time expressions such as "$request.body#/url" to path items -Callback = Dict[str, PathItem] - - -@dataclass -class Example: - summary: Optional[str] = None - description: Optional[str] = None - value: Optional[Any] = None - externalValue: Optional[URL] = None - - -@dataclass -class Server: - url: URL - description: Optional[str] = None - - -class SecuritySchemeType(enum.Enum): - ApiKey = "apiKey" - HTTP = "http" - OAuth2 = "oauth2" - OpenIDConnect = "openIdConnect" - - -@dataclass -class SecurityScheme: - type: SecuritySchemeType - description: str - - -@dataclass(init=False) -class SecuritySchemeAPI(SecurityScheme): - name: str - in_: ParameterLocation - - def __init__(self, description: str, name: str, in_: ParameterLocation) -> None: - super().__init__(SecuritySchemeType.ApiKey, description) - self.name = name - self.in_ = in_ - - -@dataclass(init=False) -class SecuritySchemeHTTP(SecurityScheme): - scheme: str - bearerFormat: Optional[str] = None - - def __init__( - self, description: str, scheme: str, bearerFormat: Optional[str] = None - ) -> None: - super().__init__(SecuritySchemeType.HTTP, description) - self.scheme = scheme - self.bearerFormat = bearerFormat - - -@dataclass(init=False) -class SecuritySchemeOpenIDConnect(SecurityScheme): - openIdConnectUrl: str - - def __init__(self, description: str, openIdConnectUrl: str) -> None: - super().__init__(SecuritySchemeType.OpenIDConnect, description) - self.openIdConnectUrl = openIdConnectUrl - - -@dataclass -class Components: - schemas: Optional[Dict[str, Schema]] = None - responses: Optional[Dict[str, Response]] = None - parameters: Optional[Dict[str, Parameter]] = None - examples: Optional[Dict[str, Example]] = None - requestBodies: Optional[Dict[str, RequestBody]] = None - securitySchemes: Optional[Dict[str, SecurityScheme]] = None - callbacks: Optional[Dict[str, Callback]] = None - - -SecurityScope = str -SecurityRequirement = Dict[str, List[SecurityScope]] - - -@dataclass -class Tag: - name: str - description: Optional[str] = None - displayName: Optional[str] = None - - -@dataclass -class TagGroup: - """ - A ReDoc extension to provide information about groups of tags. - - Exposed via the vendor-specific property "x-tagGroups" of the top-level object. - """ - - name: str - tags: List[str] - - -@dataclass -class Document: - """ - This class is a Python dataclass adaptation of the OpenAPI Specification. - - For details, see - """ - - openapi: str - info: Info - servers: List[Server] - paths: Dict[str, PathItem] - jsonSchemaDialect: Optional[str] = None - components: Optional[Components] = None - security: Optional[List[SecurityRequirement]] = None - tags: Optional[List[Tag]] = None - tagGroups: Optional[List[TagGroup]] = None diff --git a/docs/openapi_generator/pyopenapi/template.html b/docs/openapi_generator/pyopenapi/template.html deleted file mode 100644 index 5848f364ed..0000000000 --- a/docs/openapi_generator/pyopenapi/template.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - OpenAPI specification - - - - - - - - - - - - - diff --git a/docs/openapi_generator/pyopenapi/utility.py b/docs/openapi_generator/pyopenapi/utility.py deleted file mode 100644 index 762249eb84..0000000000 --- a/docs/openapi_generator/pyopenapi/utility.py +++ /dev/null @@ -1,287 +0,0 @@ -# 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. - -import json -import typing -import inspect -from pathlib import Path -from typing import Any, List, Optional, TextIO, Union, get_type_hints, get_origin, get_args - -from pydantic import BaseModel -from llama_stack_api import StrictJsonType, is_unwrapped_body_param, object_to_json -from llama_stack.core.resolver import api_protocol_map - -from .generator import Generator -from .options import Options -from .specification import Document - -THIS_DIR = Path(__file__).parent - - -class Specification: - document: Document - - def __init__(self, endpoint: type, options: Options): - generator = Generator(endpoint, options) - self.document = generator.generate() - - def get_json(self) -> StrictJsonType: - """ - Returns the OpenAPI specification as a Python data type (e.g. `dict` for an object, `list` for an array). - - The result can be serialized to a JSON string with `json.dump` or `json.dumps`. - """ - - json_doc = typing.cast(StrictJsonType, object_to_json(self.document)) - - if isinstance(json_doc, dict): - # rename vendor-specific properties - tag_groups = json_doc.pop("tagGroups", None) - if tag_groups: - json_doc["x-tagGroups"] = tag_groups - tags = json_doc.get("tags") - if tags and isinstance(tags, list): - for tag in tags: - if not isinstance(tag, dict): - continue - - display_name = tag.pop("displayName", None) - if display_name: - tag["x-displayName"] = display_name - - # Handle operations to rename extraBodyParameters -> x-llama-stack-extra-body-params - paths = json_doc.get("paths", {}) - for path_item in paths.values(): - if isinstance(path_item, dict): - for method in ["get", "post", "put", "delete", "patch"]: - operation = path_item.get(method) - if operation and isinstance(operation, dict): - extra_body_params = operation.pop("extraBodyParameters", None) - if extra_body_params: - operation["x-llama-stack-extra-body-params"] = extra_body_params - - return json_doc - - def get_json_string(self, pretty_print: bool = False) -> str: - """ - Returns the OpenAPI specification as a JSON string. - - :param pretty_print: Whether to use line indents to beautify the output. - """ - - json_doc = self.get_json() - if pretty_print: - return json.dumps( - json_doc, check_circular=False, ensure_ascii=False, indent=4 - ) - else: - return json.dumps( - json_doc, - check_circular=False, - ensure_ascii=False, - separators=(",", ":"), - ) - - def write_json(self, f: TextIO, pretty_print: bool = False) -> None: - """ - Writes the OpenAPI specification to a file as a JSON string. - - :param pretty_print: Whether to use line indents to beautify the output. - """ - - json_doc = self.get_json() - if pretty_print: - json.dump( - json_doc, - f, - check_circular=False, - ensure_ascii=False, - indent=4, - ) - else: - json.dump( - json_doc, - f, - check_circular=False, - ensure_ascii=False, - separators=(",", ":"), - ) - - def write_html(self, f: TextIO, pretty_print: bool = False) -> None: - """ - Creates a stand-alone HTML page for the OpenAPI specification with ReDoc. - - :param pretty_print: Whether to use line indents to beautify the JSON string in the HTML file. - """ - - path = THIS_DIR / "template.html" - with path.open(encoding="utf-8", errors="strict") as html_template_file: - html_template = html_template_file.read() - - html = html_template.replace( - "{ /* OPENAPI_SPECIFICATION */ }", - self.get_json_string(pretty_print=pretty_print), - ) - - f.write(html) - -def is_optional_type(type_: Any) -> bool: - """Check if a type is Optional.""" - origin = get_origin(type_) - args = get_args(type_) - return origin is Optional or (origin is Union and type(None) in args) - - -def _validate_api_method_return_type(method) -> str | None: - hints = get_type_hints(method) - - if 'return' not in hints: - return "has no return type annotation" - - return_type = hints['return'] - if is_optional_type(return_type): - return "returns Optional type where a return value is mandatory" - - -def _validate_api_method_doesnt_return_list(method) -> str | None: - hints = get_type_hints(method) - - if 'return' not in hints: - return "has no return type annotation" - - return_type = hints['return'] - if get_origin(return_type) is list: - return "returns a list where a PaginatedResponse or List*Response object is expected" - - -def _validate_api_delete_method_returns_none(method) -> str | None: - hints = get_type_hints(method) - - if 'return' not in hints: - return "has no return type annotation" - - return_type = hints['return'] - - # Allow OpenAI endpoints to return response objects since they follow OpenAI specification - method_name = getattr(method, '__name__', '') - if method_name.__contains__('openai_'): - return None - - if return_type is not None and return_type is not type(None): - return "does not return None where None is mandatory" - - -def _validate_list_parameters_contain_data(method) -> str | None: - hints = get_type_hints(method) - - if 'return' not in hints: - return "has no return type annotation" - - return_type = hints['return'] - if not inspect.isclass(return_type): - return - - if not return_type.__name__.startswith('List'): - return - - if 'data' not in return_type.model_fields: - return "does not have a mandatory data attribute containing the list of objects" - - -def _validate_has_ellipsis(method) -> str | None: - source = inspect.getsource(method) - if "..." not in source and not "NotImplementedError" in source: - return "does not contain ellipsis (...) in its implementation" - -def _validate_has_return_in_docstring(method) -> str | None: - source = inspect.getsource(method) - return_type = method.__annotations__.get('return') - if return_type is not None and return_type != type(None) and ":returns:" not in source: - return "does not have a ':returns:' in its docstring" - -def _validate_has_params_in_docstring(method) -> str | None: - source = inspect.getsource(method) - sig = inspect.signature(method) - - params_list = [p for p in sig.parameters.values() if p.name != "self"] - if len(params_list) == 1: - param = params_list[0] - param_type = param.annotation - if is_unwrapped_body_param(param_type): - return - - # Only check if the method has more than one parameter - if len(sig.parameters) > 1 and ":param" not in source: - return "does not have a ':param' in its docstring" - -def _validate_has_no_return_none_in_docstring(method) -> str | None: - source = inspect.getsource(method) - return_type = method.__annotations__.get('return') - if return_type is None and ":returns: None" in source: - return "has a ':returns: None' in its docstring which is redundant for None-returning functions" - -def _validate_docstring_lines_end_with_dot(method) -> str | None: - docstring = inspect.getdoc(method) - if docstring is None: - return None - - lines = docstring.split('\n') - for line in lines: - line = line.strip() - if line and not any(line.endswith(char) for char in '.:{}[]()",'): - return f"docstring line '{line}' does not end with a valid character: . : {{ }} [ ] ( ) , \"" - -_VALIDATORS = { - "GET": [ - _validate_api_method_return_type, - _validate_list_parameters_contain_data, - _validate_api_method_doesnt_return_list, - _validate_has_ellipsis, - _validate_has_return_in_docstring, - _validate_has_params_in_docstring, - _validate_docstring_lines_end_with_dot, - ], - "DELETE": [ - _validate_api_delete_method_returns_none, - _validate_has_ellipsis, - _validate_has_return_in_docstring, - _validate_has_params_in_docstring, - _validate_has_no_return_none_in_docstring - ], - "POST": [ - _validate_has_ellipsis, - _validate_has_return_in_docstring, - _validate_has_params_in_docstring, - _validate_has_no_return_none_in_docstring, - _validate_docstring_lines_end_with_dot, - ], -} - - -def _get_methods_by_type(protocol, method_type: str): - members = inspect.getmembers(protocol, predicate=inspect.isfunction) - return { - method_name: method - for method_name, method in members - if (webmethod := getattr(method, '__webmethod__', None)) - if webmethod and webmethod.method == method_type - } - - -def validate_api() -> List[str]: - """Validate the API protocols.""" - errors = [] - protocols = api_protocol_map() - - for target, validators in _VALIDATORS.items(): - for protocol_name, protocol in protocols.items(): - for validator in validators: - for method_name, method in _get_methods_by_type(protocol, target).items(): - err = validator(method) - if err: - errors.append(f"Method {protocol_name}.{method_name} {err}") - - return errors diff --git a/docs/openapi_generator/run_openapi_generator.sh b/docs/openapi_generator/run_openapi_generator.sh deleted file mode 100755 index 6cffd42b06..0000000000 --- a/docs/openapi_generator/run_openapi_generator.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/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 - -missing_packages=() - -check_package() { - if ! pip show "$1" &>/dev/null; then - missing_packages+=("$1") - fi -} - -if [ ${#missing_packages[@]} -ne 0 ]; then - echo "Error: The following package(s) are not installed:" - printf " - %s\n" "${missing_packages[@]}" - echo "Please install them using:" - echo "pip install ${missing_packages[*]}" - exit 1 -fi - -stack_dir=$(dirname $(dirname $THIS_DIR)) -PYTHONPATH=$PYTHONPATH:$stack_dir \ - python -m docs.openapi_generator.generate $(dirname $THIS_DIR)/static - -cp $stack_dir/docs/static/stainless-llama-stack-spec.yaml $stack_dir/client-sdks/stainless/openapi.yml diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index dea2e5bbea..7692157b26 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -1,16 +1,15 @@ openapi: 3.1.0 info: - title: >- - Llama Stack Specification - Deprecated APIs - version: v1 - description: >- + title: Llama Stack Specification - Deprecated APIs + 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. + a set of endpoints and their corresponding interfaces that are + tailored to + best leverage Llama Models. - **⚠️ DEPRECATED**: Legacy APIs that may be removed in future versions. Use for - migration reference only. + **⚠️ DEPRECATED**: Legacy APIs that may be removed in future versions. Use for + migration reference only. + version: v1 servers: - url: http://any-hosted-llama-stack.com paths: @@ -327,67 +326,5503 @@ paths: parameters: [] requestBody: content: - application/json: - schema: - $ref: '#/components/schemas/RegisterBenchmarkRequest' - required: true - deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}: - 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. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to unregister. - required: true - schema: + application/json: + schema: + $ref: '#/components/schemas/RegisterBenchmarkRequest' + required: true + deprecated: true + /v1alpha/eval/benchmarks/{benchmark_id}: + 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. + parameters: + - name: benchmark_id + in: path + description: The ID of the benchmark to unregister. + required: true + schema: + type: string + deprecated: true +jsonSchemaDialect: >- + https://json-schema.org/draft/2020-12/schema +components: + schemas: + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: Types of aggregation functions for scoring results. + AllowedToolsFilter: + properties: + tool_names: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Tool Names + type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ArrayType: + properties: + type: + type: string + const: array + title: Type + default: array + type: object + title: ArrayType + description: Parameter type for array values. + 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. + 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: + anyOf: + - type: integer + - type: 'null' + title: Cancelled At + cancelling_at: + anyOf: + - type: integer + - type: 'null' + title: Cancelling At + completed_at: + anyOf: + - type: integer + - type: 'null' + title: Completed At + error_file_id: + anyOf: + - type: string + - type: 'null' + title: Error File Id + errors: + anyOf: + - $ref: '#/components/schemas/Errors' + - type: 'null' + expired_at: + anyOf: + - type: integer + - type: 'null' + title: Expired At + expires_at: + anyOf: + - type: integer + - type: 'null' + title: Expires At + failed_at: + anyOf: + - type: integer + - type: 'null' + title: Failed At + finalizing_at: + anyOf: + - type: integer + - type: 'null' + title: Finalizing At + in_progress_at: + anyOf: + - type: integer + - type: 'null' + title: In Progress At + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + model: + anyOf: + - type: string + - type: 'null' + title: Model + output_file_id: + anyOf: + - type: string + - type: 'null' + title: Output File Id + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + - type: 'null' + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + - type: 'null' + additionalProperties: true + type: object + required: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + BatchError: + properties: + code: + anyOf: + - type: string + - type: 'null' + title: Code + line: + anyOf: + - type: integer + - type: 'null' + title: Line + message: + anyOf: + - type: string + - type: 'null' + title: Message + param: + anyOf: + - type: string + - type: 'null' + title: Param + 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: + anyOf: + - type: string + - type: 'null' + title: Provider Resource Id + description: Unique identifier for this resource in the provider + 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. + BenchmarkConfig: + properties: + eval_candidate: + $ref: '#/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: + 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: object + required: + - eval_candidate + title: BenchmarkConfig + description: A benchmark configuration for evaluation. + Body_openai_upload_file_v1_files_post: + properties: + file: + type: string + format: binary + title: File + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + expires_after: + anyOf: + - $ref: '#/components/schemas/ExpiresAfter' + - type: 'null' + type: object + required: + - file + - purpose + title: Body_openai_upload_file_v1_files_post + Body_register_benchmark_v1alpha_eval_benchmarks_post: + properties: + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + type: object + required: + - scoring_functions + title: Body_register_benchmark_v1alpha_eval_benchmarks_post + Body_register_scoring_function_v1_scoring_functions_post: + properties: + return_type: + anyOf: + - $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' + title: Return Type + 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 + type: object + required: + - return_type + title: Body_register_scoring_function_v1_scoring_functions_post + Body_register_tool_group_v1_toolgroups_post: + properties: + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + type: object + title: Body_register_tool_group_v1_toolgroups_post + BooleanType: + properties: + type: + type: string + const: boolean + title: Type + default: boolean + type: object + title: BooleanType + description: Parameter type for boolean values. + 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. + Chunk-Input: + 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 + title: Content + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Embedding + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + 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: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Embedding + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + ChunkMetadata: + 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 + type: object + title: 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. + CompletionInputType: + properties: + type: + type: string + const: completion_input + title: Type + default: completion_input + type: object + title: CompletionInputType + description: Parameter type for 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: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + 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. + items: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + title: Items + description: Initial items to include in the conversation context. You may add up to 20 items at a time. + type: object + required: + - id + - created_at + title: Conversation + description: OpenAI-compatible conversation object. + ConversationDeletedResource: + properties: + id: + type: string + title: Id + description: The deleted conversation identifier + object: + type: string + title: Object + description: Object type + default: conversation.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object + required: + - id + title: ConversationDeletedResource + description: Response for deleted conversation. + ConversationItemDeletedResource: + properties: + id: + type: string + title: Id + description: The deleted item identifier + object: + type: string + title: Object + description: Object type + default: conversation.item.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object + required: + - id + title: ConversationItemDeletedResource + description: Response for deleted conversation item. + 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: + anyOf: + - type: string + - type: 'null' + title: First Id + description: The ID of the first item in the list + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + description: The ID of the last item in the list + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Validation Dataset Id + packed: + anyOf: + - type: boolean + - type: 'null' + title: Packed + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + title: Train On Input + default: false + type: object + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: Configuration for training data and data loading. + Dataset: + properties: + identifier: + type: string + 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 + 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. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + 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. + EfficiencyConfig: + properties: + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + title: Enable Activation Checkpointing + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + title: Enable Activation Offloading + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + title: Memory Efficient Fsdp Wrap + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + title: Fsdp Cpu Offload + default: false + type: object + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. + Errors: + properties: + data: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + title: Data + object: + anyOf: + - type: string + - type: 'null' + title: Object + 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. + ExpiresAfter: + properties: + anchor: + type: string + const: created_at + title: Anchor + seconds: + type: integer + maximum: 2592000.0 + minimum: 3600.0 + title: Seconds + type: object + required: + - anchor + - seconds + title: 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) + 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. + HealthInfo: + properties: + status: + $ref: '#/components/schemas/HealthStatus' + type: object + required: + - status + title: HealthInfo + description: Health status information for 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 + 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 + 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. + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. + JsonType: + properties: + type: + type: string + const: json + title: Type + default: json + type: object + title: JsonType + description: Parameter type for JSON values. + LLMAsJudgeScoringFnParams: + properties: + type: + type: string + const: llm_as_judge + title: Type + default: llm_as_judge + judge_model: + type: string + title: Judge Model + prompt_template: + anyOf: + - type: string + - type: 'null' + title: Prompt Template + 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. + 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. + 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. + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + 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. + LoraFinetuningConfig: + properties: + type: + type: string + const: LoRA + title: Type + default: LoRA + lora_attn_modules: + items: + type: string + type: array + title: Lora Attn Modules + apply_lora_to_mlp: + type: boolean + title: Apply Lora To Mlp + apply_lora_to_output: + type: boolean + title: Apply Lora To Output + rank: + type: integer + title: Rank + alpha: + type: integer + title: Alpha + use_dora: + anyOf: + - type: boolean + - type: 'null' + title: Use Dora + default: false + quantize_base: + anyOf: + - type: boolean + - type: 'null' + title: Quantize Base + default: false + type: object + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + Model: + properties: + identifier: + type: string + 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 + 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. + ModelCandidate: + properties: + type: + type: string + const: model + title: Type + default: model + model: + type: string + title: Model + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + - type: 'null' + type: object + required: + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + ModelType: + type: string + enum: + - llm + - embedding + - rerank + title: ModelType + description: Enumeration of supported model types in Llama Stack. + 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. + ModerationObjectResults: + properties: + flagged: + type: boolean + title: Flagged + categories: + anyOf: + - additionalProperties: + type: boolean + type: object + - type: 'null' + title: Categories + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + title: Category Applied Input Types + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + title: Category Scores + user_message: + anyOf: + - type: string + - type: 'null' + title: User Message + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - flagged + title: ModerationObjectResults + description: A moderation object. + NumberType: + properties: + type: + type: string + const: number + title: Type + default: number + type: object + title: NumberType + description: Parameter type for numeric values. + ObjectType: + properties: + type: + type: string + const: object + title: Type + default: object + type: object + title: ObjectType + description: Parameter type for object values. + OpenAIAssistantMessageParam-Input: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + type: object + required: + - id + - choices + - created + - model + title: OpenAIChatCompletion + description: Response from an OpenAI-compatible chat completion request. + 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. + 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. + 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: + anyOf: + - type: number + - type: 'null' + title: Frequency Penalty + 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 + type: object + - type: 'null' + title: Logit Bias + logprobs: + anyOf: + - type: boolean + - type: 'null' + title: Logprobs + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Completion Tokens + max_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + n: + anyOf: + - type: integer + - type: 'null' + title: N + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + title: Parallel Tool Calls + presence_penalty: + anyOf: + - type: number + - type: 'null' + title: Presence Penalty + 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 + seed: + anyOf: + - type: integer + - type: 'null' + title: Seed + stop: + anyOf: + - type: string + - items: + type: string + type: array + - type: 'null' + title: Stop + stream: + anyOf: + - type: boolean + - type: 'null' + title: Stream + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Stream Options + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + 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 + top_logprobs: + anyOf: + - type: integer + - type: 'null' + title: Top Logprobs + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + user: + anyOf: + - type: string + - type: 'null' + title: User + additionalProperties: true + type: object + required: + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible chat completion endpoint. + OpenAIChatCompletionToolCall: + properties: + index: + anyOf: + - type: integer + - type: 'null' + title: Index + id: + anyOf: + - type: string + - type: 'null' + title: Id + type: + type: string + const: function + title: Type + default: function + function: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + - type: 'null' + type: object + title: OpenAIChatCompletionToolCall + description: Tool call specification for OpenAI-compatible chat completion responses. + OpenAIChatCompletionToolCallFunction: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + arguments: + anyOf: + - type: string + - type: 'null' + title: Arguments + type: object + title: OpenAIChatCompletionToolCallFunction + description: Function call details for OpenAI-compatible tool calls. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + - type: 'null' + completion_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + - type: 'null' + type: object + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage + description: Usage information for OpenAI chat completion. + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + title: Reasoning Tokens + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + title: Cached Tokens + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + OpenAIChoice-Input: + properties: + message: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Message + 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' + finish_reason: + type: string + title: Finish Reason + index: + type: integer + title: Index + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Input' + - type: 'null' + type: object + required: + - message + - finish_reason + - index + title: OpenAIChoice + description: A choice from an OpenAI-compatible chat completion response. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + - type: 'null' + type: object + required: + - message + - finish_reason + - index + title: OpenAIChoice + description: A choice from an OpenAI-compatible chat completion response. + OpenAIChoiceLogprobs-Input: + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + type: object + title: OpenAIChoiceLogprobs + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + OpenAIChoiceLogprobs-Output: + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + type: object + title: OpenAIChoiceLogprobs + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + 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. + + :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" + OpenAICompletionChoice-Input: + properties: + finish_reason: + type: string + title: Finish Reason + text: + type: string + title: Text + index: + type: integer + title: Index + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Input' + - type: 'null' + type: object + required: + - finish_reason + - text + - index + title: 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 + OpenAICompletionChoice-Output: + properties: + finish_reason: + type: string + title: Finish Reason + text: + type: string + title: Text + index: + type: integer + title: Index + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + - type: 'null' + type: object + required: + - finish_reason + - text + - index + title: 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 + 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: + anyOf: + - type: integer + - type: 'null' + title: Best Of + echo: + anyOf: + - type: boolean + - type: 'null' + title: Echo + frequency_penalty: + anyOf: + - type: number + - type: 'null' + title: Frequency Penalty + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + title: Logit Bias + logprobs: + anyOf: + - type: boolean + - type: 'null' + title: Logprobs + max_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + n: + anyOf: + - type: integer + - type: 'null' + title: N + presence_penalty: + anyOf: + - type: number + - type: 'null' + title: Presence Penalty + seed: + anyOf: + - type: integer + - type: 'null' + title: Seed + stop: + anyOf: + - type: string + - items: + type: string + type: array + - type: 'null' + title: Stop + stream: + anyOf: + - type: boolean + - type: 'null' + title: Stream + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Stream Options + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + user: + anyOf: + - type: string + - type: 'null' + title: User + suffix: + anyOf: + - type: string + - type: 'null' + title: Suffix + additionalProperties: true + type: object + required: + - model + - prompt + title: OpenAICompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible completion endpoint. + OpenAICompletionWithInputMessages: + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + input_messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + 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' + type: array + title: Input Messages + type: object + required: + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + properties: + file_ids: + items: + type: string + type: array + title: File Ids + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Attributes + 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 + additionalProperties: true + type: object + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + description: Request to create a vector store file batch with extra_body support. + OpenAICreateVectorStoreRequestWithExtraBody: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + file_ids: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: File Ids + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + 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 + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + additionalProperties: true + type: object + title: OpenAICreateVectorStoreRequestWithExtraBody + description: Request to create a vector store with extra_body support. + OpenAIDeleteResponseObject: + properties: + id: + type: string + title: Id + object: + type: string + const: response + title: Object + default: response + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: OpenAIDeleteResponseObject + description: Response object confirming deletion of an OpenAI response. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAIDeveloperMessageParam + description: A message from the developer in an OpenAI-compatible chat completion request. + 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. + 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. + OpenAIEmbeddingsRequestWithExtraBody: + properties: + model: + type: string + title: Model + input: + anyOf: + - type: string + - items: + type: string + type: array + title: Input + encoding_format: + anyOf: + - type: string + - type: 'null' + title: Encoding Format + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' + title: Dimensions + user: + anyOf: + - type: string + - type: 'null' + title: User + additionalProperties: true + type: object + required: + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody + description: Request parameters for OpenAI-compatible embeddings endpoint. + 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. + OpenAIFile: + properties: + type: + type: string + const: file + title: Type + default: file + file: + $ref: '#/components/schemas/OpenAIFileFile' + type: object + required: + - file + title: OpenAIFile + OpenAIFileDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + const: file + title: Object + default: file + deleted: + type: boolean + title: Deleted + type: object + required: + - id + - deleted + title: OpenAIFileDeleteResponse + description: Response for deleting a file in OpenAI Files API. + 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 + 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. + OpenAIFilePurpose: + type: string + enum: + - assistants + - batch + title: OpenAIFilePurpose + description: Valid purpose values for OpenAI Files API. + OpenAIImageURL: + properties: + url: + type: string + title: Url + detail: + anyOf: + - type: string + - type: 'null' + title: Detail + type: object + required: + - url + title: OpenAIImageURL + description: Image URL specification for OpenAI-compatible chat completion messages. + OpenAIJSONSchema: + properties: + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + strict: + anyOf: + - type: boolean + - type: 'null' + title: Strict + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Schema + type: object + title: OpenAIJSONSchema + description: JSON schema specification for OpenAI-compatible structured response format. + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + type: array + title: Data + type: object + required: + - data + title: OpenAIListModelsResponse + OpenAIModel: + properties: + id: + type: string + title: Id + object: + type: string + const: model + title: Object + default: model + created: + type: integer + title: Created + owned_by: + type: string + title: Owned By + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Custom Metadata + type: object + required: + - id + - created + - owned_by + title: OpenAIModel + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata + 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. + 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. + 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. + 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. + 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. + 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. + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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: + anyOf: + - type: string + - type: 'null' + title: File Data + file_id: + anyOf: + - type: string + - type: 'null' + title: File Id + file_url: + anyOf: + - type: string + - type: 'null' + title: File Url + filename: + anyOf: + - type: string + - type: 'null' + title: Filename + type: object + title: OpenAIResponseInputMessageContentFile + description: File content for input messages in OpenAI response format. + 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: + anyOf: + - type: string + - type: 'null' + title: File Id + image_url: + anyOf: + - type: string + - type: 'null' + title: Image Url + type: object + title: OpenAIResponseInputMessageContentImage + description: Image content for input messages in OpenAI response format. + 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. + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + max_num_results: + anyOf: + - type: integer + maximum: 50.0 + minimum: 1.0 + - type: 'null' + title: Max Num Results + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + - type: 'null' + type: object + required: + - vector_store_ids + title: OpenAIResponseInputToolFileSearch + description: File search tool configuration for OpenAI response inputs. + OpenAIResponseInputToolFunction: + properties: + type: + type: string + const: function + title: Type + default: function + name: + type: string + title: Name + 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 + type: object + required: + - name + - parameters + title: OpenAIResponseInputToolFunction + description: Function tool configuration for OpenAI response inputs. + OpenAIResponseInputToolWebSearch: + properties: + type: + anyOf: + - type: string + const: web_search + - type: string + const: web_search_preview + - type: string + const: web_search_preview_2025_03_11 + - type: string + const: web_search_2025_08_26 + title: Type + default: web_search + search_context_size: + anyOf: + - type: string + pattern: ^low|medium|high$ + - type: 'null' + title: Search Context Size + default: medium + type: object + title: OpenAIResponseInputToolWebSearch + description: Web search tool configuration for OpenAI response inputs. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + reason: + anyOf: + - type: string + - type: 'null' + title: Reason + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + tools: + anyOf: + - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' + title: Tools + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + type: object + required: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject + description: Complete OpenAI response object containing generation results and metadata. + 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: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array + - type: 'null' + title: Results + type: object + required: + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall + description: File search tool call output message for OpenAI responses. + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + type: object + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + description: Function tool call output message for OpenAI responses. + 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: + anyOf: + - type: string + - type: 'null' + title: Error + output: + anyOf: + - type: string + - type: 'null' + title: Output + type: object + required: + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + description: Model Context Protocol (MCP) call output message for OpenAI responses. + 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. + 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. + OpenAIResponsePrompt: + properties: + id: + 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 + version: + anyOf: + - type: string + - type: 'null' + title: Version + type: object + required: + - id + title: OpenAIResponsePrompt + description: OpenAI compatible Prompt object that is used in OpenAI responses. + OpenAIResponseText: + properties: + format: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + - type: 'null' + type: object + title: OpenAIResponseText + description: Text response configuration for OpenAI responses. + OpenAIResponseTextFormat: + properties: + type: + anyOf: + - type: string + const: text + - type: string + const: json_schema + - type: string + const: json_object + 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 + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + 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' + - type: 'null' + title: Allowed Tools + type: object + required: + - server_label + title: OpenAIResponseToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + - type: 'null' + output_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + - type: 'null' + type: object + required: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage + description: Usage information for OpenAI response. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + title: Cached Tokens + type: object + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + title: Reasoning Tokens + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAISystemMessageParam + description: A system message providing instructions or context to the model. + OpenAITokenLogProb: + properties: + token: + type: string + title: Token + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Bytes + 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. + + :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 + 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. + OpenAITopLogProb: + properties: + token: + type: string + title: Token + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Bytes + 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. + + :token: The token + :bytes: (Optional) The bytes for the token + :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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + 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. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: Available optimizer algorithms for training. + Order: + type: string + enum: + - asc + - desc + title: Order + description: Sort order for paginated responses. + 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: + anyOf: + - type: string + - type: 'null' + title: Prompt + description: The system prompt with variable placeholders + 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. + 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. + QATFinetuningConfig: + properties: + type: + type: string + const: QAT + title: Type + default: QAT + quantizer_name: + type: string + title: Quantizer Name + group_size: + type: integer + title: Group Size + type: object + required: + - quantizer_name + - group_size + title: QATFinetuningConfig + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. + 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. + 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. + 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. + RerankResponse: + properties: + data: + items: + $ref: '#/components/schemas/RerankData' + type: array + title: Data + type: object + required: + - data + title: RerankResponse + description: Response from a reranking request. + 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. + RunShieldResponse: + properties: + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + - type: 'null' + type: object + title: RunShieldResponse + description: Response from running a safety shield. + SafetyViolation: + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + anyOf: + - type: string + - type: 'null' + title: User Message + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - violation_level + title: SafetyViolation + description: Details of a safety violation detected by content moderation. + 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: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + repetition_penalty: + anyOf: + - type: number + - type: 'null' + title: Repetition Penalty + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Stop + type: object + title: SamplingParams + description: Sampling parameters. + ScoreBatchResponse: + properties: + dataset_id: + anyOf: + - type: string + - type: 'null' + title: Dataset Id + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreBatchResponse + description: Response from batch scoring operations on datasets. + ScoreResponse: + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreResponse + description: The response from scoring. + ScoringFn: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - type: string + - type: 'null' + title: Description + 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' + title: Return Type + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + 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: + 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 + type: object + required: + - identifier + - provider_id + - return_type + title: ScoringFn + description: A scoring function resource for evaluating model outputs. + 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. + SearchRankingOptions: + properties: + ranker: + anyOf: + - type: string + - type: 'null' + title: Ranker + score_threshold: + anyOf: + - type: number + - type: 'null' + title: Score Threshold + default: 0.0 + type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + Shield: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - identifier + - provider_id + title: Shield + description: A safety shield resource that can be used to check content. + StringType: + properties: + type: + type: string + const: string + title: Type + default: string + type: object + title: StringType + description: Parameter type for string values. + 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. + 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 + ToolDef: + properties: + toolgroup_id: + anyOf: + - type: string + - type: 'null' + title: Toolgroup Id + name: + type: string + title: Name + 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 + type: object + required: + - name + title: ToolDef + description: Tool definition used in runtime contexts. + ToolGroup: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + type: object + required: + - identifier + - provider_id + title: ToolGroup + description: A group of related tools managed together. + 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 + - type: 'null' + title: Content + error_message: + anyOf: + - type: string + - type: 'null' + title: Error Message + error_code: + anyOf: + - type: integer + - type: 'null' + title: Error Code + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + type: object + title: ToolInvocationResult + description: Result of a tool invocation. + 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. + TopPSamplingStrategy: + properties: + type: + type: string + const: top_p + title: Type + default: top_p + temperature: + anyOf: + - type: number + minimum: 0.0 + - type: 'null' + title: Temperature + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + default: 0.95 + type: object + required: + - temperature + title: TopPSamplingStrategy + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. + 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: + anyOf: + - type: integer + - type: 'null' + title: Max Validation Steps + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + - type: 'null' + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + - type: 'null' + efficiency_config: + anyOf: + - $ref: '#/components/schemas/EfficiencyConfig' + - type: 'null' + dtype: + anyOf: + - type: string + - type: 'null' + title: Dtype + default: bf16 + type: object + required: + - n_epochs + title: TrainingConfig + description: Comprehensive configuration for the training process. + 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. + URL: + properties: + uri: + type: string + title: Uri + type: object + required: + - uri + title: URL + description: A URL reference to external content. + UnionType: + properties: + type: + type: string + const: union + title: Type + default: union + type: object + title: UnionType + description: Parameter type for union values. + VectorStoreChunkingStrategyAuto: + properties: + type: + type: string + const: auto + title: Type + default: auto + type: object + title: VectorStoreChunkingStrategyAuto + description: Automatic chunking strategy for vector store files. + 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. + 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. + 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. + VectorStoreDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.deleted + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: VectorStoreDeleteResponse + description: Response from deleting a vector store. + 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. + VectorStoreFileContentsResponse: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + attributes: + additionalProperties: true + type: object + title: Attributes + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + type: array + title: Content + type: object + required: + - file_id + - filename + - attributes + - content + title: VectorStoreFileContentsResponse + description: Response from retrieving the contents of a vector store file. + 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. + VectorStoreFileDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.file.deleted + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: VectorStoreFileDeleteResponse + description: Response from deleting a vector store file. + 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. + 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: + anyOf: + - $ref: '#/components/schemas/VectorStoreFileLastError' + - type: 'null' + 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. + VectorStoreObject: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store + created_at: + type: integer + title: Created At + name: + anyOf: + - type: string + - type: 'null' + title: Name + usage_bytes: + type: integer + title: Usage Bytes + default: 0 + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + type: string + title: Status + default: completed + 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 + type: object + title: Metadata + type: object + required: + - id + - created_at + - file_counts + title: VectorStoreObject + description: OpenAI Vector Store object. + VectorStoreSearchResponse: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + score: + type: number + title: Score + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + type: object + - type: 'null' + title: Attributes + 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. + VectorStoreSearchResponsePage: + properties: + object: + type: string + title: Object + default: vector_store.search_results.page + search_query: + items: type: string - deprecated: true -jsonSchemaDialect: >- - https://json-schema.org/draft/2020-12/schema -components: - schemas: - Error: + type: array + title: Search Query + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + type: array + title: Data + has_more: + type: boolean + title: Has More + default: false + next_page: + anyOf: + - type: string + - type: 'null' + title: Next Page + type: object + required: + - search_query + - data + title: VectorStoreSearchResponsePage + description: Paginated response from searching a vector store. + VersionInfo: + properties: + version: + type: string + title: Version + type: object + required: + - version + title: VersionInfo + description: Version information for the service. + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: Severity level of a safety violation. + _URLOrData: + properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + data: + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + title: Data + type: object + title: _URLOrData + description: A URL or a base64 encoded string + _batches_Request: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + const: 24h + title: Completion Window + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + idempotency_key: + anyOf: + - type: string + - type: 'null' + title: Idempotency Key + type: object + required: + - input_file_id + - endpoint + - completion_window + title: _batches_Request + _conversations_Request: + properties: + items: + anyOf: + - 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' + 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' + type: array + - type: 'null' + title: Items + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + type: object + title: _conversations_Request + _conversations_conversation_id_Request: + properties: + metadata: + additionalProperties: + type: string + type: object + title: Metadata + type: object + required: + - metadata + title: _conversations_conversation_id_Request + _conversations_conversation_id_items_Request: + properties: + items: + 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' + 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' + type: array + title: Items + type: object + required: + - items + title: _conversations_conversation_id_items_Request + _datasets_Request: + properties: + purpose: + title: Purpose + source: + title: Source + metadata: + title: Metadata + dataset_id: + title: Dataset Id + type: object + required: + - purpose + - source + title: _datasets_Request + _eval_benchmarks_benchmark_id_evaluations_Request: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + type: object + required: + - input_rows + - scoring_functions + - benchmark_config + title: _eval_benchmarks_benchmark_id_evaluations_Request + _inference_rerank_Request: + properties: + model: + type: string + title: Model + query: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: Query + items: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + type: array + title: Items + max_num_results: + anyOf: + - type: integer + - type: 'null' + title: Max Num Results + type: object + required: + - model + - query + - items + title: _inference_rerank_Request + _models_Request: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + anyOf: + - type: string + - type: 'null' + title: Provider Model Id + provider_id: + anyOf: + - type: string + - type: 'null' + title: Provider Id + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + model_type: + anyOf: + - $ref: '#/components/schemas/ModelType' + - type: 'null' + type: object + required: + - model_id + title: _models_Request + _moderations_Request: + properties: + input: + anyOf: + - type: string + - items: + type: string + type: array + title: Input + model: + anyOf: + - type: string + - type: 'null' + title: Model + type: object + required: + - input + title: _moderations_Request + _post_training_preference_optimize_Request: + properties: + job_uuid: + type: string + title: Job Uuid + finetuned_model: + type: string + title: Finetuned Model + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: _post_training_preference_optimize_Request + _post_training_supervised_fine_tune_Request: + properties: + job_uuid: + type: string + title: Job Uuid + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + model: + anyOf: + - type: string + - type: 'null' + title: Model + description: Model descriptor for training if not in provider config` + checkpoint_dir: + anyOf: + - type: string + - type: 'null' + title: Checkpoint Dir + algorithm_config: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + - $ref: '#/components/schemas/QATFinetuningConfig' + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + - type: 'null' + title: Algorithm Config + type: object + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: _post_training_supervised_fine_tune_Request + _prompts_Request: + properties: + prompt: + type: string + title: Prompt + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Variables + type: object + required: + - prompt + title: _prompts_Request + _prompts_prompt_id_Request: + properties: + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Variables + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt + - version + title: _prompts_prompt_id_Request + _prompts_prompt_id_set_default_version_Request: + properties: + version: + type: integer + title: Version + type: object + required: + - version + title: _prompts_prompt_id_set_default_version_Request + _responses_Request: + properties: + input: + title: Input + model: + title: Model + prompt: + title: Prompt + instructions: + title: Instructions + previous_response_id: + title: Previous Response Id + conversation: + title: Conversation + store: + title: Store + default: true + stream: + title: Stream + default: false + temperature: + title: Temperature + text: + title: Text + tools: + title: Tools + include: + title: Include + max_infer_iters: + title: Max Infer Iters + default: 10 + guardrails: + title: Guardrails + type: object + required: + - input + - model + title: _responses_Request + _scoring_score_Request: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + additionalProperties: + 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' + type: object + 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: + additionalProperties: + 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' + type: object + 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: + anyOf: + - type: string + - type: 'null' + title: Provider Shield Id + provider_id: + anyOf: + - type: string + - type: 'null' + title: Provider Id + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - shield_id + title: _shields_Request + _tool_runtime_invoke_Request: + properties: + tool_name: + type: string + title: Tool Name + kwargs: + additionalProperties: true + type: object + title: Kwargs + type: object + required: + - tool_name + - kwargs + title: _tool_runtime_invoke_Request + _vector_io_query_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + 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: Query + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - vector_store_id + - query + title: _vector_io_query_Request + _vector_stores_vector_store_id_Request: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + type: object + title: _vector_stores_vector_store_id_Request + _vector_stores_vector_store_id_files_Request: + properties: + file_id: + type: string + title: File Id + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Attributes + 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 + type: object + required: + - file_id + title: _vector_stores_vector_store_id_files_Request + _vector_stores_vector_store_id_files_file_id_Request: + properties: + attributes: + additionalProperties: true + type: object + title: Attributes + type: object + required: + - attributes + title: _vector_stores_vector_store_id_files_file_id_Request + _vector_stores_vector_store_id_search_Request: + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: Query + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + max_num_results: + anyOf: + - type: integer + - type: 'null' + title: Max Num Results + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + - type: 'null' + rewrite_query: + anyOf: + - type: boolean + - type: 'null' + title: Rewrite Query + default: false + search_mode: + anyOf: + - type: string + - type: 'null' + title: Search Mode + default: vector type: object + required: + - query + title: _vector_stores_vector_store_id_search_Request + Error: + description: Error response from the API. Roughly follows RFC 7807. properties: status: + title: Status type: integer - description: HTTP status code title: + title: Title type: string - description: >- - Error title, a short summary of the error which is invariant for an error - type detail: + title: Detail type: string - description: >- - Error detail, a longer human-readable description of the error instance: - type: string - description: >- - (Optional) A URL which can be used to retrieve more information about - the specific occurrence of the error - additionalProperties: false + anyOf: + - type: string + - type: 'null' + title: Instance + nullable: true required: - - status - - title - - detail + - status + - title + - detail title: Error description: >- Error response from the API. Roughly follows RFC 7807. @@ -1127,8 +6562,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: @@ -1136,11 +6570,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: @@ -1148,10 +6580,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 6f379d17cd..9d1407830e 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -1,139 +1,157 @@ openapi: 3.1.0 info: - title: >- - Llama Stack Specification - Experimental APIs - version: v1 - description: >- + title: Llama Stack Specification - Experimental APIs + 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. + a set of endpoints and their corresponding interfaces that are + tailored to + best leverage Llama Models. - **🧪 EXPERIMENTAL**: Pre-release APIs (v1alpha, v1beta) that may change before - becoming stable. + **🧪 EXPERIMENTAL**: Pre-release APIs (v1alpha, v1beta) that may change before + becoming stable. + version: v1 servers: - - url: http://any-hosted-llama-stack.com +- url: http://any-hosted-llama-stack.com paths: - /v1beta/datasetio/append-rows/{dataset_id}: + /v1alpha/inference/rerank: post: + tags: + - Inference + summary: Rerank + description: Rerank a list of documents based on their relevance to a query. + operationId: rerank_v1alpha_inference_rerank_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_inference_rerank_Request' + required: true responses: '200': - description: OK + 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' + /v1beta/datasetio/append-rows/{dataset_id}: + post: tags: - - DatasetIO - summary: Append rows to a dataset. + - Datasetio + summary: Append Rows description: Append rows to a dataset. - parameters: - - name: dataset_id - in: path - description: >- - The ID of the dataset to append the rows to. - required: true - schema: - type: string + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post requestBody: content: application/json: schema: - $ref: '#/components/schemas/AppendRowsRequest' + items: + additionalProperties: true + type: object + type: array + title: Rows required: true - deprecated: false - /v1beta/datasetio/iterrows/{dataset_id}: - get: responses: '200': - description: A PaginatedResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/PaginatedResponse' + schema: {} '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: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasetio/iterrows/{dataset_id}: + get: tags: - - DatasetIO - summary: >- - Get a paginated list of rows from a dataset. - description: >- + - Datasetio + summary: Iterrows + 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. + operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get parameters: - - name: dataset_id - in: path - description: >- - The ID of the dataset to get the rows from. - required: true - schema: - type: string - - name: start_index - in: query - description: >- - Index into dataset for the first row to get. Get all rows if None. - required: false - schema: - type: integer - - name: limit - in: query - description: The number of rows to get. - required: false - schema: - type: integer - deprecated: false - /v1beta/datasets: - get: + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Limit + - name: start_index + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Start Index + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' responses: '200': - description: A ListDatasetsResponse. + description: A PaginatedResponse. content: application/json: schema: - $ref: '#/components/schemas/ListDatasetsResponse' + $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' + description: Default Response + /v1beta/datasets/{dataset_id}: + get: tags: - - Datasets - summary: List all datasets. - description: List all datasets. - parameters: [] - deprecated: false - post: + - Datasets + summary: Get Dataset + description: Get a dataset by its ID. + operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': description: A Dataset. @@ -142,25 +160,92 @@ paths: schema: $ref: '#/components/schemas/Dataset' '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: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + delete: + tags: + - Datasets + summary: Unregister Dataset + description: Unregister a dataset by its ID. + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasets: + get: + tags: + - Datasets + summary: List Datasets + description: List all datasets. + operationId: list_datasets_v1beta_datasets_get + responses: + '200': + description: A ListDatasetsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListDatasetsResponse' + '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: - - Datasets - summary: Register a new dataset. + - Datasets + summary: Register Dataset description: Register a new dataset. - parameters: [] + operationId: register_dataset_v1beta_datasets_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/RegisterDatasetRequest' + $ref: '#/components/schemas/_datasets_Request' required: true deprecated: true /v1beta/datasets/{dataset_id}: @@ -173,45 +258,49 @@ paths: schema: $ref: '#/components/schemas/Dataset' '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' + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + post: tags: - - Datasets - summary: Get a dataset by its ID. - description: Get a dataset by its ID. - parameters: - - name: dataset_id - in: path - description: The ID of the dataset to get. - required: true - schema: - type: string - deprecated: false - delete: + - Eval + summary: Evaluate Rows + description: Evaluate a list of rows on a benchmark. + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_eval_benchmarks_benchmark_id_evaluations_Request' + required: true responses: '200': - description: OK + 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: - - Datasets - summary: Unregister a dataset by its ID. - description: Unregister a dataset by its ID. parameters: - name: dataset_id in: path @@ -222,6 +311,11 @@ paths: deprecated: true /v1alpha/eval/benchmarks: get: + tags: + - Benchmarks + summary: List Benchmarks + description: List all benchmarks. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': description: A ListBenchmarksResponse. @@ -231,40 +325,24 @@ 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. - parameters: [] - deprecated: false + description: Default Response post: - 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: Register a benchmark. + - Benchmarks + summary: Register Benchmark description: Register a benchmark. - parameters: [] + operationId: register_benchmark_v1alpha_eval_benchmarks_post requestBody: + required: true content: application/json: schema: @@ -275,19 +353,19 @@ paths: get: responses: '200': - description: A Benchmark. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Benchmark' + 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: @@ -330,343 +408,141 @@ paths: deprecated: true /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: + tags: + - Post Training + summary: Cancel Training Job + description: Cancel a training job. + operationId: cancel_training_job_v1alpha_post_training_job_cancel_post + parameters: + - name: job_uuid + in: query + required: true + schema: + type: string + title: Job Uuid responses: '200': - description: >- - EvaluateResponse object containing generations and scores. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' + 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' + description: Default Response + /v1alpha/post-training/job/artifacts: + get: tags: - - Eval - summary: Evaluate a list of rows on a benchmark. - description: Evaluate a list of rows on a benchmark. + - Post Training + summary: Get Training Job Artifacts + description: Get the artifacts of a training job. + operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluateRowsRequest' + - name: job_uuid + in: query required: true - deprecated: false - /v1alpha/eval/benchmarks/{benchmark_id}/jobs: - post: + schema: + type: string + title: Job Uuid responses: '200': - description: >- - The job that was created to run the evaluation. + description: A PostTrainingJobArtifactsResponse. content: application/json: schema: - $ref: '#/components/schemas/Job' + $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' + description: Default Response + /v1alpha/post-training/job/status: + get: tags: - - Eval - summary: Run an evaluation on a benchmark. - description: Run an evaluation on a benchmark. + - Post Training + summary: Get Training Job Status + description: Get the status of a training job. + operationId: get_training_job_status_v1alpha_post_training_job_status_get parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunEvalRequest' + - name: job_uuid + in: query required: true - deprecated: false - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: - get: + schema: + type: string + title: Job Uuid responses: '200': - description: The status of the evaluation job. + description: A PostTrainingJobStatusResponse. content: application/json: schema: - $ref: '#/components/schemas/Job' + $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' + description: Default Response + /v1alpha/post-training/jobs: + get: tags: - - Eval - summary: Get the status of a job. - description: Get the status of a job. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to get the status of. - required: true - schema: - type: string - 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. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to cancel. - required: true - schema: - type: string - deprecated: false - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: - get: - responses: - '200': - description: The result of the job. - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Get the result of a job. - description: Get the result of a job. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to get the result of. - required: true - schema: - type: string - deprecated: false - /v1alpha/inference/rerank: - post: - responses: - '200': - description: >- - RerankResponse with indices sorted by relevance score (descending). - content: - application/json: - schema: - $ref: '#/components/schemas/RerankResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $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. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RerankRequest' - required: true - deprecated: false - /v1alpha/post-training/job/artifacts: - get: + - Post Training + summary: Get Training Jobs + description: Get all training jobs. + operationId: get_training_jobs_v1alpha_post_training_jobs_get responses: '200': - description: A PostTrainingJobArtifactsResponse. + description: A ListPostTrainingJobsResponse. content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + $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 the artifacts of a training job. - description: Get the artifacts of a training job. - parameters: - - name: job_uuid - in: query - description: >- - The UUID of the job to get the artifacts of. - required: true - schema: - type: string - deprecated: false - /v1alpha/post-training/job/cancel: + /v1alpha/post-training/preference-optimize: post: - 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: - - PostTraining (Coming Soon) - summary: Cancel a training job. - description: Cancel a training job. - parameters: [] + - Post Training + summary: Preference Optimize + description: Run preference optimization of a model. + operationId: preference_optimize_v1alpha_post_training_preference_optimize_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/CancelTrainingJobRequest' + $ref: '#/components/schemas/_post_training_preference_optimize_Request' required: true - deprecated: false - /v1alpha/post-training/job/status: - get: - responses: - '200': - description: A PostTrainingJobStatusResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJobStatusResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - 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. - parameters: - - name: job_uuid - in: query - description: >- - The UUID of the job to get the status of. - required: true - schema: - type: string - deprecated: false - /v1alpha/post-training/jobs: - get: - responses: - '200': - description: A ListPostTrainingJobsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListPostTrainingJobsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Get all training jobs. - description: Get all training jobs. - parameters: [] - deprecated: false - /v1alpha/post-training/preference-optimize: - post: responses: '200': description: A PostTrainingJob. @@ -675,29 +551,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' + /v1alpha/post-training/supervised-fine-tune: + post: tags: - - PostTraining (Coming Soon) - summary: Run preference optimization of a model. - description: Run preference optimization of a model. - parameters: [] + - Post Training + summary: Supervised Fine Tune + description: Run supervised fine-tuning of a model. + operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/PreferenceOptimizeRequest' + $ref: '#/components/schemas/_post_training_supervised_fine_tune_Request' required: true - deprecated: false - /v1alpha/post-training/supervised-fine-tune: - post: responses: '200': description: A PostTrainingJob. @@ -706,29 +583,17 @@ 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 supervised fine-tuning of a model. - description: Run supervised fine-tuning of a model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SupervisedFineTuneRequest' - required: true - deprecated: false -jsonSchemaDialect: >- - https://json-schema.org/draft/2020-12/schema components: schemas: Error: @@ -1006,1145 +871,4563 @@ components: AggregationFunctionType: type: string enum: - - average - - weighted_average - - median - - categorical_count - - accuracy + - average + - weighted_average + - median + - categorical_count + - accuracy title: AggregationFunctionType - description: >- - Types of aggregation functions for scoring results. - BasicScoringFnParams: + description: Types of aggregation functions for scoring results. + AllowedToolsFilter: + properties: + tool_names: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Tool Names + type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ArrayType: + properties: + type: + type: string + const: array + title: Type + default: array type: object + title: ArrayType + description: Parameter type for array values. + BasicScoringFnParams: properties: type: - $ref: '#/components/schemas/ScoringFnParamsType' + type: string const: basic + title: Type default: basic - description: >- - The type of scoring function parameters, always basic aggregation_functions: - type: array items: $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - aggregation_functions - title: BasicScoringFnParams - description: >- - Parameters for basic scoring function configuration. - BenchmarkConfig: + 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. + Batch: properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - description: The candidate to evaluate. - scoring_params: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringFnParams' - description: >- - Map between scoring function id and parameters for each scoring function - you want to run - num_examples: + id: + type: string + title: Id + completion_window: + type: string + title: Completion Window + created_at: type: integer - description: >- - (Optional) The number of examples to evaluate. If not provided, all examples - in the dataset will be evaluated - additionalProperties: false + 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: + anyOf: + - type: integer + - type: 'null' + title: Cancelled At + cancelling_at: + anyOf: + - type: integer + - type: 'null' + title: Cancelling At + completed_at: + anyOf: + - type: integer + - type: 'null' + title: Completed At + error_file_id: + anyOf: + - type: string + - type: 'null' + title: Error File Id + errors: + anyOf: + - $ref: '#/components/schemas/Errors' + - type: 'null' + expired_at: + anyOf: + - type: integer + - type: 'null' + title: Expired At + expires_at: + anyOf: + - type: integer + - type: 'null' + title: Expires At + failed_at: + anyOf: + - type: integer + - type: 'null' + title: Failed At + finalizing_at: + anyOf: + - type: integer + - type: 'null' + title: Finalizing At + in_progress_at: + anyOf: + - type: integer + - type: 'null' + title: In Progress At + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + model: + anyOf: + - type: string + - type: 'null' + title: Model + output_file_id: + anyOf: + - type: string + - type: 'null' + title: Output File Id + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + - type: 'null' + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + - type: 'null' + additionalProperties: true + type: object required: - - eval_candidate - - scoring_params - title: BenchmarkConfig - description: >- - A benchmark configuration for evaluation. - GreedySamplingStrategy: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + BatchError: + properties: + code: + anyOf: + - type: string + - type: 'null' + title: Code + line: + anyOf: + - type: integer + - type: 'null' + title: Line + message: + anyOf: + - type: string + - type: 'null' + title: Message + param: + anyOf: + - type: string + - type: 'null' + title: Param + additionalProperties: true type: object + title: BatchError + BatchRequestCounts: properties: - type: - type: string - const: greedy - default: greedy - description: >- - Must be "greedy" to identify this sampling strategy - additionalProperties: false - required: - - type - title: GreedySamplingStrategy - description: >- - Greedy sampling strategy that selects the highest probability token at each - step. - ImageContentItem: + completed: + type: integer + title: Completed + failed: + type: integer + title: Failed + total: + type: integer + title: Total + additionalProperties: true type: object - properties: - type: - type: string - const: image - default: image - description: >- - Discriminator type of the content item. Always "image" - image: - type: object - properties: - url: - $ref: '#/components/schemas/URL' - description: >- - A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - data: - type: string - contentEncoding: base64 - description: base64 encoded image data as string - additionalProperties: false - description: >- - Image as a base64 encoded string or an URL - additionalProperties: false required: - - type - - image - title: ImageContentItem - description: A image content item - InterleavedContent: - oneOf: - - type: string - - $ref: '#/components/schemas/InterleavedContentItem' - - type: array - items: - $ref: '#/components/schemas/InterleavedContentItem' - InterleavedContentItem: - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - LLMAsJudgeScoringFnParams: + - 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: + anyOf: + - type: string + - type: 'null' + title: Provider Resource Id + description: Unique identifier for this resource in the provider + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: llm_as_judge - default: llm_as_judge - description: >- - The type of scoring function parameters, always llm_as_judge - judge_model: type: string - description: >- - Identifier of the LLM model to use as a judge for scoring - prompt_template: + const: benchmark + title: Type + default: benchmark + dataset_id: type: string - description: >- - (Optional) Custom prompt template for the judge model - judge_score_regexes: - type: array + title: Dataset Id + scoring_functions: items: type: string - description: >- - Regexes to extract the answer from generated response - aggregation_functions: type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - judge_model - - judge_score_regexes - - aggregation_functions - title: LLMAsJudgeScoringFnParams - description: >- - Parameters for LLM-as-judge scoring function configuration. - ModelCandidate: + title: Scoring Functions + metadata: + additionalProperties: true + type: object + title: Metadata + description: Metadata for this evaluation task type: object - properties: - type: - type: string - const: model - default: model - model: - type: string - description: The model ID to evaluate. - sampling_params: - $ref: '#/components/schemas/SamplingParams' - description: The sampling parameters for the model. - system_message: - $ref: '#/components/schemas/SystemMessage' - description: >- - (Optional) The system message providing instructions or context to the - model. - additionalProperties: false required: - - type - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - RegexParserScoringFnParams: + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark + description: A benchmark resource for evaluating model performance. + BenchmarkConfig: + properties: + eval_candidate: + $ref: '#/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: + 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: object + required: + - eval_candidate + title: BenchmarkConfig + description: A benchmark configuration for evaluation. + Body_register_benchmark_v1alpha_eval_benchmarks_post: properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: regex_parser - default: regex_parser - description: >- - The type of scoring function parameters, always regex_parser - parsing_regexes: - type: array + scoring_functions: items: type: string - description: >- - Regex to extract the answer from generated response - aggregation_functions: type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - parsing_regexes - - aggregation_functions - title: RegexParserScoringFnParams - description: >- - Parameters for regex parser scoring function configuration. - SamplingParams: + title: Scoring Functions + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata type: object - properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - - $ref: '#/components/schemas/TopPSamplingStrategy' - - $ref: '#/components/schemas/TopKSamplingStrategy' - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - description: The sampling strategy. - max_tokens: - type: integer - description: >- - 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. - repetition_penalty: - type: number - default: 1.0 - description: >- - 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. - stop: - type: array - items: - type: string - description: >- - Up to 4 sequences where the API will stop generating further tokens. The - returned text will not contain the stop sequence. - additionalProperties: false required: - - strategy - title: SamplingParams - description: Sampling parameters. - ScoringFnParams: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' - - $ref: '#/components/schemas/BasicScoringFnParams' - discriminator: - propertyName: type - mapping: - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - basic: '#/components/schemas/BasicScoringFnParams' - ScoringFnParamsType: - type: string - enum: - - llm_as_judge - - regex_parser - - basic - title: ScoringFnParamsType - description: >- - Types of scoring function parameter configurations. - SystemMessage: - type: object + - scoring_functions + title: Body_register_benchmark_v1alpha_eval_benchmarks_post + BooleanType: properties: - role: + type: type: string - const: system - default: system - description: >- - Must be "system" to identify this as a system message - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - 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). - additionalProperties: false - required: - - role - - content - title: SystemMessage - description: >- - A system message providing instructions or context to the model. - TextContentItem: + const: boolean + title: Type + default: boolean type: object + title: BooleanType + description: Parameter type for boolean values. + ChatCompletionInputType: properties: type: type: string - const: text - default: text - description: >- - Discriminator type of the content item. Always "text" - text: + const: chat_completion_input + title: Type + default: chat_completion_input + type: object + title: ChatCompletionInputType + description: Parameter type for 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 - description: Text content - additionalProperties: false + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Embedding + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + type: object required: - - type - - text - title: TextContentItem - description: A text content item - TopKSamplingStrategy: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + ChunkMetadata: + 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 type: object + title: 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. + CompletionInputType: properties: type: type: string - const: top_k - default: top_k - description: >- - Must be "top_k" to identify this sampling strategy - top_k: - type: integer - description: >- - Number of top tokens to consider for sampling. Must be at least 1 - additionalProperties: false - required: - - type - - top_k - title: TopKSamplingStrategy - description: >- - Top-k sampling strategy that restricts sampling to the k most likely tokens. - TopPSamplingStrategy: + const: completion_input + title: Type + default: completion_input type: object + title: CompletionInputType + description: Parameter type for completion input. + Conversation: properties: - type: + id: type: string - const: top_p - default: top_p - description: >- - Must be "top_p" to identify this sampling strategy - temperature: - type: number - description: >- - Controls randomness in sampling. Higher values increase randomness - top_p: - type: number - default: 0.95 - description: >- - Cumulative probability threshold for nucleus sampling. Defaults to 0.95 - additionalProperties: false - required: - - type - title: TopPSamplingStrategy - description: >- - Top-p (nucleus) sampling strategy that samples from the smallest set of tokens - with cumulative probability >= p. - URL: + 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: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + 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. + items: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + title: Items + description: Initial items to include in the conversation context. You may add up to 20 items at a time. type: object + required: + - id + - created_at + title: Conversation + description: OpenAI-compatible conversation object. + ConversationDeletedResource: properties: - uri: + id: type: string - description: The URL string pointing to the resource - additionalProperties: false + title: Id + description: The deleted conversation identifier + object: + type: string + title: Object + description: Object type + default: conversation.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object required: - - uri - title: URL - description: A URL reference to external content. - EvaluateRowsRequest: + - id + title: ConversationDeletedResource + description: Response for deleted conversation. + ConversationItemDeletedResource: + properties: + id: + type: string + title: Id + description: The deleted item identifier + object: + type: string + title: Object + description: Object type + default: conversation.item.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true type: object + required: + - id + title: ConversationItemDeletedResource + description: Response for deleted conversation item. + ConversationItemList: properties: - input_rows: - type: array + object: + type: string + title: Object + description: Object type + default: list + data: items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to evaluate. - scoring_functions: + 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 - items: - type: string - description: >- - The scoring functions to use for the evaluation. - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. - additionalProperties: false - required: - - input_rows - - scoring_functions - - benchmark_config - title: EvaluateRowsRequest - EvaluateResponse: + title: Data + description: List of conversation items + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + description: The ID of the first item in the list + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + description: The ID of the last item in the list + 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: - generations: - type: array - items: + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Validation Dataset Id + packed: + anyOf: + - type: boolean + - type: 'null' + title: Packed + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + title: Train On Input + default: false + type: object + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: Configuration for training data and data loading. + Dataset: + properties: + identifier: + type: string + 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 + 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. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + 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. + EfficiencyConfig: + properties: + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + title: Enable Activation Checkpointing + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + title: Enable Activation Offloading + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + title: Memory Efficient Fsdp Wrap + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + title: Fsdp Cpu Offload + default: false + type: object + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. + Errors: + properties: + data: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + title: Data + object: + anyOf: + - type: string + - type: 'null' + title: Object + additionalProperties: true + type: object + title: Errors + EvaluateResponse: + properties: + generations: + items: + additionalProperties: true type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The generations from the evaluation. + type: array + title: Generations scores: - type: object additionalProperties: $ref: '#/components/schemas/ScoringResult' - description: The scores from the evaluation. - additionalProperties: false + type: object + title: Scores + type: object required: - - generations - - scores + - generations + - scores title: EvaluateResponse description: The response from an evaluation. - ScoringResult: + ExpiresAfter: + properties: + anchor: + type: string + const: created_at + title: Anchor + seconds: + type: integer + maximum: 2592000.0 + minimum: 3600.0 + title: Seconds type: object + required: + - anchor + - seconds + title: 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) + GreedySamplingStrategy: properties: - score_rows: + 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. + HealthInfo: + properties: + status: + $ref: '#/components/schemas/HealthStatus' + type: object + required: + - status + title: HealthInfo + description: Health status information for 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 + 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 + 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. + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. + JsonType: + properties: + type: + type: string + const: json + title: Type + default: json + type: object + title: JsonType + description: Parameter type for JSON values. + LLMAsJudgeScoringFnParams: + properties: + type: + type: string + const: llm_as_judge + title: Type + default: llm_as_judge + judge_model: + type: string + title: Judge Model + prompt_template: + anyOf: + - type: string + - type: 'null' + title: Prompt Template + judge_score_regexes: + items: + type: string type: array + title: Judge Score Regexes + description: Regexes to extract the answer from generated response + aggregation_functions: items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The scoring result for each row. Each row is a map of column name to value. - aggregated_results: + $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. + 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. + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + type: array + title: Data + type: object + required: + - data + title: ListPostTrainingJobsResponse + LoraFinetuningConfig: + properties: + type: + type: string + const: LoRA + title: Type + default: LoRA + lora_attn_modules: + items: + type: string + type: array + title: Lora Attn Modules + apply_lora_to_mlp: + type: boolean + title: Apply Lora To Mlp + apply_lora_to_output: + type: boolean + title: Apply Lora To Output + rank: + type: integer + title: Rank + alpha: + type: integer + title: Alpha + use_dora: + anyOf: + - type: boolean + - type: 'null' + title: Use Dora + default: false + quantize_base: + anyOf: + - type: boolean + - type: 'null' + title: Quantize Base + default: false + type: object + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Map of metric name to aggregated value - additionalProperties: false + title: Input Schema + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + Model: + properties: + identifier: + type: string + 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 + 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. + ModelCandidate: + properties: + type: + type: string + const: model + title: Type + default: model + model: + type: string + title: Model + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + - type: 'null' + type: object + required: + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + ModelType: + type: string + enum: + - llm + - embedding + - rerank + title: ModelType + description: Enumeration of supported model types in Llama Stack. + 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. + ModerationObjectResults: + properties: + flagged: + type: boolean + title: Flagged + categories: + anyOf: + - additionalProperties: + type: boolean + type: object + - type: 'null' + title: Categories + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + title: Category Applied Input Types + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + title: Category Scores + user_message: + anyOf: + - type: string + - type: 'null' + title: User Message + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - flagged + title: ModerationObjectResults + description: A moderation object. + NumberType: + properties: + type: + type: string + const: number + title: Type + default: number + type: object + title: NumberType + description: Parameter type for numeric values. + ObjectType: + properties: + type: + type: string + const: object + title: Type + default: object + type: object + title: ObjectType + description: Parameter type for object values. + OpenAIAssistantMessageParam-Input: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + type: object + required: + - id + - choices + - created + - model + title: OpenAIChatCompletion + description: Response from an OpenAI-compatible chat completion request. + 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. + 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. + 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: + anyOf: + - type: number + - type: 'null' + title: Frequency Penalty + 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 + type: object + - type: 'null' + title: Logit Bias + logprobs: + anyOf: + - type: boolean + - type: 'null' + title: Logprobs + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Completion Tokens + max_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + n: + anyOf: + - type: integer + - type: 'null' + title: N + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + title: Parallel Tool Calls + presence_penalty: + anyOf: + - type: number + - type: 'null' + title: Presence Penalty + 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 + seed: + anyOf: + - type: integer + - type: 'null' + title: Seed + stop: + anyOf: + - type: string + - items: + type: string + type: array + - type: 'null' + title: Stop + stream: + anyOf: + - type: boolean + - type: 'null' + title: Stream + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Stream Options + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + 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 + top_logprobs: + anyOf: + - type: integer + - type: 'null' + title: Top Logprobs + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + user: + anyOf: + - type: string + - type: 'null' + title: User + additionalProperties: true + type: object + required: + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible chat completion endpoint. + OpenAIChatCompletionToolCall: + properties: + index: + anyOf: + - type: integer + - type: 'null' + title: Index + id: + anyOf: + - type: string + - type: 'null' + title: Id + type: + type: string + const: function + title: Type + default: function + function: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + - type: 'null' + type: object + title: OpenAIChatCompletionToolCall + description: Tool call specification for OpenAI-compatible chat completion responses. + OpenAIChatCompletionToolCallFunction: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + arguments: + anyOf: + - type: string + - type: 'null' + title: Arguments + type: object + title: OpenAIChatCompletionToolCallFunction + description: Function call details for OpenAI-compatible tool calls. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + - type: 'null' + completion_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + - type: 'null' + type: object + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage + description: Usage information for OpenAI chat completion. + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + title: Reasoning Tokens + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + title: Cached Tokens + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + - type: 'null' + type: object + required: + - message + - finish_reason + - index + title: OpenAIChoice + description: A choice from an OpenAI-compatible chat completion response. + OpenAIChoiceLogprobs-Output: + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + type: object + title: OpenAIChoiceLogprobs + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + 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. + + :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" + OpenAICompletionChoice-Output: + properties: + finish_reason: + type: string + title: Finish Reason + text: + type: string + title: Text + index: + type: integer + title: Index + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + - type: 'null' + type: object + required: + - finish_reason + - text + - index + title: 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 + 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: + anyOf: + - type: integer + - type: 'null' + title: Best Of + echo: + anyOf: + - type: boolean + - type: 'null' + title: Echo + frequency_penalty: + anyOf: + - type: number + - type: 'null' + title: Frequency Penalty + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + title: Logit Bias + logprobs: + anyOf: + - type: boolean + - type: 'null' + title: Logprobs + max_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + n: + anyOf: + - type: integer + - type: 'null' + title: N + presence_penalty: + anyOf: + - type: number + - type: 'null' + title: Presence Penalty + seed: + anyOf: + - type: integer + - type: 'null' + title: Seed + stop: + anyOf: + - type: string + - items: + type: string + type: array + - type: 'null' + title: Stop + stream: + anyOf: + - type: boolean + - type: 'null' + title: Stream + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Stream Options + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + user: + anyOf: + - type: string + - type: 'null' + title: User + suffix: + anyOf: + - type: string + - type: 'null' + title: Suffix + additionalProperties: true + type: object + required: + - model + - prompt + title: OpenAICompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible completion endpoint. + OpenAICompletionWithInputMessages: + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + input_messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + 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' + type: array + title: Input Messages + type: object + required: + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + properties: + file_ids: + items: + type: string + type: array + title: File Ids + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Attributes + 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 + additionalProperties: true + type: object + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + description: Request to create a vector store file batch with extra_body support. + OpenAICreateVectorStoreRequestWithExtraBody: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + file_ids: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: File Ids + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + 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 + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + additionalProperties: true + type: object + title: OpenAICreateVectorStoreRequestWithExtraBody + description: Request to create a vector store with extra_body support. + OpenAIDeleteResponseObject: + properties: + id: + type: string + title: Id + object: + type: string + const: response + title: Object + default: response + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: OpenAIDeleteResponseObject + description: Response object confirming deletion of an OpenAI response. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAIDeveloperMessageParam + description: A message from the developer in an OpenAI-compatible chat completion request. + 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. + 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. + OpenAIEmbeddingsRequestWithExtraBody: + properties: + model: + type: string + title: Model + input: + anyOf: + - type: string + - items: + type: string + type: array + title: Input + encoding_format: + anyOf: + - type: string + - type: 'null' + title: Encoding Format + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' + title: Dimensions + user: + anyOf: + - type: string + - type: 'null' + title: User + additionalProperties: true + type: object + required: + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody + description: Request parameters for OpenAI-compatible embeddings endpoint. + 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. + OpenAIFile: + properties: + type: + type: string + const: file + title: Type + default: file + file: + $ref: '#/components/schemas/OpenAIFileFile' + type: object + required: + - file + title: OpenAIFile + OpenAIFileDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + const: file + title: Object + default: file + deleted: + type: boolean + title: Deleted + type: object + required: + - id + - deleted + title: OpenAIFileDeleteResponse + description: Response for deleting a file in OpenAI Files API. + 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 + 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. + OpenAIFilePurpose: + type: string + enum: + - assistants + - batch + title: OpenAIFilePurpose + description: Valid purpose values for OpenAI Files API. + OpenAIImageURL: + properties: + url: + type: string + title: Url + detail: + anyOf: + - type: string + - type: 'null' + title: Detail + type: object + required: + - url + title: OpenAIImageURL + description: Image URL specification for OpenAI-compatible chat completion messages. + OpenAIJSONSchema: + properties: + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + strict: + anyOf: + - type: boolean + - type: 'null' + title: Strict + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Schema + type: object + title: OpenAIJSONSchema + description: JSON schema specification for OpenAI-compatible structured response format. + OpenAIModel: + properties: + id: + type: string + title: Id + object: + type: string + const: model + title: Object + default: model + created: + type: integer + title: Created + owned_by: + type: string + title: Owned By + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Custom Metadata + type: object + required: + - id + - created + - owned_by + title: OpenAIModel + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata + 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. + 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. + 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. + 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. + 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. + 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. + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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: + anyOf: + - type: string + - type: 'null' + title: File Data + file_id: + anyOf: + - type: string + - type: 'null' + title: File Id + file_url: + anyOf: + - type: string + - type: 'null' + title: File Url + filename: + anyOf: + - type: string + - type: 'null' + title: Filename + type: object + title: OpenAIResponseInputMessageContentFile + description: File content for input messages in OpenAI response format. + 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: + anyOf: + - type: string + - type: 'null' + title: File Id + image_url: + anyOf: + - type: string + - type: 'null' + title: Image Url + type: object + title: OpenAIResponseInputMessageContentImage + description: Image content for input messages in OpenAI response format. + 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. + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + max_num_results: + anyOf: + - type: integer + maximum: 50.0 + minimum: 1.0 + - type: 'null' + title: Max Num Results + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + - type: 'null' + type: object + required: + - vector_store_ids + title: OpenAIResponseInputToolFileSearch + description: File search tool configuration for OpenAI response inputs. + OpenAIResponseInputToolFunction: + properties: + type: + type: string + const: function + title: Type + default: function + name: + type: string + title: Name + 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 + type: object + required: + - name + - parameters + title: OpenAIResponseInputToolFunction + description: Function tool configuration for OpenAI response inputs. + OpenAIResponseInputToolWebSearch: + properties: + type: + anyOf: + - type: string + const: web_search + - type: string + const: web_search_preview + - type: string + const: web_search_preview_2025_03_11 + - type: string + const: web_search_2025_08_26 + title: Type + default: web_search + search_context_size: + anyOf: + - type: string + pattern: ^low|medium|high$ + - type: 'null' + title: Search Context Size + default: medium + type: object + title: OpenAIResponseInputToolWebSearch + description: Web search tool configuration for OpenAI response inputs. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + reason: + anyOf: + - type: string + - type: 'null' + title: Reason + type: object + required: + - approval_request_id + - approve + title: OpenAIResponseMCPApprovalResponse + description: A response to an MCP approval request. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + tools: + anyOf: + - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' + title: Tools + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + type: object + required: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject + description: Complete OpenAI response object containing generation results and metadata. + 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: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array + - type: 'null' + title: Results + type: object + required: + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall + description: File search tool call output message for OpenAI responses. + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + type: object + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + description: Function tool call output message for OpenAI responses. + 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: + anyOf: + - type: string + - type: 'null' + title: Error + output: + anyOf: + - type: string + - type: 'null' + title: Output + type: object + required: + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + description: Model Context Protocol (MCP) call output message for OpenAI responses. + 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. + 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. + OpenAIResponsePrompt: + properties: + id: + 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 + version: + anyOf: + - type: string + - type: 'null' + title: Version + type: object + required: + - id + title: OpenAIResponsePrompt + description: OpenAI compatible Prompt object that is used in OpenAI responses. + OpenAIResponseText: + properties: + format: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + - type: 'null' + type: object + title: OpenAIResponseText + description: Text response configuration for OpenAI responses. + OpenAIResponseTextFormat: + properties: + type: + anyOf: + - type: string + const: text + - type: string + const: json_schema + - type: string + const: json_object + 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 + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + 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' + - type: 'null' + title: Allowed Tools + type: object + required: + - server_label + title: OpenAIResponseToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + - type: 'null' + output_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + - type: 'null' + type: object required: - - score_rows - - aggregated_results - title: ScoringResult - description: A scoring result for a single row. - RunEvalRequest: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage + description: Usage information for OpenAI response. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + title: Cached Tokens type: object + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: properties: - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. - additionalProperties: false + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + title: Reasoning Tokens + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object required: - - benchmark_config - title: RunEvalRequest - Job: + - content + title: OpenAISystemMessageParam + description: A system message providing instructions or context to the model. + OpenAITokenLogProb: + properties: + token: + type: string + title: Token + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Bytes + 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. + + :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 + OpenAIToolMessageParam: properties: - job_id: + role: type: string - description: Unique identifier for the job - status: + const: tool + title: Role + default: tool + tool_call_id: type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current execution status of the job - additionalProperties: false + title: Tool Call Id + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + type: object required: - - job_id - - status - title: Job - description: >- - A job execution instance with status tracking. - "OpenAIChatCompletionContentPartImageParam": + - tool_call_id + - content + title: OpenAIToolMessageParam + description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. + OpenAITopLogProb: + properties: + token: + type: string + title: Token + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Bytes + 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. + + :token: The token + :bytes: (Optional) The bytes for the token + :logprob: The log probability of the token + OpenAIUserMessageParam-Input: properties: - type: + role: type: string - const: image_url - default: image_url - description: >- - Must be "image_url" to identify this as image content - image_url: - $ref: '#/components/schemas/OpenAIImageURL' - description: >- - Image URL specification and processing details - additionalProperties: false + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object required: - - type - - image_url - title: >- - OpenAIChatCompletionContentPartImageParam - description: >- - Image content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionContentPartTextParam: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + 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: + anyOf: + - type: string + - type: 'null' + title: Name type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OptimizerConfig: properties: - type: + 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. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: Available optimizer algorithms for training. + OutputTokensDetails: + properties: + reasoning_tokens: + type: integer + title: Reasoning Tokens + additionalProperties: true + type: object + required: + - reasoning_tokens + title: OutputTokensDetails + PostTrainingJob: + properties: + job_uuid: type: string - const: text - default: text - description: >- - Must be "text" to identify this as text content - text: + title: Job Uuid + type: object + required: + - job_uuid + title: PostTrainingJob + Prompt: + properties: + prompt: + anyOf: + - type: string + - type: 'null' + title: Prompt + description: The system prompt with variable placeholders + version: + type: integer + minimum: 1.0 + title: Version + description: Version (integer starting at 1, incremented on save) + prompt_id: type: string - description: The text content of the message - additionalProperties: false + 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: - - type - - text - title: OpenAIChatCompletionContentPartTextParam - description: >- - Text content part for OpenAI-compatible chat completion messages. - OpenAIImageURL: + - version + - prompt_id + title: Prompt + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. + 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. + QATFinetuningConfig: properties: - url: + type: type: string - description: >- - URL of the image to include in the message - detail: + const: QAT + title: Type + default: QAT + quantizer_name: type: string - description: >- - (Optional) Level of detail for image processing. Can be "low", "high", - or "auto" - additionalProperties: false + title: Quantizer Name + group_size: + type: integer + title: Group Size + type: object required: - - url - title: OpenAIImageURL - description: >- - Image URL specification for OpenAI-compatible chat completion messages. - RerankRequest: + - quantizer_name + - group_size + title: QATFinetuningConfig + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. + 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. + RegexParserScoringFnParams: properties: - model: + type: type: string - description: >- - The identifier of the reranking model to use. - query: - oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - description: >- - 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. - items: + 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: - oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - description: >- - 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. - max_num_results: - type: integer - description: >- - (Optional) Maximum number of results to return. Default: returns all. - additionalProperties: false - required: - - model - - query - - items - title: RerankRequest - RerankData: + $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. + RerankData: properties: index: type: integer - description: >- - The original index of the document in the input list + title: Index relevance_score: type: number - description: >- - The relevance score from the model output. Values are inverted when applicable - so that higher scores indicate greater relevance. - additionalProperties: false + title: Relevance Score + type: object required: - - index - - relevance_score + - index + - relevance_score title: RerankData - description: >- - A single rerank result from a reranking response. + description: A single rerank result from a reranking response. RerankResponse: - type: object properties: data: + items: + $ref: '#/components/schemas/RerankData' + type: array + title: Data + type: object + required: + - data + title: RerankResponse + description: Response from a reranking request. + 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. + RunShieldResponse: + properties: + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + - type: 'null' + type: object + title: RunShieldResponse + description: Response from running a safety shield. + SafetyViolation: + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + anyOf: + - type: string + - type: 'null' + title: User Message + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - violation_level + title: SafetyViolation + description: Details of a safety violation detected by content moderation. + 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: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + repetition_penalty: + anyOf: + - type: number + - type: 'null' + title: Repetition Penalty + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Stop + type: object + title: SamplingParams + description: Sampling parameters. + ScoreBatchResponse: + properties: + dataset_id: + anyOf: + - type: string + - type: 'null' + title: Dataset Id + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreBatchResponse + description: Response from batch scoring operations on datasets. + ScoreResponse: + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreResponse + description: The response from scoring. + ScoringFn: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - type: string + - type: 'null' + title: Description + 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' + title: Return Type + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + 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: + 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 + type: object + required: + - identifier + - provider_id + - return_type + title: ScoringFn + description: A scoring function resource for evaluating model outputs. + ScoringResult: + properties: + score_rows: items: - $ref: '#/components/schemas/RerankData' - description: >- - List of rerank result objects, sorted by relevance score (descending) - additionalProperties: false + additionalProperties: true + type: object + type: array + title: Score Rows + aggregated_results: + additionalProperties: true + type: object + title: Aggregated Results + type: object required: - - data - title: RerankResponse - description: Response from a reranking request. - Checkpoint: + - score_rows + - aggregated_results + title: ScoringResult + description: A scoring result for a single row. + SearchRankingOptions: + properties: + ranker: + anyOf: + - type: string + - type: 'null' + title: Ranker + score_threshold: + anyOf: + - type: number + - type: 'null' + title: Score Threshold + default: 0.0 type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + Shield: properties: identifier: type: string - description: Unique identifier for the checkpoint - created_at: + 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 + provider_id: type: string - format: date-time - description: >- - Timestamp when the checkpoint was created - epoch: - type: integer - description: >- - Training epoch when the checkpoint was saved - post_training_job_id: + title: Provider Id + description: ID of the provider that owns this resource + type: type: string - description: >- - Identifier of the training job that created this checkpoint - path: + const: shield + title: Type + default: shield + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - identifier + - provider_id + title: Shield + description: A safety shield resource that can be used to check content. + StringType: + properties: + type: type: string - description: >- - File system path where the checkpoint is stored - training_metrics: - $ref: '#/components/schemas/PostTrainingMetric' - description: >- - (Optional) Training metrics associated with this checkpoint - additionalProperties: false + const: string + title: Type + default: string + type: object + title: StringType + description: Parameter type for string values. + 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: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - PostTrainingJobArtifactsResponse: + - content + title: SystemMessage + description: A system message providing instructions or context to the model. + 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 + ToolDef: properties: - job_uuid: + toolgroup_id: + anyOf: + - type: string + - type: 'null' + title: Toolgroup Id + name: type: string - description: Unique identifier for the training job - checkpoints: - type: array - items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false + title: Name + 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 + type: object required: - - job_uuid - - checkpoints - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingMetric: + - name + title: ToolDef + description: Tool definition used in runtime contexts. + ToolGroup: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + type: object + required: + - identifier + - provider_id + title: ToolGroup + description: A group of related tools managed together. + 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 + - type: 'null' + title: Content + error_message: + anyOf: + - type: string + - type: 'null' + title: Error Message + error_code: + anyOf: + - type: integer + - type: 'null' + title: Error Code + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata type: object + title: ToolInvocationResult + description: Result of a tool invocation. + TopKSamplingStrategy: properties: - epoch: + type: + type: string + const: top_k + title: Type + default: top_k + top_k: type: integer - description: Training epoch number - train_loss: - type: number - description: Loss value on the training dataset - validation_loss: - type: number - description: Loss value on the validation dataset - perplexity: - type: number - description: >- - Perplexity metric indicating model confidence - additionalProperties: false - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: >- - Training metrics captured during post-training jobs. - CancelTrainingJobRequest: + 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. + TopPSamplingStrategy: properties: - job_uuid: + type: type: string - description: The UUID of the job to cancel. - additionalProperties: false + const: top_p + title: Type + default: top_p + temperature: + anyOf: + - type: number + minimum: 0.0 + - type: 'null' + title: Temperature + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + default: 0.95 + type: object required: - - job_uuid - title: CancelTrainingJobRequest - PostTrainingJobStatusResponse: + - temperature + title: TopPSamplingStrategy + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. + 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: + anyOf: + - type: integer + - type: 'null' + title: Max Validation Steps + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + - type: 'null' + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + - type: 'null' + efficiency_config: + anyOf: + - $ref: '#/components/schemas/EfficiencyConfig' + - type: 'null' + dtype: + anyOf: + - type: string + - type: 'null' + title: Dtype + default: bf16 type: object + required: + - n_epochs + title: TrainingConfig + description: Comprehensive configuration for the training process. + URIDataSource: properties: - job_uuid: - type: string - description: Unique identifier for the training job - status: + type: type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current status of the training job - scheduled_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the job was scheduled - started_at: + const: uri + title: Type + default: uri + uri: type: string - format: date-time - description: >- - (Optional) Timestamp when the job execution began - completed_at: + title: Uri + type: object + required: + - uri + title: URIDataSource + description: A dataset that can be obtained from a URI. + URL: + properties: + uri: type: string - format: date-time - description: >- - (Optional) Timestamp when the job finished, if completed - resources_allocated: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Information about computational resources allocated to the - job - checkpoints: - type: array - items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false + title: Uri + type: object required: - - job_uuid - - status - - checkpoints - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - ListPostTrainingJobsResponse: + - uri + title: URL + description: A URL reference to external content. + UnionType: + properties: + type: + type: string + const: union + title: Type + default: union type: object + title: UnionType + description: Parameter type for union values. + VectorStoreChunkingStrategyAuto: properties: - data: - type: array - items: - type: object - properties: - job_uuid: - type: string - additionalProperties: false - required: - - job_uuid - title: PostTrainingJob - additionalProperties: false - required: - - data - title: ListPostTrainingJobsResponse - DPOAlignmentConfig: + type: + type: string + const: auto + title: Type + default: auto type: object + title: VectorStoreChunkingStrategyAuto + description: Automatic chunking strategy for vector store files. + VectorStoreChunkingStrategyStatic: properties: - beta: - type: number - description: Temperature parameter for the DPO loss - loss_type: - $ref: '#/components/schemas/DPOLossType' - default: sigmoid - description: The type of loss function to use for DPO - additionalProperties: false + type: + type: string + const: static + title: Type + default: static + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + type: object required: - - beta - - loss_type - title: DPOAlignmentConfig - description: >- - Configuration for Direct Preference Optimization (DPO) alignment. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: + - static + title: VectorStoreChunkingStrategyStatic + description: Static chunking strategy with configurable parameters. + 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. + VectorStoreContent: properties: - dataset_id: + type: type: string - description: >- - Unique identifier for the training dataset - batch_size: - type: integer - description: Number of samples per training batch - shuffle: - type: boolean - description: >- - Whether to shuffle the dataset during training - data_format: - $ref: '#/components/schemas/DatasetFormat' - description: >- - Format of the dataset (instruct or dialog) - validation_dataset_id: + const: text + title: Type + text: type: string - description: >- - (Optional) Unique identifier for the validation dataset - packed: - type: boolean - default: false - description: >- - (Optional) Whether to pack multiple samples into a single sequence for - efficiency - train_on_input: - type: boolean - default: false - description: >- - (Optional) Whether to compute loss on input tokens as well as output tokens - additionalProperties: false - required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: >- - Configuration for training data and data loading. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - EfficiencyConfig: + title: Text type: object + required: + - type + - text + title: VectorStoreContent + description: Content item from a vector store file or search result. + VectorStoreDeleteResponse: properties: - enable_activation_checkpointing: - type: boolean - default: false - description: >- - (Optional) Whether to use activation checkpointing to reduce memory usage - enable_activation_offloading: - type: boolean - default: false - description: >- - (Optional) Whether to offload activations to CPU to save GPU memory - memory_efficient_fsdp_wrap: - type: boolean - default: false - description: >- - (Optional) Whether to use memory-efficient FSDP wrapping - fsdp_cpu_offload: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.deleted + deleted: type: boolean - default: false - description: >- - (Optional) Whether to offload FSDP parameters to CPU - additionalProperties: false - title: EfficiencyConfig - description: >- - Configuration for memory and compute efficiency optimizations. - OptimizerConfig: + title: Deleted + default: true type: object + required: + - id + title: VectorStoreDeleteResponse + description: Response from deleting a vector store. + VectorStoreFileBatchObject: properties: - optimizer_type: - $ref: '#/components/schemas/OptimizerType' - description: >- - Type of optimizer to use (adam, adamw, or sgd) - lr: - type: number - description: Learning rate for the optimizer - weight_decay: - type: number - description: >- - Weight decay coefficient for regularization - num_warmup_steps: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.file_batch + created_at: type: integer - description: Number of steps for learning rate warmup - additionalProperties: false + 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: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: >- - Configuration parameters for the optimization algorithm. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: >- - Available optimizer algorithms for training. - TrainingConfig: + - id + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + description: OpenAI Vector Store File Batch object. + VectorStoreFileContentsResponse: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + attributes: + additionalProperties: true + type: object + title: Attributes + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + type: array + title: Content type: object + required: + - file_id + - filename + - attributes + - content + title: VectorStoreFileContentsResponse + description: Response from retrieving the contents of a vector store file. + VectorStoreFileCounts: properties: - n_epochs: + completed: type: integer - description: Number of training epochs to run - max_steps_per_epoch: + title: Completed + cancelled: type: integer - default: 1 - description: Maximum number of steps to run per epoch - gradient_accumulation_steps: + title: Cancelled + failed: type: integer - default: 1 - description: >- - Number of steps to accumulate gradients before updating - max_validation_steps: + title: Failed + in_progress: type: integer - default: 1 - description: >- - (Optional) Maximum number of validation steps per epoch - data_config: - $ref: '#/components/schemas/DataConfig' - description: >- - (Optional) Configuration for data loading and formatting - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - description: >- - (Optional) Configuration for the optimization algorithm - efficiency_config: - $ref: '#/components/schemas/EfficiencyConfig' - description: >- - (Optional) Configuration for memory and compute optimizations - dtype: + 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. + VectorStoreFileDeleteResponse: + properties: + id: type: string - default: bf16 - description: >- - (Optional) Data type for model parameters (bf16, fp16, fp32) - additionalProperties: false + title: Id + object: + type: string + title: Object + default: vector_store.file.deleted + deleted: + type: boolean + title: Deleted + default: true + type: object required: - - n_epochs - - max_steps_per_epoch - - gradient_accumulation_steps - title: TrainingConfig - description: >- - Comprehensive configuration for the training process. - PreferenceOptimizeRequest: + - id + title: VectorStoreFileDeleteResponse + description: Response from deleting a vector store file. + 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. + VectorStoreFileObject: properties: - job_uuid: + id: type: string - description: The UUID of the job to create. - finetuned_model: + title: Id + object: type: string - description: The model to fine-tune. - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - description: The algorithm configuration. - training_config: - $ref: '#/components/schemas/TrainingConfig' - description: The training configuration. - hyperparam_search_config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The hyperparam search configuration. - logger_config: + title: Object + default: vector_store.file + attributes: + additionalProperties: true type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The logger configuration. - additionalProperties: false - required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: PreferenceOptimizeRequest - PostTrainingJob: + 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: + anyOf: + - $ref: '#/components/schemas/VectorStoreFileLastError' + - type: 'null' + 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. + VectorStoreObject: properties: - job_uuid: + id: type: string - additionalProperties: false - required: - - job_uuid - title: PostTrainingJob - AlgorithmConfig: - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - - $ref: '#/components/schemas/QATFinetuningConfig' - discriminator: - propertyName: type - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - LoraFinetuningConfig: + title: Id + object: + type: string + title: Object + default: vector_store + created_at: + type: integer + title: Created At + name: + anyOf: + - type: string + - type: 'null' + title: Name + usage_bytes: + type: integer + title: Usage Bytes + default: 0 + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + type: string + title: Status + default: completed + 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 + type: object + title: Metadata type: object + required: + - id + - created_at + - file_counts + title: VectorStoreObject + description: OpenAI Vector Store object. + VectorStoreSearchResponse: properties: - type: + file_id: type: string - const: LoRA - default: LoRA - description: Algorithm type identifier, always "LoRA" - lora_attn_modules: + title: File Id + filename: + type: string + title: Filename + score: + type: number + title: Score + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + type: object + - type: 'null' + title: Attributes + 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. + VectorStoreSearchResponsePage: + properties: + object: + type: string + title: Object + default: vector_store.search_results.page + search_query: items: type: string - description: >- - List of attention module names to apply LoRA to - apply_lora_to_mlp: - type: boolean - description: Whether to apply LoRA to MLP layers - apply_lora_to_output: - type: boolean - description: >- - Whether to apply LoRA to output projection layers - rank: - type: integer - description: >- - Rank of the LoRA adaptation (lower rank = fewer parameters) - alpha: - type: integer - description: >- - LoRA scaling parameter that controls adaptation strength - use_dora: - type: boolean - default: false - description: >- - (Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation) - quantize_base: + type: array + title: Search Query + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + type: array + title: Data + has_more: type: boolean + title: Has More default: false - description: >- - (Optional) Whether to quantize the base model weights - additionalProperties: false - required: - - type - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: >- - Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - QATFinetuningConfig: + next_page: + anyOf: + - type: string + - type: 'null' + title: Next Page type: object + required: + - search_query + - data + title: VectorStoreSearchResponsePage + description: Paginated response from searching a vector store. + VersionInfo: properties: - type: - type: string - const: QAT - default: QAT - description: Algorithm type identifier, always "QAT" - quantizer_name: + version: type: string - description: >- - Name of the quantization algorithm to use - group_size: - type: integer - description: Size of groups for grouped quantization - additionalProperties: false + title: Version + type: object required: - - type - - quantizer_name - - group_size - title: QATFinetuningConfig - description: >- - Configuration for Quantization-Aware Training (QAT) fine-tuning. - SupervisedFineTuneRequest: + - version + title: VersionInfo + description: Version information for the service. + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: Severity level of a safety violation. + _URLOrData: + properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + data: + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + title: Data + type: object + title: _URLOrData + description: A URL or a base64 encoded string + _datasets_Request: + properties: + purpose: + title: Purpose + source: + title: Source + metadata: + title: Metadata + dataset_id: + title: Dataset Id + type: object + required: + - purpose + - source + title: _datasets_Request + _eval_benchmarks_benchmark_id_evaluations_Request: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' type: object + required: + - input_rows + - scoring_functions + - benchmark_config + title: _eval_benchmarks_benchmark_id_evaluations_Request + _inference_rerank_Request: + properties: + model: + type: string + title: Model + query: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: Query + items: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + type: array + title: Items + max_num_results: + anyOf: + - type: integer + - type: 'null' + title: Max Num Results + type: object + required: + - model + - query + - items + title: _inference_rerank_Request + _post_training_preference_optimize_Request: properties: job_uuid: type: string - description: The UUID of the job to create. + title: Job Uuid + finetuned_model: + type: string + title: Finetuned Model + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' training_config: $ref: '#/components/schemas/TrainingConfig' - description: The training configuration. hyperparam_search_config: + additionalProperties: true type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The hyperparam search configuration. + title: Hyperparam Search Config logger_config: + additionalProperties: true type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The logger configuration. - model: - type: string - description: The model to fine-tune. - checkpoint_dir: - type: string - description: The directory to save checkpoint(s) to. - algorithm_config: - $ref: '#/components/schemas/AlgorithmConfig' - description: The algorithm configuration. - additionalProperties: false + title: Logger Config + type: object required: - job_uuid - training_config @@ -2266,8 +5549,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: @@ -2275,11 +5557,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: @@ -2287,38 +5567,10 @@ 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: $ref: '#/components/schemas/Error' - example: - status: 0 - title: Error - detail: An unexpected error occurred -security: - - Default: [] -tags: - - name: Benchmarks - description: '' - - name: DatasetIO - description: '' - - name: Datasets - description: '' - - name: Eval - description: >- - Llama Stack Evaluation API for running evaluations on model and agent candidates. - x-displayName: Evaluations - - name: PostTraining (Coming Soon) - description: '' -x-tagGroups: - - name: Operations - tags: - - Benchmarks - - DatasetIO - - Datasets - - Eval - - PostTraining (Coming Soon) diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index 66eda78c75..180215eebc 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -1,16 +1,16 @@ openapi: 3.1.0 info: title: Llama Stack Specification - version: v1 - description: >- + 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. + a set of endpoints and their corresponding interfaces that are + tailored to + best leverage Llama Models. - **✅ STABLE**: Production-ready APIs with backward compatibility guarantees. + **✅ STABLE**: Production-ready APIs with backward compatibility guarantees. + version: v1 servers: - - url: http://any-hosted-llama-stack.com +- url: http://any-hosted-llama-stack.com paths: /v1/batches: get: @@ -1340,136 +1340,82 @@ paths: deprecated: false /v1/providers/{provider_id}: get: - responses: - '200': - description: >- - A ProviderInfo object containing the provider's details. - content: - application/json: - schema: - $ref: '#/components/schemas/ProviderInfo' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - Providers - summary: Get provider. - description: >- + - Providers + summary: Inspect Provider + description: |- Get provider. Get detailed information about a specific provider. - parameters: - - name: provider_id - in: path - description: The ID of the provider to inspect. - required: true - schema: - type: string - deprecated: false - /v1/responses: - get: + operationId: inspect_provider_v1_providers__provider_id__get responses: '200': - description: A ListOpenAIResponseObject. + description: A ProviderInfo object containing the provider's details. content: application/json: schema: - $ref: '#/components/schemas/ListOpenAIResponseObject' + $ref: '#/components/schemas/ProviderInfo' '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: List all responses. - description: List all responses. parameters: - - name: after - in: query - description: The ID of the last response to return. - required: false - schema: - type: string - - name: limit - in: query - description: The number of responses to return. - required: false - schema: - type: integer - - name: model - in: query - description: The model to filter responses by. - required: false - schema: - type: string - - name: order - in: query - description: >- - The order to sort responses by when sorted by created_at ('asc' or 'desc'). - required: false - schema: - $ref: '#/components/schemas/Order' - deprecated: false - post: + - name: provider_id + in: path + required: true + schema: + type: string + description: 'Path parameter: provider_id' + /v1/providers: + get: + tags: + - Providers + summary: List Providers + description: |- + List providers. + + List all available providers. + operationId: list_providers_v1_providers_get responses: '200': - description: An OpenAIResponseObject. + description: A ListProvidersResponse containing information about all providers. content: application/json: schema: - $ref: '#/components/schemas/OpenAIResponseObject' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIResponseObjectStream' + $ref: '#/components/schemas/ListProvidersResponse' '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/responses: + post: tags: - - Agents - summary: Create a model response. + - Agents + summary: Create Openai Response description: Create a model response. - parameters: [] + operationId: create_openai_response_v1_responses_post requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/CreateOpenaiResponseRequest' - required: true - deprecated: false - x-llama-stack-extra-body-params: - - name: guardrails - schema: - type: array - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ResponseGuardrailSpec' - description: >- - List of guardrails to apply during response generation. Guardrails provide - safety and content moderation. - required: false - /v1/responses/{response_id}: - get: + $ref: '#/components/schemas/_responses_Request' responses: '200': description: An OpenAIResponseObject. @@ -1479,2783 +1425,10283 @@ paths: $ref: '#/components/schemas/OpenAIResponseObject' '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' + description: Default Response + get: tags: - - Agents - summary: Get a model response. - description: Get a model response. + - Agents + summary: List Openai Responses + description: List all responses. + operationId: list_openai_responses_v1_responses_get parameters: - - name: response_id - in: path - description: >- - The ID of the OpenAI response to retrieve. - required: true - schema: - type: string - deprecated: false - delete: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 50 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order responses: '200': - description: An OpenAIDeleteResponseObject + description: A ListOpenAIResponseObject. content: application/json: schema: - $ref: '#/components/schemas/OpenAIDeleteResponseObject' + $ref: '#/components/schemas/ListOpenAIResponseObject' '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: Delete a response. - description: Delete a response. - parameters: - - name: response_id - in: path - description: The ID of the OpenAI response to delete. - required: true - schema: - type: string - deprecated: false - /v1/responses/{response_id}/input_items: + description: Default Response + /v1/responses/{response_id}: get: + tags: + - Agents + summary: Get Openai Response + description: Get a model response. + operationId: get_openai_response_v1_responses__response_id__get responses: '200': - description: An ListOpenAIResponseInputItem. + description: An OpenAIResponseObject. content: application/json: schema: - $ref: '#/components/schemas/ListOpenAIResponseInputItem' + $ref: '#/components/schemas/OpenAIResponseObject' '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: List input items. - description: List input items. parameters: - - name: response_id - in: path - description: >- - The ID of the response to retrieve input items for. - required: true - schema: - type: string - - name: after - in: query - description: >- - An item ID to list items after, used for pagination. - required: false - schema: - type: string - - name: before - in: query - description: >- - An item ID to list items before, used for pagination. - required: false - schema: - type: string - - name: include - in: query - description: >- - Additional fields to include in the response. - required: false - schema: - type: array - items: - type: string - - name: limit - in: query - description: >- - A limit on the number of objects to be returned. Limit can range between - 1 and 100, and the default is 20. - required: false - schema: - type: integer - - name: order - in: query - description: >- - The order to return the input items in. Default is desc. - required: false - schema: - $ref: '#/components/schemas/Order' - deprecated: false - /v1/safety/run-shield: - post: + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + delete: + tags: + - Agents + summary: Delete Openai Response + description: Delete a response. + operationId: delete_openai_response_v1_responses__response_id__delete responses: '200': - description: A RunShieldResponse. + description: An OpenAIDeleteResponseObject content: application/json: schema: - $ref: '#/components/schemas/RunShieldResponse' + $ref: '#/components/schemas/OpenAIDeleteResponseObject' '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: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + /v1/responses/{response_id}/input_items: + get: tags: - - Safety - summary: Run shield. - description: >- - Run shield. - - Run a shield. - parameters: [] + - Agents + summary: List Openai Response Input Items + description: List input items. + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' requestBody: content: application/json: schema: - $ref: '#/components/schemas/RunShieldRequest' - required: true - deprecated: false - /v1/scoring-functions: - get: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Include responses: '200': - description: A ListScoringFunctionsResponse. + description: An ListOpenAIResponseInputItem. content: application/json: schema: - $ref: '#/components/schemas/ListScoringFunctionsResponse' + $ref: '#/components/schemas/ListOpenAIResponseInputItem' '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: - - ScoringFunctions - summary: List all scoring functions. - description: List all scoring functions. - parameters: [] - deprecated: false - /v1/scoring-functions/{scoring_fn_id}: + description: Default Response + /v1/chat/completions/{completion_id}: get: + tags: + - Inference + summary: Get Chat Completion + description: |- + Get chat completion. + + Describe a chat completion by its ID. + operationId: get_chat_completion_v1_chat_completions__completion_id__get responses: '200': - description: A ScoringFn. + description: A OpenAICompletionWithInputMessages. content: application/json: schema: - $ref: '#/components/schemas/ScoringFn' + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' '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: completion_id + in: path + required: true + schema: + type: string + description: 'Path parameter: completion_id' + /v1/chat/completions: + get: tags: - - ScoringFunctions - summary: Get a scoring function by its ID. - description: Get a scoring function by its ID. + - Inference + summary: List Chat Completions + description: List chat completions. + operationId: list_chat_completions_v1_chat_completions_get parameters: - - name: scoring_fn_id - in: path - description: The ID of the scoring function to get. - required: true - schema: - type: string - deprecated: false - /v1/scoring/score: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + 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: + - Inference + summary: Openai Chat Completion + description: |- + Create chat completions. + + Generate an OpenAI-compatible chat completion for the given messages using the specified model. + operationId: openai_chat_completion_v1_chat_completions_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody' responses: '200': - description: >- - A ScoreResponse object containing rows and aggregated results. + description: An OpenAIChatCompletion. content: application/json: schema: - $ref: '#/components/schemas/ScoreResponse' + $ref: '#/components/schemas/OpenAIChatCompletion' '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' + description: Default Response + /v1/completions: + post: tags: - - Scoring - summary: Score a list of rows. - description: Score a list of rows. - parameters: [] + - Inference + summary: Openai Completion + description: |- + Create completion. + + Generate an OpenAI-compatible completion for the given prompt using the specified model. + operationId: openai_completion_v1_completions_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/ScoreRequest' + $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' required: true - deprecated: false - /v1/scoring/score-batch: - post: responses: '200': - description: A ScoreBatchResponse. + description: An OpenAICompletion. content: application/json: schema: - $ref: '#/components/schemas/ScoreBatchResponse' + $ref: '#/components/schemas/OpenAICompletion' '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/embeddings: + post: tags: - - Scoring - summary: Score a batch of rows. - description: Score a batch of rows. - parameters: [] + - Inference + summary: Openai Embeddings + description: |- + Create embeddings. + + Generate OpenAI-compatible embeddings for the given input using the specified model. + operationId: openai_embeddings_v1_embeddings_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/ScoreBatchRequest' + $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' required: true - deprecated: false - /v1/shields: - get: responses: '200': - description: A ListShieldsResponse. + description: An OpenAIEmbeddingsResponse containing the embeddings. content: application/json: schema: - $ref: '#/components/schemas/ListShieldsResponse' + $ref: '#/components/schemas/OpenAIEmbeddingsResponse' '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: - - Shields - summary: List all shields. - description: List all shields. - parameters: [] - deprecated: false - /v1/shields/{identifier}: + /v1/health: get: + tags: + - Inspect + summary: Health + description: |- + Get health status. + + Get the current health status of the service. + operationId: health_v1_health_get responses: '200': - description: A Shield. + description: Health information indicating if the service is operational. content: application/json: schema: - $ref: '#/components/schemas/Shield' + $ref: '#/components/schemas/HealthInfo' '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/inspect/routes: + get: tags: - - Shields - summary: Get a shield by its identifier. - description: Get a shield by its identifier. + - Inspect + summary: List Routes + description: |- + List routes. + + List all available API routes with their methods and implementing providers. + operationId: list_routes_v1_inspect_routes_get parameters: - - name: identifier - in: path - description: The identifier of the shield to get. - required: true - schema: + - name: api_filter + in: query + required: false + schema: + anyOf: + - enum: + - v1 + - v1alpha + - v1beta + - deprecated type: string - deprecated: false - /v1/tool-runtime/invoke: - post: + - type: 'null' + title: Api Filter responses: '200': - description: A ToolInvocationResult. + description: Response containing information about all available routes. content: application/json: schema: - $ref: '#/components/schemas/ToolInvocationResult' + $ref: '#/components/schemas/ListRoutesResponse' '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: - - ToolRuntime - summary: Run a tool with the given arguments. - description: Run a tool with the given arguments. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeToolRequest' - required: true - deprecated: false - /v1/tool-runtime/list-tools: + description: Default Response + /v1/version: get: + tags: + - Inspect + summary: Version + description: |- + Get version. + + Get the version of the service. + operationId: version_v1_version_get responses: '200': - description: A ListToolDefsResponse. + description: Version information containing the service version number. content: application/json: schema: - $ref: '#/components/schemas/ListToolDefsResponse' + $ref: '#/components/schemas/VersionInfo' '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/{batch_id}/cancel: + post: tags: - - ToolRuntime - summary: List all tools in the runtime. - description: List all tools in the runtime. - parameters: - - name: tool_group_id - in: query - description: >- - The ID of the tool group to list tools for. - required: false - schema: - type: string - - name: mcp_endpoint - in: query - description: >- - The MCP endpoint to use for the tool group. - required: false - schema: - $ref: '#/components/schemas/URL' - deprecated: false - /v1/toolgroups: - get: + - Batches + summary: Cancel Batch + description: Cancel a batch that is in progress. + operationId: cancel_batch_v1_batches__batch_id__cancel_post responses: '200': - description: A ListToolGroupsResponse. + description: The updated batch object. content: application/json: schema: - $ref: '#/components/schemas/ListToolGroupsResponse' + $ref: '#/components/schemas/Batch' '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: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' + /v1/batches: + post: tags: - - ToolGroups - summary: List tool groups with optional provider. - description: List tool groups with optional provider. - parameters: [] - deprecated: false - /v1/toolgroups/{toolgroup_id}: - get: + - Batches + summary: Create Batch + description: Create a new batch for processing multiple API requests. + operationId: create_batch_v1_batches_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_batches_Request' responses: '200': - description: A ToolGroup. + description: The created batch object. content: application/json: schema: - $ref: '#/components/schemas/ToolGroup' + $ref: '#/components/schemas/Batch' '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' + description: Default Response + get: tags: - - ToolGroups - summary: Get a tool group by its ID. - description: Get a tool group by its ID. + - Batches + summary: List Batches + description: List all batches for the current user. + operationId: list_batches_v1_batches_get parameters: - - name: toolgroup_id - in: path - description: The ID of the tool group to get. - required: true - schema: - type: string - deprecated: false - /v1/tools: - get: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit responses: '200': - description: A ListToolDefsResponse. + description: A list of batch objects. content: application/json: schema: - $ref: '#/components/schemas/ListToolDefsResponse' + $ref: '#/components/schemas/ListBatchesResponse' '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: - - ToolGroups - summary: List tools with optional tool group. - description: List tools with optional tool group. - parameters: - - name: toolgroup_id - in: query - description: >- - The ID of the tool group to list tools for. - required: false - schema: - type: string - deprecated: false - /v1/tools/{tool_name}: + description: Default Response + /v1/batches/{batch_id}: get: + tags: + - Batches + summary: Retrieve Batch + description: Retrieve information about a specific batch. + operationId: retrieve_batch_v1_batches__batch_id__get responses: '200': - description: A ToolDef. + description: The batch object. content: application/json: schema: - $ref: '#/components/schemas/ToolDef' + $ref: '#/components/schemas/Batch' '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: - - ToolGroups - summary: Get a tool by its name. - description: Get a tool by its name. parameters: - - name: tool_name - in: path - description: The name of the tool to get. - required: true - schema: - type: string - deprecated: false + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' /v1/vector-io/insert: post: - 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: - - VectorIO - summary: Insert chunks into a vector database. + - Vector Io + summary: Insert Chunks description: Insert chunks into a vector database. - parameters: [] + operationId: insert_chunks_v1_vector_io_insert_post requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/InsertChunksRequest' - required: true - deprecated: false - /v1/vector-io/query: - post: + type: array + items: + $ref: '#/components/schemas/Chunk-Input' + title: Chunks responses: '200': - description: A QueryChunksResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/QueryChunksResponse' + 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' + description: Default Response + /v1/vector_stores/{vector_store_id}/files: + post: tags: - - VectorIO - summary: Query chunks from a vector database. - description: Query chunks from a vector database. - parameters: [] + - Vector Io + summary: Openai Attach File To Vector Store + description: Attach a file to a vector store. + 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/QueryChunksRequest' - required: true - deprecated: false - /v1/vector_stores: - get: + $ref: '#/components/schemas/_vector_stores_vector_store_id_files_Request' responses: '200': - description: >- - A VectorStoreListResponse containing the list of vector stores. + description: A VectorStoreFileObject representing the attached file. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreListResponse' + $ref: '#/components/schemas/VectorStoreFileObject' '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' + description: Default Response + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + get: tags: - - VectorIO - summary: Returns a list of vector stores. - description: Returns a list of vector stores. + - Vector Io + summary: Openai List Files In Vector Store + description: List files in a vector store. + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get parameters: - - name: limit - in: query - description: >- - A limit on the number of objects to be returned. Limit can range between - 1 and 100, and the default is 20. - required: false - schema: - type: integer - - name: order - in: query - description: >- - Sort order by the `created_at` timestamp of the objects. `asc` for ascending - order and `desc` for descending order. - required: false - schema: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: filter + in: query + required: false + schema: + anyOf: + - const: completed type: string - - name: after - in: query - description: >- - A cursor for use in pagination. `after` is an object ID that defines your - place in the list. - required: false - schema: + - const: in_progress type: string - - name: before - in: query - description: >- - A cursor for use in pagination. `before` is an object ID that defines - your place in the list. - required: false - schema: + - const: cancelled type: string - deprecated: false + - const: failed + type: string + - type: 'null' + title: Filter + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + 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 + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: post: + tags: + - Vector Io + summary: Openai Cancel Vector Store File Batch + description: Cancels a vector store file batch. + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post responses: '200': - description: >- - A VectorStoreObject representing the created vector store. + description: A VectorStoreFileBatchObject representing the cancelled file batch. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '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: 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: + post: tags: - - VectorIO - summary: Creates a vector store. - description: >- + - Vector Io + summary: Openai Create Vector Store + description: |- Creates a vector store. Generate an OpenAI-compatible vector store with the given parameters. - parameters: [] + operationId: openai_create_vector_store_v1_vector_stores_post requestBody: + required: true content: application/json: schema: $ref: '#/components/schemas/OpenAICreateVectorStoreRequestWithExtraBody' - required: true - deprecated: false - /v1/vector_stores/{vector_store_id}: - get: responses: '200': - description: >- - A VectorStoreObject representing the vector store. + 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 + $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' + description: Default Response + get: tags: - - VectorIO - summary: Retrieves a vector store. - description: Retrieves a vector store. + - Vector Io + summary: Openai List Vector Stores + description: Returns a list of vector stores. + operationId: openai_list_vector_stores_v1_vector_stores_get parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to retrieve. - required: true - schema: - type: string - deprecated: false - post: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order responses: '200': - description: >- - A VectorStoreObject representing the updated vector store. + description: A VectorStoreListResponse containing the list of vector stores. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: '#/components/schemas/VectorStoreListResponse' '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' + description: Default Response + /v1/vector_stores/{vector_store_id}/file_batches: + post: tags: - - VectorIO - summary: Updates a vector store. - description: Updates a vector store. - parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to update. - required: true - schema: - type: string + - Vector Io + summary: Openai Create Vector Store File Batch + description: |- + Create a vector store file batch. + + Generate an OpenAI-compatible vector store file batch for the given vector store. + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenaiUpdateVectorStoreRequest' + $ref: '#/components/schemas/OpenAICreateVectorStoreFileBatchRequestWithExtraBody' required: true - deprecated: false - delete: responses: '200': - description: >- - A VectorStoreDeleteResponse indicating the deletion status. + description: A VectorStoreFileBatchObject representing the created file batch. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreDeleteResponse' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '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: - - VectorIO - summary: Delete a vector store. - description: Delete a vector store. parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to delete. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/file_batches: - post: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}: + get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store + description: Retrieves a vector store. + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get responses: '200': - description: >- - A VectorStoreFileBatchObject representing the created file batch. + description: A VectorStoreObject representing the vector store. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: '#/components/schemas/VectorStoreObject' '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: - - VectorIO - summary: Create a vector store file batch. - description: >- - Create a vector store file batch. - - Generate an OpenAI-compatible vector store file batch for the given vector - store. parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store to create the file batch for. - required: true - schema: - type: string + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + post: + tags: + - Vector Io + summary: Openai Update Vector Store + description: Updates a vector store. + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenAICreateVectorStoreFileBatchRequestWithExtraBody' + $ref: '#/components/schemas/_vector_stores_vector_store_id_Request' required: true - deprecated: false - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: - get: responses: '200': - description: >- - A VectorStoreFileBatchObject representing the file batch. + description: A VectorStoreObject representing the updated vector store. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: '#/components/schemas/VectorStoreObject' '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: - - VectorIO - summary: Retrieve a vector store file batch. - description: Retrieve a vector store file batch. parameters: - - name: batch_id - in: path - description: The ID of the file batch to retrieve. - required: true - schema: - type: string - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file batch. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: - post: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + delete: + tags: + - Vector Io + summary: Openai Delete Vector Store + description: Delete a vector store. + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete responses: '200': - description: >- - A VectorStoreFileBatchObject representing the cancelled file batch. + description: A VectorStoreDeleteResponse indicating the deletion status. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: '#/components/schemas/VectorStoreDeleteResponse' '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: - - VectorIO - summary: Cancels a vector store file batch. - description: Cancels a vector store file batch. parameters: - - name: batch_id - in: path - description: The ID of the file batch to cancel. - required: true - schema: - type: string - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file batch. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: + - 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}: get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store File + description: Retrieves a vector store file. + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get responses: '200': - description: >- - A VectorStoreFilesListInBatchResponse containing the list of files in - the batch. + description: A VectorStoreFileObject representing the file. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' + $ref: '#/components/schemas/VectorStoreFileObject' '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: - - VectorIO - summary: >- - Returns a list of vector store files in a batch. - description: >- - Returns a list of vector store files in a batch. parameters: - - name: batch_id - in: path - description: >- - The ID of the file batch to list files from. - required: true - schema: - type: string - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file batch. - required: true - schema: - type: string - - name: after - in: query - description: >- - A cursor for use in pagination. `after` is an object ID that defines your - place in the list. - required: false - schema: - type: string - - name: before - in: query - description: >- - A cursor for use in pagination. `before` is an object ID that defines - your place in the list. - required: false - schema: - type: string - - name: filter - in: query - description: >- - Filter by file status. One of in_progress, completed, failed, cancelled. - required: false - schema: - type: string - - name: limit - in: query - description: >- - A limit on the number of objects to be returned. Limit can range between - 1 and 100, and the default is 20. - required: false - schema: - type: integer - - name: order - in: query - description: >- - Sort order by the `created_at` timestamp of the objects. `asc` for ascending - order and `desc` for descending order. - required: false - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/files: - get: + - 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' + post: + tags: + - Vector Io + summary: Openai Update Vector Store File + description: Updates a vector store file. + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_files_file_id_Request' + required: true responses: '200': - description: >- - A VectorStoreListFilesResponse containing the list of files. + description: A VectorStoreFileObject representing the updated file. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreListFilesResponse' + $ref: '#/components/schemas/VectorStoreFileObject' '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: - - VectorIO - summary: List files in a vector store. - description: List files in a vector store. parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store to list files from. - required: true - schema: - type: string - - name: limit - in: query - description: >- - (Optional) A limit on the number of objects to be returned. Limit can - range between 1 and 100, and the default is 20. - required: false - schema: - type: integer - - name: order - in: query - description: >- - (Optional) Sort order by the `created_at` timestamp of the objects. `asc` - for ascending order and `desc` for descending order. - required: false - schema: - type: string - - name: after - in: query - description: >- - (Optional) A cursor for use in pagination. `after` is an object ID that - defines your place in the list. - required: false - schema: - type: string - - name: before - in: query - description: >- - (Optional) A cursor for use in pagination. `before` is an object ID that - defines your place in the list. - required: false - schema: - type: string - - name: filter - in: query - description: >- - (Optional) Filter by file status to only return files with the specified - status. - required: false - schema: - $ref: '#/components/schemas/VectorStoreFileStatus' - deprecated: false - post: + - 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' + delete: + tags: + - Vector Io + summary: Openai Delete Vector Store File + description: Delete a vector store file. + operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete responses: '200': - description: >- - A VectorStoreFileObject representing the attached file. + description: A VectorStoreFileDeleteResponse indicating the deletion status. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $ref: '#/components/schemas/VectorStoreFileDeleteResponse' '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: - - VectorIO - summary: Attach a file to a vector store. - description: Attach a file to a vector store. parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store to attach the file to. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenaiAttachFileToVectorStoreRequest' + - name: vector_store_id + in: path required: true - deprecated: false - /v1/vector_stores/{vector_store_id}/files/{file_id}: + 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}/file_batches/{batch_id}/files: get: + tags: + - Vector Io + summary: Openai List Files In Vector Store File Batch + description: Returns a list of vector store files in a batch. + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: filter + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Filter + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order + - 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' responses: '200': - description: >- - A VectorStoreFileObject representing the file. + description: A VectorStoreFilesListInBatchResponse containing the list of files in the batch. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' '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' + description: Default Response + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: + get: tags: - - VectorIO - summary: Retrieves a vector store file. - description: Retrieves a vector store file. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to retrieve. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to retrieve. - required: true - schema: - type: string - deprecated: false - post: + - Vector Io + summary: Openai Retrieve Vector Store File Batch + description: Retrieve a vector store file batch. + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get responses: '200': - description: >- - A VectorStoreFileObject representing the updated file. + description: A VectorStoreFileBatchObject representing the file batch. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '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: 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}/files/{file_id}/content: + get: tags: - - VectorIO - summary: Updates a vector store file. - description: Updates a vector store file. + - Vector Io + summary: Openai Retrieve Vector Store File Contents + description: Retrieves the contents of a vector store file. + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get + responses: + '200': + description: A list of InterleavedContent representing the file contents. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileContentsResponse' + '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 - description: >- - The ID of the vector store containing the file to update. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to update. - required: true - schema: - type: string + - 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}/search: + post: + tags: + - Vector Io + summary: Openai Search Vector Store + description: |- + Search for chunks in a vector store. + + Searches a vector store for relevant chunks based on a query and optional file attribute filters. + operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenaiUpdateVectorStoreFileRequest' + $ref: '#/components/schemas/_vector_stores_vector_store_id_search_Request' required: true - deprecated: false - delete: responses: '200': - description: >- - A VectorStoreFileDeleteResponse indicating the deletion status. + description: A VectorStoreSearchResponse containing the search results. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileDeleteResponse' + $ref: '#/components/schemas/VectorStoreSearchResponsePage' '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: - - VectorIO - summary: Delete a vector store file. - description: Delete a vector store file. parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to delete. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to delete. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/files/{file_id}/content: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector-io/query: + post: + tags: + - Vector Io + summary: Query Chunks + description: Query chunks from a vector database. + 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/models/{model_id}: get: + tags: + - Models + summary: Get Model + description: |- + Get model. + + Get a model by its identifier. + operationId: get_model_v1_models__model_id__get responses: '200': - description: >- - File contents, optionally with embeddings and metadata based on query - parameters. + description: A Model. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileContentResponse' + $ref: '#/components/schemas/Model' '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: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' + delete: tags: - - VectorIO - summary: >- - Retrieves the contents of a vector store file. - description: >- - Retrieves the contents of a vector store file. + - Models + summary: Unregister Model + description: |- + Unregister model. + + Unregister a model. + operationId: unregister_model_v1_models__model_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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 - description: >- - The ID of the vector store containing the file to retrieve. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to retrieve. - required: true - schema: - type: string - - name: include_embeddings - in: query - description: >- - Whether to include embedding vectors in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - - name: include_metadata - in: query - description: >- - Whether to include chunk metadata in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - deprecated: false - /v1/vector_stores/{vector_store_id}/search: + - name: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' + /v1/models: + get: + tags: + - Models + summary: Openai List Models + description: List models using the OpenAI API. + operationId: openai_list_models_v1_models_get + responses: + '200': + description: A OpenAIListModelsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIListModelsResponse' + '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: + - Models + summary: Register Model + description: |- + Register model. + + Register a model. + operationId: register_model_v1_models_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_models_Request' + required: true responses: '200': - description: >- - A VectorStoreSearchResponse containing the search results. + description: A Model. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreSearchResponsePage' + $ref: '#/components/schemas/Model' '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/moderations: + post: tags: - - VectorIO - summary: Search for chunks in a vector store. - description: >- - Search for chunks in a vector store. + - Safety + summary: Run Moderation + description: |- + Create moderation. - Searches a vector store for relevant chunks based on a query and optional - file attribute filters. - parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to search. - required: true - schema: - type: string + Classifies if text and/or image inputs are potentially harmful. + operationId: run_moderation_v1_moderations_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenaiSearchVectorStoreRequest' + $ref: '#/components/schemas/_moderations_Request' required: true - deprecated: false - /v1/version: - get: responses: '200': - description: >- - Version information containing the service version number. + description: A moderation object. content: application/json: schema: - $ref: '#/components/schemas/VersionInfo' + $ref: '#/components/schemas/ModerationObject' '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/safety/run-shield: + post: tags: - - Inspect - summary: Get version. - description: >- - Get version. + - Safety + summary: Run Shield + description: |- + Run shield. - Get the version of the service. - parameters: [] - deprecated: false -jsonSchemaDialect: >- - https://json-schema.org/draft/2020-12/schema -components: - schemas: - Error: - type: object - properties: - status: - type: integer - description: HTTP status code - title: - type: string - description: >- - Error title, a short summary of the error which is invariant for an error - type - detail: - type: string + Run a shield. + 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/shields/{identifier}: + get: + tags: + - Shields + summary: Get Shield + description: Get a shield by its identifier. + operationId: get_shield_v1_shields__identifier__get + 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' + parameters: + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + delete: + tags: + - Shields + summary: Unregister Shield + description: Unregister a shield. + operationId: unregister_shield_v1_shields__identifier__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + /v1/shields: + get: + tags: + - Shields + summary: List Shields + description: List all shields. + 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: + - Shields + summary: Register Shield + description: Register a shield. + 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/scoring/score: + post: + tags: + - Scoring + summary: Score + description: Score a list of rows. + 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: + - Scoring + summary: Score Batch + description: Score a batch of rows. + 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/scoring-functions/{scoring_fn_id}: + get: + tags: + - Scoring Functions + summary: Get Scoring Function + description: Get a scoring function by its ID. + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get + responses: + '200': + description: A ScoringFn. + content: + application/json: + schema: + $ref: '#/components/schemas/ScoringFn' + '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: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' + delete: + tags: + - Scoring Functions + summary: Unregister Scoring Function + description: Unregister a scoring function. + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' + /v1/scoring-functions: + get: + tags: + - Scoring Functions + summary: List Scoring Functions + description: List all scoring functions. + 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' + tags: + - ScoringFunctions + summary: List all scoring functions. + description: List all scoring functions. + parameters: [] + deprecated: false + /v1/scoring-functions/{scoring_fn_id}: + get: + 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/tools/{tool_name}: + get: + tags: + - Tool Groups + summary: Get Tool + description: Get a tool by its name. + operationId: get_tool_v1_tools__tool_name__get + responses: + '200': + description: A ToolDef. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDef' + '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: scoring_fn_id + in: path + description: The ID of the scoring function to get. + required: true + schema: + type: string + deprecated: false + /v1/scoring/score: + post: + responses: + '200': description: >- - Error detail, a longer human-readable description of the error + A ScoreResponse object containing rows and aggregated results. + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Scoring + summary: Score a list of rows. + description: Score a list of rows. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreRequest' + required: true + deprecated: false + /v1/scoring/score-batch: + post: + responses: + '200': + description: A ScoreBatchResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreBatchResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Scoring + summary: Score a batch of rows. + description: Score a batch of rows. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreBatchRequest' + required: true + deprecated: false + /v1/shields: + get: + responses: + '200': + description: A ListShieldsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListShieldsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Shields + summary: List all shields. + description: List all shields. + parameters: [] + deprecated: false + /v1/shields/{identifier}: + get: + responses: + '200': + description: A Shield. + content: + application/json: + schema: + $ref: '#/components/schemas/Shield' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Shields + summary: Get a shield by its identifier. + description: Get a shield by its identifier. + parameters: + - name: identifier + in: path + description: The identifier of the shield to get. + required: true + schema: + type: string + deprecated: false + /v1/tool-runtime/invoke: + post: + responses: + '200': + description: A ToolInvocationResult. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolInvocationResult' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - ToolRuntime + summary: Run a tool with the given arguments. + description: Run a tool with the given arguments. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InvokeToolRequest' + required: true + deprecated: false + /v1/tool-runtime/list-tools: + get: + responses: + '200': + description: A ListToolDefsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListToolDefsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - ToolRuntime + summary: List all tools in the runtime. + description: List all tools in the runtime. + parameters: + - name: tool_group_id + in: query + description: >- + The ID of the tool group to list tools for. + required: false + schema: + type: string + - name: mcp_endpoint + in: query + description: >- + The MCP endpoint to use for the tool group. + required: false + schema: + $ref: '#/components/schemas/URL' + deprecated: false + /v1/toolgroups: + get: + tags: + - Tool Groups + summary: List Tool Groups + description: List tool groups with optional provider. + 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' + tags: + - ToolGroups + summary: List tool groups with optional provider. + description: List tool groups with optional provider. + parameters: [] + deprecated: false + /v1/toolgroups/{toolgroup_id}: + get: + 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: + - ToolGroups + summary: Get a tool group by its ID. + description: Get a tool group by its ID. + parameters: + - name: toolgroup_id + in: path + description: The ID of the tool group to get. + required: true + schema: + type: string + deprecated: false + /v1/tools: + get: + tags: + - Tool Groups + summary: List Tools + description: List tools with optional tool group. + operationId: list_tools_v1_tools_get + parameters: + - name: toolgroup_id + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + 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/tool-runtime/invoke: + post: + tags: + - Tool Runtime + summary: Invoke Tool + description: Run a tool with the given arguments. + 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: + - Tool Runtime + summary: List Runtime Tools + description: List all tools in the runtime. + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + parameters: + - name: tool_group_id + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Tool Group Id + requestBody: + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + title: Mcp Endpoint + 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/files/{file_id}: + get: + tags: + - Files + summary: Openai Retrieve File + description: |- + Retrieve file. + + Returns information about a specific file. + operationId: openai_retrieve_file_v1_files__file_id__get + responses: + '200': + description: An OpenAIFileObject containing file information. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileObject' + '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: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + delete: + tags: + - Files + summary: Openai Delete File + description: Delete file. + operationId: openai_delete_file_v1_files__file_id__delete + responses: + '200': + description: An OpenAIFileDeleteResponse indicating successful deletion. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileDeleteResponse' + '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: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + /v1/files: + get: + tags: + - Files + summary: Openai List Files + description: |- + List files. + + Returns a list of files that belong to the user's organization. + operationId: openai_list_files_v1_files_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 10000 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + - name: purpose + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/OpenAIFilePurpose' + - type: 'null' + title: Purpose + 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: + - Files + summary: Openai Upload File + description: |- + Upload file. + + Upload a file that can be used across various endpoints. + + The file upload should be a multipart form request with: + - file: The File object (not file name) to be uploaded. + - purpose: The intended purpose of the uploaded file. + - expires_after: Optional form values describing expiration for the file. + operationId: openai_upload_file_v1_files_post + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_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}/content: + get: + tags: + - Files + summary: Openai Retrieve File Content + description: |- + Retrieve file content. + + Returns the contents of the specified file. + operationId: openai_retrieve_file_content_v1_files__file_id__content_get + responses: + '200': + description: The raw file content as a binary response. + content: + application/json: + schema: {} + '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: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + /v1/prompts: + get: + tags: + - Prompts + summary: List Prompts + description: List all prompts. + 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: + - Prompts + summary: Create Prompt + description: |- + Create prompt. + + Create a new prompt. + 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: + - VectorIO + summary: Delete a vector store file. + description: Delete a vector store file. + parameters: + - name: vector_store_id + in: path + description: >- + The ID of the vector store containing the file to delete. + required: true + schema: + type: string + - name: file_id + in: path + description: The ID of the file to delete. + required: true + schema: + type: string + deprecated: false + /v1/vector_stores/{vector_store_id}/files/{file_id}/content: + get: + responses: + '200': + description: >- + File contents, optionally with embeddings and metadata based on query + parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileContentResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - VectorIO + summary: >- + Retrieves the contents of a vector store file. + description: >- + Retrieves the contents of a vector store file. + parameters: + - name: vector_store_id + in: path + description: >- + The ID of the vector store containing the file to retrieve. + required: true + schema: + type: string + - name: file_id + in: path + description: The ID of the file to retrieve. + required: true + schema: + type: string + - name: include_embeddings + in: query + description: >- + Whether to include embedding vectors in the response. + required: false + schema: + $ref: '#/components/schemas/bool' + - name: include_metadata + in: query + description: >- + Whether to include chunk metadata in the response. + required: false + schema: + $ref: '#/components/schemas/bool' + deprecated: false + /v1/vector_stores/{vector_store_id}/search: + post: + responses: + '200': + description: >- + A VectorStoreSearchResponse containing the search results. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreSearchResponsePage' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - VectorIO + summary: Search for chunks in a vector store. + description: >- + Search for chunks in a vector store. + + Delete a prompt. + operationId: delete_prompt_v1_prompts__prompt_id__delete + 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 + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + get: + tags: + - Prompts + summary: Get Prompt + description: |- + Get prompt. + + Get a prompt by its identifier and optional version. + operationId: get_prompt_v1_prompts__prompt_id__get + parameters: + - name: version + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Version + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + 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: + - Prompts + summary: Update Prompt + description: |- + Update prompt. + + Update an existing prompt (increments version). + 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: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/versions: + get: + tags: + - Prompts + summary: List Prompt Versions + description: |- + List prompt versions. + + List all versions of a specific prompt. + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get + responses: + '200': + description: A ListPromptsResponse containing all versions of the prompt. + 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' + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/set-default-version: + post: + tags: + - Prompts + summary: Set Default Version + description: |- + Set prompt version. + + Set which version of a prompt should be the default in get_prompt (latest). + 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/conversations/{conversation_id}/items: + post: + tags: + - Conversations + summary: Add Items + description: |- + Create items. + + Create items in the conversation. + 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' + get: + tags: + - Conversations + summary: List Items + description: |- + List items. + + List items in the conversation. + operationId: list_items_v1_conversations__conversation_id__items_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - enum: + - asc + - desc + type: string + - type: 'null' + title: Order + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + requestBody: + content: + application/json: + schema: + anyOf: + - type: array + items: + $ref: '#/components/schemas/ConversationItemInclude' + - type: 'null' + title: Include + 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 + /v1/conversations: + post: + tags: + - Conversations + summary: Create Conversation + description: |- + Create a conversation. + + Create a conversation. + 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}: + get: + tags: + - Conversations + summary: Get Conversation + description: |- + Retrieve a conversation. + + Get a conversation with the given ID. + operationId: get_conversation_v1_conversations__conversation_id__get + responses: + '200': + description: The 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' + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + post: + tags: + - Conversations + summary: Update Conversation + description: |- + Update a conversation. + + Update a conversation's metadata with the given ID. + operationId: update_conversation_v1_conversations__conversation_id__post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_conversations_conversation_id_Request' + required: true + responses: + '200': + description: The updated 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' + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + delete: + tags: + - Conversations + summary: Openai Delete Conversation + description: |- + Delete a conversation. + + Delete a conversation with the given ID. + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete + responses: + '200': + description: The deleted conversation resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationDeletedResource' + '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: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items/{item_id}: + get: + tags: + - Conversations + summary: Retrieve + description: |- + Retrieve an item. + + Retrieve a conversation item. + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get + responses: + '200': + description: The conversation item. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseMessage' + '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: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + - name: item_id + in: path + required: true + schema: + type: string + description: 'Path parameter: item_id' + delete: + tags: + - Conversations + summary: Openai Delete Conversation Item + description: |- + Delete an item. + + Delete a conversation item. + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete + responses: + '200': + description: The deleted item resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationItemDeletedResource' + '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: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + - name: item_id + in: path + required: true + schema: + type: string + description: 'Path parameter: item_id' +components: + schemas: + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: Types of aggregation functions for scoring results. + AllowedToolsFilter: + properties: + tool_names: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Tool Names + type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ArrayType: + properties: + type: + type: string + const: array + title: Type + default: array + type: object + title: ArrayType + description: Parameter type for array values. + 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. + 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: + anyOf: + - type: integer + - type: 'null' + title: Cancelled At + cancelling_at: + anyOf: + - type: integer + - type: 'null' + title: Cancelling At + completed_at: + anyOf: + - type: integer + - type: 'null' + title: Completed At + error_file_id: + anyOf: + - type: string + - type: 'null' + title: Error File Id + errors: + anyOf: + - $ref: '#/components/schemas/Errors' + - type: 'null' + expired_at: + anyOf: + - type: integer + - type: 'null' + title: Expired At + expires_at: + anyOf: + - type: integer + - type: 'null' + title: Expires At + failed_at: + anyOf: + - type: integer + - type: 'null' + title: Failed At + finalizing_at: + anyOf: + - type: integer + - type: 'null' + title: Finalizing At + in_progress_at: + anyOf: + - type: integer + - type: 'null' + title: In Progress At + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + model: + anyOf: + - type: string + - type: 'null' + title: Model + output_file_id: + anyOf: + - type: string + - type: 'null' + title: Output File Id + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + - type: 'null' + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + - type: 'null' + additionalProperties: true + type: object + required: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + BatchError: + properties: + code: + anyOf: + - type: string + - type: 'null' + title: Code + line: + anyOf: + - type: integer + - type: 'null' + title: Line + message: + anyOf: + - type: string + - type: 'null' + title: Message + param: + anyOf: + - type: string + - type: 'null' + title: Param + 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: + anyOf: + - type: string + - type: 'null' + title: Provider Resource Id + description: Unique identifier for this resource in the provider + 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. + BenchmarkConfig: + properties: + eval_candidate: + $ref: '#/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: + 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: object + required: + - eval_candidate + title: BenchmarkConfig + description: A benchmark configuration for evaluation. + Body_openai_upload_file_v1_files_post: + properties: + file: + type: string + format: binary + title: File + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + expires_after: + anyOf: + - $ref: '#/components/schemas/ExpiresAfter' + - type: 'null' + type: object + required: + - file + - purpose + title: Body_openai_upload_file_v1_files_post + Body_register_scoring_function_v1_scoring_functions_post: + properties: + return_type: + anyOf: + - $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' + title: Return Type + 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 + type: object + required: + - return_type + title: Body_register_scoring_function_v1_scoring_functions_post + Body_register_tool_group_v1_toolgroups_post: + properties: + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + type: object + title: Body_register_tool_group_v1_toolgroups_post + BooleanType: + properties: + type: + type: string + const: boolean + title: Type + default: boolean + type: object + title: BooleanType + description: Parameter type for boolean values. + 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. + Chunk-Input: + 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 + title: Content + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Embedding + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + 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: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Embedding + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + ChunkMetadata: + 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 + type: object + title: 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. + CompletionInputType: + properties: + type: + type: string + const: completion_input + title: Type + default: completion_input + type: object + title: CompletionInputType + description: Parameter type for 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: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + 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. + items: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + title: Items + description: Initial items to include in the conversation context. You may add up to 20 items at a time. + type: object + required: + - id + - created_at + title: Conversation + description: OpenAI-compatible conversation object. + ConversationDeletedResource: + properties: + id: + type: string + title: Id + description: The deleted conversation identifier + object: + type: string + title: Object + description: Object type + default: conversation.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object + required: + - id + title: ConversationDeletedResource + description: Response for deleted conversation. + ConversationItemDeletedResource: + properties: + id: + type: string + title: Id + description: The deleted item identifier + object: + type: string + title: Object + description: Object type + default: conversation.item.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object + required: + - id + title: ConversationItemDeletedResource + description: Response for deleted conversation item. + 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: + anyOf: + - type: string + - type: 'null' + title: First Id + description: The ID of the first item in the list + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + description: The ID of the last item in the list + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Validation Dataset Id + packed: + anyOf: + - type: boolean + - type: 'null' + title: Packed + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + title: Train On Input + default: false + type: object + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: Configuration for training data and data loading. + Dataset: + properties: + identifier: + type: string + 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 + 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. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + 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. + EfficiencyConfig: + properties: + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + title: Enable Activation Checkpointing + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + title: Enable Activation Offloading + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + title: Memory Efficient Fsdp Wrap + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + title: Fsdp Cpu Offload + default: false + type: object + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. + Errors: + properties: + data: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + title: Data + object: + anyOf: + - type: string + - type: 'null' + title: Object + 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. + ExpiresAfter: + properties: + anchor: + type: string + const: created_at + title: Anchor + seconds: + type: integer + maximum: 2592000.0 + minimum: 3600.0 + title: Seconds + type: object + required: + - anchor + - seconds + title: 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) + 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. + HealthInfo: + properties: + status: + $ref: '#/components/schemas/HealthStatus' + type: object + required: + - status + title: HealthInfo + description: Health status information for 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 + 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 + 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. + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. + JsonType: + properties: + type: + type: string + const: json + title: Type + default: json + type: object + title: JsonType + description: Parameter type for JSON values. + LLMAsJudgeScoringFnParams: + properties: + type: + type: string + const: llm_as_judge + title: Type + default: llm_as_judge + judge_model: + type: string + title: Judge Model + prompt_template: + anyOf: + - type: string + - type: 'null' + title: Prompt Template + 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. + 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. + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + 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. + LoraFinetuningConfig: + properties: + type: + type: string + const: LoRA + title: Type + default: LoRA + lora_attn_modules: + items: + type: string + type: array + title: Lora Attn Modules + apply_lora_to_mlp: + type: boolean + title: Apply Lora To Mlp + apply_lora_to_output: + type: boolean + title: Apply Lora To Output + rank: + type: integer + title: Rank + alpha: + type: integer + title: Alpha + use_dora: + anyOf: + - type: boolean + - type: 'null' + title: Use Dora + default: false + quantize_base: + anyOf: + - type: boolean + - type: 'null' + title: Quantize Base + default: false + type: object + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + Model: + properties: + identifier: + type: string + 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 + 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. + ModelCandidate: + properties: + type: + type: string + const: model + title: Type + default: model + model: + type: string + title: Model + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + - type: 'null' + type: object + required: + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + ModelType: + type: string + enum: + - llm + - embedding + - rerank + title: ModelType + description: Enumeration of supported model types in Llama Stack. + 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. + ModerationObjectResults: + properties: + flagged: + type: boolean + title: Flagged + categories: + anyOf: + - additionalProperties: + type: boolean + type: object + - type: 'null' + title: Categories + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + title: Category Applied Input Types + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + title: Category Scores + user_message: + anyOf: + - type: string + - type: 'null' + title: User Message + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - flagged + title: ModerationObjectResults + description: A moderation object. + NumberType: + properties: + type: + type: string + const: number + title: Type + default: number + type: object + title: NumberType + description: Parameter type for numeric values. + ObjectType: + properties: + type: + type: string + const: object + title: Type + default: object + type: object + title: ObjectType + description: Parameter type for object values. + OpenAIAssistantMessageParam-Input: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + type: object + required: + - id + - choices + - created + - model + title: OpenAIChatCompletion + description: Response from an OpenAI-compatible chat completion request. + 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. + 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. + 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: + anyOf: + - type: number + - type: 'null' + title: Frequency Penalty + 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 + type: object + - type: 'null' + title: Logit Bias + logprobs: + anyOf: + - type: boolean + - type: 'null' + title: Logprobs + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Completion Tokens + max_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + n: + anyOf: + - type: integer + - type: 'null' + title: N + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + title: Parallel Tool Calls + presence_penalty: + anyOf: + - type: number + - type: 'null' + title: Presence Penalty + 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 + seed: + anyOf: + - type: integer + - type: 'null' + title: Seed + stop: + anyOf: + - type: string + - items: + type: string + type: array + - type: 'null' + title: Stop + stream: + anyOf: + - type: boolean + - type: 'null' + title: Stream + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Stream Options + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + 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 + top_logprobs: + anyOf: + - type: integer + - type: 'null' + title: Top Logprobs + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + user: + anyOf: + - type: string + - type: 'null' + title: User + additionalProperties: true + type: object + required: + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible chat completion endpoint. + OpenAIChatCompletionToolCall: + properties: + index: + anyOf: + - type: integer + - type: 'null' + title: Index + id: + anyOf: + - type: string + - type: 'null' + title: Id + type: + type: string + const: function + title: Type + default: function + function: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + - type: 'null' + type: object + title: OpenAIChatCompletionToolCall + description: Tool call specification for OpenAI-compatible chat completion responses. + OpenAIChatCompletionToolCallFunction: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + arguments: + anyOf: + - type: string + - type: 'null' + title: Arguments + type: object + title: OpenAIChatCompletionToolCallFunction + description: Function call details for OpenAI-compatible tool calls. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + - type: 'null' + completion_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + - type: 'null' + type: object + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage + description: Usage information for OpenAI chat completion. + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + title: Reasoning Tokens + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + title: Cached Tokens + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + - type: 'null' + type: object + required: + - message + - finish_reason + - index + title: OpenAIChoice + description: A choice from an OpenAI-compatible chat completion response. + OpenAIChoiceLogprobs-Output: + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + type: object + title: OpenAIChoiceLogprobs + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + 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. + + :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" + OpenAICompletionChoice-Output: + properties: + finish_reason: + type: string + title: Finish Reason + text: + type: string + title: Text + index: + type: integer + title: Index + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + - type: 'null' + type: object + required: + - finish_reason + - text + - index + title: 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 + 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: + anyOf: + - type: integer + - type: 'null' + title: Best Of + echo: + anyOf: + - type: boolean + - type: 'null' + title: Echo + frequency_penalty: + anyOf: + - type: number + - type: 'null' + title: Frequency Penalty + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + title: Logit Bias + logprobs: + anyOf: + - type: boolean + - type: 'null' + title: Logprobs + max_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + n: + anyOf: + - type: integer + - type: 'null' + title: N + presence_penalty: + anyOf: + - type: number + - type: 'null' + title: Presence Penalty + seed: + anyOf: + - type: integer + - type: 'null' + title: Seed + stop: + anyOf: + - type: string + - items: + type: string + type: array + - type: 'null' + title: Stop + stream: + anyOf: + - type: boolean + - type: 'null' + title: Stream + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Stream Options + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + user: + anyOf: + - type: string + - type: 'null' + title: User + suffix: + anyOf: + - type: string + - type: 'null' + title: Suffix + additionalProperties: true + type: object + required: + - model + - prompt + title: OpenAICompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible completion endpoint. + OpenAICompletionWithInputMessages: + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + input_messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + 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' + type: array + title: Input Messages + type: object + required: + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + properties: + file_ids: + items: + type: string + type: array + title: File Ids + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Attributes + 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 + additionalProperties: true + type: object + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + description: Request to create a vector store file batch with extra_body support. + OpenAICreateVectorStoreRequestWithExtraBody: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + file_ids: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: File Ids + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + 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 + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + additionalProperties: true + type: object + title: OpenAICreateVectorStoreRequestWithExtraBody + description: Request to create a vector store with extra_body support. + OpenAIDeleteResponseObject: + properties: + id: + type: string + title: Id + object: + type: string + const: response + title: Object + default: response + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: OpenAIDeleteResponseObject + description: Response object confirming deletion of an OpenAI response. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAIDeveloperMessageParam + description: A message from the developer in an OpenAI-compatible chat completion request. + 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. + 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. + OpenAIEmbeddingsRequestWithExtraBody: + properties: + model: + type: string + title: Model + input: + anyOf: + - type: string + - items: + type: string + type: array + title: Input + encoding_format: + anyOf: + - type: string + - type: 'null' + title: Encoding Format + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' + title: Dimensions + user: + anyOf: + - type: string + - type: 'null' + title: User + additionalProperties: true + type: object + required: + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody + description: Request parameters for OpenAI-compatible embeddings endpoint. + 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. + OpenAIFile: + properties: + type: + type: string + const: file + title: Type + default: file + file: + $ref: '#/components/schemas/OpenAIFileFile' + type: object + required: + - file + title: OpenAIFile + OpenAIFileDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + const: file + title: Object + default: file + deleted: + type: boolean + title: Deleted + type: object + required: + - id + - deleted + title: OpenAIFileDeleteResponse + description: Response for deleting a file in OpenAI Files API. + 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 + 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. + OpenAIFilePurpose: + type: string + enum: + - assistants + - batch + title: OpenAIFilePurpose + description: Valid purpose values for OpenAI Files API. + OpenAIImageURL: + properties: + url: + type: string + title: Url + detail: + anyOf: + - type: string + - type: 'null' + title: Detail + type: object + required: + - url + title: OpenAIImageURL + description: Image URL specification for OpenAI-compatible chat completion messages. + OpenAIJSONSchema: + properties: + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + strict: + anyOf: + - type: boolean + - type: 'null' + title: Strict + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Schema + type: object + title: OpenAIJSONSchema + description: JSON schema specification for OpenAI-compatible structured response format. + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + type: array + title: Data + type: object + required: + - data + title: OpenAIListModelsResponse + OpenAIModel: + properties: + id: + type: string + title: Id + object: + type: string + const: model + title: Object + default: model + created: + type: integer + title: Created + owned_by: + type: string + title: Owned By + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Custom Metadata + type: object + required: + - id + - created + - owned_by + title: OpenAIModel + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata + 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. + 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. + 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. + 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. + 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. + 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. + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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: + anyOf: + - type: string + - type: 'null' + title: File Data + file_id: + anyOf: + - type: string + - type: 'null' + title: File Id + file_url: + anyOf: + - type: string + - type: 'null' + title: File Url + filename: + anyOf: + - type: string + - type: 'null' + title: Filename + type: object + title: OpenAIResponseInputMessageContentFile + description: File content for input messages in OpenAI response format. + 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: + anyOf: + - type: string + - type: 'null' + title: File Id + image_url: + anyOf: + - type: string + - type: 'null' + title: Image Url + type: object + title: OpenAIResponseInputMessageContentImage + description: Image content for input messages in OpenAI response format. + 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. + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + max_num_results: + anyOf: + - type: integer + maximum: 50.0 + minimum: 1.0 + - type: 'null' + title: Max Num Results + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + - type: 'null' + type: object + required: + - vector_store_ids + title: OpenAIResponseInputToolFileSearch + description: File search tool configuration for OpenAI response inputs. + OpenAIResponseInputToolFunction: + properties: + type: + type: string + const: function + title: Type + default: function + name: + type: string + title: Name + 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 + type: object + required: + - name + - parameters + title: OpenAIResponseInputToolFunction + description: Function tool configuration for OpenAI response inputs. + OpenAIResponseInputToolWebSearch: + properties: + type: + anyOf: + - type: string + const: web_search + - type: string + const: web_search_preview + - type: string + const: web_search_preview_2025_03_11 + - type: string + const: web_search_2025_08_26 + title: Type + default: web_search + search_context_size: + anyOf: + - type: string + pattern: ^low|medium|high$ + - type: 'null' + title: Search Context Size + default: medium + type: object + title: OpenAIResponseInputToolWebSearch + description: Web search tool configuration for OpenAI response inputs. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + reason: + anyOf: + - type: string + - type: 'null' + title: Reason + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + tools: + anyOf: + - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' + title: Tools + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + type: object + required: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject + description: Complete OpenAI response object containing generation results and metadata. + 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: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array + - type: 'null' + title: Results + type: object + required: + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall + description: File search tool call output message for OpenAI responses. + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + type: object + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + description: Function tool call output message for OpenAI responses. + 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: + anyOf: + - type: string + - type: 'null' + title: Error + output: + anyOf: + - type: string + - type: 'null' + title: Output + type: object + required: + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + description: Model Context Protocol (MCP) call output message for OpenAI responses. + 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. + 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. + OpenAIResponsePrompt: + properties: + id: + 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 + version: + anyOf: + - type: string + - type: 'null' + title: Version + type: object + required: + - id + title: OpenAIResponsePrompt + description: OpenAI compatible Prompt object that is used in OpenAI responses. + OpenAIResponseText: + properties: + format: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + - type: 'null' + type: object + title: OpenAIResponseText + description: Text response configuration for OpenAI responses. + OpenAIResponseTextFormat: + properties: + type: + anyOf: + - type: string + const: text + - type: string + const: json_schema + - type: string + const: json_object + 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 + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + 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' + - type: 'null' + title: Allowed Tools + type: object + required: + - server_label + title: OpenAIResponseToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + - type: 'null' + output_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + - type: 'null' + type: object + required: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage + description: Usage information for OpenAI response. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + title: Cached Tokens + type: object + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + title: Reasoning Tokens + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAISystemMessageParam + description: A system message providing instructions or context to the model. + OpenAITokenLogProb: + properties: + token: + type: string + title: Token + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Bytes + 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. + + :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 + 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. + OpenAITopLogProb: + properties: + token: + type: string + title: Token + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Bytes + 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. + + :token: The token + :bytes: (Optional) The bytes for the token + :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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + 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. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: Available optimizer algorithms for training. + Order: + type: string + enum: + - asc + - desc + title: Order + description: Sort order for paginated responses. + 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 + 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. + 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. + QATFinetuningConfig: + properties: + type: + type: string + const: QAT + title: Type + default: QAT + quantizer_name: + type: string + title: Quantizer Name + group_size: + type: integer + title: Group Size + type: object + required: + - quantizer_name + - group_size + title: QATFinetuningConfig + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. + 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. + 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. + 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. + RerankResponse: + properties: + data: + items: + $ref: '#/components/schemas/RerankData' + type: array + title: Data + type: object + required: + - data + title: RerankResponse + description: Response from a reranking request. + 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. + RunShieldResponse: + properties: + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + - type: 'null' + type: object + title: RunShieldResponse + description: Response from running a safety shield. + SafetyViolation: + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + anyOf: + - type: string + - type: 'null' + title: User Message + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - violation_level + title: SafetyViolation + description: Details of a safety violation detected by content moderation. + 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: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + repetition_penalty: + anyOf: + - type: number + - type: 'null' + title: Repetition Penalty + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Stop + type: object + title: SamplingParams + description: Sampling parameters. + ScoreBatchResponse: + properties: + dataset_id: + anyOf: + - type: string + - type: 'null' + title: Dataset Id + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreBatchResponse + description: Response from batch scoring operations on datasets. + ScoreResponse: + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreResponse + description: The response from scoring. + ScoringFn: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - type: string + - type: 'null' + title: Description + 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' + title: Return Type + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + 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: + 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 + type: object + required: + - identifier + - provider_id + - return_type + title: ScoringFn + description: A scoring function resource for evaluating model outputs. + 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. + SearchRankingOptions: + properties: + ranker: + anyOf: + - type: string + - type: 'null' + title: Ranker + score_threshold: + anyOf: + - type: number + - type: 'null' + title: Score Threshold + default: 0.0 + type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + Shield: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - identifier + - provider_id + title: Shield + description: A safety shield resource that can be used to check content. + StringType: + properties: + type: + type: string + const: string + title: Type + default: string + type: object + title: StringType + description: Parameter type for string values. + 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. + 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 + ToolDef: + properties: + toolgroup_id: + anyOf: + - type: string + - type: 'null' + title: Toolgroup Id + name: + type: string + title: Name + 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 + type: object + required: + - name + title: ToolDef + description: Tool definition used in runtime contexts. + ToolGroup: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + type: object + required: + - identifier + - provider_id + title: ToolGroup + description: A group of related tools managed together. + 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 + - type: 'null' + title: Content + error_message: + anyOf: + - type: string + - type: 'null' + title: Error Message + error_code: + anyOf: + - type: integer + - type: 'null' + title: Error Code + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + type: object + title: ToolInvocationResult + description: Result of a tool invocation. + 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. + TopPSamplingStrategy: + properties: + type: + type: string + const: top_p + title: Type + default: top_p + temperature: + anyOf: + - type: number + minimum: 0.0 + - type: 'null' + title: Temperature + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + default: 0.95 + type: object + required: + - temperature + title: TopPSamplingStrategy + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. + 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: + anyOf: + - type: integer + - type: 'null' + title: Max Validation Steps + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + - type: 'null' + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + - type: 'null' + efficiency_config: + anyOf: + - $ref: '#/components/schemas/EfficiencyConfig' + - type: 'null' + dtype: + anyOf: + - type: string + - type: 'null' + title: Dtype + default: bf16 + type: object + required: + - n_epochs + title: TrainingConfig + description: Comprehensive configuration for the training process. + 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. + URL: + properties: + uri: + type: string + title: Uri + type: object + required: + - uri + title: URL + description: A URL reference to external content. + UnionType: + properties: + type: + type: string + const: union + title: Type + default: union + type: object + title: UnionType + description: Parameter type for union values. + VectorStoreChunkingStrategyAuto: + properties: + type: + type: string + const: auto + title: Type + default: auto + type: object + title: VectorStoreChunkingStrategyAuto + description: Automatic chunking strategy for vector store files. + 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. + 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. + 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. + VectorStoreDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.deleted + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: VectorStoreDeleteResponse + description: Response from deleting a vector store. + 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. + VectorStoreFileContentsResponse: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + attributes: + additionalProperties: true + type: object + title: Attributes + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + type: array + title: Content + type: object + required: + - file_id + - filename + - attributes + - content + title: VectorStoreFileContentsResponse + description: Response from retrieving the contents of a vector store file. + 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. + VectorStoreFileDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.file.deleted + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: VectorStoreFileDeleteResponse + description: Response from deleting a vector store file. + 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. + 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: + anyOf: + - $ref: '#/components/schemas/VectorStoreFileLastError' + - type: 'null' + 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. + VectorStoreObject: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store + created_at: + type: integer + title: Created At + name: + anyOf: + - type: string + - type: 'null' + title: Name + usage_bytes: + type: integer + title: Usage Bytes + default: 0 + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + type: string + title: Status + default: completed + 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 + type: object + title: Metadata + type: object + required: + - id + - created_at + - file_counts + title: VectorStoreObject + description: OpenAI Vector Store object. + VectorStoreSearchResponse: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + score: + type: number + title: Score + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + type: object + - type: 'null' + title: Attributes + 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. + VectorStoreSearchResponsePage: + properties: + object: + type: string + title: Object + default: vector_store.search_results.page + search_query: + items: + type: string + type: array + title: Search Query + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + type: array + title: Data + has_more: + type: boolean + title: Has More + default: false + next_page: + anyOf: + - type: string + - type: 'null' + title: Next Page + type: object + required: + - search_query + - data + title: VectorStoreSearchResponsePage + description: Paginated response from searching a vector store. + VersionInfo: + properties: + version: + type: string + title: Version + type: object + required: + - version + title: VersionInfo + description: Version information for the service. + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: Severity level of a safety violation. + _URLOrData: + properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + data: + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + title: Data + type: object + title: _URLOrData + description: A URL or a base64 encoded string + _batches_Request: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + const: 24h + title: Completion Window + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + idempotency_key: + anyOf: + - type: string + - type: 'null' + title: Idempotency Key + type: object + required: + - input_file_id + - endpoint + - completion_window + title: _batches_Request + _conversations_Request: + properties: + items: + anyOf: + - 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' + 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' + type: array + - type: 'null' + title: Items + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + type: object + title: _conversations_Request + _conversations_conversation_id_Request: + properties: + metadata: + additionalProperties: + type: string + type: object + title: Metadata + type: object + required: + - metadata + title: _conversations_conversation_id_Request + _conversations_conversation_id_items_Request: + properties: + items: + 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' + 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' + type: array + title: Items + type: object + required: + - items + title: _conversations_conversation_id_items_Request + _models_Request: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + anyOf: + - type: string + - type: 'null' + title: Provider Model Id + provider_id: + anyOf: + - type: string + - type: 'null' + title: Provider Id + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + model_type: + anyOf: + - $ref: '#/components/schemas/ModelType' + - type: 'null' + type: object + required: + - model_id + title: _models_Request + _moderations_Request: + properties: + input: + anyOf: + - type: string + - items: + type: string + type: array + title: Input + model: + anyOf: + - type: string + - type: 'null' + title: Model + type: object + required: + - input + title: _moderations_Request + _prompts_Request: + properties: + prompt: + type: string + title: Prompt + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Variables + type: object + required: + - prompt + title: _prompts_Request + _prompts_prompt_id_Request: + properties: + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Variables + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt + - version + title: _prompts_prompt_id_Request + _prompts_prompt_id_set_default_version_Request: + properties: + version: + type: integer + title: Version + type: object + required: + - version + title: _prompts_prompt_id_set_default_version_Request + _responses_Request: + properties: + input: + title: Input + model: + title: Model + prompt: + title: Prompt + instructions: + title: Instructions + previous_response_id: + title: Previous Response Id + conversation: + title: Conversation + store: + title: Store + default: true + stream: + title: Stream + default: false + temperature: + title: Temperature + text: + title: Text + tools: + title: Tools + include: + title: Include + max_infer_iters: + title: Max Infer Iters + default: 10 + guardrails: + title: Guardrails + type: object + required: + - input + - model + title: _responses_Request + _scoring_score_Request: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + additionalProperties: + 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' + type: object + 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: + additionalProperties: + 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' + type: object + 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: + anyOf: + - type: string + - type: 'null' + title: Provider Shield Id + provider_id: + anyOf: + - type: string + - type: 'null' + title: Provider Id + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - shield_id + title: _shields_Request + _tool_runtime_invoke_Request: + properties: + tool_name: + type: string + title: Tool Name + kwargs: + additionalProperties: true + type: object + title: Kwargs + type: object + required: + - tool_name + - kwargs + title: _tool_runtime_invoke_Request + _vector_io_query_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + 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: Query + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - vector_store_id + - query + title: _vector_io_query_Request + _vector_stores_vector_store_id_Request: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + type: object + title: _vector_stores_vector_store_id_Request + _vector_stores_vector_store_id_files_Request: + properties: + file_id: + type: string + title: File Id + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Attributes + 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 + type: object + required: + - file_id + title: _vector_stores_vector_store_id_files_Request + _vector_stores_vector_store_id_files_file_id_Request: + properties: + attributes: + additionalProperties: true + type: object + title: Attributes + type: object + required: + - attributes + title: _vector_stores_vector_store_id_files_file_id_Request + _vector_stores_vector_store_id_search_Request: + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: Query + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + max_num_results: + anyOf: + - type: integer + - type: 'null' + title: Max Num Results + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + - type: 'null' + rewrite_query: + anyOf: + - type: boolean + - type: 'null' + title: Rewrite Query + default: false + search_mode: + anyOf: + - type: string + - type: 'null' + title: Search Mode + default: vector + type: object + required: + - query + title: _vector_stores_vector_store_id_search_Request + Error: + description: Error response from the API. Roughly follows RFC 7807. + properties: + status: + title: Status + type: integer + title: + title: Title + type: string + detail: + title: Detail + type: string instance: + anyOf: + - type: string + - type: 'null' + title: Instance + nullable: true + required: + - status + - title + - detail + title: Error + type: object + ImageContentItem: + description: A image content item + properties: + type: + const: image + default: image + title: Type + type: string + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + BuiltinTool: + enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + title: BuiltinTool + type: string + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string + required: + - image + title: ImageDelta + type: object + TextDelta: + description: A text content delta for streaming responses. + properties: + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: TextDelta + type: object + ToolCall: + properties: + call_id: + title: Call Id + type: string + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + arguments: + title: Arguments + type: string + required: + - call_id + - tool_name + - arguments + title: ToolCall + type: object + ToolCallDelta: + description: A tool call content delta for streaming responses. + properties: + type: + const: tool_call + default: tool_call + title: Type + type: string + tool_call: + anyOf: + - type: string + - $ref: '#/components/schemas/ToolCall' + title: Tool Call + parse_status: + $ref: '#/components/schemas/ToolCallParseStatus' + required: + - tool_call + - parse_status + title: ToolCallDelta + type: object + ToolCallParseStatus: + description: Status of tool call parsing during streaming. + enum: + - started + - in_progress + - failed + - succeeded + title: ToolCallParseStatus + type: string + ContentDelta: + discriminator: + mapping: + image: '#/components/schemas/ImageDelta' + text: '#/components/schemas/TextDelta' + tool_call: '#/components/schemas/ToolCallDelta' + propertyName: type + oneOf: + - $ref: '#/components/schemas/TextDelta' + - $ref: '#/components/schemas/ImageDelta' + - $ref: '#/components/schemas/ToolCallDelta' + ToolDefinition: + properties: + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + nullable: true + input_schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Input Schema + nullable: true + output_schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Output Schema + nullable: true + required: + - tool_name + title: ToolDefinition + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + CompletionMessage: + description: A message containing the model's (assistant) response in a chat conversation. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + stop_reason: + $ref: '#/components/schemas/StopReason' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/ToolCall' + type: array + - type: 'null' + title: Tool Calls + required: + - content + - stop_reason + title: CompletionMessage + type: object + StopReason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + title: StopReason + type: string + ToolResponseMessage: + description: A message representing the result of a tool invocation. + properties: + role: + const: tool + default: tool + title: Role + type: string + call_id: + title: Call Id + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + required: + - call_id + - content + title: ToolResponseMessage + type: object + UserMessage: + description: A message from the user in a chat conversation. + properties: + role: + const: user + default: user + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + - type: 'null' + title: Context + nullable: true + required: + - content + title: UserMessage + type: object + Message: + discriminator: + mapping: + assistant: '#/components/schemas/CompletionMessage' + system: '#/components/schemas/SystemMessage' + tool: '#/components/schemas/ToolResponseMessage' + user: '#/components/schemas/UserMessage' + propertyName: role + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/SystemMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + - $ref: '#/components/schemas/CompletionMessage' + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + OpenAIChatCompletionContentPartParam: + 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' + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + nullable: true + name: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + nullable: true + title: OpenAIAssistantMessageParam + type: object + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object + OpenAIMessageParam: + 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' + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + VectorStoreFileStatus: + anyOf: + - const: completed + type: string + - const: in_progress + type: string + - const: cancelled + type: string + - const: failed + type: string + OpenAIResponseInputMessageContent: + 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' + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + 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 - description: >- - (Optional) A URL which can be used to retrieve more information about - the specific occurrence of the error - additionalProperties: false + id: + anyOf: + - type: string + - type: 'null' + title: Id + nullable: true + status: + anyOf: + - type: string + - type: 'null' + title: Status + nullable: true required: - - status - - title - - detail - title: Error - description: >- - Error response from the API. Roughly follows RFC 7807. - ListBatchesResponse: + - content + - role + title: OpenAIResponseMessage type: object + OpenAIResponseOutput: + 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' + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. 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: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Always + nullable: true + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Never + nullable: true + title: ApprovalFilter type: object + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: - input_file_id: + type: + const: mcp + default: mcp + title: Type type: string - description: >- - The ID of an uploaded file containing requests for the batch. - endpoint: + server_label: + title: Server Label type: string - description: >- - The endpoint to be used for all requests in the batch. - completion_window: + server_url: + title: Server Url type: string - const: 24h - description: >- - The time window within which the batch should be processed. - metadata: - type: object - additionalProperties: + headers: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Headers + nullable: true + require_approval: + anyOf: + - const: always type: string - description: Optional metadata for the batch. - idempotency_key: - type: string - description: >- - Optional idempotency key. When provided, enables idempotent behavior. - additionalProperties: false + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + default: never + title: Require Approval + allowed_tools: + anyOf: + - items: + type: string + type: array + - $ref: '#/components/schemas/AllowedToolsFilter' + - type: 'null' + title: Allowed Tools + nullable: true required: - - input_file_id - - endpoint - - completion_window - title: CreateBatchRequest - Batch: + - server_label + - server_url + title: OpenAIResponseInputToolMCP type: object + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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/OpenAIResponseInputToolMCP' + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. properties: - id: - type: string - completion_window: - type: string - created_at: - type: integer - endpoint: + type: + const: output_text + default: output_text + title: Type type: string - input_file_id: + text: + title: Text type: string - object: + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: Annotations + type: array + logprobs: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + title: Logprobs + nullable: true + required: + - text + title: OpenAIResponseContentPartOutputText + type: object + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. + properties: + type: + const: reasoning_text + default: reasoning_text + title: Type type: string - const: batch - status: + text: + title: Text 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: + required: + - text + title: OpenAIResponseContentPartReasoningText + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. + properties: + type: + const: summary_text + default: summary_text + title: Type 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: + text: + title: Text type: string - output_file_id: + required: + - text + title: OpenAIResponseContentPartReasoningSummary + type: object + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.completed + default: response.completed + title: Type 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: + - response + title: OpenAIResponseObjectStreamResponseCompleted type: object + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. properties: - data: - type: array - items: - type: object - properties: - id: - type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChoice' - description: List of choices - object: - type: string - const: chat.completion - default: chat.completion - description: >- - The object type, which will be "chat.completion" - created: - type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: - type: string - description: >- - The model that was used to generate the chat completion - usage: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - description: >- - Token usage information for the completion - input_messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - additionalProperties: false - required: - - id - - choices - - object - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - description: >- - List of chat completion objects with their input messages - has_more: - type: boolean - description: >- - Whether there are more completions available beyond this list - first_id: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id type: string - description: ID of the first completion in this list - last_id: + item_id: + title: Item Id type: string - description: ID of the last completion in this list - object: + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: Part + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.added + default: response.content_part.added + title: Type type: string - const: list - default: list - description: >- - Must be "list" to identify this as a list response - additionalProperties: false required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIChatCompletionResponse - description: >- - Response from listing OpenAI-compatible chat completions. - OpenAIAssistantMessageParam: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded type: object + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. properties: - role: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id type: string - const: assistant - default: assistant - description: >- - Must be "assistant" to identify this as the model's response - content: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - description: The content of the model's response - name: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: Part + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.done + default: response.content_part.done + title: Type type: string - description: >- - (Optional) The name of the assistant message participant. - tool_calls: - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - description: >- - List of tool calls. Each tool call is an OpenAIChatCompletionToolCall - object. - additionalProperties: false required: - - role - title: OpenAIAssistantMessageParam - description: >- - A message containing the model's (assistant) response in an OpenAI-compatible - chat completion request. - "OpenAIChatCompletionContentPartImageParam": + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone type: object + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' type: + const: response.created + default: response.created + title: Type type: string - const: image_url - default: image_url - description: >- - Must be "image_url" to identify this as image content - image_url: - $ref: '#/components/schemas/OpenAIImageURL' - description: >- - Image URL specification and processing details - additionalProperties: false required: - - type - - image_url - title: >- - OpenAIChatCompletionContentPartImageParam - description: >- - Image content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionContentPartParam: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - - $ref: '#/components/schemas/OpenAIFile' - discriminator: - propertyName: type - mapping: - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - file: '#/components/schemas/OpenAIFile' - OpenAIChatCompletionContentPartTextParam: + - response + title: OpenAIResponseObjectStreamResponseCreated type: object + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer type: + const: response.failed + default: response.failed + title: Type type: string - const: text - default: text - description: >- - Must be "text" to identify this as text content - text: - type: string - description: The text content of the message - additionalProperties: false required: - - type - - text - title: OpenAIChatCompletionContentPartTextParam - description: >- - Text content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionToolCall: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed type: object + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. properties: - index: - type: integer - description: >- - (Optional) Index of the tool call in the list - id: + item_id: + title: Item Id type: string - description: >- - (Optional) Unique identifier for the tool call + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type type: string - const: function - default: function - description: >- - Must be "function" to identify this as a function call - function: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - description: (Optional) Function call details - additionalProperties: false required: - - type - title: OpenAIChatCompletionToolCall - description: >- - Tool call specification for OpenAI-compatible chat completion responses. - OpenAIChatCompletionToolCallFunction: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted type: object + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. properties: - name: + item_id: + title: Item Id type: string - description: (Optional) Name of the function to call - arguments: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type type: string - description: >- - (Optional) Arguments to pass to the function as a JSON string - additionalProperties: false - title: OpenAIChatCompletionToolCallFunction - description: >- - Function call details for OpenAI-compatible tool calls. - OpenAIChatCompletionUsage: + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress type: object + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. properties: - prompt_tokens: - type: integer - description: Number of tokens in the prompt - completion_tokens: + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - description: Number of tokens in the completion - total_tokens: + sequence_number: + title: Sequence Number type: integer - description: Total tokens used (prompt + completion) - prompt_tokens_details: - type: object - properties: - cached_tokens: - type: integer - description: Number of tokens retrieved from cache - additionalProperties: false - title: >- - OpenAIChatCompletionUsagePromptTokensDetails - description: >- - Token details for prompt tokens in OpenAI chat completion usage. - completion_tokens_details: - type: object - properties: - reasoning_tokens: - type: integer - description: >- - Number of tokens used for reasoning (o1/o3 models) - additionalProperties: false - title: >- - OpenAIChatCompletionUsageCompletionTokensDetails - description: >- - Token details for output tokens in OpenAI chat completion usage. - additionalProperties: false + type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type + type: string required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - description: >- - Usage information for OpenAI chat completion. - OpenAIChoice: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. properties: - message: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam' - - $ref: '#/components/schemas/OpenAISystemMessageParam' - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - - $ref: '#/components/schemas/OpenAIToolMessageParam' - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - discriminator: - propertyName: role - mapping: - user: '#/components/schemas/OpenAIUserMessageParam' - system: '#/components/schemas/OpenAISystemMessageParam' - assistant: '#/components/schemas/OpenAIAssistantMessageParam' - tool: '#/components/schemas/OpenAIToolMessageParam' - developer: '#/components/schemas/OpenAIDeveloperMessageParam' - description: The message from the model - finish_reason: + arguments: + title: Arguments type: string - description: The reason the model stopped generating - index: + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - description: The index of the choice - logprobs: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - description: >- - (Optional) The log probabilities for the tokens in the message - additionalProperties: false + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type + type: string required: - - message - - finish_reason - - index - title: OpenAIChoice - description: >- - A choice from an OpenAI-compatible chat completion response. - OpenAIChoiceLogprobs: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone type: object + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. properties: - content: - type: array - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - description: >- - (Optional) The log probabilities for the tokens in the message - refusal: - type: array - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - description: >- - (Optional) The log probabilities for the tokens in the message - additionalProperties: false - title: OpenAIChoiceLogprobs - description: >- - The log probabilities for the tokens in the message from an OpenAI-compatible - chat completion response. - OpenAIDeveloperMessageParam: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress type: object + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. properties: - role: - type: string - const: developer - default: developer - description: >- - Must be "developer" to identify this as a developer message - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - description: The content of the developer message - name: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.incomplete + default: response.incomplete + title: Type type: string - description: >- - (Optional) The name of the developer message participant. - additionalProperties: false required: - - role - - content - title: OpenAIDeveloperMessageParam - description: >- - A message from the developer in an OpenAI-compatible chat completion request. - OpenAIFile: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type type: string - const: file - default: file - file: - $ref: '#/components/schemas/OpenAIFileFile' - additionalProperties: false required: - - type - - file - title: OpenAIFile - OpenAIFileFile: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: properties: - file_data: + arguments: + title: Arguments type: string - file_id: + item_id: + title: Item Id type: string - filename: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type type: string - additionalProperties: false - title: OpenAIFileFile - OpenAIImageURL: + required: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone type: object + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. properties: - url: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type type: string - description: >- - URL of the image to include in the message - detail: + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.failed + default: response.mcp_call.failed + title: Type type: string - description: >- - (Optional) Level of detail for image processing. Can be "low", "high", - or "auto" - additionalProperties: false required: - - url - title: OpenAIImageURL - description: >- - Image URL specification for OpenAI-compatible chat completion messages. - OpenAIMessageParam: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam' - - $ref: '#/components/schemas/OpenAISystemMessageParam' - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - - $ref: '#/components/schemas/OpenAIToolMessageParam' - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - discriminator: - propertyName: role - mapping: - user: '#/components/schemas/OpenAIUserMessageParam' - system: '#/components/schemas/OpenAISystemMessageParam' - assistant: '#/components/schemas/OpenAIAssistantMessageParam' - tool: '#/components/schemas/OpenAIToolMessageParam' - developer: '#/components/schemas/OpenAIDeveloperMessageParam' - OpenAISystemMessageParam: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed type: object + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. properties: - role: + item_id: + title: Item Id type: string - const: system - default: system - description: >- - Must be "system" to identify this as a system message - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - description: >- - 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). - name: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress + title: Type type: string - description: >- - (Optional) The name of the system message participant. - additionalProperties: false required: - - role - - content - title: OpenAISystemMessageParam - description: >- - A system message providing instructions or context to the model. - OpenAITokenLogProb: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress type: object + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: properties: - token: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type type: string - bytes: - type: array - items: - type: integer - logprob: - type: number - top_logprobs: - type: array - items: - $ref: '#/components/schemas/OpenAITopLogProb' - additionalProperties: false required: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb - description: >- - The log probability for a token from an OpenAI-compatible chat completion - response. - OpenAIToolMessageParam: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted type: object + OpenAIResponseObjectStreamResponseMcpListToolsFailed: properties: - role: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type type: string - const: tool - default: tool - description: >- - Must be "tool" to identify this as a tool response - tool_call_id: + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + type: object + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type type: string - description: >- - Unique identifier for the tool call this response is for - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - description: The response content from the tool - additionalProperties: false required: - - role - - tool_call_id - - content - title: OpenAIToolMessageParam - description: >- - A message representing the result of a tool invocation in an OpenAI-compatible - chat completion request. - OpenAITopLogProb: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. properties: - token: + response_id: + title: Response Id + type: string + item: + 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: Item + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.added + default: response.output_item.added + title: Type type: string - bytes: - type: array - items: - type: integer - logprob: - type: number - additionalProperties: false required: - - token - - logprob - title: OpenAITopLogProb - description: >- - The top log probability for a token from an OpenAI-compatible chat completion - response. - OpenAIUserMessageParam: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded type: object + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. properties: - role: + response_id: + title: Response Id type: string - const: user - default: user - description: >- - Must be "user" to identify this as a user message - content: + item: + 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: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartParam' - description: >- - The content of the message, which can include text and other media - name: + - $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: Item + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done + title: Type type: string - description: >- - (Optional) The name of the user message participant. - additionalProperties: false required: - - role - - content - title: OpenAIUserMessageParam - description: >- - A message from the user in an OpenAI-compatible chat completion request. - OpenAIJSONSchema: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. properties: - name: + item_id: + title: Item Id type: string - description: Name of the schema - description: + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: Annotation + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.annotation.added + default: response.output_text.annotation.added + title: Type type: string - description: (Optional) Description of the schema - strict: - type: boolean - description: >- - (Optional) Whether to enforce strict adherence to the schema - schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The JSON schema definition - additionalProperties: false required: - - name - title: OpenAIJSONSchema - description: >- - JSON schema specification for OpenAI-compatible structured response format. - OpenAIResponseFormatJSONObject: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded type: object + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.output_text.delta + default: response.output_text.delta + title: Type type: string - const: json_object - default: json_object - description: >- - Must be "json_object" to indicate generic JSON object response format - additionalProperties: false required: - - type - title: OpenAIResponseFormatJSONObject - description: >- - JSON object response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatJSONSchema: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta type: object + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. properties: + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.output_text.done + default: response.output_text.done + title: Type type: string - const: json_schema - default: json_schema - description: >- - Must be "json_schema" to indicate structured JSON response format - json_schema: - $ref: '#/components/schemas/OpenAIJSONSchema' - description: >- - The JSON schema specification for the response - additionalProperties: false required: - - type - - json_schema - title: OpenAIResponseFormatJSONSchema - description: >- - JSON schema response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatParam: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - discriminator: - propertyName: type - mapping: - text: '#/components/schemas/OpenAIResponseFormatText' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - OpenAIResponseFormatText: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type type: string - const: text - default: text - description: >- - Must be "text" to indicate plain text response format - additionalProperties: false required: - - type - title: OpenAIResponseFormatText - description: >- - Text response format for OpenAI-compatible chat completion requests. - OpenAIChatCompletionRequestWithExtraBody: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. properties: - model: + item_id: + title: Item Id type: string - description: >- - The identifier of the model to use. The model must be registered with - Llama Stack and available via the /models endpoint. - messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - description: List of messages in the conversation. - frequency_penalty: - type: number - description: >- - (Optional) The penalty for repeated tokens. - function_call: - oneOf: - - type: string - - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The function call to use. - functions: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) List of functions to use. - logit_bias: - type: object - additionalProperties: - type: number - description: (Optional) The logit bias to use. - logprobs: - type: boolean - description: (Optional) The log probabilities to use. - max_completion_tokens: - type: integer - description: >- - (Optional) The maximum number of tokens to generate. - max_tokens: + output_index: + title: Output Index type: integer - description: >- - (Optional) The maximum number of tokens to generate. - n: + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number type: integer - description: >- - (Optional) The number of completions to generate. - parallel_tool_calls: - type: boolean - description: >- - (Optional) Whether to parallelize tool calls. - presence_penalty: - type: number - description: >- - (Optional) The penalty for repeated tokens. - response_format: - $ref: '#/components/schemas/OpenAIResponseFormatParam' - description: (Optional) The response format to use. - seed: + summary_index: + title: Summary Index type: integer - description: (Optional) The seed to use. - stop: - oneOf: - - type: string - - type: array - items: - type: string - description: (Optional) The stop tokens to use. - stream: - type: boolean - description: >- - (Optional) Whether to stream the response. - stream_options: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The stream options to use. - temperature: - type: number - description: (Optional) The temperature to use. - tool_choice: - oneOf: - - type: string - - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The tool choice to use. - tools: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The tools to use. - top_logprobs: + type: + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done + title: Type + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - description: >- - (Optional) The top log probabilities to use. - top_p: - type: number - description: (Optional) The top p to use. - user: + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta + title: Type type: string - description: (Optional) The user to use. - additionalProperties: false required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody - description: >- - Request parameters for OpenAI-compatible chat completion endpoint. - OpenAIChatCompletion: + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. properties: - id: + text: + title: Text type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChoice' - description: List of choices - object: + item_id: + title: Item Id type: string - const: chat.completion - default: chat.completion - description: >- - The object type, which will be "chat.completion" - created: + output_index: + title: Output Index type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done + title: Type type: string - description: >- - The model that was used to generate the chat completion - usage: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - description: >- - Token usage information for the completion - additionalProperties: false required: - - id - - choices - - object - - created - - model - title: OpenAIChatCompletion - description: >- - Response from an OpenAI-compatible chat completion request. - OpenAIChatCompletionChunk: + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone type: object + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. properties: - id: + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChunkChoice' - description: List of choices - object: + item_id: + title: Item Id type: string - const: chat.completion.chunk - default: chat.completion.chunk - description: >- - The object type, which will be "chat.completion.chunk" - created: + output_index: + title: Output Index type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.delta + default: response.reasoning_text.delta + title: Type type: string - description: >- - The model that was used to generate the chat completion - usage: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - description: >- - Token usage information (typically included in final chunk with stream_options) - additionalProperties: false required: - - id - - choices - - object - - created - - model - title: OpenAIChatCompletionChunk - description: >- - Chunk from a streaming response to an OpenAI-compatible chat completion request. - OpenAIChoiceDelta: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta type: object + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. properties: - content: - type: string - description: (Optional) The content of the delta - refusal: + content_index: + title: Content Index + type: integer + text: + title: Text type: string - description: (Optional) The refusal of the delta - role: + item_id: + title: Item Id type: string - description: (Optional) The role of the delta - tool_calls: - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - description: (Optional) The tool calls of the delta - reasoning_content: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done + title: Type type: string - description: >- - (Optional) The reasoning content from the model (non-standard, for o1/o3 - models) - additionalProperties: false - title: OpenAIChoiceDelta - description: >- - A delta from an OpenAI-compatible chat completion streaming response. - OpenAIChunkChoice: + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone type: object + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. properties: + content_index: + title: Content Index + type: integer delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - description: The delta from the chunk - finish_reason: + title: Delta type: string - description: The reason the model stopped generating - index: + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - description: The index of the choice - logprobs: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - description: >- - (Optional) The log probabilities for the tokens in the message - additionalProperties: false + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.delta + default: response.refusal.delta + title: Type + type: string required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice - description: >- - A chunk choice from an OpenAI-compatible chat completion streaming response. - OpenAICompletionWithInputMessages: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta type: object + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. properties: - id: + content_index: + title: Content Index + type: integer + refusal: + title: Refusal type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChoice' - description: List of choices - object: + item_id: + title: Item Id type: string - const: chat.completion - default: chat.completion - description: >- - The object type, which will be "chat.completion" - created: + output_index: + title: Output Index type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.done + default: response.refusal.done + title: Type type: string - description: >- - The model that was used to generate the chat completion - usage: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - description: >- - Token usage information for the completion - input_messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - additionalProperties: false required: - - id - - choices - - object - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - OpenAICompletionRequestWithExtraBody: + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone type: object + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. properties: - model: + item_id: + title: Item Id type: string - description: >- - The identifier of the model to use. The model must be registered with - Llama Stack and available via the /models endpoint. - prompt: - oneOf: - - type: string - - type: array - items: - type: string - - type: array - items: - type: integer - - type: array - items: - type: array - items: - type: integer - description: The prompt to generate a completion for. - best_of: - type: integer - description: >- - (Optional) The number of completions to generate. - echo: - type: boolean - description: (Optional) Whether to echo the prompt. - frequency_penalty: - type: number - description: >- - (Optional) The penalty for repeated tokens. - logit_bias: - type: object - additionalProperties: - type: number - description: (Optional) The logit bias to use. - logprobs: - type: boolean - description: (Optional) The log probabilities to use. - max_tokens: - type: integer - description: >- - (Optional) The maximum number of tokens to generate. - n: + output_index: + title: Output Index type: integer - description: >- - (Optional) The number of completions to generate. - presence_penalty: - type: number - description: >- - (Optional) The penalty for repeated tokens. - seed: + sequence_number: + title: Sequence Number type: integer - description: (Optional) The seed to use. - stop: - oneOf: - - type: string - - type: array - items: - type: string - description: (Optional) The stop tokens to use. - stream: - type: boolean - description: >- - (Optional) Whether to stream the response. - stream_options: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The stream options to use. - temperature: - type: number - description: (Optional) The temperature to use. - top_p: - type: number - description: (Optional) The top p to use. - user: - type: string - description: (Optional) The user to use. - suffix: + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type type: string - description: >- - (Optional) The suffix that should be appended to the completion. - additionalProperties: false required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody - description: >- - Request parameters for OpenAI-compatible completion endpoint. - OpenAICompletion: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted type: object + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. properties: - id: + item_id: + title: Item Id type: string - choices: - type: array - items: - $ref: '#/components/schemas/OpenAICompletionChoice' - created: + output_index: + title: Output Index type: integer - model: - type: string - object: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress + title: Type type: string - const: text_completion - default: text_completion - additionalProperties: false required: - - id - - choices - - created - - model - - object - title: OpenAICompletion - description: >- - Response from an OpenAI-compatible completion request. - OpenAICompletionChoice: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress type: object + OpenAIResponseObjectStreamResponseWebSearchCallSearching: properties: - finish_reason: - type: string - text: + item_id: + title: Item Id type: string - index: + output_index: + title: Output Index type: integer - logprobs: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - additionalProperties: false + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type + type: string required: - - finish_reason - - text - - index - title: OpenAICompletionChoice - description: >- - A choice from an OpenAI-compatible completion response. - ConversationItem: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + type: object + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + OpenAIResponseInput: + 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/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage' + ConversationItem: 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' @@ -5913,244 +13359,70 @@ components: $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 - max_tool_calls: - type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response - 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: + 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: The type/identifier of the guardrail. + description: >- + (Optional) System message inserted into the model's context + max_tool_calls: + type: integer + description: >- + (Optional) Max number of total calls to built-in tools that can be processed + in a response + input: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseInput' + description: >- + List of input items that led to this response additionalProperties: false required: - - type - title: ResponseGuardrailSpec + - created_at + - id + - model + - object + - output + - parallel_tool_calls + - status + - text + - input + title: OpenAIResponseObjectWithInput description: >- - Specification for a guardrail to apply during response generation. - OpenAIResponseInputTool: + OpenAI response object extended with input context information. + OpenAIResponseOutput: oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + - $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' + propertyName: type + 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' + DataSource: + discriminator: mapping: web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' @@ -8175,452 +15447,687 @@ components: title: ListScoringFunctionsResponse ScoreRequest: type: object + SpanStartPayload: + description: Payload for a span start event. properties: - input_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to score. - scoring_functions: - type: object - additionalProperties: - oneOf: - - $ref: '#/components/schemas/ScoringFnParams' - - type: 'null' - description: >- - The scoring functions to use for the scoring. - additionalProperties: false + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + title: Parent Span Id + nullable: true required: - - input_rows - - scoring_functions - title: ScoreRequest - ScoreResponse: + - name + title: SpanStartPayload type: object + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: - results: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: >- - A map of scoring function name to ScoringResult. - additionalProperties: false + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: Value + unit: + title: Unit + type: string required: - - results - title: ScoreResponse - description: The response from scoring. - ScoringResult: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. properties: - score_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The scoring result for each row. Each row is a map of column name to value. - aggregated_results: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: - type: string - - type: array - - type: object - description: Map of metric name to aggregated value - additionalProperties: false + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + title: Payload required: - - score_rows - - aggregated_results - title: ScoringResult - description: A scoring result for a single row. - ScoreBatchRequest: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. properties: - dataset_id: + trace_id: + title: Trace Id type: string - description: The ID of the dataset to score. - scoring_functions: - type: object - additionalProperties: - oneOf: - - $ref: '#/components/schemas/ScoringFnParams' + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean - type: 'null' - description: >- - The scoring functions to use for the scoring. - save_results_dataset: - type: boolean - description: >- - Whether to save the results to a dataset. - additionalProperties: false + type: object + - type: 'null' + title: Attributes + type: + const: unstructured_log + default: unstructured_log + title: Type + type: string + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' required: - - dataset_id - - scoring_functions - - save_results_dataset - title: ScoreBatchRequest - ScoreBatchResponse: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + - $ref: '#/components/schemas/MetricEvent' + - $ref: '#/components/schemas/StructuredLogEvent' + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. properties: - dataset_id: + 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 - description: >- - (Optional) The identifier of the dataset that was scored - results: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: >- - A map of scoring function name to ScoringResult - additionalProperties: false required: - - results - title: ScoreBatchResponse - description: >- - Response from batch scoring operations on datasets. - Shield: + - data + title: ListOpenAIResponseInputItem type: object + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. properties: - identifier: - type: string - provider_resource_id: + created_at: + title: Created At + type: integer + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + nullable: true + id: + title: Id type: string - provider_id: + model: + title: Model type: string - type: + object: + const: response + default: response + title: Object type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: shield - default: shield - description: The resource type, always shield - params: - type: object - additionalProperties: + 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: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Configuration parameters for the shield - additionalProperties: false + - $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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + nullable: true + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + nullable: true + status: + title: Status + type: string + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + nullable: true + tools: + anyOf: + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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 + - type: 'null' + title: Tools + nullable: true + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + nullable: true + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + nullable: true + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + 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: - - identifier - - provider_id - - type - title: Shield - description: >- - A safety shield resource that can be used to check content. - ListShieldsResponse: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput type: object + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. properties: data: - type: array items: - $ref: '#/components/schemas/Shield' - additionalProperties: false + $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 - title: ListShieldsResponse - InvokeToolRequest: + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject type: object + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. properties: - tool_name: + type: + title: Type type: string - description: The name of the tool to invoke. - kwargs: - 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. - additionalProperties: false required: - - tool_name - - kwargs - title: InvokeToolRequest - ImageContentItem: + - type + title: ResponseGuardrailSpec type: object + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - type: + object: + const: list + default: list + title: Object type: string - const: image - default: image - description: >- - Discriminator type of the content item. Always "image" - image: - type: object - properties: - url: - $ref: '#/components/schemas/URL' - description: >- - A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - data: - type: string - contentEncoding: base64 - description: base64 encoded image data as string - additionalProperties: false - description: >- - Image as a base64 encoded string or an URL - additionalProperties: false - required: - - type - - image - title: ImageContentItem - description: A image content item - InterleavedContent: - oneOf: - - type: string - - $ref: '#/components/schemas/InterleavedContentItem' - - type: array + data: + description: List of batch objects items: - $ref: '#/components/schemas/InterleavedContentItem' - InterleavedContentItem: - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - TextContentItem: + $ref: '#/components/schemas/Batch' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + description: ID of the first batch in the list + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + description: ID of the last batch in the list + title: Last Id + nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean + required: + - data + title: ListBatchesResponse type: object + MetricInResponse: + description: A metric value included in API responses. properties: - type: - type: string - const: text - default: text - description: >- - Discriminator type of the content item. Always "text" - text: - type: string - description: Text content - additionalProperties: false + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: Value + unit: + anyOf: + - type: string + - type: 'null' + title: Unit + nullable: true required: - - type - - text - title: TextContentItem - description: A text content item - ToolInvocationResult: + - metric + - value + title: MetricInResponse type: object + PaginatedResponse: + description: A generic paginated response that follows a simple format. properties: - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - (Optional) The output content from the tool execution - error_message: - type: string - description: >- - (Optional) Error message if the tool execution failed - error_code: - type: integer - description: >- - (Optional) Numeric error code if the tool execution failed - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional metadata about the tool execution - additionalProperties: false - title: ToolInvocationResult - description: Result of a tool invocation. - URL: + data: + items: + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + anyOf: + - type: string + - type: 'null' + title: Url + nullable: true + required: + - data + - has_more + title: PaginatedResponse type: object + PostTrainingMetric: + description: Training metrics captured during post-training jobs. properties: - uri: - type: string - description: The URL string pointing to the resource - additionalProperties: false + 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: - - uri - title: URL - description: A URL reference to external content. - ToolDef: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric type: object + Checkpoint: + description: Checkpoint created during training runs. properties: - toolgroup_id: + identifier: + title: Identifier type: string - description: >- - (Optional) ID of the tool group this tool belongs to - name: + created_at: + format: date-time + title: Created At type: string - description: Name of the tool - description: + epoch: + title: Epoch + type: integer + post_training_job_id: + title: Post Training Job Id type: string - description: >- - (Optional) Human-readable description of what the tool does - input_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) JSON Schema for tool inputs (MCP inputSchema) - output_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) JSON Schema for tool outputs (MCP outputSchema) - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional metadata about the tool - additionalProperties: false + path: + title: Path + type: string + training_metrics: + anyOf: + - $ref: '#/components/schemas/PostTrainingMetric' + - type: 'null' + nullable: true required: - - name - title: ToolDef - description: >- - Tool definition used in runtime contexts. - ListToolDefsResponse: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint type: object + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: - data: - type: array + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. items: - $ref: '#/components/schemas/ToolDef' - description: List of tool definitions - additionalProperties: false + discriminator: + 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' + 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/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + maxItems: 20 + title: Items + type: array required: - - data - title: ListToolDefsResponse - description: >- - Response containing a list of tool definitions. - ToolGroup: + - items + title: ConversationItemCreateRequest type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. properties: - identifier: - type: string - provider_resource_id: + id: + description: unique identifier for this message + title: Id type: string - provider_id: + content: + description: message content + items: + additionalProperties: true + type: object + title: Content + type: array + role: + description: message role + title: Role type: string - type: + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: tool_group - default: tool_group - description: Type of resource, always 'tool_group' - mcp_endpoint: - $ref: '#/components/schemas/URL' - description: >- - (Optional) Model Context Protocol endpoint for remote tools - args: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional arguments for the tool group - additionalProperties: false required: - - identifier - - provider_id - - type - title: ToolGroup - description: >- - A group of related tools managed together. - ListToolGroupsResponse: + - id + - content + - role + - status + title: ConversationMessage type: object + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. properties: data: - type: array items: - $ref: '#/components/schemas/ToolGroup' - description: List of tool groups - additionalProperties: false + $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 - title: ListToolGroupsResponse - description: >- - Response containing a list of tool groups. - Chunk: + title: ListShieldsResponse + InvokeToolRequest: 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: + tool_name: type: string - description: >- - Unique identifier for the chunk. Must be provided explicitly. - metadata: + description: The name of the tool to invoke. + kwargs: type: object additionalProperties: oneOf: @@ -8631,388 +16138,1010 @@ components: - type: array - type: object description: >- - Metadata associated with the chunk that will be used in the model context - during inference. - embedding: - type: array + A dictionary of arguments to pass to the tool. + additionalProperties: false + required: + - tool_name + - kwargs + title: InvokeToolRequest + ImageContentItem: + type: object + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). + properties: + type: + const: bf16 + default: bf16 + title: Type + type: string + title: Bf16QuantizationConfig + type: object + LogProbConfig: + description: '' + properties: + top_k: + anyOf: + - type: integer + - type: 'null' + default: 0 + title: Top K + title: LogProbConfig + type: object + SystemMessageBehavior: + description: Config for how to override the default system prompt. + enum: + - append + - replace + title: SystemMessageBehavior + 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. + enum: + - auto + - required + - none + title: ToolChoice + type: string + ToolConfig: + description: Configuration for tool use. + properties: + tool_choice: + anyOf: + - $ref: '#/components/schemas/ToolChoice' + - type: string + - type: 'null' + default: auto + title: Tool Choice + tool_prompt_format: + anyOf: + - $ref: '#/components/schemas/ToolPromptFormat' + - type: 'null' + nullable: true + system_message_behavior: + anyOf: + - $ref: '#/components/schemas/SystemMessageBehavior' + - type: 'null' + default: append + title: ToolConfig + type: object + ToolPromptFormat: + description: Prompt format for calling custom / zero shot tools. + enum: + - json + - function_tag + - python_list + title: ToolPromptFormat + type: string + ChatCompletionRequest: + properties: + model: + title: Model + type: string + messages: items: + discriminator: + mapping: + assistant: '#/components/schemas/CompletionMessage' + system: '#/components/schemas/SystemMessage' + tool: '#/components/schemas/ToolResponseMessage' + user: '#/components/schemas/UserMessage' + propertyName: role + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/SystemMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + - $ref: '#/components/schemas/CompletionMessage' + title: Messages + type: array + sampling_params: + anyOf: + - $ref: '#/components/schemas/SamplingParams' + - type: 'null' + tools: + anyOf: + - items: + $ref: '#/components/schemas/ToolDefinition' + type: array + - type: 'null' + title: Tools + tool_config: + anyOf: + - $ref: '#/components/schemas/ToolConfig' + - type: 'null' + response_format: + anyOf: + - discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + - type: 'null' + title: Response Format + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Stream + logprobs: + anyOf: + - $ref: '#/components/schemas/LogProbConfig' + - type: 'null' + nullable: true + required: + - model + - messages + title: ChatCompletionRequest + type: object + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: 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 + title: Logprobs By Token + type: object required: - - content - - chunk_id - - metadata - title: Chunk - description: >- - A chunk of content that can be inserted into a vector database. - ChunkMetadata: + - logprobs_by_token + title: TokenLogProbs type: object + ChatCompletionResponse: + description: Response from a chat completion request. properties: - chunk_id: + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + completion_message: + $ref: '#/components/schemas/CompletionMessage' + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true + required: + - completion_message + title: ChatCompletionResponse + type: object + ChatCompletionResponseEventType: + description: Types of events that can occur during chat completion. + enum: + - start + - complete + - progress + title: ChatCompletionResponseEventType + type: string + ChatCompletionResponseEvent: + description: An event during chat completion generation. + properties: + event_type: + $ref: '#/components/schemas/ChatCompletionResponseEventType' + delta: + discriminator: + mapping: + image: '#/components/schemas/ImageDelta' + text: '#/components/schemas/TextDelta' + tool_call: '#/components/schemas/ToolCallDelta' + propertyName: type + oneOf: + - $ref: '#/components/schemas/TextDelta' + - $ref: '#/components/schemas/ImageDelta' + - $ref: '#/components/schemas/ToolCallDelta' + title: Delta + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true + stop_reason: + anyOf: + - $ref: '#/components/schemas/StopReason' + - type: 'null' + nullable: true + required: + - event_type + - delta + title: ChatCompletionResponseEvent + type: object + ChatCompletionResponseStreamChunk: + description: A chunk of a streamed chat completion response. + properties: + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + event: + $ref: '#/components/schemas/ChatCompletionResponseEvent' + required: + - event + title: ChatCompletionResponseStreamChunk + type: object + CompletionResponse: + description: Response from a completion request. + properties: + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + content: + title: Content type: string - description: >- - The ID of the chunk. If not set, it will be generated based on the document - ID and content. - document_id: + stop_reason: + $ref: '#/components/schemas/StopReason' + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true + required: + - content + - stop_reason + title: CompletionResponse + type: object + CompletionResponseStreamChunk: + description: A chunk of a streamed completion response. + properties: + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + delta: + title: Delta type: string - description: >- - The ID of the document this chunk belongs to. - source: + stop_reason: + anyOf: + - $ref: '#/components/schemas/StopReason' + - type: 'null' + nullable: true + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true + required: + - delta + title: CompletionResponseStreamChunk + type: object + EmbeddingsResponse: + description: Response containing generated embeddings. + properties: + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array + required: + - embeddings + title: EmbeddingsResponse + type: object + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. + properties: + type: + const: fp8_mixed + default: fp8_mixed + title: Type type: string - description: >- - The source of the content, such as a URL, file path, or other identifier. - created_timestamp: - type: integer - description: >- - An optional timestamp indicating when the chunk was created. - updated_timestamp: + title: Fp8QuantizationConfig + type: object + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. + properties: + type: + const: int4_mixed + default: int4_mixed + title: Type + type: string + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Scheme + title: Int4QuantizationConfig + type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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 - description: >- - An optional timestamp indicating when the chunk was last updated. - chunk_window: + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + 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. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + nullable: true + title: OpenAIChoiceLogprobs + type: object + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. + 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 - description: >- - The window of the chunk, which can be used to group related chunks together. - chunk_tokenizer: + last_id: + title: Last Id type: string - description: >- - The tokenizer used to create the chunk. Default is Tiktoken. - chunk_embedding_model: + object: + const: list + default: list + title: Object type: string - description: >- - The embedding model used to create the chunk's embedding. - chunk_embedding_dimension: - type: integer - description: >- - The dimension of the embedding vector for the chunk. - content_token_count: + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse + type: object + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. + properties: + content: + anyOf: + - type: string + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - type: string + - type: 'null' + title: Refusal + nullable: true + role: + anyOf: + - type: string + - type: 'null' + title: Role + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + nullable: true + reasoning_content: + anyOf: + - type: string + - type: 'null' + title: Reasoning Content + nullable: true + title: OpenAIChoiceDelta + type: object + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. + properties: + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason + type: string + index: + title: Index type: integer - description: >- - The number of tokens in the content of the chunk. - metadata_token_count: + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true + required: + - delta + - finish_reason + - index + title: OpenAIChunkChoice + type: object + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + properties: + id: + title: Id + type: string + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object + type: string + created: + title: Created type: integer - description: >- - The number of tokens in the metadata of the chunk. - additionalProperties: false - title: 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. - InsertChunksRequest: + model: + title: Model + type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + nullable: true + required: + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk 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: - vector_store_id: + finish_reason: + title: Finish Reason type: string - description: >- - The identifier of the vector database to insert the chunks into. - chunks: - type: array - items: - $ref: '#/components/schemas/Chunk' - description: >- - The chunks to insert. Each `Chunk` should contain content which can be - interleaved text, images, or other types. `metadata`: `dict[str, Any]` - and `embedding`: `List[float]` are optional. If `metadata` is provided, - you configure how Llama Stack formats the chunk during generation. If - `embedding` is not provided, it will be computed later. - ttl_seconds: + text: + title: Text + type: string + index: + title: Index type: integer - description: The time to live of the chunks. - additionalProperties: false + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true required: - - vector_store_id - - chunks - title: InsertChunksRequest - QueryChunksRequest: + - finish_reason + - text + - index + title: OpenAICompletionChoice type: object + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens properties: - vector_store_id: + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Text Offset + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Token Logprobs + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Tokens + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + title: Top Logprobs + nullable: true + title: OpenAICompletionLogprobs + type: object + ToolResponse: + description: Response from a tool invocation. + properties: + call_id: + title: Call Id type: string - description: >- - The identifier of the vector database to query. - query: - $ref: '#/components/schemas/InterleavedContent' - description: The query to search for. - params: - type: object - additionalProperties: + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The parameters of the query. - additionalProperties: false + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + nullable: true required: - - vector_store_id - - query - title: QueryChunksRequest - QueryChunksResponse: + - call_id + - tool_name + - content + title: ToolResponse type: object + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - chunks: - type: array + route: + title: Route + type: string + method: + title: Method + type: string + provider_types: items: - $ref: '#/components/schemas/Chunk' - description: >- - List of content chunks returned from the query - scores: + type: string + title: Provider Types type: array - items: - type: number - description: >- - Relevance scores corresponding to each returned chunk - additionalProperties: false required: - - chunks - - scores - title: QueryChunksResponse - description: >- - Response from querying chunks in a vector database. - VectorStoreFileCounts: + - route + - method + - provider_types + title: RouteInfo type: object + ListRoutesResponse: + description: Response containing a list of all available API routes. properties: - completed: - type: integer - description: >- - Number of files that have been successfully processed - cancelled: - type: integer - description: >- - Number of files that had their processing cancelled - failed: - type: integer - description: Number of files that failed to process - in_progress: - type: integer - description: >- - Number of files currently being processed - total: - type: integer - description: >- - Total number of files in the vector store - additionalProperties: false + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - description: >- - File processing status counts for a vector store. - VectorStoreListResponse: + - data + title: ListRoutesResponse type: object + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. properties: - object: + job_uuid: + title: Job Uuid type: string - default: list - description: Object type identifier, always "list" - data: - type: array + checkpoints: items: - $ref: '#/components/schemas/VectorStoreObject' - description: List of vector store objects - first_id: - type: string - description: >- - (Optional) ID of the first vector store in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last vector store in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more vector stores available beyond this page - additionalProperties: false + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - object - - data - - has_more - title: VectorStoreListResponse - description: Response from listing vector stores. - VectorStoreObject: + - job_uuid + title: PostTrainingJobArtifactsResponse type: object + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: - id: - type: string - description: Unique identifier for the vector store - object: + job_uuid: + title: Job Uuid type: string - default: vector_store - description: >- - Object type identifier, always "vector_store" - created_at: - type: integer - description: >- - Timestamp when the vector store was created - name: + log_lines: + items: + type: string + title: Log Lines + type: array + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream + type: object + PostTrainingJobStatusResponse: + description: Status of a finetuning job. + properties: + job_uuid: + title: Job Uuid type: string - description: (Optional) Name of the vector store - usage_bytes: - type: integer - default: 0 - description: >- - Storage space used by the vector store in bytes - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the vector store status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Scheduled At + nullable: true + started_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Started At + nullable: true + completed_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Completed At + nullable: true + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Resources Allocated + nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. + properties: + job_uuid: + title: Job Uuid type: string - default: completed - description: Current status of the vector store - expires_after: + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config type: object - additionalProperties: + logger_config: + additionalProperties: true + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest + type: object + ListToolDefsResponse: + description: Response containing a list of tool definitions. + properties: + data: + items: + $ref: '#/components/schemas/ToolDef' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + description: >- + Response containing a list of tool groups. + Chunk: + type: object + Chunk: + description: A chunk of content that can be inserted into a vector database. + properties: + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Expiration policy for the vector store - expires_at: - type: integer - description: >- - (Optional) Timestamp when the vector store will expire - last_active_at: - type: integer - description: >- - (Optional) Timestamp of last activity on the vector store + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + chunk_id: + title: Chunk Id + type: string metadata: + additionalProperties: true + title: Metadata type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of key-value pairs that can be attached to the vector store - additionalProperties: false + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Embedding + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + nullable: true required: - - id - - object - - created_at - - usage_bytes - - file_counts - - status - - metadata - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreChunkingStrategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - VectorStoreChunkingStrategyAuto: + - content + - chunk_id + title: Chunk type: object + VectorStoreCreateRequest: + description: Request to create a vector store. properties: - type: + name: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + nullable: true + chunking_strategy: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Chunking Strategy + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object + title: VectorStoreCreateRequest + type: object + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. + properties: + object: + default: list + title: Object type: string - const: auto - default: auto - description: >- - Strategy type, always "auto" for automatic chunking - additionalProperties: false + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - type - title: VectorStoreChunkingStrategyAuto - description: >- - Automatic chunking strategy for vector store files. - VectorStoreChunkingStrategyStatic: + - data + title: VectorStoreFilesListInBatchResponse type: object + VectorStoreListFilesResponse: + description: Response from listing files in a vector store. properties: - type: + object: + default: list + title: Object type: string - const: static - default: static - description: >- - Strategy type, always "static" for static chunking - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' - description: >- - Configuration parameters for the static chunking strategy - additionalProperties: false + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - type - - static - title: VectorStoreChunkingStrategyStatic - description: >- - Static chunking strategy with configurable parameters. - VectorStoreChunkingStrategyStaticConfig: + - data + title: VectorStoreListFilesResponse type: object + VectorStoreListResponse: + description: Response from listing vector stores. properties: - chunk_overlap_tokens: - type: integer - default: 400 - description: >- - Number of tokens to overlap between adjacent chunks - max_chunk_size_tokens: - type: integer - default: 800 - description: >- - Maximum number of tokens per chunk, must be between 100 and 4096 - additionalProperties: false + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - chunk_overlap_tokens - - max_chunk_size_tokens - title: VectorStoreChunkingStrategyStaticConfig - description: >- - Configuration for static chunking strategy. - "OpenAICreateVectorStoreRequestWithExtraBody": + - data + title: VectorStoreListResponse type: object + VectorStoreModifyRequest: + description: Request to modify a vector store. properties: name: - type: string - description: (Optional) A name for the vector store - file_ids: - type: array - items: - type: string - description: >- - List of file IDs to include in the vector store + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Expiration policy for the vector store - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - (Optional) Strategy for splitting files into chunks + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + nullable: true metadata: type: object additionalProperties: @@ -9462,143 +17591,75 @@ components: Represents the parsed content of a vector store file. OpenaiSearchVectorStoreRequest: type: object + VectorStoreSearchRequest: + description: Request to search a vector store. properties: query: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - The query string or array for performing the search. + anyOf: + - type: string + - items: + type: string + type: array + title: Query filters: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Filters based on file attributes to narrow the search results. + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + nullable: true max_num_results: + default: 10 + title: Max Num Results type: integer - description: >- - Maximum number of results to return (1 to 50 inclusive, default 10). 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: >- - Ranking options for fine-tuning the search results. + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Ranking Options + nullable: true rewrite_query: + default: false + title: Rewrite Query type: boolean - description: >- - Whether to rewrite the natural language query for vector search (default - false) - search_mode: - type: string - description: >- - The search mode to use - "keyword", "vector", or "hybrid" (default "vector") - additionalProperties: false - required: - - query - title: OpenaiSearchVectorStoreRequest - VectorStoreSearchResponse: - type: object - properties: - 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 - attributes: - type: object - additionalProperties: - oneOf: - - type: string - - type: number - - type: boolean - description: >- - (Optional) Key-value attributes associated with the file - content: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' - description: >- - List of content items matching the search query - additionalProperties: false required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - description: Response from searching a vector store. - VectorStoreSearchResponsePage: + - query + title: VectorStoreSearchRequest type: object + _safety_run_shield_Request: properties: - object: + shield_id: + title: Shield Id type: string - default: vector_store.search_results.page - description: >- - Object type identifier for the search results page - search_query: - type: array + messages: items: - type: string - description: >- - The original search query that was executed - data: + 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: Messages type: array - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - description: List of search result objects - has_more: - type: boolean - default: false - description: >- - Whether there are more results available beyond this page - next_page: - type: string - description: >- - (Optional) Token for retrieving the next page of results - additionalProperties: false + params: + additionalProperties: true + title: Params + type: object required: - - object - - search_query - - data - - has_more - title: VectorStoreSearchResponsePage - description: >- - Paginated response from searching a vector store. - VersionInfo: + - shield_id + - messages + - params + title: _safety_run_shield_Request type: object - properties: - version: - type: string - description: Version number of the service - additionalProperties: false - required: - - version - title: VersionInfo - description: Version information for the service. responses: BadRequest400: description: The request was invalid or malformed @@ -9611,8 +17672,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: @@ -9620,11 +17680,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: @@ -9632,185 +17690,10 @@ 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: $ref: '#/components/schemas/Error' - example: - status: 0 - title: Error - detail: An unexpected error occurred -security: - - Default: [] -tags: - - name: Agents - description: >- - APIs for creating and interacting with agentic systems. - - - ## Responses API - - - The Responses API provides OpenAI-compatible functionality with enhanced capabilities - for dynamic, stateful interactions. - - - > **✅ STABLE**: This API is production-ready with backward compatibility guarantees. - Recommended for production applications. - - - ### ✅ Supported Tools - - - The Responses API supports the following tool types: - - - - **`web_search`**: Search the web for current information and real-time data - - - **`file_search`**: Search through uploaded files and vector stores - - Supports dynamic `vector_store_ids` per call - - Compatible with OpenAI file search patterns - - **`function`**: Call custom functions with JSON schema validation - - - **`mcp_tool`**: Model Context Protocol integration - - - ### ✅ Supported Fields & Features - - - **Core Capabilities:** - - - **Dynamic Configuration**: Switch models, vector stores, and tools per request - without pre-configuration - - - **Conversation Branching**: Use `previous_response_id` to branch conversations - and explore different paths - - - **Rich Annotations**: Automatic file citations, URL citations, and container - file citations - - - **Status Tracking**: Monitor tool call execution status and handle failures - gracefully - - - ### 🚧 Work in Progress - - - - Full real-time response streaming support - - - `tool_choice` parameter - - - `max_tool_calls` parameter - - - Built-in tools (code interpreter, containers API) - - - Safety & guardrails - - - `reasoning` capabilities - - - `service_tier` - - - `logprobs` - - - `max_output_tokens` - - - `metadata` handling - - - `instructions` - - - `incomplete_details` - - - `background` - x-displayName: Agents - - name: Batches - description: >- - The API is designed to allow use of openai client libraries for seamless integration. - - - This API provides the following extensions: - - idempotent batch creation - - Note: This API is currently under active development and may undergo changes. - x-displayName: >- - The Batches API enables efficient processing of multiple requests in a single - operation, particularly useful for processing large datasets, batch evaluation - workflows, and cost-effective inference at scale. - - name: Conversations - description: >- - Protocol for conversation management operations. - x-displayName: Conversations - - name: Files - description: >- - This API is used to upload documents that can be used with other Llama Stack - APIs. - x-displayName: Files - - name: Inference - description: >- - Llama Stack Inference API for generating completions, chat completions, and - embeddings. - - - This API provides the raw interface to the underlying models. Three kinds of - models are supported: - - - LLM models: these models generate "raw" and "chat" (conversational) completions. - - - Embedding models: these models generate embeddings to be used for semantic - search. - - - Rerank models: these models reorder the documents based on their relevance - to a query. - x-displayName: Inference - - name: Inspect - description: >- - APIs for inspecting the Llama Stack service, including health status, available - API routes with methods and implementing providers. - x-displayName: Inspect - - name: Models - description: '' - - name: Prompts - description: >- - Protocol for prompt management operations. - x-displayName: Prompts - - name: Providers - description: >- - Providers API for inspecting, listing, and modifying providers and their configurations. - x-displayName: Providers - - name: Safety - description: OpenAI-compatible Moderations API. - x-displayName: Safety - - name: Scoring - description: '' - - name: ScoringFunctions - description: '' - - name: Shields - description: '' - - name: ToolGroups - description: '' - - name: ToolRuntime - description: '' - - name: VectorIO - description: '' -x-tagGroups: - - name: Operations - tags: - - Agents - - Batches - - Conversations - - Files - - Inference - - Inspect - - Models - - Prompts - - Providers - - Safety - - Scoring - - ScoringFunctions - - Shields - - ToolGroups - - ToolRuntime - - VectorIO diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index 65a255c173..76bb8b08dd 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -1,19 +1,19 @@ openapi: 3.1.0 info: - title: >- - Llama Stack Specification - Stable & Experimental APIs - version: v1 - description: >- + title: Llama Stack Specification - Stable & Experimental APIs + 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. + 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. + **🔗 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: v1 servers: - - url: http://any-hosted-llama-stack.com +- url: http://any-hosted-llama-stack.com paths: /v1/batches: get: @@ -1406,90 +1406,82 @@ paths: deprecated: false /v1/providers/{provider_id}: get: + tags: + - Providers + summary: Inspect Provider + description: |- + Get provider. + + Get detailed information about a specific provider. + operationId: inspect_provider_v1_providers__provider_id__get responses: '200': - description: >- - A ProviderInfo object containing the provider's details. + description: A ProviderInfo object containing the provider's details. content: application/json: schema: $ref: '#/components/schemas/ProviderInfo' '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: - - Providers - summary: Get provider. - description: >- - Get provider. - - Get detailed information about a specific provider. parameters: - - name: provider_id - in: path - description: The ID of the provider to inspect. - required: true - schema: - type: string - deprecated: false - /v1/responses: + - name: provider_id + in: path + required: true + schema: + type: string + description: 'Path parameter: provider_id' + /v1/providers: get: + tags: + - Providers + summary: List Providers + description: |- + List providers. + + List all available providers. + operationId: list_providers_v1_providers_get responses: '200': - description: A ListOpenAIResponseObject. + description: A ListProvidersResponse containing information about all providers. content: application/json: schema: - $ref: '#/components/schemas/ListOpenAIResponseObject' + $ref: '#/components/schemas/ListProvidersResponse' '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: List all responses. - description: List all responses. - parameters: - - name: after - in: query - description: The ID of the last response to return. - required: false - schema: - type: string - - name: limit - in: query - description: The number of responses to return. - required: false - schema: - type: integer - - name: model - in: query - description: The model to filter responses by. - required: false - schema: - type: string - - name: order - in: query - description: >- - The order to sort responses by when sorted by created_at ('asc' or 'desc'). - required: false - schema: - $ref: '#/components/schemas/Order' - deprecated: false + /v1/responses: post: + tags: + - Agents + summary: Create Openai Response + description: Create a model response. + operationId: create_openai_response_v1_responses_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_responses_Request' responses: '200': description: An OpenAIResponseObject. @@ -1497,226 +1489,314 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIResponseObject' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIResponseObjectStream' '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 a model response. - description: Create a model response. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateOpenaiResponseRequest' - required: true - deprecated: false - x-llama-stack-extra-body-params: - - name: guardrails - schema: - type: array - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ResponseGuardrailSpec' - description: >- - List of guardrails to apply during response generation. Guardrails provide - safety and content moderation. - required: false - /v1/responses/{response_id}: + description: Default Response get: + tags: + - Agents + summary: List Openai Responses + description: List all responses. + operationId: list_openai_responses_v1_responses_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 50 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order responses: '200': - description: An OpenAIResponseObject. + description: A ListOpenAIResponseObject. content: application/json: schema: - $ref: '#/components/schemas/OpenAIResponseObject' + $ref: '#/components/schemas/ListOpenAIResponseObject' '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' + description: Default Response + /v1/responses/{response_id}: + get: tags: - - Agents - summary: Get a model response. + - Agents + summary: Get Openai Response description: Get a model response. - parameters: - - name: response_id - in: path - description: >- - The ID of the OpenAI response to retrieve. - required: true - schema: - type: string - deprecated: false - delete: + operationId: get_openai_response_v1_responses__response_id__get responses: '200': - description: An OpenAIDeleteResponseObject + description: An OpenAIResponseObject. content: application/json: schema: - $ref: '#/components/schemas/OpenAIDeleteResponseObject' + $ref: '#/components/schemas/OpenAIResponseObject' '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: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + delete: tags: - - Agents - summary: Delete a response. + - Agents + summary: Delete Openai Response description: Delete a response. - parameters: - - name: response_id - in: path - description: The ID of the OpenAI response to delete. - required: true - schema: - type: string - deprecated: false - /v1/responses/{response_id}/input_items: - get: + operationId: delete_openai_response_v1_responses__response_id__delete responses: '200': - description: An ListOpenAIResponseInputItem. + description: An OpenAIDeleteResponseObject content: application/json: schema: - $ref: '#/components/schemas/ListOpenAIResponseInputItem' + $ref: '#/components/schemas/OpenAIDeleteResponseObject' '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: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + /v1/responses/{response_id}/input_items: + get: tags: - - Agents - summary: List input items. + - Agents + summary: List Openai Response Input Items description: List input items. + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get parameters: - - name: response_id - in: path - description: >- - The ID of the response to retrieve input items for. - required: true - schema: - type: string - - name: after - in: query - description: >- - An item ID to list items after, used for pagination. - required: false - schema: - type: string - - name: before - in: query - description: >- - An item ID to list items before, used for pagination. - required: false - schema: - type: string - - name: include - in: query - description: >- - Additional fields to include in the response. - required: false - schema: - type: array - items: - type: string - - name: limit - in: query - description: >- - A limit on the number of objects to be returned. Limit can range between - 1 and 100, and the default is 20. - required: false - schema: - type: integer - - name: order - in: query - description: >- - The order to return the input items in. Default is desc. - required: false - schema: - $ref: '#/components/schemas/Order' - deprecated: false - /v1/safety/run-shield: - post: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + requestBody: + content: + application/json: + schema: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Include responses: '200': - description: A RunShieldResponse. + description: An ListOpenAIResponseInputItem. content: application/json: schema: - $ref: '#/components/schemas/RunShieldResponse' + $ref: '#/components/schemas/ListOpenAIResponseInputItem' '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' + description: Default Response + /v1/chat/completions/{completion_id}: + get: tags: - - Safety - summary: Run shield. - description: >- - Run shield. + - Inference + summary: Get Chat Completion + description: |- + Get chat completion. - Run a shield. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunShieldRequest' - required: true - deprecated: false - /v1/scoring-functions: - get: + Describe a chat completion by its ID. + operationId: get_chat_completion_v1_chat_completions__completion_id__get responses: '200': - description: A ListScoringFunctionsResponse. + description: A OpenAICompletionWithInputMessages. content: application/json: schema: - $ref: '#/components/schemas/ListScoringFunctionsResponse' + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' '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: completion_id + in: path + required: true + schema: + type: string + description: 'Path parameter: completion_id' + /v1/chat/completions: + get: + tags: + - Inference + summary: List Chat Completions + description: List chat completions. + operationId: list_chat_completions_v1_chat_completions_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + 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' tags: @@ -1755,19 +1835,20 @@ paths: get: responses: '200': - description: A ScoringFn. + description: An OpenAIChatCompletion. content: application/json: schema: - $ref: '#/components/schemas/ScoringFn' + $ref: '#/components/schemas/OpenAIChatCompletion' '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: @@ -1811,85 +1892,73 @@ paths: deprecated: true /v1/scoring/score: post: - responses: - '200': - description: >- - A ScoreResponse object containing rows and aggregated results. - content: - application/json: - schema: - $ref: '#/components/schemas/ScoreResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - Scoring - summary: Score a list of rows. - description: Score a list of rows. - parameters: [] + - Inference + summary: Openai Completion + description: |- + Create completion. + + Generate an OpenAI-compatible completion for the given prompt using the specified model. + operationId: openai_completion_v1_completions_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/ScoreRequest' + $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' required: true - deprecated: false - /v1/scoring/score-batch: - post: responses: '200': - description: A ScoreBatchResponse. + description: An OpenAICompletion. content: application/json: schema: - $ref: '#/components/schemas/ScoreBatchResponse' + $ref: '#/components/schemas/OpenAICompletion' '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/embeddings: + post: tags: - - Scoring - summary: Score a batch of rows. - description: Score a batch of rows. - parameters: [] + - Inference + summary: Openai Embeddings + description: |- + Create embeddings. + + Generate OpenAI-compatible embeddings for the given input using the specified model. + operationId: openai_embeddings_v1_embeddings_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/ScoreBatchRequest' + $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' required: true - deprecated: false - /v1/shields: - get: responses: '200': - description: A ListShieldsResponse. + description: An OpenAIEmbeddingsResponse containing the embeddings. content: application/json: schema: - $ref: '#/components/schemas/ListShieldsResponse' + $ref: '#/components/schemas/OpenAIEmbeddingsResponse' '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: - Shields @@ -1931,21 +2000,25 @@ paths: get: responses: '200': - description: A Shield. + description: RerankResponse with indices sorted by relevance score (descending). content: application/json: schema: - $ref: '#/components/schemas/Shield' + $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' + /v1/health: + get: tags: - Shields summary: Get a shield by its identifier. @@ -1987,58 +2060,30 @@ paths: deprecated: true /v1/tool-runtime/invoke: post: - responses: - '200': - description: A ToolInvocationResult. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolInvocationResult' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - ToolRuntime - summary: Run a tool with the given arguments. - description: Run a tool with the given arguments. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeToolRequest' - required: true - deprecated: false - /v1/tool-runtime/list-tools: - get: + - Batches + summary: Cancel Batch + description: Cancel a batch that is in progress. + operationId: cancel_batch_v1_batches__batch_id__cancel_post responses: '200': - description: A ListToolDefsResponse. + description: The updated batch object. content: application/json: schema: - $ref: '#/components/schemas/ListToolDefsResponse' + $ref: '#/components/schemas/Batch' '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: - - ToolRuntime - summary: List all tools in the runtime. - description: List all tools in the runtime. parameters: - name: tool_group_id in: query @@ -2228,5445 +2273,13348 @@ paths: deprecated: false /v1/vector-io/insert: post: - 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: - - VectorIO - summary: Insert chunks into a vector database. + - Vector Io + summary: Insert Chunks description: Insert chunks into a vector database. - parameters: [] + operationId: insert_chunks_v1_vector_io_insert_post requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/InsertChunksRequest' - required: true - deprecated: false - /v1/vector-io/query: - post: + type: array + items: + $ref: '#/components/schemas/Chunk-Input' + title: Chunks responses: '200': - description: A QueryChunksResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/QueryChunksResponse' + 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' + description: Default Response + /v1/vector_stores/{vector_store_id}/files: + post: tags: - - VectorIO - summary: Query chunks from a vector database. - description: Query chunks from a vector database. - parameters: [] + - Vector Io + summary: Openai Attach File To Vector Store + description: Attach a file to a vector store. + 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/QueryChunksRequest' - required: true - deprecated: false - /v1/vector_stores: - get: + $ref: '#/components/schemas/_vector_stores_vector_store_id_files_Request' responses: '200': - description: >- - A VectorStoreListResponse containing the list of vector stores. + description: A VectorStoreFileObject representing the attached file. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreListResponse' + $ref: '#/components/schemas/VectorStoreFileObject' '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' + description: Default Response + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + get: tags: - - VectorIO - summary: Returns a list of vector stores. - description: Returns a list of vector stores. + - Vector Io + summary: Openai List Files In Vector Store + description: List files in a vector store. + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get parameters: - - name: limit - in: query - description: >- - A limit on the number of objects to be returned. Limit can range between - 1 and 100, and the default is 20. - required: false - schema: - type: integer - - name: order - in: query - description: >- - Sort order by the `created_at` timestamp of the objects. `asc` for ascending - order and `desc` for descending order. - required: false - schema: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: filter + in: query + required: false + schema: + anyOf: + - const: completed type: string - - name: after - in: query - description: >- - A cursor for use in pagination. `after` is an object ID that defines your - place in the list. - required: false - schema: + - const: in_progress type: string - - name: before - in: query - description: >- - A cursor for use in pagination. `before` is an object ID that defines - your place in the list. - required: false - schema: + - const: cancelled type: string - deprecated: false + - const: failed + type: string + - type: 'null' + title: Filter + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + 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 + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: post: + tags: + - Vector Io + summary: Openai Cancel Vector Store File Batch + description: Cancels a vector store file batch. + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post responses: '200': - description: >- - A VectorStoreObject representing the created vector store. + description: A VectorStoreFileBatchObject representing the cancelled file batch. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '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: 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: + post: tags: - - VectorIO - summary: Creates a vector store. - description: >- + - Vector Io + summary: Openai Create Vector Store + description: |- Creates a vector store. Generate an OpenAI-compatible vector store with the given parameters. - parameters: [] + operationId: openai_create_vector_store_v1_vector_stores_post requestBody: + required: true content: application/json: schema: $ref: '#/components/schemas/OpenAICreateVectorStoreRequestWithExtraBody' - required: true - deprecated: false - /v1/vector_stores/{vector_store_id}: - get: responses: '200': - description: >- - A VectorStoreObject representing the vector store. + 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 + $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' + description: Default Response + get: tags: - - VectorIO - summary: Retrieves a vector store. - description: Retrieves a vector store. + - Vector Io + summary: Openai List Vector Stores + description: Returns a list of vector stores. + operationId: openai_list_vector_stores_v1_vector_stores_get parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to retrieve. - required: true - schema: - type: string - deprecated: false - post: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order responses: '200': - description: >- - A VectorStoreObject representing the updated vector store. + description: A VectorStoreListResponse containing the list of vector stores. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: '#/components/schemas/VectorStoreListResponse' '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' + description: Default Response + /v1/vector_stores/{vector_store_id}/file_batches: + post: tags: - - VectorIO - summary: Updates a vector store. - description: Updates a vector store. - parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to update. - required: true - schema: - type: string + - Vector Io + summary: Openai Create Vector Store File Batch + description: |- + Create a vector store file batch. + + Generate an OpenAI-compatible vector store file batch for the given vector store. + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenaiUpdateVectorStoreRequest' + $ref: '#/components/schemas/OpenAICreateVectorStoreFileBatchRequestWithExtraBody' required: true - deprecated: false - delete: responses: '200': - description: >- - A VectorStoreDeleteResponse indicating the deletion status. + description: A VectorStoreFileBatchObject representing the created file batch. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreDeleteResponse' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '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: - - VectorIO - summary: Delete a vector store. - description: Delete a vector store. parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to delete. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/file_batches: - post: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}: + get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store + description: Retrieves a vector store. + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get responses: '200': - description: >- - A VectorStoreFileBatchObject representing the created file batch. + description: A VectorStoreObject representing the vector store. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: '#/components/schemas/VectorStoreObject' '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: - - VectorIO - summary: Create a vector store file batch. - description: >- - Create a vector store file batch. - - Generate an OpenAI-compatible vector store file batch for the given vector - store. parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store to create the file batch for. - required: true - schema: - type: string + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + post: + tags: + - Vector Io + summary: Openai Update Vector Store + description: Updates a vector store. + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenAICreateVectorStoreFileBatchRequestWithExtraBody' + $ref: '#/components/schemas/_vector_stores_vector_store_id_Request' required: true - deprecated: false - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: - get: responses: '200': - description: >- - A VectorStoreFileBatchObject representing the file batch. + description: A VectorStoreObject representing the updated vector store. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: '#/components/schemas/VectorStoreObject' '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: - - VectorIO - summary: Retrieve a vector store file batch. - description: Retrieve a vector store file batch. parameters: - - name: batch_id - in: path - description: The ID of the file batch to retrieve. - required: true - schema: - type: string - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file batch. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: - post: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + delete: + tags: + - Vector Io + summary: Openai Delete Vector Store + description: Delete a vector store. + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete responses: '200': - description: >- - A VectorStoreFileBatchObject representing the cancelled file batch. + description: A VectorStoreDeleteResponse indicating the deletion status. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: '#/components/schemas/VectorStoreDeleteResponse' '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: - - VectorIO - summary: Cancels a vector store file batch. - description: Cancels a vector store file batch. parameters: - - name: batch_id - in: path - description: The ID of the file batch to cancel. - required: true - schema: - type: string - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file batch. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: + - 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}: get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store File + description: Retrieves a vector store file. + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get responses: '200': - description: >- - A VectorStoreFilesListInBatchResponse containing the list of files in - the batch. + description: A VectorStoreFileObject representing the file. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' + $ref: '#/components/schemas/VectorStoreFileObject' '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: - - VectorIO - summary: >- - Returns a list of vector store files in a batch. - description: >- - Returns a list of vector store files in a batch. parameters: - - name: batch_id - in: path - description: >- - The ID of the file batch to list files from. - required: true - schema: - type: string - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file batch. - required: true - schema: - type: string - - name: after - in: query - description: >- - A cursor for use in pagination. `after` is an object ID that defines your - place in the list. - required: false - schema: - type: string - - name: before - in: query - description: >- - A cursor for use in pagination. `before` is an object ID that defines - your place in the list. - required: false - schema: - type: string - - name: filter - in: query - description: >- - Filter by file status. One of in_progress, completed, failed, cancelled. - required: false - schema: - type: string - - name: limit - in: query - description: >- - A limit on the number of objects to be returned. Limit can range between - 1 and 100, and the default is 20. - required: false - schema: - type: integer - - name: order - in: query - description: >- - Sort order by the `created_at` timestamp of the objects. `asc` for ascending - order and `desc` for descending order. - required: false - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/files: - get: + - 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' + post: + tags: + - Vector Io + summary: Openai Update Vector Store File + description: Updates a vector store file. + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_files_file_id_Request' + required: true responses: '200': - description: >- - A VectorStoreListFilesResponse containing the list of files. + description: A VectorStoreFileObject representing the updated file. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreListFilesResponse' + $ref: '#/components/schemas/VectorStoreFileObject' '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: 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' + delete: tags: - - VectorIO - summary: List files in a vector store. - description: List files in a vector store. + - Vector Io + summary: Openai Delete Vector Store File + description: Delete a vector store file. + operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete + responses: + '200': + description: A VectorStoreFileDeleteResponse indicating the deletion status. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileDeleteResponse' + '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 - description: >- - The ID of the vector store to list files from. - required: true - schema: - type: string - - name: limit - in: query - description: >- - (Optional) A limit on the number of objects to be returned. Limit can - range between 1 and 100, and the default is 20. - required: false - schema: - type: integer - - name: order - in: query - description: >- - (Optional) Sort order by the `created_at` timestamp of the objects. `asc` - for ascending order and `desc` for descending order. - required: false - schema: - type: string - - name: after - in: query - description: >- - (Optional) A cursor for use in pagination. `after` is an object ID that - defines your place in the list. - required: false - schema: - type: string - - name: before - in: query - description: >- - (Optional) A cursor for use in pagination. `before` is an object ID that - defines your place in the list. - required: false - schema: - type: string - - name: filter - in: query - description: >- - (Optional) Filter by file status to only return files with the specified - status. - required: false - schema: - $ref: '#/components/schemas/VectorStoreFileStatus' - deprecated: false - post: + - 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}/file_batches/{batch_id}/files: + get: + tags: + - Vector Io + summary: Openai List Files In Vector Store File Batch + description: Returns a list of vector store files in a batch. + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: filter + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Filter + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order + - 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' responses: '200': - description: >- - A VectorStoreFileObject representing the attached file. + description: A VectorStoreFilesListInBatchResponse containing the list of files in the batch. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' '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: - - VectorIO - summary: Attach a file to a vector store. - description: Attach a file to a vector store. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store to attach the file to. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenaiAttachFileToVectorStoreRequest' - required: true - deprecated: false - /v1/vector_stores/{vector_store_id}/files/{file_id}: + description: Default Response + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store File Batch + description: Retrieve a vector store file batch. + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get responses: '200': - description: >- - A VectorStoreFileObject representing the file. + description: A VectorStoreFileBatchObject representing the file batch. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '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: - - VectorIO - summary: Retrieves a vector store file. - description: Retrieves a vector store file. parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to retrieve. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to retrieve. - required: true - schema: - type: string - deprecated: false - post: + - 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}/files/{file_id}/content: + get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store File Contents + description: Retrieves the contents of a vector store file. + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get responses: '200': - description: >- - A VectorStoreFileObject representing the updated file. + description: A list of InterleavedContent representing the file contents. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $ref: '#/components/schemas/VectorStoreFileContentsResponse' '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: - - VectorIO - summary: Updates a vector store file. - description: Updates a vector store file. parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to update. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to update. - required: true - schema: - type: string + - 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}/search: + post: + tags: + - Vector Io + summary: Openai Search Vector Store + description: |- + Search for chunks in a vector store. + + Searches a vector store for relevant chunks based on a query and optional file attribute filters. + operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenaiUpdateVectorStoreFileRequest' + $ref: '#/components/schemas/_vector_stores_vector_store_id_search_Request' required: true - deprecated: false - delete: responses: '200': - description: >- - A VectorStoreFileDeleteResponse indicating the deletion status. + description: A VectorStoreSearchResponse containing the search results. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileDeleteResponse' + $ref: '#/components/schemas/VectorStoreSearchResponsePage' '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: - - VectorIO - summary: Delete a vector store file. - description: Delete a vector store file. parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to delete. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to delete. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/files/{file_id}/content: - get: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector-io/query: + post: + tags: + - Vector Io + summary: Query Chunks + description: Query chunks from a vector database. + 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: >- - File contents, optionally with embeddings and metadata based on query - parameters. + description: A QueryChunksResponse. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileContentResponse' + $ref: '#/components/schemas/QueryChunksResponse' '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/models/{model_id}: + get: tags: - - VectorIO - summary: >- - Retrieves the contents of a vector store file. - description: >- - Retrieves the contents of a vector store file. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to retrieve. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to retrieve. - required: true - schema: - type: string - - name: include_embeddings - in: query - description: >- - Whether to include embedding vectors in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - - name: include_metadata - in: query - description: >- - Whether to include chunk metadata in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - deprecated: false - /v1/vector_stores/{vector_store_id}/search: - post: + - Models + summary: Get Model + description: |- + Get model. + + Get a model by its identifier. + operationId: get_model_v1_models__model_id__get responses: '200': - description: >- - A VectorStoreSearchResponse containing the search results. + description: A Model. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreSearchResponsePage' + $ref: '#/components/schemas/Model' '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: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' + delete: tags: - - VectorIO - summary: Search for chunks in a vector store. - description: >- - Search for chunks in a vector store. + - Models + summary: Unregister Model + description: |- + Unregister model. - Searches a vector store for relevant chunks based on a query and optional - file attribute filters. - parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to search. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenaiSearchVectorStoreRequest' - required: true - deprecated: false - /v1/version: - get: + Unregister a model. + operationId: unregister_model_v1_models__model_id__delete responses: '200': - description: >- - Version information containing the service version number. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VersionInfo' + schema: {} '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: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' + /v1/models: + get: tags: - - Inspect - summary: Get version. - description: >- - Get version. - - Get the version of the service. - parameters: [] - deprecated: false - /v1beta/datasetio/append-rows/{dataset_id}: - post: + - Models + summary: Openai List Models + description: List models using the OpenAI API. + operationId: openai_list_models_v1_models_get responses: '200': - description: OK + description: A OpenAIListModelsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIListModelsResponse' '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' + post: tags: - - DatasetIO - summary: Append rows to a dataset. - description: Append rows to a dataset. - parameters: - - name: dataset_id - in: path - description: >- - The ID of the dataset to append the rows to. - required: true - schema: - type: string + - Models + summary: Register Model + description: |- + Register model. + + Register a model. + operationId: register_model_v1_models_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/AppendRowsRequest' + $ref: '#/components/schemas/_models_Request' required: true - deprecated: false - /v1beta/datasetio/iterrows/{dataset_id}: - get: responses: '200': - description: A PaginatedResponse. + description: A Model. content: application/json: schema: - $ref: '#/components/schemas/PaginatedResponse' + $ref: '#/components/schemas/Model' '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/moderations: + post: 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. + - Safety + summary: Run Moderation + description: |- + Create moderation. - - has_more: Whether there are more items available after this set. - parameters: - - name: dataset_id - in: path - description: >- - The ID of the dataset to get the rows from. - required: true - schema: - type: string - - name: start_index - in: query - description: >- - Index into dataset for the first row to get. Get all rows if None. - required: false - schema: - type: integer - - name: limit - in: query - description: The number of rows to get. - required: false - schema: - type: integer - deprecated: false - /v1beta/datasets: - get: + Classifies if text and/or image inputs are potentially harmful. + operationId: run_moderation_v1_moderations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_moderations_Request' + required: true responses: '200': - description: A ListDatasetsResponse. + description: A moderation object. content: application/json: schema: - $ref: '#/components/schemas/ListDatasetsResponse' + $ref: '#/components/schemas/ModerationObject' '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. - parameters: [] - deprecated: false + /v1/safety/run-shield: 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. - parameters: [] + - Safety + summary: Run Shield + description: |- + Run shield. + + Run a shield. + operationId: run_shield_v1_safety_run_shield_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/RegisterDatasetRequest' + $ref: '#/components/schemas/_safety_run_shield_Request' required: true - deprecated: true - /v1beta/datasets/{dataset_id}: - get: responses: '200': - description: A Dataset. + description: A RunShieldResponse. 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: Get a dataset by its ID. - description: Get a dataset by its ID. - parameters: - - name: dataset_id - in: path - description: The ID of the dataset to get. - required: true - schema: - type: string - deprecated: false - delete: - responses: - '200': - description: OK + $ref: '#/components/schemas/RunShieldResponse' '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: Unregister a dataset by its ID. - description: Unregister a dataset by its ID. - parameters: - - name: dataset_id - in: path - description: The ID of the dataset to unregister. - required: true - schema: - type: string - deprecated: true - /v1alpha/eval/benchmarks: + /v1/shields/{identifier}: get: + tags: + - Shields + summary: Get Shield + description: Get a shield by its identifier. + operationId: get_shield_v1_shields__identifier__get responses: '200': - description: A ListBenchmarksResponse. + description: A Shield. content: application/json: schema: - $ref: '#/components/schemas/ListBenchmarksResponse' + $ref: '#/components/schemas/Shield' '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: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + delete: tags: - - Benchmarks - summary: List all benchmarks. - description: List all benchmarks. - parameters: [] - deprecated: false - post: + - Shields + summary: Unregister Shield + description: Unregister a shield. + operationId: unregister_shield_v1_shields__identifier__delete responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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: - - Benchmarks - summary: Register a benchmark. - description: Register a benchmark. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterBenchmarkRequest' + parameters: + - name: identifier + in: path required: true - deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}: + schema: + type: string + description: 'Path parameter: identifier' + /v1/shields: get: + tags: + - Shields + summary: List Shields + description: List all shields. + operationId: list_shields_v1_shields_get responses: '200': - description: A Benchmark. + description: >- + File contents, optionally with embeddings and metadata based on query + parameters. content: application/json: schema: - $ref: '#/components/schemas/Benchmark' + $ref: '#/components/schemas/VectorStoreFileContentResponse' '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' +<<<<<<< HEAD tags: - - Benchmarks - summary: Get a benchmark by its ID. - description: Get a benchmark by its ID. - parameters: - - name: benchmark_id + - VectorIO + summary: >- + Retrieves the contents of a vector store file. + description: >- + Retrieves the contents of a vector store file. + parameters: + - name: vector_store_id in: path - description: The ID of the benchmark to get. + description: >- + The ID of the vector store containing the file to retrieve. required: true schema: type: string - 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. - parameters: - - name: benchmark_id + - name: file_id in: path - description: The ID of the benchmark to unregister. + description: The ID of the file to retrieve. required: true schema: type: string - deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + - name: include_embeddings + in: query + description: >- + Whether to include embedding vectors in the response. + required: false + schema: + $ref: '#/components/schemas/bool' + - name: include_metadata + in: query + description: >- + Whether to include chunk metadata in the response. + required: false + schema: + $ref: '#/components/schemas/bool' + deprecated: false + /v1/vector_stores/{vector_store_id}/search: +======= +>>>>>>> a84647350 (chore: use Pydantic to generate OpenAPI schema) post: + tags: + - Shields + summary: Register Shield + description: Register a shield. + operationId: register_shield_v1_shields_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_shields_Request' + required: true responses: '200': - description: >- - EvaluateResponse object containing generations and scores. + description: A Shield. content: application/json: schema: - $ref: '#/components/schemas/EvaluateResponse' + $ref: '#/components/schemas/Shield' '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' + /v1beta/datasetio/append-rows/{dataset_id}: + post: tags: - - Eval - summary: Evaluate a list of rows on a benchmark. - description: Evaluate a list of rows on a benchmark. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string + - Datasetio + summary: Append Rows + description: Append rows to a dataset. + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post requestBody: content: application/json: schema: - $ref: '#/components/schemas/EvaluateRowsRequest' + items: + additionalProperties: true + type: object + type: array + title: Rows required: true - deprecated: false - /v1alpha/eval/benchmarks/{benchmark_id}/jobs: - post: responses: '200': - description: >- - The job that was created to run the evaluation. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Job' + schema: {} '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: Run an evaluation on a benchmark. - description: Run an evaluation on a benchmark. parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunEvalRequest' + - name: dataset_id + in: path required: true - deprecated: false - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasetio/iterrows/{dataset_id}: get: + tags: + - Datasetio + summary: Iterrows + 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. + operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get + parameters: + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Limit + - name: start_index + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Start Index + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' responses: '200': - description: The status of the evaluation job. + description: A PaginatedResponse. content: application/json: schema: - $ref: '#/components/schemas/Job' + $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' + description: Default Response + /v1beta/datasets/{dataset_id}: + get: tags: - - Eval - summary: Get the status of a job. - description: Get the status of a job. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to get the status of. - required: true - schema: - type: string - deprecated: false - delete: + - Datasets + summary: Get Dataset + description: Get a dataset by its ID. + operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': - description: OK + description: A Dataset. + content: + application/json: + schema: + $ref: '#/components/schemas/Dataset' '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: Cancel a job. - description: Cancel a job. parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to cancel. - required: true - schema: - type: string - deprecated: false - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: - get: + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + delete: + tags: + - Datasets + summary: Unregister Dataset + description: Unregister a dataset by its ID. + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete responses: '200': - description: The result of the job. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' + schema: {} '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: Get the result of a job. - description: Get the result of a job. parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to get the result of. - required: true - schema: - type: string - deprecated: false - /v1alpha/inference/rerank: - post: + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasets: + get: + tags: + - Datasets + summary: List Datasets + description: List all datasets. + operationId: list_datasets_v1beta_datasets_get responses: '200': - description: >- - RerankResponse with indices sorted by relevance score (descending). + description: A ListDatasetsResponse. content: application/json: schema: - $ref: '#/components/schemas/RerankResponse' + $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' + post: 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. - parameters: [] + - Datasets + summary: Register Dataset + description: Register a new dataset. + operationId: register_dataset_v1beta_datasets_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/RerankRequest' + $ref: '#/components/schemas/_datasets_Request' required: true - deprecated: false - /v1alpha/post-training/job/artifacts: + deprecated: true + /v1beta/datasets/{dataset_id}: get: responses: '200': - description: A PostTrainingJobArtifactsResponse. + description: A Dataset. content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + $ref: '#/components/schemas/Dataset' '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 the artifacts of a training job. - description: Get the artifacts of a training job. - parameters: - - name: job_uuid - in: query - description: >- - The UUID of the job to get the artifacts of. - required: true - schema: - type: string - deprecated: false - /v1alpha/post-training/job/cancel: + /v1/scoring/score: post: + tags: + - Scoring + summary: Score + description: Score a list of rows. + operationId: score_v1_scoring_score_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_scoring_score_Request' + required: true responses: '200': - description: OK + 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': - $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: Cancel a training job. - description: Cancel a training job. - parameters: [] + /v1/scoring/score-batch: + post: + tags: + - Scoring + summary: Score Batch + description: Score a batch of rows. + operationId: score_batch_v1_scoring_score_batch_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/CancelTrainingJobRequest' + $ref: '#/components/schemas/_scoring_score_batch_Request' required: true - deprecated: false - /v1alpha/post-training/job/status: + 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/scoring-functions/{scoring_fn_id}: get: + tags: + - Scoring Functions + summary: Get Scoring Function + description: Get a scoring function by its ID. + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': - description: A PostTrainingJobStatusResponse. + description: A ScoringFn. content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJobStatusResponse' + $ref: '#/components/schemas/ScoringFn' '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: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' + delete: tags: - - PostTraining (Coming Soon) - summary: Get the status of a training job. - description: Get the status of a training job. + - Scoring Functions + summary: Unregister Scoring Function + description: Unregister a scoring function. + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: job_uuid - in: query - description: >- - The UUID of the job to get the status of. - required: true - schema: - type: string - deprecated: false - /v1alpha/post-training/jobs: + - name: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' + /v1/scoring-functions: get: + tags: + - Scoring Functions + summary: List Scoring Functions + description: List all scoring functions. + operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': - description: A ListPostTrainingJobsResponse. + description: A ListScoringFunctionsResponse. content: application/json: schema: - $ref: '#/components/schemas/ListPostTrainingJobsResponse' + $ref: '#/components/schemas/ListScoringFunctionsResponse' '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 all training jobs. - description: Get all training jobs. - parameters: [] - deprecated: false - /v1alpha/post-training/preference-optimize: + description: Default Response post: + tags: + - Scoring Functions + summary: Register Scoring Function + description: Register a scoring function. + operationId: register_scoring_function_v1_scoring_functions_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' responses: '200': - description: A PostTrainingJob. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' + 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' + description: Default Response + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + post: tags: - - PostTraining (Coming Soon) - summary: Run preference optimization of a model. - description: Run preference optimization of a model. - parameters: [] + - Eval + summary: Evaluate Rows + description: Evaluate a list of rows on a benchmark. + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/PreferenceOptimizeRequest' + $ref: '#/components/schemas/_eval_benchmarks_benchmark_id_evaluations_Request' required: true - deprecated: false - /v1alpha/post-training/supervised-fine-tune: - post: responses: '200': - description: A PostTrainingJob. + description: EvaluateResponse object containing generations and scores. content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJob' + $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' + parameters: + - name: dataset_id + in: path + description: The ID of the dataset to unregister. + required: true + schema: + type: string + deprecated: true + /v1alpha/eval/benchmarks: + get: tags: - - PostTraining (Coming Soon) - summary: Run supervised fine-tuning of a model. - description: Run supervised fine-tuning of a model. - parameters: [] + - Benchmarks + summary: List Benchmarks + description: List all benchmarks. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get + responses: + '200': + description: A ListBenchmarksResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListBenchmarksResponse' + '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: + - Benchmarks + summary: Register Benchmark + description: Register a benchmark. + operationId: register_benchmark_v1alpha_eval_benchmarks_post requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/SupervisedFineTuneRequest' + $ref: '#/components/schemas/RegisterBenchmarkRequest' required: true + deprecated: true + /v1alpha/eval/benchmarks/{benchmark_id}: + get: + 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: + - Benchmarks + summary: Get a benchmark by its ID. + description: Get a benchmark by its ID. + parameters: + - name: benchmark_id + in: path + description: The ID of the benchmark to get. + required: true + schema: + type: string deprecated: false -jsonSchemaDialect: >- - https://json-schema.org/draft/2020-12/schema -components: - schemas: - Error: - type: object - properties: - status: - type: integer - description: HTTP status code - title: + 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. + parameters: + - name: benchmark_id + in: path + description: The ID of the benchmark to unregister. + required: true + schema: + type: string + deprecated: true + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + post: + tags: + - Post Training + summary: Cancel Training Job + description: Cancel a training job. + operationId: cancel_training_job_v1alpha_post_training_job_cancel_post + parameters: + - name: job_uuid + in: query + required: true + schema: type: string - description: >- - Error title, a short summary of the error which is invariant for an error - type - detail: + title: Job Uuid + 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 + /v1alpha/post-training/job/artifacts: + get: + tags: + - Post Training + summary: Get Training Job Artifacts + description: Get the artifacts of a training job. + operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get + parameters: + - name: job_uuid + in: query + required: true + schema: type: string - description: >- - Error detail, a longer human-readable description of the error - instance: + title: Job Uuid + responses: + '200': + description: A PostTrainingJobArtifactsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + '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 + /v1alpha/post-training/job/status: + get: + tags: + - Post Training + summary: Get Training Job Status + description: Get the status of a training job. + operationId: get_training_job_status_v1alpha_post_training_job_status_get + parameters: + - name: job_uuid + in: query + required: true + schema: type: string - description: >- - (Optional) A URL which can be used to retrieve more information about - the specific occurrence of the error - additionalProperties: false - required: - - status - - title - - detail - title: Error - description: >- - Error response from the API. Roughly follows RFC 7807. - ListBatchesResponse: - type: object - properties: + title: Job Uuid + responses: + '200': + description: A PostTrainingJobStatusResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobStatusResponse' + '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 + /v1alpha/post-training/jobs: + get: + tags: + - Post Training + summary: Get Training Jobs + description: Get all training jobs. + operationId: get_training_jobs_v1alpha_post_training_jobs_get + responses: + '200': + description: A ListPostTrainingJobsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPostTrainingJobsResponse' + '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' + /v1alpha/post-training/preference-optimize: + post: + tags: + - Post Training + summary: Preference Optimize + description: Run preference optimization of a model. + operationId: preference_optimize_v1alpha_post_training_preference_optimize_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_post_training_preference_optimize_Request' + required: true + responses: + '200': + description: A PostTrainingJob. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJob' + '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' + /v1alpha/post-training/supervised-fine-tune: + post: + tags: + - Post Training + summary: Supervised Fine Tune + description: Run supervised fine-tuning of a model. + operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_post_training_supervised_fine_tune_Request' + required: true + responses: + '200': + description: A PostTrainingJob. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJob' + '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/tools/{tool_name}: + get: + tags: + - Tool Groups + summary: Get Tool + description: Get a tool by its name. + operationId: get_tool_v1_tools__tool_name__get + responses: + '200': + description: A ToolDef. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDef' + '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: tool_name + in: path + required: true + schema: + type: string + description: 'Path parameter: tool_name' + /v1/toolgroups/{toolgroup_id}: + get: + tags: + - Tool Groups + summary: Get Tool Group + description: Get a tool group by its ID. + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get + responses: + '200': + description: A ToolGroup. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolGroup' + '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: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' + delete: + tags: + - Tool Groups + summary: Unregister Toolgroup + description: Unregister a tool group. + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' + /v1/toolgroups: + get: + tags: + - Tool Groups + summary: List Tool Groups + description: List tool groups with optional provider. + 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: + - Tool Groups + summary: Register Tool Group + description: Register a tool group. + operationId: register_tool_group_v1_toolgroups_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' + 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/tools: + get: + tags: + - Tool Groups + summary: List Tools + description: List tools with optional tool group. + operationId: list_tools_v1_tools_get + parameters: + - name: toolgroup_id + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + 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/tool-runtime/invoke: + post: + tags: + - Tool Runtime + summary: Invoke Tool + description: Run a tool with the given arguments. + 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: + - Tool Runtime + summary: List Runtime Tools + description: List all tools in the runtime. + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + parameters: + - name: tool_group_id + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Tool Group Id + requestBody: + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + title: Mcp Endpoint + 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/files/{file_id}: + get: + tags: + - Files + summary: Openai Retrieve File + description: |- + Retrieve file. + + Returns information about a specific file. + operationId: openai_retrieve_file_v1_files__file_id__get + responses: + '200': + description: An OpenAIFileObject containing file information. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileObject' + '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: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + delete: + tags: + - Files + summary: Openai Delete File + description: Delete file. + operationId: openai_delete_file_v1_files__file_id__delete + responses: + '200': + description: An OpenAIFileDeleteResponse indicating successful deletion. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileDeleteResponse' + '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: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + /v1/files: + get: + tags: + - Files + summary: Openai List Files + description: |- + List files. + + Returns a list of files that belong to the user's organization. + operationId: openai_list_files_v1_files_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 10000 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + - name: purpose + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/OpenAIFilePurpose' + - type: 'null' + title: Purpose + 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: + - Files + summary: Openai Upload File + description: |- + Upload file. + + Upload a file that can be used across various endpoints. + + The file upload should be a multipart form request with: + - file: The File object (not file name) to be uploaded. + - purpose: The intended purpose of the uploaded file. + - expires_after: Optional form values describing expiration for the file. + operationId: openai_upload_file_v1_files_post + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_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}/content: + get: + tags: + - Files + summary: Openai Retrieve File Content + description: |- + Retrieve file content. + + Returns the contents of the specified file. + operationId: openai_retrieve_file_content_v1_files__file_id__content_get + responses: + '200': + description: The raw file content as a binary response. + content: + application/json: + schema: {} + '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: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + /v1/prompts: + get: + tags: + - Prompts + summary: List Prompts + description: List all prompts. + 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: + - Prompts + summary: Create Prompt + description: |- + Create prompt. + + Create a new prompt. + 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: + - Prompts + summary: Delete Prompt + description: |- + Delete prompt. + + Delete a prompt. + operationId: delete_prompt_v1_prompts__prompt_id__delete + 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 + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + get: + tags: + - Prompts + summary: Get Prompt + description: |- + Get prompt. + + Get a prompt by its identifier and optional version. + operationId: get_prompt_v1_prompts__prompt_id__get + parameters: + - name: version + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Version + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + 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: + - Prompts + summary: Update Prompt + description: |- + Update prompt. + + Update an existing prompt (increments version). + 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: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/versions: + get: + tags: + - Prompts + summary: List Prompt Versions + description: |- + List prompt versions. + + List all versions of a specific prompt. + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get + responses: + '200': + description: A ListPromptsResponse containing all versions of the prompt. + 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' + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/set-default-version: + post: + tags: + - Prompts + summary: Set Default Version + description: |- + Set prompt version. + + Set which version of a prompt should be the default in get_prompt (latest). + 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/conversations/{conversation_id}/items: + post: + tags: + - Conversations + summary: Add Items + description: |- + Create items. + + Create items in the conversation. + 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' + get: + tags: + - Conversations + summary: List Items + description: |- + List items. + + List items in the conversation. + operationId: list_items_v1_conversations__conversation_id__items_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - enum: + - asc + - desc + type: string + - type: 'null' + title: Order + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + requestBody: + content: + application/json: + schema: + anyOf: + - type: array + items: + $ref: '#/components/schemas/ConversationItemInclude' + - type: 'null' + title: Include + 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 + /v1/conversations: + post: + tags: + - Conversations + summary: Create Conversation + description: |- + Create a conversation. + + Create a conversation. + 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}: + get: + tags: + - Conversations + summary: Get Conversation + description: |- + Retrieve a conversation. + + Get a conversation with the given ID. + operationId: get_conversation_v1_conversations__conversation_id__get + responses: + '200': + description: The 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' + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + post: + tags: + - Conversations + summary: Update Conversation + description: |- + Update a conversation. + + Update a conversation's metadata with the given ID. + operationId: update_conversation_v1_conversations__conversation_id__post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_conversations_conversation_id_Request' + required: true + responses: + '200': + description: The updated 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' + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + delete: + tags: + - Conversations + summary: Openai Delete Conversation + description: |- + Delete a conversation. + + Delete a conversation with the given ID. + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete + responses: + '200': + description: The deleted conversation resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationDeletedResource' + '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: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items/{item_id}: + get: + tags: + - Conversations + summary: Retrieve + description: |- + Retrieve an item. + + Retrieve a conversation item. + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get + responses: + '200': + description: The conversation item. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseMessage' + '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: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + - name: item_id + in: path + required: true + schema: + type: string + description: 'Path parameter: item_id' + delete: + tags: + - Conversations + summary: Openai Delete Conversation Item + description: |- + Delete an item. + + Delete a conversation item. + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete + responses: + '200': + description: The deleted item resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationItemDeletedResource' + '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: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + - name: item_id + in: path + required: true + schema: + type: string + description: 'Path parameter: item_id' +components: + schemas: + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: Types of aggregation functions for scoring results. + AllowedToolsFilter: + properties: + tool_names: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Tool Names + type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ArrayType: + properties: + type: + type: string + const: array + title: Type + default: array + type: object + title: ArrayType + description: Parameter type for array values. + 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. + 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: + anyOf: + - type: integer + - type: 'null' + title: Cancelled At + cancelling_at: + anyOf: + - type: integer + - type: 'null' + title: Cancelling At + completed_at: + anyOf: + - type: integer + - type: 'null' + title: Completed At + error_file_id: + anyOf: + - type: string + - type: 'null' + title: Error File Id + errors: + anyOf: + - $ref: '#/components/schemas/Errors' + - type: 'null' + expired_at: + anyOf: + - type: integer + - type: 'null' + title: Expired At + expires_at: + anyOf: + - type: integer + - type: 'null' + title: Expires At + failed_at: + anyOf: + - type: integer + - type: 'null' + title: Failed At + finalizing_at: + anyOf: + - type: integer + - type: 'null' + title: Finalizing At + in_progress_at: + anyOf: + - type: integer + - type: 'null' + title: In Progress At + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + model: + anyOf: + - type: string + - type: 'null' + title: Model + output_file_id: + anyOf: + - type: string + - type: 'null' + title: Output File Id + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + - type: 'null' + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + - type: 'null' + additionalProperties: true + type: object + required: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + BatchError: + properties: + code: + anyOf: + - type: string + - type: 'null' + title: Code + line: + anyOf: + - type: integer + - type: 'null' + title: Line + message: + anyOf: + - type: string + - type: 'null' + title: Message + param: + anyOf: + - type: string + - type: 'null' + title: Param + 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: + anyOf: + - type: string + - type: 'null' + title: Provider Resource Id + description: Unique identifier for this resource in the provider + 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. + BenchmarkConfig: + properties: + eval_candidate: + $ref: '#/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: + 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: object + required: + - eval_candidate + title: BenchmarkConfig + description: A benchmark configuration for evaluation. + Body_openai_upload_file_v1_files_post: + properties: + file: + type: string + format: binary + title: File + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + expires_after: + anyOf: + - $ref: '#/components/schemas/ExpiresAfter' + - type: 'null' + type: object + required: + - file + - purpose + title: Body_openai_upload_file_v1_files_post + Body_register_benchmark_v1alpha_eval_benchmarks_post: + properties: + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + type: object + required: + - scoring_functions + title: Body_register_benchmark_v1alpha_eval_benchmarks_post + Body_register_scoring_function_v1_scoring_functions_post: + properties: + return_type: + anyOf: + - $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' + title: Return Type + 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 + type: object + required: + - return_type + title: Body_register_scoring_function_v1_scoring_functions_post + Body_register_tool_group_v1_toolgroups_post: + properties: + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + type: object + title: Body_register_tool_group_v1_toolgroups_post + BooleanType: + properties: + type: + type: string + const: boolean + title: Type + default: boolean + type: object + title: BooleanType + description: Parameter type for boolean values. + 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. + Chunk-Input: + 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 + title: Content + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Embedding + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + 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: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Embedding + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + ChunkMetadata: + 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 + type: object + title: 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. + CompletionInputType: + properties: + type: + type: string + const: completion_input + title: Type + default: completion_input + type: object + title: CompletionInputType + description: Parameter type for 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: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + 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. + items: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + title: Items + description: Initial items to include in the conversation context. You may add up to 20 items at a time. + type: object + required: + - id + - created_at + title: Conversation + description: OpenAI-compatible conversation object. + ConversationDeletedResource: + properties: + id: + type: string + title: Id + description: The deleted conversation identifier + object: + type: string + title: Object + description: Object type + default: conversation.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object + required: + - id + title: ConversationDeletedResource + description: Response for deleted conversation. + ConversationItemDeletedResource: + properties: + id: + type: string + title: Id + description: The deleted item identifier + object: + type: string + title: Object + description: Object type + default: conversation.item.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object + required: + - id + title: ConversationItemDeletedResource + description: Response for deleted conversation item. + 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: + anyOf: + - type: string + - type: 'null' + title: First Id + description: The ID of the first item in the list + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + description: The ID of the last item in the list + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Validation Dataset Id + packed: + anyOf: + - type: boolean + - type: 'null' + title: Packed + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + title: Train On Input + default: false + type: object + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: Configuration for training data and data loading. + Dataset: + properties: + identifier: + type: string + 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 + 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. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + 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. + EfficiencyConfig: + properties: + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + title: Enable Activation Checkpointing + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + title: Enable Activation Offloading + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + title: Memory Efficient Fsdp Wrap + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + title: Fsdp Cpu Offload + default: false + type: object + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. + Errors: + properties: + data: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + title: Data + object: + anyOf: + - type: string + - type: 'null' + title: Object + 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. + ExpiresAfter: + properties: + anchor: + type: string + const: created_at + title: Anchor + seconds: + type: integer + maximum: 2592000.0 + minimum: 3600.0 + title: Seconds + type: object + required: + - anchor + - seconds + title: 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) + 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. + HealthInfo: + properties: + status: + $ref: '#/components/schemas/HealthStatus' + type: object + required: + - status + title: HealthInfo + description: Health status information for 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 + 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 + 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. + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. + JsonType: + properties: + type: + type: string + const: json + title: Type + default: json + type: object + title: JsonType + description: Parameter type for JSON values. + LLMAsJudgeScoringFnParams: + properties: + type: + type: string + const: llm_as_judge + title: Type + default: llm_as_judge + judge_model: + type: string + title: Judge Model + prompt_template: + anyOf: + - type: string + - type: 'null' + title: Prompt Template + 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. + 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. + 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. + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + 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. + LoraFinetuningConfig: + properties: + type: + type: string + const: LoRA + title: Type + default: LoRA + lora_attn_modules: + items: + type: string + type: array + title: Lora Attn Modules + apply_lora_to_mlp: + type: boolean + title: Apply Lora To Mlp + apply_lora_to_output: + type: boolean + title: Apply Lora To Output + rank: + type: integer + title: Rank + alpha: + type: integer + title: Alpha + use_dora: + anyOf: + - type: boolean + - type: 'null' + title: Use Dora + default: false + quantize_base: + anyOf: + - type: boolean + - type: 'null' + title: Quantize Base + default: false + type: object + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + Model: + properties: + identifier: + type: string + 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 + 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. + ModelCandidate: + properties: + type: + type: string + const: model + title: Type + default: model + model: + type: string + title: Model + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + - type: 'null' + type: object + required: + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + ModelType: + type: string + enum: + - llm + - embedding + - rerank + title: ModelType + description: Enumeration of supported model types in Llama Stack. + 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. + ModerationObjectResults: + properties: + flagged: + type: boolean + title: Flagged + categories: + anyOf: + - additionalProperties: + type: boolean + type: object + - type: 'null' + title: Categories + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + title: Category Applied Input Types + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + title: Category Scores + user_message: + anyOf: + - type: string + - type: 'null' + title: User Message + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - flagged + title: ModerationObjectResults + description: A moderation object. + NumberType: + properties: + type: + type: string + const: number + title: Type + default: number + type: object + title: NumberType + description: Parameter type for numeric values. + ObjectType: + properties: + type: + type: string + const: object + title: Type + default: object + type: object + title: ObjectType + description: Parameter type for object values. + OpenAIAssistantMessageParam-Input: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + type: object + required: + - id + - choices + - created + - model + title: OpenAIChatCompletion + description: Response from an OpenAI-compatible chat completion request. + 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. + 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. + 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: + anyOf: + - type: number + - type: 'null' + title: Frequency Penalty + 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 + type: object + - type: 'null' + title: Logit Bias + logprobs: + anyOf: + - type: boolean + - type: 'null' + title: Logprobs + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Completion Tokens + max_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + n: + anyOf: + - type: integer + - type: 'null' + title: N + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + title: Parallel Tool Calls + presence_penalty: + anyOf: + - type: number + - type: 'null' + title: Presence Penalty + 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 + seed: + anyOf: + - type: integer + - type: 'null' + title: Seed + stop: + anyOf: + - type: string + - items: + type: string + type: array + - type: 'null' + title: Stop + stream: + anyOf: + - type: boolean + - type: 'null' + title: Stream + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Stream Options + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + 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 + top_logprobs: + anyOf: + - type: integer + - type: 'null' + title: Top Logprobs + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + user: + anyOf: + - type: string + - type: 'null' + title: User + additionalProperties: true + type: object + required: + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible chat completion endpoint. + OpenAIChatCompletionToolCall: + properties: + index: + anyOf: + - type: integer + - type: 'null' + title: Index + id: + anyOf: + - type: string + - type: 'null' + title: Id + type: + type: string + const: function + title: Type + default: function + function: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + - type: 'null' + type: object + title: OpenAIChatCompletionToolCall + description: Tool call specification for OpenAI-compatible chat completion responses. + OpenAIChatCompletionToolCallFunction: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + arguments: + anyOf: + - type: string + - type: 'null' + title: Arguments + type: object + title: OpenAIChatCompletionToolCallFunction + description: Function call details for OpenAI-compatible tool calls. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + - type: 'null' + completion_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + - type: 'null' + type: object + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage + description: Usage information for OpenAI chat completion. + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + title: Reasoning Tokens + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + title: Cached Tokens + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + - type: 'null' + type: object + required: + - message + - finish_reason + - index + title: OpenAIChoice + description: A choice from an OpenAI-compatible chat completion response. + OpenAIChoiceLogprobs-Output: + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + type: object + title: OpenAIChoiceLogprobs + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + 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. + + :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" + OpenAICompletionChoice-Output: + properties: + finish_reason: + type: string + title: Finish Reason + text: + type: string + title: Text + index: + type: integer + title: Index + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + - type: 'null' + type: object + required: + - finish_reason + - text + - index + title: 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 + 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: + anyOf: + - type: integer + - type: 'null' + title: Best Of + echo: + anyOf: + - type: boolean + - type: 'null' + title: Echo + frequency_penalty: + anyOf: + - type: number + - type: 'null' + title: Frequency Penalty + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + title: Logit Bias + logprobs: + anyOf: + - type: boolean + - type: 'null' + title: Logprobs + max_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + n: + anyOf: + - type: integer + - type: 'null' + title: N + presence_penalty: + anyOf: + - type: number + - type: 'null' + title: Presence Penalty + seed: + anyOf: + - type: integer + - type: 'null' + title: Seed + stop: + anyOf: + - type: string + - items: + type: string + type: array + - type: 'null' + title: Stop + stream: + anyOf: + - type: boolean + - type: 'null' + title: Stream + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Stream Options + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + user: + anyOf: + - type: string + - type: 'null' + title: User + suffix: + anyOf: + - type: string + - type: 'null' + title: Suffix + additionalProperties: true + type: object + required: + - model + - prompt + title: OpenAICompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible completion endpoint. + OpenAICompletionWithInputMessages: + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + input_messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + 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' + type: array + title: Input Messages + type: object + required: + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + properties: + file_ids: + items: + type: string + type: array + title: File Ids + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Attributes + 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 + additionalProperties: true + type: object + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + description: Request to create a vector store file batch with extra_body support. + OpenAICreateVectorStoreRequestWithExtraBody: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + file_ids: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: File Ids + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + 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 + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + additionalProperties: true + type: object + title: OpenAICreateVectorStoreRequestWithExtraBody + description: Request to create a vector store with extra_body support. + OpenAIDeleteResponseObject: + properties: + id: + type: string + title: Id + object: + type: string + const: response + title: Object + default: response + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: OpenAIDeleteResponseObject + description: Response object confirming deletion of an OpenAI response. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAIDeveloperMessageParam + description: A message from the developer in an OpenAI-compatible chat completion request. + 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. + 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. + OpenAIEmbeddingsRequestWithExtraBody: + properties: + model: + type: string + title: Model + input: + anyOf: + - type: string + - items: + type: string + type: array + title: Input + encoding_format: + anyOf: + - type: string + - type: 'null' + title: Encoding Format + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' + title: Dimensions + user: + anyOf: + - type: string + - type: 'null' + title: User + additionalProperties: true + type: object + required: + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody + description: Request parameters for OpenAI-compatible embeddings endpoint. + 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. + OpenAIFile: + properties: + type: + type: string + const: file + title: Type + default: file + file: + $ref: '#/components/schemas/OpenAIFileFile' + type: object + required: + - file + title: OpenAIFile + OpenAIFileDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + const: file + title: Object + default: file + deleted: + type: boolean + title: Deleted + type: object + required: + - id + - deleted + title: OpenAIFileDeleteResponse + description: Response for deleting a file in OpenAI Files API. + 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 + 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. + OpenAIFilePurpose: + type: string + enum: + - assistants + - batch + title: OpenAIFilePurpose + description: Valid purpose values for OpenAI Files API. + OpenAIImageURL: + properties: + url: + type: string + title: Url + detail: + anyOf: + - type: string + - type: 'null' + title: Detail + type: object + required: + - url + title: OpenAIImageURL + description: Image URL specification for OpenAI-compatible chat completion messages. + OpenAIJSONSchema: + properties: + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + strict: + anyOf: + - type: boolean + - type: 'null' + title: Strict + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Schema + type: object + title: OpenAIJSONSchema + description: JSON schema specification for OpenAI-compatible structured response format. + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + type: array + title: Data + type: object + required: + - data + title: OpenAIListModelsResponse + OpenAIModel: + properties: + id: + type: string + title: Id + object: + type: string + const: model + title: Object + default: model + created: + type: integer + title: Created + owned_by: + type: string + title: Owned By + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Custom Metadata + type: object + required: + - id + - created + - owned_by + title: OpenAIModel + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata + 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. + 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. + 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. + 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. + 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. + 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. + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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: + anyOf: + - type: string + - type: 'null' + title: File Data + file_id: + anyOf: + - type: string + - type: 'null' + title: File Id + file_url: + anyOf: + - type: string + - type: 'null' + title: File Url + filename: + anyOf: + - type: string + - type: 'null' + title: Filename + type: object + title: OpenAIResponseInputMessageContentFile + description: File content for input messages in OpenAI response format. + 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: + anyOf: + - type: string + - type: 'null' + title: File Id + image_url: + anyOf: + - type: string + - type: 'null' + title: Image Url + type: object + title: OpenAIResponseInputMessageContentImage + description: Image content for input messages in OpenAI response format. + 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. + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + max_num_results: + anyOf: + - type: integer + maximum: 50.0 + minimum: 1.0 + - type: 'null' + title: Max Num Results + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + - type: 'null' + type: object + required: + - vector_store_ids + title: OpenAIResponseInputToolFileSearch + description: File search tool configuration for OpenAI response inputs. + OpenAIResponseInputToolFunction: + properties: + type: + type: string + const: function + title: Type + default: function + name: + type: string + title: Name + 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 + type: object + required: + - name + - parameters + title: OpenAIResponseInputToolFunction + description: Function tool configuration for OpenAI response inputs. + OpenAIResponseInputToolWebSearch: + properties: + type: + anyOf: + - type: string + const: web_search + - type: string + const: web_search_preview + - type: string + const: web_search_preview_2025_03_11 + - type: string + const: web_search_2025_08_26 + title: Type + default: web_search + search_context_size: + anyOf: + - type: string + pattern: ^low|medium|high$ + - type: 'null' + title: Search Context Size + default: medium + type: object + title: OpenAIResponseInputToolWebSearch + description: Web search tool configuration for OpenAI response inputs. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + reason: + anyOf: + - type: string + - type: 'null' + title: Reason + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + tools: + anyOf: + - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' + title: Tools + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + type: object + required: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject + description: Complete OpenAI response object containing generation results and metadata. + 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: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array + - type: 'null' + title: Results + type: object + required: + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall + description: File search tool call output message for OpenAI responses. + 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. + 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: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status + type: object + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + description: Function tool call output message for OpenAI responses. + 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: + anyOf: + - type: string + - type: 'null' + title: Error + output: + anyOf: + - type: string + - type: 'null' + title: Output + type: object + required: + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + description: Model Context Protocol (MCP) call output message for OpenAI responses. + 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. + 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. + OpenAIResponsePrompt: + properties: + id: + 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 + version: + anyOf: + - type: string + - type: 'null' + title: Version + type: object + required: + - id + title: OpenAIResponsePrompt + description: OpenAI compatible Prompt object that is used in OpenAI responses. + OpenAIResponseText: + properties: + format: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + - type: 'null' + type: object + title: OpenAIResponseText + description: Text response configuration for OpenAI responses. + OpenAIResponseTextFormat: + properties: + type: + anyOf: + - type: string + const: text + - type: string + const: json_schema + - type: string + const: json_object + 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 + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + 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' + - type: 'null' + title: Allowed Tools + type: object + required: + - server_label + title: OpenAIResponseToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + - type: 'null' + output_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + - type: 'null' + type: object + required: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage + description: Usage information for OpenAI response. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + title: Cached Tokens + type: object + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + title: Reasoning Tokens + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAISystemMessageParam + description: A system message providing instructions or context to the model. + OpenAITokenLogProb: + properties: + token: + type: string + title: Token + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Bytes + 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. + + :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 + 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. + OpenAITopLogProb: + properties: + token: + type: string + title: Token + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Bytes + 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. + + :token: The token + :bytes: (Optional) The bytes for the token + :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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + 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. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: Available optimizer algorithms for training. + Order: + type: string + enum: + - asc + - desc + title: Order + description: Sort order for paginated responses. + 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: + anyOf: + - type: string + - type: 'null' + title: Prompt + description: The system prompt with variable placeholders + 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. + 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. + QATFinetuningConfig: + properties: + type: + type: string + const: QAT + title: Type + default: QAT + quantizer_name: + type: string + title: Quantizer Name + group_size: + type: integer + title: Group Size + type: object + required: + - quantizer_name + - group_size + title: QATFinetuningConfig + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. + 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. + 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. + 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. + RerankResponse: + properties: + data: + items: + $ref: '#/components/schemas/RerankData' + type: array + title: Data + type: object + required: + - data + title: RerankResponse + description: Response from a reranking request. + 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. + RunShieldResponse: + properties: + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + - type: 'null' + type: object + title: RunShieldResponse + description: Response from running a safety shield. + SafetyViolation: + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + anyOf: + - type: string + - type: 'null' + title: User Message + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - violation_level + title: SafetyViolation + description: Details of a safety violation detected by content moderation. + 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: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + repetition_penalty: + anyOf: + - type: number + - type: 'null' + title: Repetition Penalty + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Stop + type: object + title: SamplingParams + description: Sampling parameters. + ScoreBatchResponse: + properties: + dataset_id: + anyOf: + - type: string + - type: 'null' + title: Dataset Id + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreBatchResponse + description: Response from batch scoring operations on datasets. + ScoreResponse: + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreResponse + description: The response from scoring. + ScoringFn: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - type: string + - type: 'null' + title: Description + 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' + title: Return Type + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + 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: + 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 + type: object + required: + - identifier + - provider_id + - return_type + title: ScoringFn + description: A scoring function resource for evaluating model outputs. + 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. + SearchRankingOptions: + properties: + ranker: + anyOf: + - type: string + - type: 'null' + title: Ranker + score_threshold: + anyOf: + - type: number + - type: 'null' + title: Score Threshold + default: 0.0 + type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + Shield: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - identifier + - provider_id + title: Shield + description: A safety shield resource that can be used to check content. + StringType: + properties: + type: + type: string + const: string + title: Type + default: string + type: object + title: StringType + description: Parameter type for string values. + 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. + 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 + ToolDef: + properties: + toolgroup_id: + anyOf: + - type: string + - type: 'null' + title: Toolgroup Id + name: + type: string + title: Name + 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 + type: object + required: + - name + title: ToolDef + description: Tool definition used in runtime contexts. + ToolGroup: + properties: + identifier: + type: string + 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 + 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: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + type: object + required: + - identifier + - provider_id + title: ToolGroup + description: A group of related tools managed together. + 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 + - type: 'null' + title: Content + error_message: + anyOf: + - type: string + - type: 'null' + title: Error Message + error_code: + anyOf: + - type: integer + - type: 'null' + title: Error Code + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + type: object + title: ToolInvocationResult + description: Result of a tool invocation. + 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. + TopPSamplingStrategy: + properties: + type: + type: string + const: top_p + title: Type + default: top_p + temperature: + anyOf: + - type: number + minimum: 0.0 + - type: 'null' + title: Temperature + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + default: 0.95 + type: object + required: + - temperature + title: TopPSamplingStrategy + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. + 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: + anyOf: + - type: integer + - type: 'null' + title: Max Validation Steps + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + - type: 'null' + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + - type: 'null' + efficiency_config: + anyOf: + - $ref: '#/components/schemas/EfficiencyConfig' + - type: 'null' + dtype: + anyOf: + - type: string + - type: 'null' + title: Dtype + default: bf16 + type: object + required: + - n_epochs + title: TrainingConfig + description: Comprehensive configuration for the training process. + 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. + URL: + properties: + uri: + type: string + title: Uri + type: object + required: + - uri + title: URL + description: A URL reference to external content. + UnionType: + properties: + type: + type: string + const: union + title: Type + default: union + type: object + title: UnionType + description: Parameter type for union values. + VectorStoreChunkingStrategyAuto: + properties: + type: + type: string + const: auto + title: Type + default: auto + type: object + title: VectorStoreChunkingStrategyAuto + description: Automatic chunking strategy for vector store files. + 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. + 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. + 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. + VectorStoreDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.deleted + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: VectorStoreDeleteResponse + description: Response from deleting a vector store. + 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. + VectorStoreFileContentsResponse: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + attributes: + additionalProperties: true + type: object + title: Attributes + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + type: array + title: Content + type: object + required: + - file_id + - filename + - attributes + - content + title: VectorStoreFileContentsResponse + description: Response from retrieving the contents of a vector store file. + 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. + VectorStoreFileDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.file.deleted + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: VectorStoreFileDeleteResponse + description: Response from deleting a vector store file. + 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. + 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: + anyOf: + - $ref: '#/components/schemas/VectorStoreFileLastError' + - type: 'null' + 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. + VectorStoreObject: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store + created_at: + type: integer + title: Created At + name: + anyOf: + - type: string + - type: 'null' + title: Name + usage_bytes: + type: integer + title: Usage Bytes + default: 0 + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + type: string + title: Status + default: completed + 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 + type: object + title: Metadata + type: object + required: + - id + - created_at + - file_counts + title: VectorStoreObject + description: OpenAI Vector Store object. + VectorStoreSearchResponse: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + score: + type: number + title: Score + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + type: object + - type: 'null' + title: Attributes + 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. + VectorStoreSearchResponsePage: + 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: + title: Object + default: vector_store.search_results.page + search_query: + items: + type: string + type: array + title: Search Query + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + type: array + title: Data + has_more: + type: boolean + title: Has More + default: false + next_page: + anyOf: + - type: string + - type: 'null' + title: Next Page + type: object + required: + - search_query + - data + title: VectorStoreSearchResponsePage + description: Paginated response from searching a vector store. + VersionInfo: + properties: + version: + type: string + title: Version + type: object + required: + - version + title: VersionInfo + description: Version information for the service. + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: Severity level of a safety violation. + _URLOrData: + properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + data: + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + title: Data + type: object + title: _URLOrData + description: A URL or a base64 encoded string + _batches_Request: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + const: 24h + title: Completion Window + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + idempotency_key: + anyOf: + - type: string + - type: 'null' + title: Idempotency Key + type: object + required: + - input_file_id + - endpoint + - completion_window + title: _batches_Request + _conversations_Request: + properties: + items: + anyOf: + - 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' + 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' + type: array + - type: 'null' + title: Items + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + type: object + title: _conversations_Request + _conversations_conversation_id_Request: + properties: + metadata: + additionalProperties: + type: string + type: object + title: Metadata + type: object + required: + - metadata + title: _conversations_conversation_id_Request + _conversations_conversation_id_items_Request: + properties: + items: + 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' + 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' + type: array + title: Items + type: object + required: + - items + title: _conversations_conversation_id_items_Request + _datasets_Request: + properties: + purpose: + title: Purpose + source: + title: Source + metadata: + title: Metadata + dataset_id: + title: Dataset Id + type: object + required: + - purpose + - source + title: _datasets_Request + _eval_benchmarks_benchmark_id_evaluations_Request: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + type: object + required: + - input_rows + - scoring_functions + - benchmark_config + title: _eval_benchmarks_benchmark_id_evaluations_Request + _inference_rerank_Request: + properties: + model: + type: string + title: Model + query: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: Query + items: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + type: array + title: Items + max_num_results: + anyOf: + - type: integer + - type: 'null' + title: Max Num Results + type: object + required: + - model + - query + - items + title: _inference_rerank_Request + _models_Request: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + anyOf: + - type: string + - type: 'null' + title: Provider Model Id + provider_id: + anyOf: + - type: string + - type: 'null' + title: Provider Id + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + model_type: + anyOf: + - $ref: '#/components/schemas/ModelType' + - type: 'null' + type: object + required: + - model_id + title: _models_Request + _moderations_Request: + properties: + input: + anyOf: + - type: string + - items: + type: string + type: array + title: Input + model: + anyOf: + - type: string + - type: 'null' + title: Model + type: object + required: + - input + title: _moderations_Request + _post_training_preference_optimize_Request: + properties: + job_uuid: + type: string + title: Job Uuid + finetuned_model: + type: string + title: Finetuned Model + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: _post_training_preference_optimize_Request + _post_training_supervised_fine_tune_Request: + properties: + job_uuid: + type: string + title: Job Uuid + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + model: + anyOf: + - type: string + - type: 'null' + title: Model + description: Model descriptor for training if not in provider config` + checkpoint_dir: + anyOf: + - type: string + - type: 'null' + title: Checkpoint Dir + algorithm_config: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + - $ref: '#/components/schemas/QATFinetuningConfig' + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + - type: 'null' + title: Algorithm Config + type: object + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: _post_training_supervised_fine_tune_Request + _prompts_Request: + properties: + prompt: + type: string + title: Prompt + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Variables + type: object + required: + - prompt + title: _prompts_Request + _prompts_prompt_id_Request: + properties: + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Variables + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt + - version + title: _prompts_prompt_id_Request + _prompts_prompt_id_set_default_version_Request: + properties: + version: + type: integer + title: Version + type: object + required: + - version + title: _prompts_prompt_id_set_default_version_Request + _responses_Request: + properties: + input: + title: Input + model: + title: Model + prompt: + title: Prompt + instructions: + title: Instructions + previous_response_id: + title: Previous Response Id + conversation: + title: Conversation + store: + title: Store + default: true + stream: + title: Stream + default: false + temperature: + title: Temperature + text: + title: Text + tools: + title: Tools + include: + title: Include + max_infer_iters: + title: Max Infer Iters + default: 10 + guardrails: + title: Guardrails + type: object + required: + - input + - model + title: _responses_Request + _scoring_score_Request: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + additionalProperties: + 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' + type: object + 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: + additionalProperties: + 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' + type: object + 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: + anyOf: + - type: string + - type: 'null' + title: Provider Shield Id + provider_id: + anyOf: + - type: string + - type: 'null' + title: Provider Id + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - shield_id + title: _shields_Request + _tool_runtime_invoke_Request: + properties: + tool_name: + type: string + title: Tool Name + kwargs: + additionalProperties: true + type: object + title: Kwargs + type: object + required: + - tool_name + - kwargs + title: _tool_runtime_invoke_Request + _vector_io_query_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + 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: Query + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - vector_store_id + - query + title: _vector_io_query_Request + _vector_stores_vector_store_id_Request: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + type: object + title: _vector_stores_vector_store_id_Request + _vector_stores_vector_store_id_files_Request: + properties: + file_id: + type: string + title: File Id + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Attributes + 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 + type: object + required: + - file_id + title: _vector_stores_vector_store_id_files_Request + _vector_stores_vector_store_id_files_file_id_Request: + properties: + attributes: + additionalProperties: true + type: object + title: Attributes + type: object + required: + - attributes + title: _vector_stores_vector_store_id_files_file_id_Request + _vector_stores_vector_store_id_search_Request: + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: Query + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + max_num_results: + anyOf: + - type: integer + - type: 'null' + title: Max Num Results + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + - type: 'null' + rewrite_query: + anyOf: + - type: boolean + - type: 'null' + title: Rewrite Query + default: false + search_mode: + anyOf: + - type: string + - type: 'null' + title: Search Mode + default: vector + type: object + required: + - query + title: _vector_stores_vector_store_id_search_Request + Error: + description: Error response from the API. Roughly follows RFC 7807. + properties: + status: + title: Status + type: integer + title: + title: Title + type: string + detail: + title: Detail + type: string + instance: + anyOf: + - type: string + - type: 'null' + title: Instance + nullable: true + required: + - status + - title + - detail + title: Error + type: object + ImageContentItem: + description: A image content item + properties: + type: + const: image + default: image + title: Type + type: string + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + BuiltinTool: + enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + title: BuiltinTool + type: string + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string + required: + - image + title: ImageDelta + type: object + TextDelta: + description: A text content delta for streaming responses. + properties: + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: TextDelta + type: object + ToolCall: + properties: + call_id: + title: Call Id + type: string + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + arguments: + title: Arguments + type: string + required: + - call_id + - tool_name + - arguments + title: ToolCall + type: object + ToolCallDelta: + description: A tool call content delta for streaming responses. + properties: + type: + const: tool_call + default: tool_call + title: Type + type: string + tool_call: + anyOf: + - type: string + - $ref: '#/components/schemas/ToolCall' + title: Tool Call + parse_status: + $ref: '#/components/schemas/ToolCallParseStatus' + required: + - tool_call + - parse_status + title: ToolCallDelta + type: object + ToolCallParseStatus: + description: Status of tool call parsing during streaming. + enum: + - started + - in_progress + - failed + - succeeded + title: ToolCallParseStatus + type: string + ContentDelta: + discriminator: + mapping: + image: '#/components/schemas/ImageDelta' + text: '#/components/schemas/TextDelta' + tool_call: '#/components/schemas/ToolCallDelta' + propertyName: type + oneOf: + - $ref: '#/components/schemas/TextDelta' + - $ref: '#/components/schemas/ImageDelta' + - $ref: '#/components/schemas/ToolCallDelta' + ToolDefinition: + properties: + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + nullable: true + input_schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Input Schema + nullable: true + output_schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Output Schema + nullable: true + required: + - tool_name + title: ToolDefinition + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + CompletionMessage: + description: A message containing the model's (assistant) response in a chat conversation. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + stop_reason: + $ref: '#/components/schemas/StopReason' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/ToolCall' + type: array + - type: 'null' + title: Tool Calls + required: + - content + - stop_reason + title: CompletionMessage + type: object + StopReason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + title: StopReason + type: string + ToolResponseMessage: + description: A message representing the result of a tool invocation. + properties: + role: + const: tool + default: tool + title: Role + type: string + call_id: + title: Call Id + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + required: + - call_id + - content + title: ToolResponseMessage + type: object + UserMessage: + description: A message from the user in a chat conversation. + properties: + role: + const: user + default: user + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + - type: 'null' + title: Context + nullable: true + required: + - content + title: UserMessage + type: object + Message: + discriminator: + mapping: + assistant: '#/components/schemas/CompletionMessage' + system: '#/components/schemas/SystemMessage' + tool: '#/components/schemas/ToolResponseMessage' + user: '#/components/schemas/UserMessage' + propertyName: role + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/SystemMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + - $ref: '#/components/schemas/CompletionMessage' + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + OpenAIChatCompletionContentPartParam: + 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' + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + nullable: true + name: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + nullable: true + title: OpenAIAssistantMessageParam + type: object + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object + OpenAIMessageParam: + 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' + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + VectorStoreFileStatus: + anyOf: + - const: completed + type: string + - const: in_progress + type: string + - const: cancelled + type: string + - const: failed + type: string + OpenAIResponseInputMessageContent: + 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' + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + 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: + anyOf: + - type: string + - type: 'null' + title: Id + nullable: true + status: + anyOf: + - type: string + - type: 'null' + title: Status + nullable: true + required: + - content + - role + title: OpenAIResponseMessage + type: object + OpenAIResponseOutput: + 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' + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Always + nullable: true + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Never + nullable: true + title: ApprovalFilter + type: object + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + properties: + type: + const: mcp + default: mcp + title: Type + type: string + server_label: + title: Server Label + type: string + server_url: + title: Server Url + type: string + headers: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Headers + nullable: true + require_approval: + anyOf: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + default: never + title: Require Approval + allowed_tools: + anyOf: + - items: + type: string + type: array + - $ref: '#/components/schemas/AllowedToolsFilter' + - type: 'null' + title: Allowed Tools + nullable: true + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + type: object + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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/OpenAIResponseInputToolMCP' + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. + properties: + type: + const: output_text + default: output_text + title: Type + type: string + text: + title: Text + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: Annotations + type: array + logprobs: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + title: Logprobs + nullable: true + required: + - text + title: OpenAIResponseContentPartOutputText + type: object + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. + properties: + type: + const: reasoning_text + default: reasoning_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningText + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. + properties: + type: + const: summary_text + default: summary_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningSummary + type: object + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.completed + default: response.completed + title: Type + type: string + required: + - response + title: OpenAIResponseObjectStreamResponseCompleted + type: object + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. + properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: Part + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.added + default: response.content_part.added + title: Type + type: string + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded + type: object + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. + properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: Part + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.done + default: response.content_part.done + title: Type + type: string + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone + type: object + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.created + default: response.created + title: Type + type: string + required: + - response + title: OpenAIResponseObjectStreamResponseCreated + type: object + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.failed + default: response.failed + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed + type: object + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. + properties: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type + type: string + required: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress + type: object + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.incomplete + default: response.incomplete + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + properties: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type + type: string + required: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.failed + default: response.mcp_call.failed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed + type: object + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + type: object + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + type: object + OpenAIResponseObjectStreamResponseMcpListToolsFailed: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + type: object + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. + properties: + response_id: + title: Response Id + type: string + item: + 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: Item + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.added + default: response.output_item.added + title: Type + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded + type: object + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. + properties: + response_id: + title: Response Id type: string - last_id: + item: + 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: Item + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done + title: Type 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: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. properties: - input_file_id: + item_id: + title: Item Id type: string - description: >- - The ID of an uploaded file containing requests for the batch. - endpoint: + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: Annotation + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.annotation.added + default: response.output_text.annotation.added + title: Type type: string - description: >- - The endpoint to be used for all requests in the batch. - completion_window: + required: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + type: object + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. + properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta 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: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.delta + default: response.output_text.delta + title: Type type: string - description: >- - Optional idempotency key. When provided, enables idempotent behavior. - additionalProperties: false required: - - input_file_id - - endpoint - - completion_window - title: CreateBatchRequest - Batch: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta type: object + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. properties: - id: + content_index: + title: Content Index + type: integer + text: + title: Text type: string - completion_window: + item_id: + title: Item Id type: string - created_at: + output_index: + title: Output Index type: integer - endpoint: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done + title: Type type: string - input_file_id: + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. + properties: + item_id: + title: Item Id type: string - object: + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type type: string - const: batch - status: + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. + properties: + item_id: + title: Item Id type: string - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - cancelled_at: + output_index: + title: Output Index type: integer - cancelling_at: + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number type: integer - completed_at: + summary_index: + title: Summary Index type: integer - error_file_id: + type: + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done + title: Type 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: + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - expires_at: + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. + properties: + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done + title: Type + type: string + required: + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. + properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.delta + default: response.reasoning_text.delta + title: Type + type: string + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. + properties: + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done + title: Type + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone + type: object + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. + properties: + content_index: + title: Content Index type: integer - failed_at: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - finalizing_at: + sequence_number: + title: Sequence Number type: integer - in_progress_at: + type: + const: response.refusal.delta + default: response.refusal.delta + title: Type + type: string + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta + type: object + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. + properties: + content_index: + title: Content Index type: integer - metadata: - type: object - additionalProperties: - type: string - model: + refusal: + title: Refusal type: string - output_file_id: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.done + default: response.refusal.done + title: Type 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: + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone type: object + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. properties: - data: - type: array - items: - type: object - properties: - id: - type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChoice' - description: List of choices - object: - type: string - const: chat.completion - default: chat.completion - description: >- - The object type, which will be "chat.completion" - created: - type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: - type: string - description: >- - The model that was used to generate the chat completion - usage: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - description: >- - Token usage information for the completion - input_messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - additionalProperties: false - required: - - id - - choices - - object - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - description: >- - List of chat completion objects with their input messages - has_more: - type: boolean - description: >- - Whether there are more completions available beyond this list - first_id: - type: string - description: ID of the first completion in this list - last_id: + item_id: + title: Item Id type: string - description: ID of the last completion in this list - object: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type type: string - const: list - default: list - description: >- - Must be "list" to identify this as a list response - additionalProperties: false required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIChatCompletionResponse - description: >- - Response from listing OpenAI-compatible chat completions. - OpenAIAssistantMessageParam: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted type: object + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. properties: - role: + item_id: + title: Item Id type: string - const: assistant - default: assistant - description: >- - Must be "assistant" to identify this as the model's response - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - description: The content of the model's response - name: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress + title: Type type: string - description: >- - (Optional) The name of the assistant message participant. - tool_calls: - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - description: >- - List of tool calls. Each tool call is an OpenAIChatCompletionToolCall - object. - additionalProperties: false required: - - role - title: OpenAIAssistantMessageParam - description: >- - A message containing the model's (assistant) response in an OpenAI-compatible - chat completion request. - "OpenAIChatCompletionContentPartImageParam": + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress type: object + OpenAIResponseObjectStreamResponseWebSearchCallSearching: properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type type: string - const: image_url - default: image_url - description: >- - Must be "image_url" to identify this as image content - image_url: - $ref: '#/components/schemas/OpenAIImageURL' - description: >- - Image URL specification and processing details - additionalProperties: false required: - - type - - image_url - title: >- - OpenAIChatCompletionContentPartImageParam - description: >- - Image content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionContentPartParam: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - - $ref: '#/components/schemas/OpenAIFile' + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + type: object + OpenAIResponseObjectStream: discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + OpenAIResponseInput: + 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' + ConversationItem: + discriminator: mapping: - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - file: '#/components/schemas/OpenAIFile' - OpenAIChatCompletionContentPartTextParam: + 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: text - default: text + const: url_citation + default: url_citation description: >- - Must be "text" to identify this as text content - text: - type: string - description: The text content of the message - additionalProperties: false - required: - - type - - text - title: OpenAIChatCompletionContentPartTextParam - description: >- - Text content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionToolCall: - type: object - properties: - index: + Annotation type identifier, always "url_citation" + end_index: type: integer description: >- - (Optional) Index of the tool call in the list - id: - type: string + End position of the citation span in the content + start_index: + type: integer description: >- - (Optional) Unique identifier for the tool call - type: + Start position of the citation span in the content + title: type: string - const: function - default: function - description: >- - Must be "function" to identify this as a function call - function: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - description: (Optional) Function call details + description: Title of the referenced web resource + url: + type: string + description: URL of the referenced web resource additionalProperties: false required: - type - title: OpenAIChatCompletionToolCall + - end_index + - start_index + - title + - url + title: OpenAIResponseAnnotationCitation description: >- - Tool call specification for OpenAI-compatible chat completion responses. - OpenAIChatCompletionToolCallFunction: + URL citation annotation for referencing external web resources. + "OpenAIResponseAnnotationContainerFileCitation": type: object properties: - name: + type: type: string - description: (Optional) Name of the function to call - arguments: + const: container_file_citation + default: container_file_citation + container_id: type: string - description: >- - (Optional) Arguments to pass to the function as a JSON string - additionalProperties: false - title: OpenAIChatCompletionToolCallFunction - description: >- - Function call details for OpenAI-compatible tool calls. - OpenAIChatCompletionUsage: - type: object - properties: - prompt_tokens: - type: integer - description: Number of tokens in the prompt - completion_tokens: + end_index: type: integer - description: Number of tokens in the completion - total_tokens: + file_id: + type: string + filename: + type: string + start_index: type: integer - description: Total tokens used (prompt + completion) - prompt_tokens_details: - type: object - properties: - cached_tokens: - type: integer - description: Number of tokens retrieved from cache - additionalProperties: false - title: >- - OpenAIChatCompletionUsagePromptTokensDetails - description: >- - Token details for prompt tokens in OpenAI chat completion usage. - completion_tokens_details: - type: object - properties: - reasoning_tokens: - type: integer - description: >- - Number of tokens used for reasoning (o1/o3 models) - additionalProperties: false - title: >- - OpenAIChatCompletionUsageCompletionTokensDetails - description: >- - Token details for output tokens in OpenAI chat completion usage. additionalProperties: false required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - description: >- - Usage information for OpenAI chat completion. - OpenAIChoice: + - type + - container_id + - end_index + - file_id + - filename + - start_index + title: >- + OpenAIResponseAnnotationContainerFileCitation + OpenAIResponseAnnotationFileCitation: type: object properties: - message: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam' - - $ref: '#/components/schemas/OpenAISystemMessageParam' - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - - $ref: '#/components/schemas/OpenAIToolMessageParam' - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - discriminator: - propertyName: role - mapping: - user: '#/components/schemas/OpenAIUserMessageParam' - system: '#/components/schemas/OpenAISystemMessageParam' - assistant: '#/components/schemas/OpenAIAssistantMessageParam' - tool: '#/components/schemas/OpenAIToolMessageParam' - developer: '#/components/schemas/OpenAIDeveloperMessageParam' - description: The message from the model - finish_reason: + 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: The reason the model stopped generating + description: Name of the referenced file index: type: integer - description: The index of the choice - logprobs: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' description: >- - (Optional) The log probabilities for the tokens in the message + Position index of the citation within the content additionalProperties: false required: - - message - - finish_reason + - type + - file_id + - filename - index - title: OpenAIChoice + title: OpenAIResponseAnnotationFileCitation description: >- - A choice from an OpenAI-compatible chat completion response. - OpenAIChoiceLogprobs: + File citation annotation for referencing specific files in response content. + OpenAIResponseAnnotationFilePath: type: object properties: - content: - type: array - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - description: >- - (Optional) The log probabilities for the tokens in the message - refusal: - type: array - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - description: >- - (Optional) The log probabilities for the tokens in the message + type: + type: string + const: file_path + default: file_path + file_id: + type: string + index: + type: integer additionalProperties: false - title: OpenAIChoiceLogprobs - description: >- - The log probabilities for the tokens in the message from an OpenAI-compatible - chat completion response. - OpenAIDeveloperMessageParam: + 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: - role: + type: type: string - const: developer - default: developer + const: refusal + default: refusal description: >- - Must be "developer" to identify this as a developer message - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - description: The content of the developer message - name: + Content part type identifier, always "refusal" + refusal: type: string - description: >- - (Optional) The name of the developer message participant. + description: Refusal text supplied by the model additionalProperties: false required: - - role - - content - title: OpenAIDeveloperMessageParam + - type + - refusal + title: OpenAIResponseContentPartRefusal description: >- - A message from the developer in an OpenAI-compatible chat completion request. - OpenAIFile: + Refusal content within a streamed response part. + "OpenAIResponseInputFunctionToolCallOutput": type: object properties: + call_id: + type: string + output: + type: string type: type: string - const: file - default: file - file: - $ref: '#/components/schemas/OpenAIFileFile' + const: function_call_output + default: function_call_output + id: + type: string + status: + type: string additionalProperties: false required: + - call_id + - output - type - - file - title: OpenAIFile - OpenAIFileFile: + 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 - filename: - type: string - additionalProperties: false - title: OpenAIFileFile - OpenAIImageURL: - type: object - properties: - url: + description: >- + (Optional) The ID of the file to be sent to the model. + file_url: type: string description: >- - URL of the image to include in the message - detail: + The URL of the file to be sent to the model. + filename: type: string description: >- - (Optional) Level of detail for image processing. Can be "low", "high", - or "auto" + The name of the file to be sent to the model. additionalProperties: false required: - - url - title: OpenAIImageURL + - type + title: OpenAIResponseInputMessageContentFile description: >- - Image URL specification for OpenAI-compatible chat completion messages. - OpenAIMessageParam: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam' - - $ref: '#/components/schemas/OpenAISystemMessageParam' - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - - $ref: '#/components/schemas/OpenAIToolMessageParam' - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - discriminator: - propertyName: role - mapping: - user: '#/components/schemas/OpenAIUserMessageParam' - system: '#/components/schemas/OpenAISystemMessageParam' - assistant: '#/components/schemas/OpenAIAssistantMessageParam' - tool: '#/components/schemas/OpenAIToolMessageParam' - developer: '#/components/schemas/OpenAIDeveloperMessageParam' - OpenAISystemMessageParam: + File content for input messages in OpenAI response format. + OpenAIResponseInputMessageContentImage: type: object properties: - role: - type: string - const: system - default: system - description: >- - Must be "system" to identify this as a system message - content: + detail: oneOf: - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + 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: >- - 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). - name: + Content type identifier, always "input_image" + file_id: type: string description: >- - (Optional) The name of the system message participant. + (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: - - role - - content - title: OpenAISystemMessageParam + - detail + - type + title: OpenAIResponseInputMessageContentImage description: >- - A system message providing instructions or context to the model. - OpenAITokenLogProb: + Image content for input messages in OpenAI response format. + OpenAIResponseInputMessageContentText: type: object properties: - token: + text: type: string - bytes: - type: array - items: - type: integer - logprob: - type: number - top_logprobs: - type: array - items: - $ref: '#/components/schemas/OpenAITopLogProb' + 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: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb + - text + - type + title: OpenAIResponseInputMessageContentText description: >- - The log probability for a token from an OpenAI-compatible chat completion - response. - OpenAIToolMessageParam: + Text content for input messages in OpenAI response format. + OpenAIResponseMCPApprovalRequest: type: object properties: - role: + arguments: type: string - const: tool - default: tool - description: >- - Must be "tool" to identify this as a tool response - tool_call_id: + id: type: string - description: >- - Unique identifier for the tool call this response is for - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - description: The response content from the tool + name: + type: string + server_label: + type: string + type: + type: string + const: mcp_approval_request + default: mcp_approval_request additionalProperties: false required: - - role - - tool_call_id - - content - title: OpenAIToolMessageParam + - arguments + - id + - name + - server_label + - type + title: OpenAIResponseMCPApprovalRequest description: >- - A message representing the result of a tool invocation in an OpenAI-compatible - chat completion request. - OpenAITopLogProb: + A request for human approval of a tool invocation. + OpenAIResponseMCPApprovalResponse: type: object properties: - token: + approval_request_id: + type: string + approve: + type: boolean + type: + type: string + const: mcp_approval_response + default: mcp_approval_response + id: + type: string + reason: type: string - bytes: - type: array - items: - type: integer - logprob: - type: number additionalProperties: false required: - - token - - logprob - title: OpenAITopLogProb - description: >- - The top log probability for a token from an OpenAI-compatible chat completion - response. - OpenAIUserMessageParam: + - approval_request_id + - approve + - type + title: OpenAIResponseMCPApprovalResponse + description: A response to an MCP approval request. + OpenAIResponseMessage: type: object properties: - role: - type: string - const: user - default: user - description: >- - Must be "user" to identify this as a user message content: oneOf: - type: string - type: array items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartParam' - description: >- - The content of the message, which can include text and other media - name: + $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 - description: >- - (Optional) The name of the user message participant. - additionalProperties: false - required: - - role - - content - title: OpenAIUserMessageParam - description: >- - A message from the user in an OpenAI-compatible chat completion request. - OpenAIJSONSchema: - type: object - properties: - name: + const: message + default: message + id: type: string - description: Name of the schema - description: + status: type: string - description: (Optional) Description of the schema - strict: - type: boolean - description: >- - (Optional) Whether to enforce strict adherence to the schema - schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The JSON schema definition additionalProperties: false required: - - name - title: OpenAIJSONSchema + - content + - role + - type + title: OpenAIResponseMessage description: >- - JSON schema specification for OpenAI-compatible structured response format. - OpenAIResponseFormatJSONObject: + 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: json_object - default: json_object - description: >- - Must be "json_object" to indicate generic JSON object response format + const: output_text + default: output_text + annotations: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseAnnotations' additionalProperties: false required: + - text - type - title: OpenAIResponseFormatJSONObject - description: >- - JSON object response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatJSONSchema: + - 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: json_schema - default: json_schema + const: file_search_call + default: file_search_call description: >- - Must be "json_schema" to indicate structured JSON response format - json_schema: - $ref: '#/components/schemas/OpenAIJSONSchema' + Tool call type identifier, always "file_search_call" + results: + type: array + items: + 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: >- - The JSON schema specification for the response + (Optional) Search results returned by the file search operation additionalProperties: false required: + - id + - queries + - status - type - - json_schema - title: OpenAIResponseFormatJSONSchema + title: >- + OpenAIResponseOutputMessageFileSearchToolCall description: >- - JSON schema response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatParam: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - discriminator: - propertyName: type - mapping: - text: '#/components/schemas/OpenAIResponseFormatText' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - OpenAIResponseFormatText: + File search tool call output message for OpenAI responses. + "OpenAIResponseOutputMessageFunctionToolCall": type: object properties: + 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: text - default: text + 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: >- - Must be "text" to indicate plain text response format + (Optional) Current status of the function call execution additionalProperties: false required: + - call_id + - name + - arguments - type - title: OpenAIResponseFormatText + title: >- + OpenAIResponseOutputMessageFunctionToolCall description: >- - Text response format for OpenAI-compatible chat completion requests. - OpenAIChatCompletionRequestWithExtraBody: + Function tool call output message for OpenAI responses. + OpenAIResponseOutputMessageMCPCall: type: object properties: - model: + id: type: string + description: Unique identifier for this MCP call + type: + type: string + const: mcp_call + default: mcp_call description: >- - The identifier of the model to use. The model must be registered with - Llama Stack and available via the /models endpoint. - messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - description: List of messages in the conversation. - frequency_penalty: - type: number - description: >- - (Optional) The penalty for repeated tokens. - function_call: - oneOf: - - type: string - - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The function call to use. - functions: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) List of functions to use. - logit_bias: - type: object - additionalProperties: - type: number - description: (Optional) The logit bias to use. - logprobs: - type: boolean - description: (Optional) The log probabilities to use. - max_completion_tokens: - type: integer - description: >- - (Optional) The maximum number of tokens to generate. - max_tokens: - type: integer - description: >- - (Optional) The maximum number of tokens to generate. - n: - type: integer - description: >- - (Optional) The number of completions to generate. - parallel_tool_calls: - type: boolean - description: >- - (Optional) Whether to parallelize tool calls. - presence_penalty: - type: number + Tool call type identifier, always "mcp_call" + arguments: + type: string description: >- - (Optional) The penalty for repeated tokens. - response_format: - $ref: '#/components/schemas/OpenAIResponseFormatParam' - description: (Optional) The response format to use. - seed: - type: integer - description: (Optional) The seed to use. - stop: - oneOf: - - type: string - - type: array - items: - type: string - description: (Optional) The stop tokens to use. - stream: - type: boolean + JSON string containing the MCP call arguments + name: + type: string + description: Name of the MCP method being called + server_label: + type: string description: >- - (Optional) Whether to stream the response. - stream_options: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The stream options to use. - temperature: - type: number - description: (Optional) The temperature to use. - tool_choice: - oneOf: - - type: string - - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The tool choice to use. - tools: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The tools to use. - top_logprobs: - type: integer + Label identifying the MCP server handling the call + error: + type: string description: >- - (Optional) The top log probabilities to use. - top_p: - type: number - description: (Optional) The top p to use. - user: + (Optional) Error message if the MCP call failed + output: type: string - description: (Optional) The user to use. + description: >- + (Optional) Output result from the successful MCP call additionalProperties: false required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody + - id + - type + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall description: >- - Request parameters for OpenAI-compatible chat completion endpoint. - OpenAIChatCompletion: + Model Context Protocol (MCP) call output message for OpenAI responses. + OpenAIResponseOutputMessageMCPListTools: type: object properties: id: type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChoice' - description: List of choices - object: - type: string - const: chat.completion - default: chat.completion description: >- - The object type, which will be "chat.completion" - created: - type: integer + Unique identifier for this MCP list tools operation + type: + type: string + const: mcp_list_tools + default: mcp_list_tools description: >- - The Unix timestamp in seconds when the chat completion was created - model: + Tool call type identifier, always "mcp_list_tools" + server_label: type: string description: >- - The model that was used to generate the chat completion - usage: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + 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: >- - Token usage information for the completion + List of available tools provided by the MCP server additionalProperties: false required: - id - - choices - - object - - created - - model - title: OpenAIChatCompletion + - type + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools description: >- - Response from an OpenAI-compatible chat completion request. - OpenAIChatCompletionChunk: + MCP list tools output message containing available tools from an MCP server. + "OpenAIResponseOutputMessageWebSearchToolCall": type: object properties: - id: - type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChunkChoice' - description: List of choices - object: - type: string - const: chat.completion.chunk - default: chat.completion.chunk - description: >- - The object type, which will be "chat.completion.chunk" - created: - type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: + id: + type: string + description: Unique identifier for this tool call + status: type: string description: >- - The model that was used to generate the chat completion - usage: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + Current status of the web search operation + type: + type: string + const: web_search_call + default: web_search_call description: >- - Token usage information (typically included in final chunk with stream_options) + Tool call type identifier, always "web_search_call" additionalProperties: false required: - id - - choices - - object - - created - - model - title: OpenAIChatCompletionChunk + - status + - type + title: >- + OpenAIResponseOutputMessageWebSearchToolCall description: >- - Chunk from a streaming response to an OpenAI-compatible chat completion request. - OpenAIChoiceDelta: + Web search tool call output message for OpenAI responses. + CreateConversationRequest: type: object properties: - content: - type: string - description: (Optional) The content of the delta - refusal: - type: string - description: (Optional) The refusal of the delta - role: - type: string - description: (Optional) The role of the delta - tool_calls: + items: type: array items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - description: (Optional) The tool calls of the delta - reasoning_content: - type: string + $ref: '#/components/schemas/ConversationItem' description: >- - (Optional) The reasoning content from the model (non-standard, for o1/o3 - models) - additionalProperties: false - title: OpenAIChoiceDelta - description: >- - A delta from an OpenAI-compatible chat completion streaming response. - OpenAIChunkChoice: - type: object - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - description: The delta from the chunk - finish_reason: - type: string - description: The reason the model stopped generating - index: - type: integer - description: The index of the choice - logprobs: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + Initial items to include in the conversation context. + metadata: + type: object + additionalProperties: + type: string description: >- - (Optional) The log probabilities for the tokens in the message + Set of key-value pairs that can be attached to an object. additionalProperties: false - required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice - description: >- - A chunk choice from an OpenAI-compatible chat completion streaming response. - OpenAICompletionWithInputMessages: + title: CreateConversationRequest + Conversation: type: object properties: id: type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChoice' - description: List of choices object: type: string - const: chat.completion - default: chat.completion - description: >- - The object type, which will be "chat.completion" - created: + const: conversation + default: conversation + created_at: type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: - type: string - description: >- - The model that was used to generate the chat completion - usage: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - description: >- - Token usage information for the completion - input_messages: + metadata: + type: object + additionalProperties: + type: string + items: type: array items: - $ref: '#/components/schemas/OpenAIMessageParam' + type: object + title: dict + description: >- + dict() -> new empty dictionary dict(mapping) -> new dictionary initialized + from a mapping object's (key, value) pairs dict(iterable) -> new + dictionary initialized as if via: d = {} for k, v in iterable: d[k] + = v dict(**kwargs) -> new dictionary initialized with the name=value + pairs in the keyword argument list. For example: dict(one=1, two=2) additionalProperties: false required: - id - - choices - object - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - OpenAICompletionRequestWithExtraBody: + - created_at + title: Conversation + description: OpenAI-compatible conversation object. + UpdateConversationRequest: type: object properties: - model: - type: string - description: >- - The identifier of the model to use. The model must be registered with - Llama Stack and available via the /models endpoint. - prompt: - oneOf: - - type: string - - type: array - items: - type: string - - type: array - items: - type: integer - - type: array - items: - type: array - items: - type: integer - description: The prompt to generate a completion for. - best_of: - type: integer - description: >- - (Optional) The number of completions to generate. - echo: - type: boolean - description: (Optional) Whether to echo the prompt. - frequency_penalty: - type: number - description: >- - (Optional) The penalty for repeated tokens. - logit_bias: - type: object - additionalProperties: - type: number - description: (Optional) The logit bias to use. - logprobs: - type: boolean - description: (Optional) The log probabilities to use. - max_tokens: - type: integer - description: >- - (Optional) The maximum number of tokens to generate. - n: - type: integer - description: >- - (Optional) The number of completions to generate. - presence_penalty: - type: number - description: >- - (Optional) The penalty for repeated tokens. - seed: - type: integer - description: (Optional) The seed to use. - stop: - oneOf: - - type: string - - type: array - items: - type: string - description: (Optional) The stop tokens to use. - stream: - type: boolean - description: >- - (Optional) Whether to stream the response. - stream_options: + metadata: type: object additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The stream options to use. - temperature: - type: number - description: (Optional) The temperature to use. - top_p: - type: number - description: (Optional) The top p to use. - user: - type: string - description: (Optional) The user to use. - suffix: - type: string + type: string description: >- - (Optional) The suffix that should be appended to the completion. + Set of key-value pairs that can be attached to an object. additionalProperties: false required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody - description: >- - Request parameters for OpenAI-compatible completion endpoint. - OpenAICompletion: + - metadata + title: UpdateConversationRequest + ConversationDeletedResource: type: object properties: id: type: string - choices: - type: array - items: - $ref: '#/components/schemas/OpenAICompletionChoice' - created: - type: integer - model: - type: string object: type: string - const: text_completion - default: text_completion + default: conversation.deleted + deleted: + type: boolean + default: true additionalProperties: false required: - id - - choices - - created - - model - object - title: OpenAICompletion - description: >- - Response from an OpenAI-compatible completion request. - OpenAICompletionChoice: - 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: + - deleted + title: ConversationDeletedResource + description: Response for deleted conversation. + ConversationItemList: type: object properties: - type: + object: 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: + default: list + data: + type: array + items: + $ref: '#/components/schemas/ConversationItem' + first_id: type: string - description: Title of the referenced web resource - url: + last_id: type: string - description: URL of the referenced web resource + has_more: + type: boolean + default: false additionalProperties: false required: - - type - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation + - object + - data + - has_more + title: ConversationItemList description: >- - URL citation annotation for referencing external web resources. - "OpenAIResponseAnnotationContainerFileCitation": + List of conversation items with pagination. + AddItemsRequest: type: object properties: - type: - type: string - const: container_file_citation - default: container_file_citation - container_id: - type: string - end_index: - type: integer - file_id: + items: + type: array + items: + $ref: '#/components/schemas/ConversationItem' + description: >- + Items to include in the conversation context. + additionalProperties: false + required: + - items + title: AddItemsRequest + ConversationItemDeletedResource: + type: object + properties: + id: type: string - filename: + object: type: string - start_index: - type: integer + default: conversation.item.deleted + deleted: + type: boolean + default: true additionalProperties: false required: - - type - - container_id - - end_index - - file_id - - filename - - start_index - title: >- - OpenAIResponseAnnotationContainerFileCitation - OpenAIResponseAnnotationFileCitation: + - id + - object + - deleted + title: ConversationItemDeletedResource + description: Response for deleted conversation item. + OpenAIEmbeddingsRequestWithExtraBody: type: object properties: - type: + model: 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: + The identifier of the model to use. The model must be an embedding model + registered with Llama Stack and available via the /models endpoint. + input: + oneOf: + - type: string + - type: array + items: + type: string + description: >- + 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. + encoding_format: type: string - description: Name of the referenced file - index: + default: float + description: >- + (Optional) The format to return the embeddings in. Can be either "float" + or "base64". Defaults to "float". + dimensions: type: integer description: >- - Position index of the citation within the content + (Optional) The number of dimensions the resulting output embeddings should + have. Only supported in text-embedding-3 and later models. + user: + type: string + description: >- + (Optional) A unique identifier representing your end-user, which can help + OpenAI to monitor and detect abuse. additionalProperties: false required: - - type - - file_id - - filename - - index - title: OpenAIResponseAnnotationFileCitation + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody description: >- - File citation annotation for referencing specific files in response content. - OpenAIResponseAnnotationFilePath: + Request parameters for OpenAI-compatible embeddings endpoint. + OpenAIEmbeddingData: type: object properties: - type: - type: string - const: file_path - default: file_path - file_id: + object: type: string + const: embedding + default: embedding + description: >- + The object type, which will be "embedding" + embedding: + oneOf: + - type: array + items: + type: number + - type: string + description: >- + The embedding vector as a list of floats (when encoding_format="float") + or as a base64-encoded string (when encoding_format="base64") index: type: integer + description: >- + The index of the embedding in the input list additionalProperties: false required: - - type - - file_id + - object + - embedding - 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: + title: OpenAIEmbeddingData + description: >- + A single embedding data object from an OpenAI-compatible embeddings response. + OpenAIEmbeddingUsage: 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 + prompt_tokens: + type: integer + description: The number of tokens in the input + total_tokens: + type: integer + description: The total number of tokens used additionalProperties: false required: - - type - - refusal - title: OpenAIResponseContentPartRefusal + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage description: >- - Refusal content within a streamed response part. - "OpenAIResponseInputFunctionToolCallOutput": + Usage information for an OpenAI-compatible embeddings response. + OpenAIEmbeddingsResponse: type: object properties: - call_id: - type: string - output: - type: string - type: - type: string - const: function_call_output - default: function_call_output - id: + object: type: string - status: + const: list + default: list + description: The object type, which will be "list" + data: + type: array + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + description: List of embedding data objects + model: type: string + description: >- + The model that was used to generate the embeddings + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' + description: Usage information additionalProperties: false required: - - call_id - - output - - type - title: >- - OpenAIResponseInputFunctionToolCallOutput + - object + - data + - model + - usage + title: OpenAIEmbeddingsResponse 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 + Response from an OpenAI-compatible embeddings request. + OpenAIFilePurpose: + type: string + enum: + - assistants + - batch + title: OpenAIFilePurpose + description: >- + Valid purpose values for OpenAI Files API. + ListOpenAIFileResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/OpenAIFileObject' + description: List of file objects + has_more: + type: boolean description: >- - The data of the file to be sent to the model. - file_id: + Whether there are more files available beyond this page + first_id: type: string description: >- - (Optional) The ID of the file to be sent to the model. - file_url: + ID of the first file in the list for pagination + last_id: type: string description: >- - The URL of the file to be sent to the model. - filename: + ID of the last file in the list for pagination + object: type: string - description: >- - The name of the file to be sent to the model. + const: list + default: list + description: The object type, which is always "list" additionalProperties: false required: - - type - title: OpenAIResponseInputMessageContentFile + - data + - has_more + - first_id + - last_id + - object + title: ListOpenAIFileResponse description: >- - File content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentImage: + Response for listing files in OpenAI Files API. + OpenAIFileObject: 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: + object: type: string - const: input_image - default: input_image - description: >- - Content type identifier, always "input_image" - file_id: + const: file + default: file + description: The object type, which is always "file" + id: type: string description: >- - (Optional) The ID of the file to be sent to the model. - image_url: + The file identifier, which can be referenced in the API endpoints + bytes: + type: integer + description: The size of the file, in bytes + created_at: + type: integer + description: >- + The Unix timestamp (in seconds) for when the file was created + expires_at: + type: integer + description: >- + The Unix timestamp (in seconds) for when the file expires + filename: type: string - description: (Optional) URL of the image content + description: The name of the file + purpose: + type: string + enum: + - assistants + - batch + description: The intended purpose of the file additionalProperties: false required: - - detail - - type - title: OpenAIResponseInputMessageContentImage + - object + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject description: >- - Image content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentText: + OpenAI File object as defined in the OpenAI Files API. + ExpiresAfter: type: object properties: - text: - type: string - description: The text content of the input message - type: + anchor: type: string - const: input_text - default: input_text - description: >- - Content type identifier, always "input_text" + const: created_at + seconds: + type: integer additionalProperties: false required: - - text - - type - title: OpenAIResponseInputMessageContentText + - anchor + - seconds + title: ExpiresAfter description: >- - Text content for input messages in OpenAI response format. - OpenAIResponseMCPApprovalRequest: + Control expiration of uploaded files. + + Params: + - anchor, must be "created_at" + - seconds, must be int between 3600 and 2592000 (1 hour to 30 days) + OpenAIFileDeleteResponse: type: object properties: - arguments: - type: string id: type: string - name: - type: string - server_label: - type: string - type: + description: The file identifier that was deleted + object: type: string - const: mcp_approval_request - default: mcp_approval_request + const: file + default: file + description: The object type, which is always "file" + deleted: + type: boolean + description: >- + Whether the file was successfully deleted additionalProperties: false required: - - arguments - id - - name - - server_label - - type - title: OpenAIResponseMCPApprovalRequest + - object + - deleted + title: OpenAIFileDeleteResponse description: >- - A request for human approval of a tool invocation. - OpenAIResponseMCPApprovalResponse: + Response for deleting a file in OpenAI Files API. + Response: + type: object + title: Response + HealthInfo: type: object properties: - approval_request_id: - type: string - approve: - type: boolean - type: - type: string - const: mcp_approval_response - default: mcp_approval_response - id: - type: string - reason: + status: type: string + enum: + - OK + - Error + - Not Implemented + description: Current health status of the service additionalProperties: false required: - - approval_request_id - - approve - - type - title: OpenAIResponseMCPApprovalResponse - description: A response to an MCP approval request. - OpenAIResponseMessage: + - status + title: HealthInfo + description: >- + Health status information for the service. + RouteInfo: type: object 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: + route: type: string - status: + description: The API endpoint path + method: type: string + description: HTTP method for the route + provider_types: + type: array + items: + type: string + description: >- + List of provider types that implement this route additionalProperties: false required: - - content - - role - - type - title: OpenAIResponseMessage + - route + - method + - provider_types + title: RouteInfo 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": + Information about an API route including its path, method, and implementing + providers. + ListRoutesResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/RouteInfo' + description: >- + List of available route information objects + additionalProperties: false + required: + - data + title: ListRoutesResponse + description: >- + Response containing a list of all available API routes. + OpenAIModel: type: object properties: - text: + id: type: string - type: + object: type: string - const: output_text - default: output_text - annotations: + const: model + default: model + created: + type: integer + owned_by: + type: string + custom_metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + additionalProperties: false + required: + - id + - object + - created + - owned_by + title: OpenAIModel + description: A model from OpenAI. + OpenAIListModelsResponse: + type: object + properties: + data: type: array items: - $ref: '#/components/schemas/OpenAIResponseAnnotations' + $ref: '#/components/schemas/OpenAIModel' additionalProperties: false required: - - text - - type - - annotations - title: >- - OpenAIResponseOutputMessageContentOutputText - "OpenAIResponseOutputMessageFileSearchToolCall": + - data + title: OpenAIListModelsResponse + Model: type: object properties: - id: + identifier: type: string - description: Unique identifier for this tool call - queries: - type: array - items: - type: string - description: List of search queries executed - status: + description: >- + Unique identifier for this resource in llama stack + provider_resource_id: type: string description: >- - Current status of the file search operation + Unique identifier for this resource in the provider + provider_id: + type: string + description: >- + ID of the provider that owns this resource type: type: string - const: file_search_call - default: file_search_call + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: model + default: model description: >- - Tool call type identifier, always "file_search_call" - results: - type: array - items: - 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. + The resource type, always 'model' for model resources + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Any additional metadata for this model + model_type: + $ref: '#/components/schemas/ModelType' + default: llm description: >- - (Optional) Search results returned by the file search operation + The type of model (LLM or embedding model) additionalProperties: false required: - - id - - queries - - status + - identifier + - provider_id - type - title: >- - OpenAIResponseOutputMessageFileSearchToolCall + - metadata + - model_type + title: Model description: >- - File search tool call output message for OpenAI responses. - "OpenAIResponseOutputMessageFunctionToolCall": + A model resource representing an AI model registered in Llama Stack. + ModelType: + type: string + enum: + - llm + - embedding + - rerank + title: ModelType + description: >- + Enumeration of supported model types in Llama Stack. + RunModerationRequest: type: object properties: - call_id: - type: string - description: Unique identifier for the function call - name: - type: string - description: Name of the function being called - arguments: - type: string + input: + oneOf: + - type: string + - type: array + items: + type: string description: >- - JSON string containing the function arguments - type: + Input (or inputs) to classify. Can be a single string, an array of strings, + or an array of multi-modal input objects similar to other models. + model: type: string - const: function_call - default: function_call description: >- - Tool call type identifier, always "function_call" + (Optional) The content moderation model you would like to use. + additionalProperties: false + required: + - input + title: RunModerationRequest + ModerationObject: + type: object + properties: id: type: string description: >- - (Optional) Additional identifier for the tool call - status: + The unique identifier for the moderation request. + model: type: string description: >- - (Optional) Current status of the function call execution + The model used to generate the moderation results. + results: + type: array + items: + $ref: '#/components/schemas/ModerationObjectResults' + description: A list of moderation objects additionalProperties: false required: - - call_id - - name - - arguments - - type - title: >- - OpenAIResponseOutputMessageFunctionToolCall - description: >- - Function tool call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPCall: + - id + - model + - results + title: ModerationObject + description: A moderation object. + ModerationObjectResults: type: object properties: - id: - type: string - description: Unique identifier for this MCP call - type: - type: string - const: mcp_call - default: mcp_call + flagged: + type: boolean description: >- - Tool call type identifier, always "mcp_call" - arguments: - type: string + Whether any of the below categories are flagged. + categories: + type: object + additionalProperties: + type: boolean description: >- - JSON string containing the MCP call arguments - name: - type: string - description: Name of the MCP method being called - server_label: - type: string + A list of the categories, and whether they are flagged or not. + category_applied_input_types: + type: object + additionalProperties: + type: array + items: + type: string description: >- - Label identifying the MCP server handling the call - error: - type: string + A list of the categories along with the input type(s) that the score applies + to. + category_scores: + type: object + additionalProperties: + type: number description: >- - (Optional) Error message if the MCP call failed - output: + A list of the categories along with their scores as predicted by model. + user_message: type: string - description: >- - (Optional) Output result from the successful MCP call + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object additionalProperties: false required: - - id - - type - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - description: >- - Model Context Protocol (MCP) call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPListTools: + - flagged + - metadata + title: ModerationObjectResults + description: A moderation object. + Prompt: type: object properties: - id: + prompt: type: string description: >- - Unique identifier for this MCP list tools operation - type: - type: string - const: mcp_list_tools - default: mcp_list_tools + The system prompt text with variable placeholders. Variables are only + supported when using the Responses API. + version: + type: integer description: >- - Tool call type identifier, always "mcp_list_tools" - server_label: + Version (integer starting at 1, incremented on save) + prompt_id: type: string description: >- - Label identifying the MCP server providing the tools - tools: + Unique identifier formatted as 'pmpt_<48-digit-hash>' + variables: 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. + type: string description: >- - List of available tools provided by the MCP server + List of prompt variable names that can be used in the prompt template + is_default: + type: boolean + default: false + description: >- + Boolean indicating whether this version is the default version for this + prompt additionalProperties: false required: - - id - - type - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools + - version + - prompt_id + - variables + - is_default + title: Prompt description: >- - MCP list tools output message containing available tools from an MCP server. - "OpenAIResponseOutputMessageWebSearchToolCall": + A prompt resource representing a stored OpenAI Compatible prompt template + in Llama Stack. + ListPromptsResponse: 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" + data: + type: array + items: + $ref: '#/components/schemas/Prompt' additionalProperties: false required: - - id - - status - - type - title: >- - OpenAIResponseOutputMessageWebSearchToolCall - description: >- - Web search tool call output message for OpenAI responses. - CreateConversationRequest: + - data + title: ListPromptsResponse + description: Response model to list prompts. + CreatePromptRequest: type: object properties: - items: + prompt: + type: string + description: >- + The prompt text content with variable placeholders. + variables: type: array items: - $ref: '#/components/schemas/ConversationItem' - description: >- - Initial items to include in the conversation context. - metadata: - type: object - additionalProperties: type: string description: >- - Set of key-value pairs that can be attached to an object. + List of variable names that can be used in the prompt template. additionalProperties: false - title: CreateConversationRequest - Conversation: + required: + - prompt + title: CreatePromptRequest + UpdatePromptRequest: type: object properties: - id: - type: string - object: + prompt: type: string - const: conversation - default: conversation - created_at: + description: The updated prompt text content. + version: type: integer - metadata: - type: object - additionalProperties: - type: string - items: + description: >- + The current version of the prompt being updated. + variables: type: array items: - type: object - title: dict - description: >- - dict() -> new empty dictionary dict(mapping) -> new dictionary initialized - from a mapping object's (key, value) pairs dict(iterable) -> new - dictionary initialized as if via: d = {} for k, v in iterable: d[k] - = v dict(**kwargs) -> new dictionary initialized with the name=value - pairs in the keyword argument list. For example: dict(one=1, two=2) + type: string + description: >- + Updated list of variable names that can be used in the prompt template. + set_as_default: + type: boolean + description: >- + Set the new version as the default (default=True). additionalProperties: false required: - - id - - object - - created_at - title: Conversation - description: OpenAI-compatible conversation object. - UpdateConversationRequest: + - prompt + - version + - set_as_default + title: UpdatePromptRequest + SetDefaultVersionRequest: type: object properties: - metadata: - type: object - additionalProperties: - type: string - description: >- - Set of key-value pairs that can be attached to an object. + version: + type: integer + description: The version to set as default. additionalProperties: false required: - - metadata - title: UpdateConversationRequest - ConversationDeletedResource: + - version + title: SetDefaultVersionRequest + ProviderInfo: type: object properties: - id: + api: type: string - object: + description: The API name this provider implements + provider_id: type: string - default: conversation.deleted - deleted: - type: boolean - default: true + description: Unique identifier for the provider + provider_type: + type: string + description: The type of provider implementation + config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Configuration parameters for the provider + health: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Current health status of the provider additionalProperties: false required: - - id - - object - - deleted - title: ConversationDeletedResource - description: Response for deleted conversation. - ConversationItemList: + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo + description: >- + Information about a registered provider including its configuration and health + status. + ListProvidersResponse: type: object properties: - object: - type: string - default: list data: type: array items: - $ref: '#/components/schemas/ConversationItem' - first_id: - type: string - last_id: - type: string - has_more: - type: boolean - default: false + $ref: '#/components/schemas/ProviderInfo' + description: List of provider information objects additionalProperties: false required: - - object - data - - has_more - title: ConversationItemList + title: ListProvidersResponse description: >- - List of conversation items with pagination. - AddItemsRequest: + Response containing a list of all available providers. + ListOpenAIResponseObject: type: object properties: - items: + data: type: array items: - $ref: '#/components/schemas/ConversationItem' + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' description: >- - Items to include in the conversation context. - additionalProperties: false - required: - - items - title: AddItemsRequest - ConversationItemDeletedResource: - type: object - properties: - id: + List of response objects with their input context + has_more: + type: boolean + description: >- + Whether there are more results available beyond this page + first_id: + type: string + description: >- + Identifier of the first item in this page + last_id: type: string + description: Identifier of the last item in this page object: type: string - default: conversation.item.deleted - deleted: - type: boolean - default: true + const: list + default: list + description: Object type identifier, always "list" additionalProperties: false required: - - id + - data + - has_more + - first_id + - last_id - object - - deleted - title: ConversationItemDeletedResource - description: Response for deleted conversation item. - OpenAIEmbeddingsRequestWithExtraBody: + title: ListOpenAIResponseObject + description: >- + Paginated list of OpenAI response objects with navigation metadata. + OpenAIResponseError: type: object properties: - model: - type: string - description: >- - The identifier of the model to use. The model must be an embedding model - registered with Llama Stack and available via the /models endpoint. - input: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - 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. - encoding_format: + code: type: string - default: float - description: >- - (Optional) The format to return the embeddings in. Can be either "float" - or "base64". Defaults to "float". - dimensions: - type: integer description: >- - (Optional) The number of dimensions the resulting output embeddings should - have. Only supported in text-embedding-3 and later models. - user: + Error code identifying the type of failure + message: type: string description: >- - (Optional) A unique identifier representing your end-user, which can help - OpenAI to monitor and detect abuse. + Human-readable error message describing the failure additionalProperties: false required: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody + - code + - message + title: OpenAIResponseError description: >- - Request parameters for OpenAI-compatible embeddings endpoint. - OpenAIEmbeddingData: + 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: - object: + type: type: string - const: embedding - default: embedding + const: file_search + default: file_search description: >- - The object type, which will be "embedding" - embedding: - oneOf: - - type: array - items: - type: number - - type: string + Tool type identifier, always "file_search" + vector_store_ids: + type: array + items: + type: string description: >- - The embedding vector as a list of floats (when encoding_format="float") - or as a base64-encoded string (when encoding_format="base64") - index: + 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: >- - The index of the embedding in the input list + (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: - - object - - embedding - - index - title: OpenAIEmbeddingData + - type + - vector_store_ids + title: OpenAIResponseInputToolFileSearch description: >- - A single embedding data object from an OpenAI-compatible embeddings response. - OpenAIEmbeddingUsage: + File search tool configuration for OpenAI response inputs. + OpenAIResponseInputToolFunction: type: object properties: - prompt_tokens: - type: integer - description: The number of tokens in the input - total_tokens: - type: integer - description: The total number of tokens used + 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: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage + - type + - name + title: OpenAIResponseInputToolFunction description: >- - Usage information for an OpenAI-compatible embeddings response. - OpenAIEmbeddingsResponse: + Function tool configuration for OpenAI response inputs. + OpenAIResponseInputToolWebSearch: type: object properties: - object: - type: string - const: list - default: list - description: The object type, which will be "list" - data: - type: array - items: - $ref: '#/components/schemas/OpenAIEmbeddingData' - description: List of embedding data objects - model: - type: string - description: >- - The model that was used to generate the embeddings - usage: - $ref: '#/components/schemas/OpenAIEmbeddingUsage' - description: Usage information + type: + oneOf: + - type: string + const: web_search + - type: string + const: web_search_preview + - type: string + const: web_search_preview_2025_03_11 + - type: string + const: web_search_2025_08_26 + 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: - - object - - data - - model - - usage - title: OpenAIEmbeddingsResponse - description: >- - Response from an OpenAI-compatible embeddings request. - OpenAIFilePurpose: - type: string - enum: - - assistants - - batch - title: OpenAIFilePurpose + - type + title: OpenAIResponseInputToolWebSearch description: >- - Valid purpose values for OpenAI Files API. - ListOpenAIFileResponse: + Web search tool configuration for OpenAI response inputs. + OpenAIResponseObjectWithInput: type: object properties: - data: + 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/OpenAIFileObject' - description: List of file objects - has_more: + $ref: '#/components/schemas/OpenAIResponseOutput' + description: >- + List of generated output items (messages, tool calls, etc.) + parallel_tool_calls: type: boolean + default: false description: >- - Whether there are more files available beyond this page - first_id: + Whether tool calls can be executed in parallel + previous_response_id: type: string description: >- - ID of the first file in the list for pagination - last_id: - type: string + (Optional) ID of the previous response in a conversation + prompt: + $ref: '#/components/schemas/OpenAIResponsePrompt' description: >- - ID of the last file in the list for pagination - object: + (Optional) Reference to a prompt template and its variables. + status: type: string - const: list - default: list - description: The object type, which is always "list" - additionalProperties: false - required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIFileResponse - description: >- - Response for listing files in OpenAI Files API. - OpenAIFileObject: - type: object - properties: - object: + 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 - const: file - default: file - description: The object type, which is always "file" - id: + 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: >- - The file identifier, which can be referenced in the API endpoints - bytes: - type: integer - description: The size of the file, in bytes - created_at: + (Optional) System message inserted into the model's context + max_tool_calls: type: integer description: >- - The Unix timestamp (in seconds) for when the file was created - expires_at: - type: integer + (Optional) Max number of total calls to built-in tools that can be processed + in a response + input: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseInput' description: >- - The Unix timestamp (in seconds) for when the file expires - filename: - type: string - description: The name of the file - purpose: - type: string - enum: - - assistants - - batch - description: The intended purpose of the file + List of input items that led to this response additionalProperties: false required: - - object - - id - - bytes - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject + - id + - model + - object + - output + - parallel_tool_calls + - status + - text + - input + title: OpenAIResponseObjectWithInput description: >- - OpenAI File object as defined in the OpenAI Files API. - ExpiresAfter: + 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' + propertyName: type + 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' + DataSource: + discriminator: + mapping: + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + OpenAIResponseInputToolMCP: type: object properties: - anchor: + type: type: string - const: created_at - seconds: - type: integer + 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: - - anchor - - seconds - title: ExpiresAfter + - type + - server_label + - server_url + - require_approval + title: OpenAIResponseInputToolMCP 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) - OpenAIFileDeleteResponse: + Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + CreateOpenaiResponseRequest: type: object properties: - id: - type: string - description: The file identifier that was deleted - object: + input: + oneOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/OpenAIResponseInput' + description: Input message(s) to create the response. + model: type: string - const: file - default: file - description: The object type, which is always "file" - deleted: - type: boolean + description: The underlying LLM used for completions. + prompt: + $ref: '#/components/schemas/OpenAIResponsePrompt' description: >- - Whether the file was successfully deleted - additionalProperties: false - required: - - id - - object - - deleted - title: OpenAIFileDeleteResponse - description: >- - Response for deleting a file in OpenAI Files API. - Response: - type: object - title: Response - HealthInfo: - type: object - properties: - status: + (Optional) Prompt object with ID, version, and variables. + instructions: type: string - enum: - - OK - - Error - - Not Implemented - description: Current health status of the service - additionalProperties: false - required: - - status - title: HealthInfo - description: >- - Health status information for the service. - RouteInfo: - type: object - properties: - route: + previous_response_id: type: string - description: The API endpoint path - method: + 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: HTTP method for the route - provider_types: + 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: - type: string - description: >- - List of provider types that implement this route - additionalProperties: false - required: - - route - - method - - provider_types - title: RouteInfo - description: >- - Information about an API route including its path, method, and implementing - providers. - ListRoutesResponse: - type: object - properties: - data: + $ref: '#/components/schemas/OpenAIResponseInputTool' + include: type: array items: - $ref: '#/components/schemas/RouteInfo' + type: string description: >- - List of available route information objects + (Optional) Additional fields to include in the response. + max_infer_iters: + type: integer + max_tool_calls: + type: integer + description: >- + (Optional) Max number of total calls to built-in tools that can be processed + in a response. additionalProperties: false required: - - data - title: ListRoutesResponse - description: >- - Response containing a list of all available API routes. - OpenAIModel: + - input + - model + title: CreateOpenaiResponseRequest + OpenAIResponseObject: 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 - object: + description: Unique identifier for this response + model: type: string - const: model - default: model - created: - type: integer - owned_by: + description: Model identifier used for generation + object: type: string - custom_metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - additionalProperties: false - required: - - id - - object - - created - - owned_by - title: OpenAIModel - description: A model from OpenAI. - OpenAIListModelsResponse: - type: object - properties: - data: + const: response + default: response + description: >- + Object type identifier, always "response" + output: type: array items: - $ref: '#/components/schemas/OpenAIModel' - additionalProperties: false - required: - - data - title: OpenAIListModelsResponse - Model: - type: object - properties: - identifier: + $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: >- - Unique identifier for this resource in llama stack - provider_resource_id: + (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: >- - Unique identifier for this resource in the provider - provider_id: + 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: >- - ID of the provider that owns this resource + (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 + max_tool_calls: + type: integer + description: >- + (Optional) Max number of total calls to built-in tools that can be processed + in a response + additionalProperties: false + required: + - created_at + - id + - model + - object + - output + - parallel_tool_calls + - status + - text + title: OpenAIResponseObject + description: >- + Complete OpenAI response object containing generation results and metadata. + OpenAIResponseContentPartOutputText: + type: object + properties: type: type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: model - default: model + const: output_text + default: output_text description: >- - The resource type, always 'model' for model resources - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Any additional metadata for this model - model_type: - $ref: '#/components/schemas/ModelType' - default: llm + Content part type identifier, always "output_text" + text: + type: string + description: Text emitted for this content part + annotations: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseAnnotations' description: >- - The type of model (LLM or embedding model) + Structured annotations associated with the text + logprobs: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: (Optional) Token log probability details additionalProperties: false required: - - identifier - - provider_id - type - - metadata - - model_type - title: Model - description: >- - A model resource representing an AI model registered in Llama Stack. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType + - text + - annotations + title: OpenAIResponseContentPartOutputText description: >- - Enumeration of supported model types in Llama Stack. - RunModerationRequest: + Text content within a streamed response part. + "OpenAIResponseContentPartReasoningSummary": type: object properties: - input: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - Input (or inputs) to classify. Can be a single string, an array of strings, - or an array of multi-modal input objects similar to other models. - model: + type: type: string + const: summary_text + default: summary_text description: >- - (Optional) The content moderation model you would like to use. + Content part type identifier, always "summary_text" + text: + type: string + description: Summary text additionalProperties: false required: - - input - title: RunModerationRequest - ModerationObject: + - type + - text + title: >- + OpenAIResponseContentPartReasoningSummary + description: >- + Reasoning summary part in a streamed response. + OpenAIResponseContentPartReasoningText: type: object properties: - id: + type: type: string + const: reasoning_text + default: reasoning_text description: >- - The unique identifier for the moderation request. - model: + Content part type identifier, always "reasoning_text" + text: type: string - description: >- - The model used to generate the moderation results. - results: - type: array - items: - $ref: '#/components/schemas/ModerationObjectResults' - description: A list of moderation objects + description: Reasoning text supplied by the model additionalProperties: false required: - - id - - model - - results - title: ModerationObject - description: A moderation object. - ModerationObjectResults: + - type + - text + title: OpenAIResponseContentPartReasoningText + description: >- + Reasoning text emitted as part of a streamed response. + OpenAIResponseObjectStream: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + discriminator: + propertyName: type + mapping: + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + "OpenAIResponseObjectStreamResponseCompleted": type: object properties: - flagged: - type: boolean - description: >- - Whether any of the below categories are flagged. - categories: - type: object - additionalProperties: - type: boolean - description: >- - A list of the categories, and whether they are flagged or not. - category_applied_input_types: - type: object - additionalProperties: - type: array - items: - type: string - description: >- - A list of the categories along with the input type(s) that the score applies - to. - category_scores: - type: object - additionalProperties: - type: number - description: >- - A list of the categories along with their scores as predicted by model. - user_message: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + description: Completed response object + type: type: string - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + const: response.completed + default: response.completed + description: >- + Event type identifier, always "response.completed" additionalProperties: false - required: - - flagged - - metadata - title: ModerationObjectResults - description: A moderation object. - Prompt: + required: + - response + - type + title: >- + OpenAIResponseObjectStreamResponseCompleted + description: >- + Streaming event indicating a response has been completed. + "OpenAIResponseObjectStreamResponseContentPartAdded": type: object properties: - prompt: - type: string - description: >- - The system prompt text with variable placeholders. Variables are only - supported when using the Responses API. - version: + content_index: type: integer description: >- - Version (integer starting at 1, incremented on save) - prompt_id: + Index position of the part within the content array + response_id: type: string description: >- - Unique identifier formatted as 'pmpt_<48-digit-hash>' - variables: - type: array - items: - type: string + Unique identifier of the response containing this content + item_id: + type: string description: >- - List of prompt variable names that can be used in the prompt template - is_default: - type: boolean - default: false + Unique identifier of the output item containing this content part + output_index: + type: integer description: >- - Boolean indicating whether this version is the default version for this - prompt + Index position of the output item in the response + part: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + description: The content part that was added + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.content_part.added + default: response.content_part.added + description: >- + Event type identifier, always "response.content_part.added" additionalProperties: false required: - - version - - prompt_id - - variables - - is_default - title: Prompt + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseContentPartAdded description: >- - A prompt resource representing a stored OpenAI Compatible prompt template - in Llama Stack. - ListPromptsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Prompt' - additionalProperties: false - required: - - data - title: ListPromptsResponse - description: Response model to list prompts. - CreatePromptRequest: + Streaming event for when a new content part is added to a response item. + "OpenAIResponseObjectStreamResponseContentPartDone": type: object properties: - prompt: + content_index: + type: integer + description: >- + Index position of the part within the content array + response_id: type: string description: >- - The prompt text content with variable placeholders. - variables: - type: array - items: - type: string + Unique identifier of the response containing this content + item_id: + type: string description: >- - List of variable names that can be used in the prompt template. + Unique identifier of the output item containing this content part + output_index: + type: integer + description: >- + Index position of the output item in the response + part: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + description: The completed content part + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.content_part.done + default: response.content_part.done + description: >- + Event type identifier, always "response.content_part.done" additionalProperties: false required: - - prompt - title: CreatePromptRequest - UpdatePromptRequest: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseContentPartDone + description: >- + Streaming event for when a content part is completed. + "OpenAIResponseObjectStreamResponseCreated": type: object properties: - prompt: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + description: The response object that was created + type: type: string - description: The updated prompt text content. - version: - type: integer - description: >- - The current version of the prompt being updated. - variables: - type: array - items: - type: string - description: >- - Updated list of variable names that can be used in the prompt template. - set_as_default: - type: boolean + const: response.created + default: response.created description: >- - Set the new version as the default (default=True). + Event type identifier, always "response.created" additionalProperties: false required: - - prompt - - version - - set_as_default - title: UpdatePromptRequest - SetDefaultVersionRequest: + - response + - type + title: >- + OpenAIResponseObjectStreamResponseCreated + description: >- + Streaming event indicating a new response has been created. + OpenAIResponseObjectStreamResponseFailed: type: object properties: - version: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + description: Response object describing the failure + sequence_number: type: integer - description: The version to set as default. + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.failed + default: response.failed + description: >- + Event type identifier, always "response.failed" additionalProperties: false required: - - version - title: SetDefaultVersionRequest - ProviderInfo: + - response + - sequence_number + - type + title: OpenAIResponseObjectStreamResponseFailed + description: >- + Streaming event emitted when a response fails. + "OpenAIResponseObjectStreamResponseFileSearchCallCompleted": type: object properties: - api: - type: string - description: The API name this provider implements - provider_id: + item_id: type: string - description: Unique identifier for the provider - provider_type: + description: >- + Unique identifier of the completed file search call + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: type: string - description: The type of provider implementation - config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + const: response.file_search_call.completed + default: response.file_search_call.completed description: >- - Configuration parameters for the provider - health: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Current health status of the provider + Event type identifier, always "response.file_search_call.completed" additionalProperties: false required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseFileSearchCallCompleted description: >- - Information about a registered provider including its configuration and health - status. - ListProvidersResponse: + Streaming event for completed file search calls. + "OpenAIResponseObjectStreamResponseFileSearchCallInProgress": type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/ProviderInfo' - description: List of provider information objects + item_id: + type: string + description: >- + Unique identifier of the file search call + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + description: >- + Event type identifier, always "response.file_search_call.in_progress" additionalProperties: false required: - - data - title: ListProvidersResponse + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseFileSearchCallInProgress description: >- - Response containing a list of all available providers. - ListOpenAIResponseObject: + Streaming event for file search calls in progress. + "OpenAIResponseObjectStreamResponseFileSearchCallSearching": type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput' + item_id: + type: string description: >- - List of response objects with their input context - has_more: - type: boolean + Unique identifier of the file search call + output_index: + type: integer description: >- - Whether there are more results available beyond this page - first_id: - type: string + Index position of the item in the output list + sequence_number: + type: integer description: >- - Identifier of the first item in this page - last_id: - type: string - description: Identifier of the last item in this page - object: + Sequential number for ordering streaming events + type: type: string - const: list - default: list - description: Object type identifier, always "list" + const: response.file_search_call.searching + default: response.file_search_call.searching + description: >- + Event type identifier, always "response.file_search_call.searching" additionalProperties: false required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIResponseObject + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseFileSearchCallSearching description: >- - Paginated list of OpenAI response objects with navigation metadata. - OpenAIResponseError: + Streaming event for file search currently searching. + "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta": type: object properties: - code: + delta: type: string description: >- - Error code identifying the type of failure - message: + Incremental function call arguments being added + item_id: type: string description: >- - Human-readable error message describing the failure + Unique identifier of the function call being updated + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + description: >- + Event type identifier, always "response.function_call_arguments.delta" additionalProperties: false required: - - code - - message - title: OpenAIResponseError + - delta + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta 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: + Streaming event for incremental function call argument updates. + "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone": type: object properties: - type: + arguments: type: string - const: file_search - default: file_search description: >- - Tool type identifier, always "file_search" - vector_store_ids: - type: array - items: - type: string + Final complete arguments JSON string for the function call + item_id: + 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 + Unique identifier of the completed function call + output_index: + type: integer description: >- - (Optional) Additional filters to apply to the search - max_num_results: + Index position of the item in the output list + sequence_number: 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 + Sequential number for ordering streaming events + type: + type: string + const: response.function_call_arguments.done + default: response.function_call_arguments.done description: >- - (Optional) Options for ranking and scoring search results + Event type identifier, always "response.function_call_arguments.done" additionalProperties: false required: + - arguments + - item_id + - output_index + - sequence_number - type - - vector_store_ids - title: OpenAIResponseInputToolFileSearch + title: >- + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone description: >- - File search tool configuration for OpenAI response inputs. - OpenAIResponseInputToolFunction: + Streaming event for when function call arguments are completed. + "OpenAIResponseObjectStreamResponseInProgress": type: object properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + description: Current response state while in progress + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events 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 + const: response.in_progress + default: response.in_progress 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 + Event type identifier, always "response.in_progress" + additionalProperties: false + required: + - response + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseInProgress + description: >- + Streaming event indicating the response remains in progress. + "OpenAIResponseObjectStreamResponseIncomplete": + type: object + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' description: >- - (Optional) JSON schema defining the function's parameters - strict: - type: boolean + Response object describing the incomplete state + sequence_number: + type: integer description: >- - (Optional) Whether to enforce strict parameter validation + Sequential number for ordering streaming events + type: + type: string + const: response.incomplete + default: response.incomplete + description: >- + Event type identifier, always "response.incomplete" additionalProperties: false required: + - response + - sequence_number - type - - name - title: OpenAIResponseInputToolFunction + title: >- + OpenAIResponseObjectStreamResponseIncomplete description: >- - Function tool configuration for OpenAI response inputs. - OpenAIResponseInputToolWebSearch: + Streaming event emitted when a response ends in an incomplete state. + "OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta": type: object properties: + delta: + type: string + item_id: + type: string + output_index: + type: integer + sequence_number: + type: integer type: - oneOf: - - type: string - const: web_search - - type: string - const: web_search_preview - - type: string - const: web_search_preview_2025_03_11 - - type: string - const: web_search_2025_08_26 - 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" + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta additionalProperties: false required: + - delta + - item_id + - output_index + - sequence_number - type - title: OpenAIResponseInputToolWebSearch - description: >- - Web search tool configuration for OpenAI response inputs. - OpenAIResponseObjectWithInput: + title: >- + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + "OpenAIResponseObjectStreamResponseMcpCallArgumentsDone": 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: + arguments: type: string - description: >- - (Optional) Truncation strategy applied to the response - usage: - $ref: '#/components/schemas/OpenAIResponseUsage' - description: >- - (Optional) Token usage information for the response - instructions: + item_id: type: string - description: >- - (Optional) System message inserted into the model's context - max_tool_calls: + output_index: type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response - input: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: >- - List of input items that led to this response + sequence_number: + type: integer + type: + type: string + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done 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: + - arguments + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + "OpenAIResponseObjectStreamResponseMcpCallCompleted": type: object properties: - id: - type: string - description: Unique identifier of the prompt template - variables: - type: object - additionalProperties: - $ref: '#/components/schemas/OpenAIResponseInputMessageContent' + sequence_number: + type: integer 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: + Sequential number for ordering streaming events + type: type: string + const: response.mcp_call.completed + default: response.mcp_call.completed description: >- - Version number of the prompt to use (defaults to latest if not specified) + Event type identifier, always "response.mcp_call.completed" additionalProperties: false required: - - id - title: OpenAIResponsePrompt - description: >- - OpenAI compatible Prompt object that is used in OpenAI responses. - OpenAIResponseText: + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpCallCompleted + description: Streaming event for completed MCP calls. + "OpenAIResponseObjectStreamResponseMcpCallFailed": 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 + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.mcp_call.failed + default: response.mcp_call.failed description: >- - (Optional) Text format configuration specifying output format requirements + Event type identifier, always "response.mcp_call.failed" 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: + required: + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpCallFailed + description: Streaming event for failed MCP calls. + "OpenAIResponseObjectStreamResponseMcpCallInProgress": type: object properties: + item_id: + type: string + description: Unique identifier of the MCP call + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events 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. + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress description: >- - (Optional) Restriction on which tools can be used from this server + Event type identifier, always "response.mcp_call.in_progress" additionalProperties: false required: + - item_id + - output_index + - sequence_number - type - - server_label - title: OpenAIResponseToolMCP + title: >- + OpenAIResponseObjectStreamResponseMcpCallInProgress description: >- - Model Context Protocol (MCP) tool configuration for OpenAI response object. - OpenAIResponseUsage: + Streaming event for MCP calls in progress. + "OpenAIResponseObjectStreamResponseMcpListToolsCompleted": 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: + sequence_number: 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 + type: + type: string + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed additionalProperties: false required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - description: Usage information for OpenAI response. - ResponseGuardrailSpec: + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpListToolsCompleted + "OpenAIResponseObjectStreamResponseMcpListToolsFailed": type: object properties: + sequence_number: + type: integer type: type: string - description: The type/identifier of the guardrail. + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed additionalProperties: false required: + - sequence_number - 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: + title: >- + OpenAIResponseObjectStreamResponseMcpListToolsFailed + "OpenAIResponseObjectStreamResponseMcpListToolsInProgress": type: object properties: + sequence_number: + type: integer 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: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + additionalProperties: false + required: + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpListToolsInProgress + "OpenAIResponseObjectStreamResponseOutputItemAdded": + type: object + properties: + response_id: 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: + Unique identifier of the response containing this output + item: 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 + - $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' 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. + The output item that was added (message, tool call, etc.) + output_index: + type: integer description: >- - (Optional) Restriction on which tools can be used from this server + Index position of this item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.output_item.added + default: response.output_item.added + description: >- + Event type identifier, always "response.output_item.added" additionalProperties: false required: + - response_id + - item + - output_index + - sequence_number - type - - server_label - - server_url - - require_approval - title: OpenAIResponseInputToolMCP + title: >- + OpenAIResponseObjectStreamResponseOutputItemAdded + description: >- + Streaming event for when a new output item is added to the response. + "OpenAIResponseObjectStreamResponseOutputItemDone": + type: object + properties: + response_id: + type: string + description: >- + Unique identifier of the response containing this output + item: + 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' + description: >- + The completed output item (message, tool call, etc.) + output_index: + type: integer + description: >- + Index position of this item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.output_item.done + default: response.output_item.done + description: >- + Event type identifier, always "response.output_item.done" + additionalProperties: false + required: + - response_id + - item + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseOutputItemDone description: >- - Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - CreateOpenaiResponseRequest: + Streaming event for when an output item is completed. + "OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded": 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: + item_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 + Unique identifier of the item to which the annotation is being added + output_index: + type: integer 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 + Index position of the output item in the response's output array + content_index: + type: integer description: >- - (Optional) Additional fields to include in the response. - max_infer_iters: + Index position of the content part within the output item + annotation_index: type: integer - max_tool_calls: + description: >- + Index of the annotation within the content part + annotation: + 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' + description: The annotation object being added + sequence_number: type: integer description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response. + Sequential number for ordering streaming events + type: + type: string + const: response.output_text.annotation.added + default: response.output_text.annotation.added + description: >- + Event type identifier, always "response.output_text.annotation.added" additionalProperties: false required: - - input - - model - title: CreateOpenaiResponseRequest - OpenAIResponseObject: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + description: >- + Streaming event for when an annotation is added to output text. + "OpenAIResponseObjectStreamResponseOutputTextDelta": type: object properties: - created_at: + content_index: 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: + description: Index position within the text content + delta: type: string - description: Model identifier used for generation - object: + description: Incremental text content being added + item_id: 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 + Unique identifier of the output item being updated + output_index: + type: integer description: >- - (Optional) ID of the previous response in a conversation - prompt: - $ref: '#/components/schemas/OpenAIResponsePrompt' + Index position of the item in the output list + sequence_number: + type: integer description: >- - (Optional) Reference to a prompt template and its variables. - status: + Sequential number for ordering streaming events + type: type: string + const: response.output_text.delta + default: response.output_text.delta description: >- - Current status of the response generation - temperature: - type: number - description: >- - (Optional) Sampling temperature used for generation + Event type identifier, always "response.output_text.delta" + additionalProperties: false + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseOutputTextDelta + description: >- + Streaming event for incremental text content updates. + "OpenAIResponseObjectStreamResponseOutputTextDone": + type: object + properties: + content_index: + type: integer + description: Index position within the text content 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: + Final complete text content of the output item + item_id: type: string description: >- - (Optional) System message inserted into the model's context - max_tool_calls: + Unique identifier of the completed output item + output_index: type: integer description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response - additionalProperties: false - required: - - created_at - - id - - model - - object - - output - - parallel_tool_calls - - status - - text - title: OpenAIResponseObject - description: >- - Complete OpenAI response object containing generation results and metadata. - OpenAIResponseContentPartOutputText: - type: object - properties: - type: - type: string - const: output_text - default: output_text + Index position of the item in the output list + sequence_number: + type: integer description: >- - Content part type identifier, always "output_text" - text: + Sequential number for ordering streaming events + type: type: string - description: Text emitted for this content part - annotations: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseAnnotations' + const: response.output_text.done + default: response.output_text.done description: >- - Structured annotations associated with the text - logprobs: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) Token log probability details + Event type identifier, always "response.output_text.done" additionalProperties: false required: - - type + - content_index - text - - annotations - title: OpenAIResponseContentPartOutputText + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseOutputTextDone description: >- - Text content within a streamed response part. - "OpenAIResponseContentPartReasoningSummary": + Streaming event for when text output is completed. + "OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded": type: object properties: - type: + item_id: type: string - const: summary_text - default: summary_text + description: Unique identifier of the output item + output_index: + type: integer + description: Index position of the output item + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + description: The summary part that was added + sequence_number: + type: integer description: >- - Content part type identifier, always "summary_text" - text: + Sequential number for ordering streaming events + summary_index: + type: integer + description: >- + Index of the summary part within the reasoning summary + type: type: string - description: Summary text + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + description: >- + Event type identifier, always "response.reasoning_summary_part.added" additionalProperties: false required: + - item_id + - output_index + - part + - sequence_number + - summary_index - type - - text title: >- - OpenAIResponseContentPartReasoningSummary + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded description: >- - Reasoning summary part in a streamed response. - OpenAIResponseContentPartReasoningText: + Streaming event for when a new reasoning summary part is added. + "OpenAIResponseObjectStreamResponseReasoningSummaryPartDone": type: object properties: - type: + item_id: type: string - const: reasoning_text - default: reasoning_text + description: Unique identifier of the output item + output_index: + type: integer + description: Index position of the output item + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + description: The completed summary part + sequence_number: + type: integer description: >- - Content part type identifier, always "reasoning_text" - text: + Sequential number for ordering streaming events + summary_index: + type: integer + description: >- + Index of the summary part within the reasoning summary + type: type: string - description: Reasoning text supplied by the model + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done + description: >- + Event type identifier, always "response.reasoning_summary_part.done" additionalProperties: false required: + - item_id + - output_index + - part + - sequence_number + - summary_index - type - - text - title: OpenAIResponseContentPartReasoningText + title: >- + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone description: >- - Reasoning text emitted as part of a streamed response. - OpenAIResponseObjectStream: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - discriminator: - propertyName: type - mapping: - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - "OpenAIResponseObjectStreamResponseCompleted": + Streaming event for when a reasoning summary part is completed. + "OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta": type: object properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Completed response object + delta: + type: string + description: Incremental summary text being added + item_id: + type: string + description: Unique identifier of the output item + output_index: + type: integer + description: Index position of the output item + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + summary_index: + type: integer + description: >- + Index of the summary part within the reasoning summary type: type: string - const: response.completed - default: response.completed + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta description: >- - Event type identifier, always "response.completed" + Event type identifier, always "response.reasoning_summary_text.delta" additionalProperties: false required: - - response + - delta + - item_id + - output_index + - sequence_number + - summary_index - type title: >- - OpenAIResponseObjectStreamResponseCompleted + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta description: >- - Streaming event indicating a response has been completed. - "OpenAIResponseObjectStreamResponseContentPartAdded": + Streaming event for incremental reasoning summary text updates. + "OpenAIResponseObjectStreamResponseReasoningSummaryTextDone": type: object properties: - content_index: - type: integer - description: >- - Index position of the part within the content array - response_id: + text: type: string - description: >- - Unique identifier of the response containing this content + description: Final complete summary text item_id: type: string - description: >- - Unique identifier of the output item containing this content part + description: Unique identifier of the output item output_index: type: integer - description: >- - Index position of the output item in the response - part: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - description: The content part that was added + description: Index position of the output item sequence_number: type: integer description: >- Sequential number for ordering streaming events + summary_index: + type: integer + description: >- + Index of the summary part within the reasoning summary type: type: string - const: response.content_part.added - default: response.content_part.added + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done description: >- - Event type identifier, always "response.content_part.added" + Event type identifier, always "response.reasoning_summary_text.done" additionalProperties: false required: - - content_index - - response_id + - text - item_id - output_index - - part - sequence_number + - summary_index - type title: >- - OpenAIResponseObjectStreamResponseContentPartAdded + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone description: >- - Streaming event for when a new content part is added to a response item. - "OpenAIResponseObjectStreamResponseContentPartDone": + Streaming event for when reasoning summary text is completed. + "OpenAIResponseObjectStreamResponseReasoningTextDelta": type: object properties: content_index: type: integer description: >- - Index position of the part within the content array - response_id: - type: string - description: >- - Unique identifier of the response containing this content + Index position of the reasoning content part + delta: + type: string + description: Incremental reasoning text being added item_id: type: string description: >- - Unique identifier of the output item containing this content part + Unique identifier of the output item being updated output_index: type: integer description: >- - Index position of the output item in the response - part: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - description: The completed content part + Index position of the item in the output list sequence_number: type: integer description: >- Sequential number for ordering streaming events type: type: string - const: response.content_part.done - default: response.content_part.done + const: response.reasoning_text.delta + default: response.reasoning_text.delta description: >- - Event type identifier, always "response.content_part.done" + Event type identifier, always "response.reasoning_text.delta" additionalProperties: false required: - content_index - - response_id + - delta - item_id - output_index - - part - sequence_number - type title: >- - OpenAIResponseObjectStreamResponseContentPartDone + OpenAIResponseObjectStreamResponseReasoningTextDelta description: >- - Streaming event for when a content part is completed. - "OpenAIResponseObjectStreamResponseCreated": + Streaming event for incremental reasoning text updates. + "OpenAIResponseObjectStreamResponseReasoningTextDone": type: object properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: The response object that was created - type: + content_index: + type: integer + description: >- + Index position of the reasoning content part + text: + type: string + description: Final complete reasoning text + item_id: type: string - const: response.created - default: response.created description: >- - Event type identifier, always "response.created" - additionalProperties: false - required: - - response - - type - title: >- - OpenAIResponseObjectStreamResponseCreated - description: >- - Streaming event indicating a new response has been created. - OpenAIResponseObjectStreamResponseFailed: - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Response object describing the failure + Unique identifier of the completed output item + output_index: + type: integer + description: >- + Index position of the item in the output list sequence_number: type: integer description: >- Sequential number for ordering streaming events type: type: string - const: response.failed - default: response.failed + const: response.reasoning_text.done + default: response.reasoning_text.done description: >- - Event type identifier, always "response.failed" + Event type identifier, always "response.reasoning_text.done" additionalProperties: false required: - - response + - content_index + - text + - item_id + - output_index - sequence_number - type - title: OpenAIResponseObjectStreamResponseFailed + title: >- + OpenAIResponseObjectStreamResponseReasoningTextDone description: >- - Streaming event emitted when a response fails. - "OpenAIResponseObjectStreamResponseFileSearchCallCompleted": + Streaming event for when reasoning text is completed. + "OpenAIResponseObjectStreamResponseRefusalDelta": type: object properties: + content_index: + type: integer + description: Index position of the content part + delta: + type: string + description: Incremental refusal text being added item_id: type: string - description: >- - Unique identifier of the completed file search call + description: Unique identifier of the output item output_index: type: integer description: >- @@ -7677,27 +15625,34 @@ components: Sequential number for ordering streaming events type: type: string - const: response.file_search_call.completed - default: response.file_search_call.completed + const: response.refusal.delta + default: response.refusal.delta description: >- - Event type identifier, always "response.file_search_call.completed" + Event type identifier, always "response.refusal.delta" additionalProperties: false required: + - content_index + - delta - item_id - output_index - sequence_number - type title: >- - OpenAIResponseObjectStreamResponseFileSearchCallCompleted + OpenAIResponseObjectStreamResponseRefusalDelta description: >- - Streaming event for completed file search calls. - "OpenAIResponseObjectStreamResponseFileSearchCallInProgress": + Streaming event for incremental refusal text updates. + "OpenAIResponseObjectStreamResponseRefusalDone": type: object properties: + content_index: + type: integer + description: Index position of the content part + refusal: + type: string + description: Final complete refusal text item_id: type: string - description: >- - Unique identifier of the file search call + description: Unique identifier of the output item output_index: type: integer description: >- @@ -7708,27 +15663,29 @@ components: Sequential number for ordering streaming events type: type: string - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress + const: response.refusal.done + default: response.refusal.done description: >- - Event type identifier, always "response.file_search_call.in_progress" + Event type identifier, always "response.refusal.done" additionalProperties: false required: + - content_index + - refusal - item_id - output_index - sequence_number - type title: >- - OpenAIResponseObjectStreamResponseFileSearchCallInProgress + OpenAIResponseObjectStreamResponseRefusalDone description: >- - Streaming event for file search calls in progress. - "OpenAIResponseObjectStreamResponseFileSearchCallSearching": + Streaming event for when refusal text is completed. + "OpenAIResponseObjectStreamResponseWebSearchCallCompleted": type: object properties: item_id: type: string description: >- - Unique identifier of the file search call + Unique identifier of the completed web search call output_index: type: integer description: >- @@ -7739,10 +15696,10 @@ components: Sequential number for ordering streaming events type: type: string - const: response.file_search_call.searching - default: response.file_search_call.searching + const: response.web_search_call.completed + default: response.web_search_call.completed description: >- - Event type identifier, always "response.file_search_call.searching" + Event type identifier, always "response.web_search_call.completed" additionalProperties: false required: - item_id @@ -7750,20 +15707,15 @@ components: - sequence_number - type title: >- - OpenAIResponseObjectStreamResponseFileSearchCallSearching + OpenAIResponseObjectStreamResponseWebSearchCallCompleted description: >- - Streaming event for file search currently searching. - "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta": + Streaming event for completed web search calls. + "OpenAIResponseObjectStreamResponseWebSearchCallInProgress": type: object properties: - delta: - type: string - description: >- - Incremental function call arguments being added item_id: type: string - description: >- - Unique identifier of the function call being updated + description: Unique identifier of the web search call output_index: type: integer description: >- @@ -7774,959 +15726,803 @@ components: Sequential number for ordering streaming events type: type: string - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress description: >- - Event type identifier, always "response.function_call_arguments.delta" + Event type identifier, always "response.web_search_call.in_progress" additionalProperties: false required: - - delta - item_id - output_index - sequence_number - type title: >- - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + OpenAIResponseObjectStreamResponseWebSearchCallInProgress description: >- - Streaming event for incremental function call argument updates. - "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone": + Streaming event for web search calls in progress. + "OpenAIResponseObjectStreamResponseWebSearchCallSearching": type: object properties: - arguments: - type: string - description: >- - Final complete arguments JSON string for the function call item_id: type: string - description: >- - Unique identifier of the completed function call output_index: type: integer - description: >- - Index position of the item in the output list sequence_number: type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.function_call_arguments.done - default: response.function_call_arguments.done - description: >- - Event type identifier, always "response.function_call_arguments.done" + const: response.web_search_call.searching + default: response.web_search_call.searching additionalProperties: false required: - - arguments - item_id - output_index - sequence_number - type title: >- - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + OpenAIResponseObjectStreamResponseWebSearchCallSearching + OpenAIDeleteResponseObject: + type: object + properties: + id: + type: string + description: >- + Unique identifier of the deleted response + object: + type: string + const: response + default: response + description: >- + Object type identifier, always "response" + deleted: + type: boolean + default: true + description: Deletion confirmation flag, always True + additionalProperties: false + required: + - id + - object + - deleted + title: OpenAIDeleteResponseObject description: >- - Streaming event for when function call arguments are completed. - "OpenAIResponseObjectStreamResponseInProgress": + Response object confirming deletion of an OpenAI response. + ListOpenAIResponseInputItem: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseInput' + description: List of input items + object: + type: string + const: list + default: list + description: Object type identifier, always "list" + additionalProperties: false + required: + - data + - object + title: ListOpenAIResponseInputItem + description: >- + List container for OpenAI response input items. + RunShieldRequest: + type: object + properties: + shield_id: + type: string + description: The identifier of the shield to run. + messages: + type: array + items: + $ref: '#/components/schemas/OpenAIMessageParam' + description: The messages to run the shield on. + params: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The parameters of the shield. + additionalProperties: false + required: + - shield_id + - messages + - params + title: RunShieldRequest + RunShieldResponse: type: object properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Current response state while in progress - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.in_progress - default: response.in_progress + violation: + $ref: '#/components/schemas/SafetyViolation' description: >- - Event type identifier, always "response.in_progress" + (Optional) Safety violation detected by the shield, if any additionalProperties: false - required: - - response - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseInProgress - description: >- - Streaming event indicating the response remains in progress. - "OpenAIResponseObjectStreamResponseIncomplete": + title: RunShieldResponse + description: Response from running a safety shield. + SafetyViolation: type: object properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: >- - Response object describing the incomplete state - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + description: Severity level of the violation + user_message: type: string - const: response.incomplete - default: response.incomplete description: >- - Event type identifier, always "response.incomplete" + (Optional) Message to convey to the user about the violation + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Additional metadata including specific violation codes for debugging and + telemetry additionalProperties: false required: - - response - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseIncomplete + - violation_level + - metadata + title: SafetyViolation description: >- - Streaming event emitted when a response ends in an incomplete state. - "OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta": + Details of a safety violation detected by content moderation. + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: Severity level of a safety violation. + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: >- + Types of aggregation functions for scoring results. + ArrayType: type: object properties: - delta: - type: string - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer type: type: string - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta + const: array + default: array + description: Discriminator type. Always "array" additionalProperties: false required: - - delta - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - "OpenAIResponseObjectStreamResponseMcpCallArgumentsDone": + title: ArrayType + description: Parameter type for array values. + BasicScoringFnParams: type: object properties: - arguments: - type: string - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer type: - type: string - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done + $ref: '#/components/schemas/ScoringFnParamsType' + const: basic + default: basic + description: >- + The type of scoring function parameters, always basic + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row additionalProperties: false required: - - arguments - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - "OpenAIResponseObjectStreamResponseMcpCallCompleted": + - aggregation_functions + title: BasicScoringFnParams + description: >- + Parameters for basic scoring function configuration. + BooleanType: type: object properties: - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.mcp_call.completed - default: response.mcp_call.completed - description: >- - Event type identifier, always "response.mcp_call.completed" + const: boolean + default: boolean + description: Discriminator type. Always "boolean" additionalProperties: false required: - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallCompleted - description: Streaming event for completed MCP calls. - "OpenAIResponseObjectStreamResponseMcpCallFailed": + title: BooleanType + description: Parameter type for boolean values. + ChatCompletionInputType: type: object properties: - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.mcp_call.failed - default: response.mcp_call.failed + const: chat_completion_input + default: chat_completion_input description: >- - Event type identifier, always "response.mcp_call.failed" + Discriminator type. Always "chat_completion_input" additionalProperties: false required: - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallFailed - description: Streaming event for failed MCP calls. - "OpenAIResponseObjectStreamResponseMcpCallInProgress": + title: ChatCompletionInputType + description: >- + Parameter type for chat completion input. + CompletionInputType: type: object properties: - item_id: - type: string - description: Unique identifier of the MCP call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress + const: completion_input + default: completion_input description: >- - Event type identifier, always "response.mcp_call.in_progress" + Discriminator type. Always "completion_input" additionalProperties: false required: - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallInProgress - description: >- - Streaming event for MCP calls in progress. - "OpenAIResponseObjectStreamResponseMcpListToolsCompleted": + title: CompletionInputType + description: Parameter type for completion input. + JsonType: type: object properties: - sequence_number: - type: integer type: type: string - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed + const: json + default: json + description: Discriminator type. Always "json" additionalProperties: false required: - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsCompleted - "OpenAIResponseObjectStreamResponseMcpListToolsFailed": + title: JsonType + description: Parameter type for JSON values. + LLMAsJudgeScoringFnParams: type: object properties: - sequence_number: - type: integer type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: llm_as_judge + default: llm_as_judge + description: >- + The type of scoring function parameters, always llm_as_judge + judge_model: type: string - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed + description: >- + Identifier of the LLM model to use as a judge for scoring + prompt_template: + type: string + description: >- + (Optional) Custom prompt template for the judge model + judge_score_regexes: + type: array + items: + type: string + description: >- + Regexes to extract the answer from generated response + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row additionalProperties: false required: - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsFailed - "OpenAIResponseObjectStreamResponseMcpListToolsInProgress": + - judge_model + - judge_score_regexes + - aggregation_functions + title: LLMAsJudgeScoringFnParams + description: >- + Parameters for LLM-as-judge scoring function configuration. + NumberType: type: object properties: - sequence_number: - type: integer type: type: string - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress + const: number + default: number + description: Discriminator type. Always "number" additionalProperties: false required: - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsInProgress - "OpenAIResponseObjectStreamResponseOutputItemAdded": + title: NumberType + description: Parameter type for numeric values. + ObjectType: type: object properties: - response_id: - type: string - description: >- - Unique identifier of the response containing this output - item: - 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' - description: >- - The output item that was added (message, tool call, etc.) - output_index: - type: integer - description: >- - Index position of this item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.output_item.added - default: response.output_item.added - description: >- - Event type identifier, always "response.output_item.added" + const: object + default: object + description: Discriminator type. Always "object" additionalProperties: false required: - - response_id - - item - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseOutputItemAdded - description: >- - Streaming event for when a new output item is added to the response. - "OpenAIResponseObjectStreamResponseOutputItemDone": + title: ObjectType + description: Parameter type for object values. + RegexParserScoringFnParams: type: object properties: - response_id: - type: string - description: >- - Unique identifier of the response containing this output - item: - 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' - description: >- - The completed output item (message, tool call, etc.) - output_index: - type: integer + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: regex_parser + default: regex_parser description: >- - Index position of this item in the output list - sequence_number: - type: integer + The type of scoring function parameters, always regex_parser + parsing_regexes: + type: array + items: + type: string description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_item.done - default: response.output_item.done + Regex to extract the answer from generated response + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' description: >- - Event type identifier, always "response.output_item.done" + Aggregation functions to apply to the scores of each row additionalProperties: false required: - - response_id - - item - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseOutputItemDone + - parsing_regexes + - aggregation_functions + title: RegexParserScoringFnParams description: >- - Streaming event for when an output item is completed. - "OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded": + Parameters for regex parser scoring function configuration. + ScoringFn: type: object properties: - item_id: + identifier: type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: scoring_function + default: scoring_function description: >- - Unique identifier of the item to which the annotation is being added - output_index: - type: integer - description: >- - Index position of the output item in the response's output array - content_index: - type: integer - description: >- - Index position of the content part within the output item - annotation_index: - type: integer - description: >- - Index of the annotation within the content part - annotation: + The resource type, always scoring_function + description: + type: string + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + return_type: oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + - $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' 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' - description: The annotation object being added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_text.annotation.added - default: response.output_text.annotation.added - description: >- - Event type identifier, always "response.output_text.annotation.added" + string: '#/components/schemas/StringType' + number: '#/components/schemas/NumberType' + boolean: '#/components/schemas/BooleanType' + array: '#/components/schemas/ArrayType' + object: '#/components/schemas/ObjectType' + json: '#/components/schemas/JsonType' + union: '#/components/schemas/UnionType' + chat_completion_input: '#/components/schemas/ChatCompletionInputType' + completion_input: '#/components/schemas/CompletionInputType' + params: + $ref: '#/components/schemas/ScoringFnParams' additionalProperties: false required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number + - identifier + - provider_id - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - metadata + - return_type + title: ScoringFn + description: >- + A scoring function resource for evaluating model outputs. + ScoringFnParams: + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + basic: '#/components/schemas/BasicScoringFnParams' + ScoringFnParamsType: + type: string + enum: + - llm_as_judge + - regex_parser + - basic + title: ScoringFnParamsType description: >- - Streaming event for when an annotation is added to output text. - "OpenAIResponseObjectStreamResponseOutputTextDelta": + Types of scoring function parameter configurations. + StringType: type: object properties: - content_index: - type: integer - description: Index position within the text content - delta: - type: string - description: Incremental text content being added - item_id: - type: string - description: >- - Unique identifier of the output item being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.output_text.delta - default: response.output_text.delta - description: >- - Event type identifier, always "response.output_text.delta" + const: string + default: string + description: Discriminator type. Always "string" additionalProperties: false required: - - content_index - - delta - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextDelta - description: >- - Streaming event for incremental text content updates. - "OpenAIResponseObjectStreamResponseOutputTextDone": + title: StringType + description: Parameter type for string values. + UnionType: type: object properties: - content_index: - type: integer - description: Index position within the text content - text: - type: string - description: >- - Final complete text content of the output item - item_id: - type: string - description: >- - Unique identifier of the completed output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.output_text.done - default: response.output_text.done - description: >- - Event type identifier, always "response.output_text.done" + const: union + default: union + description: Discriminator type. Always "union" additionalProperties: false required: - - content_index - - text - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextDone - description: >- - Streaming event for when text output is completed. - "OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded": + title: UnionType + description: Parameter type for union values. + ListScoringFunctionsResponse: type: object properties: - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - description: The summary part that was added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - description: >- - Event type identifier, always "response.reasoning_summary_part.added" + data: + type: array + items: + $ref: '#/components/schemas/ScoringFn' additionalProperties: false required: - - item_id - - output_index - - part - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - description: >- - Streaming event for when a new reasoning summary part is added. - "OpenAIResponseObjectStreamResponseReasoningSummaryPartDone": + - data + title: ListScoringFunctionsResponse + ScoreRequest: type: object properties: - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - description: The completed summary part - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done + input_rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to score. + scoring_functions: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/ScoringFnParams' + - type: 'null' description: >- - Event type identifier, always "response.reasoning_summary_part.done" + The scoring functions to use for the scoring. additionalProperties: false required: - - item_id - - output_index - - part - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - description: >- - Streaming event for when a reasoning summary part is completed. - "OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta": + - input_rows + - scoring_functions + title: ScoreRequest + ScoreResponse: type: object properties: - delta: - type: string - description: Incremental summary text being added - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta + results: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringResult' description: >- - Event type identifier, always "response.reasoning_summary_text.delta" + A map of scoring function name to ScoringResult. additionalProperties: false required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - description: >- - Streaming event for incremental reasoning summary text updates. - "OpenAIResponseObjectStreamResponseReasoningSummaryTextDone": + - results + title: ScoreResponse + description: The response from scoring. + ScoringResult: type: object properties: - text: - type: string - description: Final complete summary text - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done + score_rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - Event type identifier, always "response.reasoning_summary_text.done" + The scoring result for each row. Each row is a map of column name to value. + aggregated_results: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Map of metric name to aggregated value additionalProperties: false required: - - text - - item_id - - output_index - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - description: >- - Streaming event for when reasoning summary text is completed. - "OpenAIResponseObjectStreamResponseReasoningTextDelta": + - score_rows + - aggregated_results + title: ScoringResult + description: A scoring result for a single row. + ScoreBatchRequest: type: object properties: - content_index: - type: integer - description: >- - Index position of the reasoning content part - delta: - type: string - description: Incremental reasoning text being added - item_id: + dataset_id: type: string + description: The ID of the dataset to score. + scoring_functions: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/ScoringFnParams' + - type: 'null' description: >- - Unique identifier of the output item being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.reasoning_text.delta - default: response.reasoning_text.delta + The scoring functions to use for the scoring. + save_results_dataset: + type: boolean description: >- - Event type identifier, always "response.reasoning_text.delta" + Whether to save the results to a dataset. additionalProperties: false required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningTextDelta - description: >- - Streaming event for incremental reasoning text updates. - "OpenAIResponseObjectStreamResponseReasoningTextDone": + - dataset_id + - scoring_functions + - save_results_dataset + title: ScoreBatchRequest + ScoreBatchResponse: type: object properties: - content_index: - type: integer - description: >- - Index position of the reasoning content part - text: - type: string - description: Final complete reasoning text - item_id: + dataset_id: type: string description: >- - Unique identifier of the completed output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.reasoning_text.done - default: response.reasoning_text.done + (Optional) The identifier of the dataset that was scored + results: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringResult' description: >- - Event type identifier, always "response.reasoning_text.done" + A map of scoring function name to ScoringResult additionalProperties: false required: - - content_index - - text - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningTextDone + - results + title: ScoreBatchResponse description: >- - Streaming event for when reasoning text is completed. - "OpenAIResponseObjectStreamResponseRefusalDelta": + Response from batch scoring operations on datasets. + Shield: type: object properties: - content_index: - type: integer - description: Index position of the content part - delta: + identifier: type: string - description: Incremental refusal text being added - item_id: + provider_resource_id: + type: string + provider_id: type: string - description: Unique identifier of the output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.refusal.delta - default: response.refusal.delta + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: shield + default: shield + description: The resource type, always shield + params: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - Event type identifier, always "response.refusal.delta" + (Optional) Configuration parameters for the shield additionalProperties: false required: - - content_index - - delta - - item_id - - output_index - - sequence_number + - identifier + - provider_id - type - title: >- - OpenAIResponseObjectStreamResponseRefusalDelta + title: Shield description: >- - Streaming event for incremental refusal text updates. - "OpenAIResponseObjectStreamResponseRefusalDone": + A safety shield resource that can be used to check content. + ListShieldsResponse: type: object properties: - content_index: - type: integer - description: Index position of the content part - refusal: - type: string - description: Final complete refusal text - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.refusal.done - default: response.refusal.done - description: >- - Event type identifier, always "response.refusal.done" + data: + type: array + items: + $ref: '#/components/schemas/Shield' additionalProperties: false required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseRefusalDone - description: >- - Streaming event for when refusal text is completed. - "OpenAIResponseObjectStreamResponseWebSearchCallCompleted": + - data + title: ListShieldsResponse + InvokeToolRequest: type: object properties: - item_id: - type: string - description: >- - Unique identifier of the completed web search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: + tool_name: type: string - const: response.web_search_call.completed - default: response.web_search_call.completed + description: The name of the tool to invoke. + kwargs: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - Event type identifier, always "response.web_search_call.completed" + A dictionary of arguments to pass to the tool. additionalProperties: false required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallCompleted - description: >- - Streaming event for completed web search calls. - "OpenAIResponseObjectStreamResponseWebSearchCallInProgress": + - tool_name + - kwargs + title: InvokeToolRequest + ImageContentItem: type: object properties: - item_id: - type: string - description: Unique identifier of the web search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: type: string - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress + const: image + default: image description: >- - Event type identifier, always "response.web_search_call.in_progress" + Discriminator type of the content item. Always "image" + image: + type: object + properties: + url: + $ref: '#/components/schemas/URL' + description: >- + A URL of the image or data URL in the format of data:image/{type};base64,{data}. + Note that URL could have length limits. + data: + type: string + contentEncoding: base64 + description: base64 encoded image data as string + additionalProperties: false + description: >- + Image as a base64 encoded string or an URL additionalProperties: false required: - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallInProgress - description: >- - Streaming event for web search calls in progress. - "OpenAIResponseObjectStreamResponseWebSearchCallSearching": + - image + title: ImageContentItem + description: A image content item + InterleavedContent: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - type: array + items: + $ref: '#/components/schemas/InterleavedContentItem' + InterleavedContentItem: + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + TextContentItem: type: object properties: - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer type: type: string - const: response.web_search_call.searching - default: response.web_search_call.searching + const: text + default: text + description: >- + Discriminator type of the content item. Always "text" + text: + type: string + description: Text content additionalProperties: false required: - - item_id - - output_index - - sequence_number - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallSearching - OpenAIDeleteResponseObject: + - text + title: TextContentItem + description: A text content item + ToolInvocationResult: type: object properties: - id: - type: string + content: + $ref: '#/components/schemas/InterleavedContent' description: >- - Unique identifier of the deleted response - object: + (Optional) The output content from the tool execution + error_message: type: string - const: response - default: response description: >- - Object type identifier, always "response" - deleted: - type: boolean - default: true - description: Deletion confirmation flag, always True + (Optional) Error message if the tool execution failed + error_code: + type: integer + description: >- + (Optional) Numeric error code if the tool execution failed + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata about the tool execution additionalProperties: false - required: - - id - - object - - deleted - title: OpenAIDeleteResponseObject - description: >- - Response object confirming deletion of an OpenAI response. - ListOpenAIResponseInputItem: + title: ToolInvocationResult + description: Result of a tool invocation. + URL: type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: List of input items - object: + uri: type: string - const: list - default: list - description: Object type identifier, always "list" + description: The URL string pointing to the resource additionalProperties: false required: - - data - - object - title: ListOpenAIResponseInputItem - description: >- - List container for OpenAI response input items. - RunShieldRequest: + - uri + title: URL + description: A URL reference to external content. + ToolDef: type: object properties: - shield_id: + toolgroup_id: type: string - description: The identifier of the shield to run. - messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - description: The messages to run the shield on. - params: + description: >- + (Optional) ID of the tool group this tool belongs to + name: + type: string + description: Name of the tool + description: + type: string + description: >- + (Optional) Human-readable description of what the tool does + input_schema: type: object additionalProperties: oneOf: @@ -8736,34 +16532,81 @@ components: - type: string - type: array - type: object - description: The parameters of the shield. + description: >- + (Optional) JSON Schema for tool inputs (MCP inputSchema) + output_schema: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) JSON Schema for tool outputs (MCP outputSchema) + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata about the tool additionalProperties: false required: - - shield_id - - messages - - params - title: RunShieldRequest - RunShieldResponse: + - name + title: ToolDef + description: >- + Tool definition used in runtime contexts. + ListToolDefsResponse: type: object properties: - violation: - $ref: '#/components/schemas/SafetyViolation' - description: >- - (Optional) Safety violation detected by the shield, if any + data: + type: array + items: + $ref: '#/components/schemas/ToolDef' + description: List of tool definitions additionalProperties: false - title: RunShieldResponse - description: Response from running a safety shield. - SafetyViolation: + required: + - data + title: ListToolDefsResponse + description: >- + Response containing a list of tool definitions. + ToolGroup: type: object properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - description: Severity level of the violation - user_message: + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: tool_group + default: tool_group + description: Type of resource, always 'tool_group' + mcp_endpoint: + $ref: '#/components/schemas/URL' description: >- - (Optional) Message to convey to the user about the violation - metadata: + (Optional) Model Context Protocol endpoint for remote tools + args: type: object additionalProperties: oneOf: @@ -8774,244 +16617,319 @@ components: - type: array - type: object description: >- - Additional metadata including specific violation codes for debugging and - telemetry + (Optional) Additional arguments for the tool group additionalProperties: false required: - - violation_level - - metadata - title: SafetyViolation - description: >- - Details of a safety violation detected by content moderation. - ViolationLevel: - type: string - enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType + - identifier + - provider_id + - type + title: ToolGroup description: >- - Types of aggregation functions for scoring results. - ArrayType: + A group of related tools managed together. + ListToolGroupsResponse: type: object properties: - type: - type: string - const: array - default: array - description: Discriminator type. Always "array" + data: + type: array + items: + $ref: '#/components/schemas/ToolGroup' + description: List of tool groups additionalProperties: false required: - - type - title: ArrayType - description: Parameter type for array values. - BasicScoringFnParams: + - data + title: ListToolGroupsResponse + description: >- + Response containing a list of tool groups. + Chunk: type: object properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: basic - default: basic + content: + $ref: '#/components/schemas/InterleavedContent' description: >- - The type of scoring function parameters, always basic - aggregation_functions: + 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: - $ref: '#/components/schemas/AggregationFunctionType' + type: number description: >- - Aggregation functions to apply to the scores of each row + 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: - - type - - aggregation_functions - title: BasicScoringFnParams + - content + - chunk_id + - metadata + title: Chunk description: >- - Parameters for basic scoring function configuration. - BooleanType: + A chunk of content that can be inserted into a vector database. + ChunkMetadata: type: object properties: - type: + chunk_id: type: string - const: boolean - default: boolean - description: Discriminator type. Always "boolean" - additionalProperties: false - required: - - type - title: BooleanType - description: Parameter type for boolean values. - ChatCompletionInputType: - type: object - properties: - type: + description: >- + The ID of the chunk. If not set, it will be generated based on the document + ID and content. + document_id: type: string - const: chat_completion_input - default: chat_completion_input description: >- - Discriminator type. Always "chat_completion_input" + The ID of the document this chunk belongs to. + source: + type: string + description: >- + The source of the content, such as a URL, file path, or other identifier. + created_timestamp: + type: integer + description: >- + An optional timestamp indicating when the chunk was created. + updated_timestamp: + type: integer + description: >- + An optional timestamp indicating when the chunk was last updated. + chunk_window: + type: string + description: >- + The window of the chunk, which can be used to group related chunks together. + chunk_tokenizer: + type: string + description: >- + The tokenizer used to create the chunk. Default is Tiktoken. + chunk_embedding_model: + type: string + description: >- + The embedding model used to create the chunk's embedding. + chunk_embedding_dimension: + type: integer + description: >- + The dimension of the embedding vector for the chunk. + content_token_count: + type: integer + description: >- + The number of tokens in the content of the chunk. + metadata_token_count: + type: integer + description: >- + The number of tokens in the metadata of the chunk. additionalProperties: false - required: - - type - title: ChatCompletionInputType + title: ChunkMetadata description: >- - Parameter type for chat completion input. - CompletionInputType: + `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. + InsertChunksRequest: type: object properties: - type: + vector_store_id: type: string - const: completion_input - default: completion_input description: >- - Discriminator type. Always "completion_input" + The identifier of the vector database to insert the chunks into. + chunks: + type: array + items: + $ref: '#/components/schemas/Chunk' + description: >- + The chunks to insert. Each `Chunk` should contain content which can be + interleaved text, images, or other types. `metadata`: `dict[str, Any]` + and `embedding`: `List[float]` are optional. If `metadata` is provided, + you configure how Llama Stack formats the chunk during generation. If + `embedding` is not provided, it will be computed later. + ttl_seconds: + type: integer + description: The time to live of the chunks. additionalProperties: false required: - - type - title: CompletionInputType - description: Parameter type for completion input. - JsonType: + - vector_store_id + - chunks + title: InsertChunksRequest + QueryChunksRequest: type: object properties: - type: + vector_store_id: type: string - const: json - default: json - description: Discriminator type. Always "json" + description: >- + The identifier of the vector database to query. + query: + $ref: '#/components/schemas/InterleavedContent' + description: The query to search for. + params: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The parameters of the query. additionalProperties: false required: - - type - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: + - vector_store_id + - query + title: QueryChunksRequest + QueryChunksResponse: type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: llm_as_judge - default: llm_as_judge - description: >- - The type of scoring function parameters, always llm_as_judge - judge_model: - type: string - description: >- - Identifier of the LLM model to use as a judge for scoring - prompt_template: - type: string - description: >- - (Optional) Custom prompt template for the judge model - judge_score_regexes: + properties: + chunks: type: array items: - type: string + $ref: '#/components/schemas/Chunk' description: >- - Regexes to extract the answer from generated response - aggregation_functions: + List of content chunks returned from the query + scores: type: array items: - $ref: '#/components/schemas/AggregationFunctionType' + type: number description: >- - Aggregation functions to apply to the scores of each row + Relevance scores corresponding to each returned chunk additionalProperties: false required: - - type - - judge_model - - judge_score_regexes - - aggregation_functions - title: LLMAsJudgeScoringFnParams + - chunks + - scores + title: QueryChunksResponse description: >- - Parameters for LLM-as-judge scoring function configuration. - NumberType: + Response from querying chunks in a vector database. + VectorStoreFileCounts: type: object properties: - type: - type: string - const: number - default: number - description: Discriminator type. Always "number" + completed: + type: integer + description: >- + Number of files that have been successfully processed + cancelled: + type: integer + description: >- + Number of files that had their processing cancelled + failed: + type: integer + description: Number of files that failed to process + in_progress: + type: integer + description: >- + Number of files currently being processed + total: + type: integer + description: >- + Total number of files in the vector store additionalProperties: false required: - - type - title: NumberType - description: Parameter type for numeric values. - ObjectType: + - completed + - cancelled + - failed + - in_progress + - total + title: VectorStoreFileCounts + description: >- + File processing status counts for a vector store. + VectorStoreListResponse: type: object properties: - type: + object: type: string - const: object - default: object - description: Discriminator type. Always "object" - additionalProperties: false - required: - - type - title: ObjectType - description: Parameter type for object values. - RegexParserScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: regex_parser - default: regex_parser - description: >- - The type of scoring function parameters, always regex_parser - parsing_regexes: + default: list + description: Object type identifier, always "list" + data: type: array items: - type: string + $ref: '#/components/schemas/VectorStoreObject' + description: List of vector store objects + first_id: + type: string description: >- - Regex to extract the answer from generated response - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' + (Optional) ID of the first vector store in the list for pagination + last_id: + type: string description: >- - Aggregation functions to apply to the scores of each row + (Optional) ID of the last vector store in the list for pagination + has_more: + type: boolean + default: false + description: >- + Whether there are more vector stores available beyond this page additionalProperties: false required: - - type - - parsing_regexes - - aggregation_functions - title: RegexParserScoringFnParams - description: >- - Parameters for regex parser scoring function configuration. - ScoringFn: + - object + - data + - has_more + title: VectorStoreListResponse + description: Response from listing vector stores. + VectorStoreObject: type: object properties: - identifier: - type: string - provider_resource_id: + id: type: string - provider_id: + description: Unique identifier for the vector store + object: type: string - type: + default: vector_store + description: >- + Object type identifier, always "vector_store" + created_at: + type: integer + description: >- + Timestamp when the vector store was created + name: type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: scoring_function - default: scoring_function + description: (Optional) Name of the vector store + usage_bytes: + type: integer + default: 0 description: >- - The resource type, always scoring_function - description: + Storage space used by the vector store in bytes + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + description: >- + File processing status counts for the vector store + status: type: string + default: completed + description: Current status of the vector store + expires_after: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Expiration policy for the vector store + expires_at: + type: integer + description: >- + (Optional) Timestamp when the vector store will expire + last_active_at: + type: integer + description: >- + (Optional) Timestamp of last activity on the vector store metadata: type: object additionalProperties: @@ -9022,159 +16940,103 @@ components: - type: string - type: array - type: object - 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' - discriminator: - propertyName: type - mapping: - string: '#/components/schemas/StringType' - number: '#/components/schemas/NumberType' - boolean: '#/components/schemas/BooleanType' - array: '#/components/schemas/ArrayType' - object: '#/components/schemas/ObjectType' - json: '#/components/schemas/JsonType' - union: '#/components/schemas/UnionType' - chat_completion_input: '#/components/schemas/ChatCompletionInputType' - completion_input: '#/components/schemas/CompletionInputType' - params: - $ref: '#/components/schemas/ScoringFnParams' + description: >- + Set of key-value pairs that can be attached to the vector store additionalProperties: false required: - - identifier - - provider_id - - type + - id + - object + - created_at + - usage_bytes + - file_counts + - status - metadata - - return_type - title: ScoringFn - description: >- - A scoring function resource for evaluating model outputs. - ScoringFnParams: + title: VectorStoreObject + description: OpenAI Vector Store object. + VectorStoreChunkingStrategy: oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' - - $ref: '#/components/schemas/BasicScoringFnParams' + - $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' + ScoringFnParams: discriminator: - propertyName: type mapping: - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - basic: '#/components/schemas/BasicScoringFnParams' - ScoringFnParamsType: - type: string - enum: - - llm_as_judge - - regex_parser - - basic - title: ScoringFnParamsType - description: >- - Types of scoring function parameter configurations. - StringType: - type: object - properties: - type: - type: string - const: string - default: string - description: Discriminator type. Always "string" - additionalProperties: false - required: - - type - title: StringType - description: Parameter type for string values. - UnionType: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + VectorStoreChunkingStrategyAuto: type: object properties: type: type: string - const: union - default: union - description: Discriminator type. Always "union" + const: auto + default: auto + description: >- + Strategy type, always "auto" for automatic chunking additionalProperties: false required: - type - title: UnionType - description: Parameter type for union values. - ListScoringFunctionsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ScoringFn' - additionalProperties: false - required: - - data - title: ListScoringFunctionsResponse - ScoreRequest: + title: VectorStoreChunkingStrategyAuto + description: >- + Automatic chunking strategy for vector store files. + VectorStoreChunkingStrategyStatic: type: object properties: - input_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to score. - scoring_functions: - type: object - additionalProperties: - oneOf: - - $ref: '#/components/schemas/ScoringFnParams' - - type: 'null' + type: + type: string + const: static + default: static description: >- - The scoring functions to use for the scoring. + Strategy type, always "static" for static chunking + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + description: >- + Configuration parameters for the static chunking strategy additionalProperties: false required: - - input_rows - - scoring_functions - title: ScoreRequest - ScoreResponse: + - type + - static + title: VectorStoreChunkingStrategyStatic + description: >- + Static chunking strategy with configurable parameters. + VectorStoreChunkingStrategyStaticConfig: type: object properties: - results: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' + chunk_overlap_tokens: + type: integer + default: 400 description: >- - A map of scoring function name to ScoringResult. + Number of tokens to overlap between adjacent chunks + max_chunk_size_tokens: + type: integer + default: 800 + description: >- + Maximum number of tokens per chunk, must be between 100 and 4096 additionalProperties: false required: - - results - title: ScoreResponse - description: The response from scoring. - ScoringResult: + - chunk_overlap_tokens + - max_chunk_size_tokens + title: VectorStoreChunkingStrategyStaticConfig + description: >- + Configuration for static chunking strategy. + "OpenAICreateVectorStoreRequestWithExtraBody": type: object properties: - score_rows: + name: + type: string + description: (Optional) A name for the vector store + file_ids: type: array items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + type: string description: >- - The scoring result for each row. Each row is a map of column name to value. - aggregated_results: + List of file IDs to include in the vector store + expires_after: type: object additionalProperties: oneOf: @@ -9184,81 +17046,48 @@ components: - type: string - type: array - type: object - description: Map of metric name to aggregated value - additionalProperties: false - required: - - score_rows - - aggregated_results - title: ScoringResult - description: A scoring result for a single row. - ScoreBatchRequest: - type: object - properties: - dataset_id: - type: string - description: The ID of the dataset to score. - scoring_functions: + description: >- + (Optional) Expiration policy for the vector store + chunking_strategy: + $ref: '#/components/schemas/VectorStoreChunkingStrategy' + description: >- + (Optional) Strategy for splitting files into chunks + metadata: type: object additionalProperties: oneOf: - - $ref: '#/components/schemas/ScoringFnParams' - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - The scoring functions to use for the scoring. - save_results_dataset: - type: boolean - description: >- - Whether to save the results to a dataset. + Set of key-value pairs that can be attached to the vector store additionalProperties: false - required: - - dataset_id - - scoring_functions - - save_results_dataset - title: ScoreBatchRequest - ScoreBatchResponse: + title: >- + OpenAICreateVectorStoreRequestWithExtraBody + description: >- + Request to create a vector store with extra_body support. + OpenaiUpdateVectorStoreRequest: type: object properties: - dataset_id: + name: type: string - description: >- - (Optional) The identifier of the dataset that was scored - results: + description: The name of the vector store. + expires_after: type: object additionalProperties: - $ref: '#/components/schemas/ScoringResult' + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - A map of scoring function name to ScoringResult - additionalProperties: false - required: - - results - title: ScoreBatchResponse - description: >- - Response from batch scoring operations on datasets. - Shield: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: shield - default: shield - description: The resource type, always shield - params: + The expiration policy for a vector store. + metadata: type: object additionalProperties: oneOf: @@ -9269,33 +17098,43 @@ components: - type: array - type: object description: >- - (Optional) Configuration parameters for the shield + Set of 16 key-value pairs that can be attached to an object. additionalProperties: false - required: - - identifier - - provider_id - - type - title: Shield - description: >- - A safety shield resource that can be used to check content. - ListShieldsResponse: + title: OpenaiUpdateVectorStoreRequest + VectorStoreDeleteResponse: type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/Shield' + id: + type: string + description: >- + Unique identifier of the deleted vector store + object: + type: string + default: vector_store.deleted + description: >- + Object type identifier for the deletion response + deleted: + type: boolean + default: true + description: >- + Whether the deletion operation was successful additionalProperties: false required: - - data - title: ListShieldsResponse - InvokeToolRequest: + - id + - object + - deleted + title: VectorStoreDeleteResponse + description: Response from deleting a vector store. + "OpenAICreateVectorStoreFileBatchRequestWithExtraBody": type: object properties: - tool_name: - type: string - description: The name of the tool to invoke. - kwargs: + file_ids: + type: array + items: + type: string + description: >- + A list of File IDs that the vector store should use + attributes: type: object additionalProperties: oneOf: @@ -9306,92 +17145,100 @@ components: - type: array - type: object description: >- - A dictionary of arguments to pass to the tool. + (Optional) Key-value attributes to store with the files + chunking_strategy: + $ref: '#/components/schemas/VectorStoreChunkingStrategy' + description: >- + (Optional) The chunking strategy used to chunk the file(s). Defaults to + auto additionalProperties: false required: - - tool_name - - kwargs - title: InvokeToolRequest - ImageContentItem: + - file_ids + title: >- + OpenAICreateVectorStoreFileBatchRequestWithExtraBody + description: >- + Request to create a vector store file batch with extra_body support. + VectorStoreFileBatchObject: type: object properties: - type: + id: type: string - const: image - default: image + description: Unique identifier for the file batch + object: + type: string + default: vector_store.file_batch description: >- - Discriminator type of the content item. Always "image" - image: - type: object - properties: - url: - $ref: '#/components/schemas/URL' - description: >- - A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - data: - type: string - contentEncoding: base64 - description: base64 encoded image data as string - additionalProperties: false + Object type identifier, always "vector_store.file_batch" + created_at: + type: integer description: >- - Image as a base64 encoded string or an URL + Timestamp when the file batch was created + vector_store_id: + type: string + description: >- + ID of the vector store containing the file batch + status: + $ref: '#/components/schemas/VectorStoreFileStatus' + description: >- + Current processing status of the file batch + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + description: >- + File processing status counts for the batch additionalProperties: false required: - - type - - image - title: ImageContentItem - description: A image content item - InterleavedContent: + - id + - object + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + description: OpenAI Vector Store File Batch object. + VectorStoreFileStatus: oneOf: - type: string - - $ref: '#/components/schemas/InterleavedContentItem' - - type: array - items: - $ref: '#/components/schemas/InterleavedContentItem' - InterleavedContentItem: - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - TextContentItem: + const: completed + - type: string + const: in_progress + - type: string + const: cancelled + - type: string + const: failed + VectorStoreFileLastError: type: object properties: - type: - type: string - const: text - default: text + code: + oneOf: + - type: string + const: server_error + - type: string + const: rate_limit_exceeded description: >- - Discriminator type of the content item. Always "text" - text: + Error code indicating the type of failure + message: type: string - description: Text content + description: >- + Human-readable error message describing the failure additionalProperties: false required: - - type - - text - title: TextContentItem - description: A text content item - ToolInvocationResult: + - code + - message + title: VectorStoreFileLastError + description: >- + Error information for failed vector store file processing. + VectorStoreFileObject: type: object properties: - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - (Optional) The output content from the tool execution - error_message: + id: type: string + description: Unique identifier for the file + object: + type: string + default: vector_store.file description: >- - (Optional) Error message if the tool execution failed - error_code: - type: integer - description: >- - (Optional) Numeric error code if the tool execution failed - metadata: + Object type identifier, always "vector_store.file" + attributes: type: object additionalProperties: oneOf: @@ -9402,48 +17249,124 @@ components: - type: array - type: object description: >- - (Optional) Additional metadata about the tool execution + Key-value attributes associated with the file + chunking_strategy: + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + description: >- + Strategy used for splitting the file into chunks + created_at: + type: integer + description: >- + Timestamp when the file was added to the vector store + last_error: + $ref: '#/components/schemas/VectorStoreFileLastError' + description: >- + (Optional) Error information if file processing failed + status: + $ref: '#/components/schemas/VectorStoreFileStatus' + description: Current processing status of the file + usage_bytes: + type: integer + default: 0 + description: Storage space used by this file in bytes + vector_store_id: + type: string + description: >- + ID of the vector store containing this file additionalProperties: false - title: ToolInvocationResult - description: Result of a tool invocation. - URL: + required: + - id + - object + - attributes + - chunking_strategy + - created_at + - status + - usage_bytes + - vector_store_id + title: VectorStoreFileObject + description: OpenAI Vector Store File object. + VectorStoreFilesListInBatchResponse: type: object properties: - uri: + object: type: string - description: The URL string pointing to the resource + default: list + description: Object type identifier, always "list" + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreFileObject' + description: >- + List of vector store file objects in the batch + first_id: + type: string + description: >- + (Optional) ID of the first file in the list for pagination + last_id: + type: string + description: >- + (Optional) ID of the last file in the list for pagination + has_more: + type: boolean + default: false + description: >- + Whether there are more files available beyond this page additionalProperties: false required: - - uri - title: URL - description: A URL reference to external content. - ToolDef: + - object + - data + - has_more + title: VectorStoreFilesListInBatchResponse + description: >- + Response from listing files in a vector store file batch. + VectorStoreListFilesResponse: type: object properties: - toolgroup_id: + object: type: string - description: >- - (Optional) ID of the tool group this tool belongs to - name: + default: list + description: Object type identifier, always "list" + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreFileObject' + description: List of vector store file objects + first_id: type: string - description: Name of the tool - description: + description: >- + (Optional) ID of the first file in the list for pagination + last_id: type: string description: >- - (Optional) Human-readable description of what the tool does - input_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + (Optional) ID of the last file in the list for pagination + has_more: + type: boolean + default: false + description: >- + Whether there are more files available beyond this page + additionalProperties: false + required: + - object + - data + - has_more + title: VectorStoreListFilesResponse + description: >- + Response from listing files in a vector store. + OpenaiAttachFileToVectorStoreRequest: + type: object + properties: + file_id: + type: string description: >- - (Optional) JSON Schema for tool inputs (MCP inputSchema) - output_schema: + The ID of the file to attach to the vector store. + attributes: type: object additionalProperties: oneOf: @@ -9454,8 +17377,19 @@ components: - type: array - type: object description: >- - (Optional) JSON Schema for tool outputs (MCP outputSchema) - metadata: + The key-value attributes stored with the file, which can be used for filtering. + chunking_strategy: + $ref: '#/components/schemas/VectorStoreChunkingStrategy' + description: >- + The chunking strategy to use for the file. + additionalProperties: false + required: + - file_id + title: OpenaiAttachFileToVectorStoreRequest + OpenaiUpdateVectorStoreFileRequest: + type: object + properties: + attributes: type: object additionalProperties: oneOf: @@ -9466,56 +17400,58 @@ components: - type: array - type: object description: >- - (Optional) Additional metadata about the tool + The updated key-value attributes to store with the file. additionalProperties: false required: - - name - title: ToolDef - description: >- - Tool definition used in runtime contexts. - ListToolDefsResponse: + - attributes + title: OpenaiUpdateVectorStoreFileRequest + VectorStoreFileDeleteResponse: type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/ToolDef' - description: List of tool definitions + id: + type: string + description: Unique identifier of the deleted file + object: + type: string + default: vector_store.file.deleted + description: >- + Object type identifier for the deletion response + deleted: + type: boolean + default: true + description: >- + Whether the deletion operation was successful additionalProperties: false required: - - data - title: ListToolDefsResponse + - id + - object + - deleted + title: VectorStoreFileDeleteResponse description: >- - Response containing a list of tool definitions. - ToolGroup: + Response from deleting a vector store file. + bool: + type: boolean + VectorStoreContent: type: object properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string type: type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: tool_group - default: tool_group - description: Type of resource, always 'tool_group' - mcp_endpoint: - $ref: '#/components/schemas/URL' + const: text description: >- - (Optional) Model Context Protocol endpoint for remote tools - args: + Content type, currently only "text" is supported + text: + type: string + description: The actual text content + embedding: + type: array + items: + type: number + description: >- + Optional embedding vector for this content chunk + chunk_metadata: + $ref: '#/components/schemas/ChunkMetadata' + description: Optional chunk metadata + metadata: type: object additionalProperties: oneOf: @@ -9525,43 +17461,56 @@ components: - type: string - type: array - type: object - description: >- - (Optional) Additional arguments for the tool group + description: Optional user-defined metadata additionalProperties: false required: - - identifier - - provider_id - type - title: ToolGroup + - text + title: VectorStoreContent description: >- - A group of related tools managed together. - ListToolGroupsResponse: + Content item from a vector store file or search result. + VectorStoreFileContentResponse: type: object properties: + object: + type: string + const: vector_store.file_content.page + default: vector_store.file_content.page + description: >- + The object type, which is always `vector_store.file_content.page` data: type: array items: - $ref: '#/components/schemas/ToolGroup' - description: List of tool groups + $ref: '#/components/schemas/VectorStoreContent' + description: Parsed content of the file + has_more: + type: boolean + default: false + description: >- + Indicates if there are more content pages to fetch + next_page: + type: string + description: The token for the next page, if any additionalProperties: false required: + - object - data - title: ListToolGroupsResponse + - has_more + title: VectorStoreFileContentResponse description: >- - Response containing a list of tool groups. - Chunk: + Represents the parsed content of a vector store file. + OpenaiSearchVectorStoreRequest: 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 + query: + oneOf: + - type: string + - type: array + items: + type: string description: >- - Unique identifier for the chunk. Must be provided explicitly. - metadata: + The query string or array for performing the search. + filters: type: object additionalProperties: oneOf: @@ -9572,121 +17521,218 @@ components: - 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 + Filters based on file attributes to narrow the search results. + max_num_results: + type: integer description: >- - Optional embedding for the chunk. If not provided, it will be computed - later. - chunk_metadata: - $ref: '#/components/schemas/ChunkMetadata' + Maximum number of results to return (1 to 50 inclusive, default 10). + 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: >- - Metadata for the chunk that will NOT be used in the context during inference. - The `chunk_metadata` is required backend functionality. + Ranking options for fine-tuning the search results. + rewrite_query: + type: boolean + description: >- + Whether to rewrite the natural language query for vector search (default + false) + search_mode: + type: string + description: >- + The search mode to use - "keyword", "vector", or "hybrid" (default "vector") additionalProperties: false required: - - content - - chunk_id - - metadata - title: Chunk - description: >- - A chunk of content that can be inserted into a vector database. - ChunkMetadata: + - query + title: OpenaiSearchVectorStoreRequest + VectorStoreSearchResponse: type: object properties: - chunk_id: - type: string - description: >- - The ID of the chunk. If not set, it will be generated based on the document - ID and content. - document_id: - type: string - description: >- - The ID of the document this chunk belongs to. - source: + file_id: type: string description: >- - The source of the content, such as a URL, file path, or other identifier. - created_timestamp: - type: integer - description: >- - An optional timestamp indicating when the chunk was created. - updated_timestamp: - type: integer - description: >- - An optional timestamp indicating when the chunk was last updated. - chunk_window: + 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 + attributes: + type: object + additionalProperties: + oneOf: + - type: string + - type: number + - type: boolean description: >- - The window of the chunk, which can be used to group related chunks together. - chunk_tokenizer: - type: string + (Optional) Key-value attributes associated with the file + content: + type: array + items: + $ref: '#/components/schemas/VectorStoreContent' description: >- - The tokenizer used to create the chunk. Default is Tiktoken. - chunk_embedding_model: + List of content items matching the search query + additionalProperties: false + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + description: Response from searching a vector store. + VectorStoreSearchResponsePage: + type: object + properties: + object: type: string + default: vector_store.search_results.page description: >- - The embedding model used to create the chunk's embedding. - chunk_embedding_dimension: - type: integer + Object type identifier for the search results page + search_query: + type: array + items: + type: string description: >- - The dimension of the embedding vector for the chunk. - content_token_count: - type: integer + The original search query that was executed + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + description: List of search result objects + has_more: + type: boolean + default: false description: >- - The number of tokens in the content of the chunk. - metadata_token_count: - type: integer + Whether there are more results available beyond this page + next_page: + type: string description: >- - The number of tokens in the metadata of the chunk. + (Optional) Token for retrieving the next page of results additionalProperties: false - title: ChunkMetadata + required: + - object + - search_query + - data + - has_more + title: VectorStoreSearchResponsePage 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. - InsertChunksRequest: + Paginated response from searching a vector store. + VersionInfo: type: object properties: - vector_store_id: + version: type: string - description: >- - The identifier of the vector database to insert the chunks into. - chunks: + description: Version number of the service + additionalProperties: false + required: + - version + title: VersionInfo + description: Version information for the service. + AppendRowsRequest: + type: object + properties: + rows: type: array items: - $ref: '#/components/schemas/Chunk' + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to append to the dataset. + additionalProperties: false + required: + - rows + title: AppendRowsRequest + PaginatedResponse: + type: object + properties: + data: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The list of items for the current page + has_more: + type: boolean description: >- - The chunks to insert. Each `Chunk` should contain content which can be - interleaved text, images, or other types. `metadata`: `dict[str, Any]` - and `embedding`: `List[float]` are optional. If `metadata` is provided, - you configure how Llama Stack formats the chunk during generation. If - `embedding` is not provided, it will be computed later. - ttl_seconds: - type: integer - description: The time to live of the chunks. + Whether there are more items available after this set + url: + type: string + description: The URL for accessing this list additionalProperties: false required: - - vector_store_id - - chunks - title: InsertChunksRequest - QueryChunksRequest: + - data + - has_more + title: PaginatedResponse + description: >- + A generic paginated response that follows a simple format. + Dataset: type: object properties: - vector_store_id: + identifier: + type: string + provider_resource_id: type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: dataset + default: dataset description: >- - The identifier of the vector database to query. - query: - $ref: '#/components/schemas/InterleavedContent' - description: The query to search for. - params: + Type of resource, always 'dataset' for datasets + purpose: + type: string + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + description: >- + Purpose of the dataset indicating its intended use + source: + oneOf: + - $ref: '#/components/schemas/URIDataSource' + - $ref: '#/components/schemas/RowsDataSource' + discriminator: + propertyName: type + mapping: + uri: '#/components/schemas/URIDataSource' + rows: '#/components/schemas/RowsDataSource' + description: >- + Data source configuration for the dataset + metadata: type: object additionalProperties: oneOf: @@ -9696,149 +17742,113 @@ components: - type: string - type: array - type: object - description: The parameters of the query. + description: Additional metadata for the dataset additionalProperties: false required: - - vector_store_id - - query - title: QueryChunksRequest - QueryChunksResponse: + - identifier + - provider_id + - type + - purpose + - source + - metadata + title: Dataset + description: >- + Dataset resource for storing and accessing training or evaluation data. + RowsDataSource: type: object properties: - chunks: - type: array - items: - $ref: '#/components/schemas/Chunk' - description: >- - List of content chunks returned from the query - scores: + type: + type: string + const: rows + default: rows + rows: type: array items: - type: number + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - Relevance scores corresponding to each returned chunk + The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", + "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, + world!"}]} ] additionalProperties: false required: - - chunks - - scores - title: QueryChunksResponse - description: >- - Response from querying chunks in a vector database. - VectorStoreFileCounts: + - type + - rows + title: RowsDataSource + description: A dataset stored in rows. + URIDataSource: type: object properties: - completed: - type: integer - description: >- - Number of files that have been successfully processed - cancelled: - type: integer - description: >- - Number of files that had their processing cancelled - failed: - type: integer - description: Number of files that failed to process - in_progress: - type: integer - description: >- - Number of files currently being processed - total: - type: integer + type: + type: string + const: uri + default: uri + uri: + type: string description: >- - Total number of files in the vector store + The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" + - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" additionalProperties: false - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts + required: + - type + - uri + title: URIDataSource description: >- - File processing status counts for a vector store. - VectorStoreListResponse: + A dataset that can be obtained from a URI. + ListDatasetsResponse: type: object properties: - object: - type: string - default: list - description: Object type identifier, always "list" data: type: array items: - $ref: '#/components/schemas/VectorStoreObject' - description: List of vector store objects - first_id: - type: string - description: >- - (Optional) ID of the first vector store in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last vector store in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more vector stores available beyond this page + $ref: '#/components/schemas/Dataset' + description: List of datasets additionalProperties: false required: - - object - data - - has_more - title: VectorStoreListResponse - description: Response from listing vector stores. - VectorStoreObject: + title: ListDatasetsResponse + description: Response from listing datasets. + Benchmark: type: object properties: - id: + identifier: type: string - description: Unique identifier for the vector store - object: + provider_resource_id: type: string - default: vector_store - description: >- - Object type identifier, always "vector_store" - created_at: - type: integer - description: >- - Timestamp when the vector store was created - name: + provider_id: type: string - description: (Optional) Name of the vector store - usage_bytes: - type: integer - default: 0 - description: >- - Storage space used by the vector store in bytes - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the vector store - status: + type: + type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: benchmark + default: benchmark + description: The resource type, always benchmark + dataset_id: type: string - default: completed - description: Current status of the vector store - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Expiration policy for the vector store - expires_at: - type: integer description: >- - (Optional) Timestamp when the vector store will expire - last_active_at: - type: integer + Identifier of the dataset to use for the benchmark evaluation + scoring_functions: + type: array + items: + type: string description: >- - (Optional) Timestamp of last activity on the vector store + List of scoring function identifiers to apply during evaluation metadata: type: object additionalProperties: @@ -9849,511 +17859,482 @@ components: - type: string - type: array - type: object - description: >- - Set of key-value pairs that can be attached to the vector store + description: Metadata for this evaluation task additionalProperties: false required: - - id - - object - - created_at - - usage_bytes - - file_counts - - status + - identifier + - provider_id + - type + - dataset_id + - scoring_functions - metadata - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreChunkingStrategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - VectorStoreChunkingStrategyAuto: + title: Benchmark + description: >- + A benchmark resource for evaluating model performance. + ListBenchmarksResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Benchmark' + additionalProperties: false + required: + - data + title: ListBenchmarksResponse + BenchmarkConfig: + type: object + properties: + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + description: The candidate to evaluate. + scoring_params: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringFnParams' + description: >- + Map between scoring function id and parameters for each scoring function + you want to run + num_examples: + type: integer + description: >- + (Optional) The number of examples to evaluate. If not provided, all examples + in the dataset will be evaluated + additionalProperties: false + required: + - eval_candidate + - scoring_params + title: BenchmarkConfig + description: >- + A benchmark configuration for evaluation. + GreedySamplingStrategy: type: object properties: type: type: string - const: auto - default: auto + const: greedy + default: greedy description: >- - Strategy type, always "auto" for automatic chunking + Must be "greedy" to identify this sampling strategy additionalProperties: false required: - type - title: VectorStoreChunkingStrategyAuto + title: GreedySamplingStrategy description: >- - Automatic chunking strategy for vector store files. - VectorStoreChunkingStrategyStatic: + Greedy sampling strategy that selects the highest probability token at each + step. + ModelCandidate: type: object properties: type: type: string - const: static - default: static - description: >- - Strategy type, always "static" for static chunking - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + const: model + default: model + model: + type: string + description: The model ID to evaluate. + sampling_params: + $ref: '#/components/schemas/SamplingParams' + description: The sampling parameters for the model. + system_message: + $ref: '#/components/schemas/SystemMessage' description: >- - Configuration parameters for the static chunking strategy + (Optional) The system message providing instructions or context to the + model. additionalProperties: false required: - type - - static - title: VectorStoreChunkingStrategyStatic - description: >- - Static chunking strategy with configurable parameters. - VectorStoreChunkingStrategyStaticConfig: + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + SamplingParams: type: object properties: - chunk_overlap_tokens: + strategy: + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + description: The sampling strategy. + max_tokens: type: integer - default: 400 description: >- - Number of tokens to overlap between adjacent chunks - max_chunk_size_tokens: - type: integer - default: 800 + 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. + repetition_penalty: + type: number + default: 1.0 description: >- - Maximum number of tokens per chunk, must be between 100 and 4096 + 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. + stop: + type: array + items: + type: string + description: >- + Up to 4 sequences where the API will stop generating further tokens. The + returned text will not contain the stop sequence. additionalProperties: false required: - - chunk_overlap_tokens - - max_chunk_size_tokens - title: VectorStoreChunkingStrategyStaticConfig - description: >- - Configuration for static chunking strategy. - "OpenAICreateVectorStoreRequestWithExtraBody": + - strategy + title: SamplingParams + description: Sampling parameters. + SystemMessage: type: object properties: - name: + role: type: string - description: (Optional) A name for the vector store - file_ids: - type: array - items: - type: string - description: >- - List of file IDs to include in the vector store - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Expiration policy for the vector store - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' + const: system + default: system description: >- - (Optional) Strategy for splitting files into chunks - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + Must be "system" to identify this as a system message + content: + $ref: '#/components/schemas/InterleavedContent' description: >- - Set of key-value pairs that can be attached to the vector store + 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). additionalProperties: false - title: >- - OpenAICreateVectorStoreRequestWithExtraBody + required: + - role + - content + title: SystemMessage description: >- - Request to create a vector store with extra_body support. - OpenaiUpdateVectorStoreRequest: + A system message providing instructions or context to the model. + TopKSamplingStrategy: type: object properties: - name: + type: type: string - description: The name of the vector store. - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + const: top_k + default: top_k description: >- - The expiration policy for a vector store. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + Must be "top_k" to identify this sampling strategy + top_k: + type: integer description: >- - Set of 16 key-value pairs that can be attached to an object. + Number of top tokens to consider for sampling. Must be at least 1 additionalProperties: false - title: OpenaiUpdateVectorStoreRequest - VectorStoreDeleteResponse: + required: + - type + - top_k + title: TopKSamplingStrategy + description: >- + Top-k sampling strategy that restricts sampling to the k most likely tokens. + TopPSamplingStrategy: type: object properties: - id: + type: type: string + const: top_p + default: top_p description: >- - Unique identifier of the deleted vector store - object: - type: string - default: vector_store.deleted + Must be "top_p" to identify this sampling strategy + temperature: + type: number description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true + Controls randomness in sampling. Higher values increase randomness + top_p: + type: number + default: 0.95 description: >- - Whether the deletion operation was successful + Cumulative probability threshold for nucleus sampling. Defaults to 0.95 additionalProperties: false required: - - id - - object - - deleted - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - "OpenAICreateVectorStoreFileBatchRequestWithExtraBody": + - type + title: TopPSamplingStrategy + description: >- + Top-p (nucleus) sampling strategy that samples from the smallest set of tokens + with cumulative probability >= p. + EvaluateRowsRequest: type: object properties: - file_ids: + input_rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to evaluate. + scoring_functions: type: array items: type: string description: >- - A list of File IDs that the vector store should use - attributes: + The scoring functions to use for the evaluation. + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + description: The configuration for the benchmark. + additionalProperties: false + required: + - input_rows + - scoring_functions + - benchmark_config + title: EvaluateRowsRequest + EvaluateResponse: + type: object + properties: + generations: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The generations from the evaluation. + scores: type: object additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Key-value attributes to store with the files - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - (Optional) The chunking strategy used to chunk the file(s). Defaults to - auto + $ref: '#/components/schemas/ScoringResult' + description: The scores from the evaluation. additionalProperties: false required: - - file_ids - title: >- - OpenAICreateVectorStoreFileBatchRequestWithExtraBody - description: >- - Request to create a vector store file batch with extra_body support. - VectorStoreFileBatchObject: + - generations + - scores + title: EvaluateResponse + description: The response from an evaluation. + RunEvalRequest: type: object properties: - id: - type: string - description: Unique identifier for the file batch - object: - type: string - default: vector_store.file_batch - description: >- - Object type identifier, always "vector_store.file_batch" - created_at: - type: integer - description: >- - Timestamp when the file batch was created - vector_store_id: - type: string - description: >- - ID of the vector store containing the file batch - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: >- - Current processing status of the file batch - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the batch + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + description: The configuration for the benchmark. additionalProperties: false required: - - id - - object - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject - description: OpenAI Vector Store File Batch object. - VectorStoreFileStatus: - oneOf: - - type: string - const: completed - - type: string - const: in_progress - - type: string - const: cancelled - - type: string - const: failed - VectorStoreFileLastError: + - benchmark_config + title: RunEvalRequest + Job: type: object properties: - code: - oneOf: - - type: string - const: server_error - - type: string - const: rate_limit_exceeded - description: >- - Error code indicating the type of failure - message: + job_id: type: string - description: >- - Human-readable error message describing the failure + description: Unique identifier for the job + status: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + description: Current execution status of the job additionalProperties: false required: - - code - - message - title: VectorStoreFileLastError + - job_id + - status + title: Job description: >- - Error information for failed vector store file processing. - VectorStoreFileObject: + A job execution instance with status tracking. + RerankRequest: type: object properties: - id: - type: string - description: Unique identifier for the file - object: + model: type: string - default: vector_store.file description: >- - Object type identifier, always "vector_store.file" - attributes: - type: object - additionalProperties: + The identifier of the reranking model to use. + query: + oneOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + description: >- + 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. + items: + type: array + items: oneOf: - - type: 'null' - - type: boolean - - type: number - type: string - - type: array - - type: object - description: >- - Key-value attributes associated with the file - chunking_strategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' description: >- - Strategy used for splitting the file into chunks - created_at: + 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. + max_num_results: type: integer description: >- - Timestamp when the file was added to the vector store - last_error: - $ref: '#/components/schemas/VectorStoreFileLastError' - description: >- - (Optional) Error information if file processing failed - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: Current processing status of the file - usage_bytes: + (Optional) Maximum number of results to return. Default: returns all. + additionalProperties: false + required: + - model + - query + - items + title: RerankRequest + RerankData: + type: object + properties: + index: type: integer - default: 0 - description: Storage space used by this file in bytes - vector_store_id: - type: string description: >- - ID of the vector store containing this file + The original index of the document in the input list + relevance_score: + type: number + description: >- + The relevance score from the model output. Values are inverted when applicable + so that higher scores indicate greater relevance. additionalProperties: false required: - - id - - object - - attributes - - chunking_strategy - - created_at - - status - - usage_bytes - - vector_store_id - title: VectorStoreFileObject - description: OpenAI Vector Store File object. - VectorStoreFilesListInBatchResponse: + - index + - relevance_score + title: RerankData + description: >- + A single rerank result from a reranking response. + RerankResponse: type: object properties: - object: - type: string - default: list - description: Object type identifier, always "list" data: type: array items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: >- - List of vector store file objects in the batch - first_id: - type: string - description: >- - (Optional) ID of the first file in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false + $ref: '#/components/schemas/RerankData' description: >- - Whether there are more files available beyond this page + List of rerank result objects, sorted by relevance score (descending) additionalProperties: false required: - - object - data - - has_more - title: VectorStoreFilesListInBatchResponse - description: >- - Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: + title: RerankResponse + description: Response from a reranking request. + Checkpoint: type: object properties: - object: + identifier: type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: List of vector store file objects - first_id: + description: Unique identifier for the checkpoint + created_at: + type: string + format: date-time + description: >- + Timestamp when the checkpoint was created + epoch: + type: integer + description: >- + Training epoch when the checkpoint was saved + post_training_job_id: type: string description: >- - (Optional) ID of the first file in the list for pagination - last_id: + Identifier of the training job that created this checkpoint + path: type: string description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false + File system path where the checkpoint is stored + training_metrics: + $ref: '#/components/schemas/PostTrainingMetric' description: >- - Whether there are more files available beyond this page + (Optional) Training metrics associated with this checkpoint additionalProperties: false required: - - object - - data - - has_more - title: VectorStoreListFilesResponse - description: >- - Response from listing files in a vector store. - OpenaiAttachFileToVectorStoreRequest: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. + PostTrainingJobArtifactsResponse: type: object properties: - file_id: + job_uuid: type: string + description: Unique identifier for the training job + checkpoints: + type: array + items: + $ref: '#/components/schemas/Checkpoint' description: >- - The ID of the file to attach to the vector store. - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The key-value attributes stored with the file, which can be used for filtering. - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - The chunking strategy to use for the file. + List of model checkpoints created during training additionalProperties: false required: - - file_id - title: OpenaiAttachFileToVectorStoreRequest - OpenaiUpdateVectorStoreFileRequest: + - job_uuid + - checkpoints + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingMetric: type: object properties: - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + epoch: + type: integer + description: Training epoch number + train_loss: + type: number + description: Loss value on the training dataset + validation_loss: + type: number + description: Loss value on the validation dataset + perplexity: + type: number description: >- - The updated key-value attributes to store with the file. + Perplexity metric indicating model confidence additionalProperties: false required: - - attributes - title: OpenaiUpdateVectorStoreFileRequest - VectorStoreFileDeleteResponse: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: >- + Training metrics captured during post-training jobs. + CancelTrainingJobRequest: type: object properties: - id: - type: string - description: Unique identifier of the deleted file - object: + job_uuid: type: string - default: vector_store.file.deleted - description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true - description: >- - Whether the deletion operation was successful + description: The UUID of the job to cancel. additionalProperties: false required: - - id - - object - - deleted - title: VectorStoreFileDeleteResponse - description: >- - Response from deleting a vector store file. - bool: - type: boolean - VectorStoreContent: + - job_uuid + title: CancelTrainingJobRequest + PostTrainingJobStatusResponse: type: object properties: - type: + job_uuid: type: string - const: text + description: Unique identifier for the training job + status: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + description: Current status of the training job + scheduled_at: + type: string + format: date-time description: >- - Content type, currently only "text" is supported - text: + (Optional) Timestamp when the job was scheduled + started_at: type: string - description: The actual text content - embedding: - type: array - items: - type: number + format: date-time description: >- - Optional embedding vector for this content chunk - chunk_metadata: - $ref: '#/components/schemas/ChunkMetadata' - description: Optional chunk metadata - metadata: + (Optional) Timestamp when the job execution began + completed_at: + type: string + format: date-time + description: >- + (Optional) Timestamp when the job finished, if completed + resources_allocated: type: object additionalProperties: oneOf: @@ -10363,278 +18344,237 @@ components: - type: string - type: array - type: object - description: Optional user-defined metadata + description: >- + (Optional) Information about computational resources allocated to the + job + checkpoints: + type: array + items: + $ref: '#/components/schemas/Checkpoint' + description: >- + List of model checkpoints created during training additionalProperties: false required: - - type - - text - title: VectorStoreContent - description: >- - Content item from a vector store file or search result. - VectorStoreFileContentResponse: + - job_uuid + - status + - checkpoints + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + ListPostTrainingJobsResponse: type: object properties: - object: - type: string - const: vector_store.file_content.page - default: vector_store.file_content.page - description: >- - The object type, which is always `vector_store.file_content.page` data: type: array items: - $ref: '#/components/schemas/VectorStoreContent' - description: Parsed content of the file - has_more: - type: boolean - default: false - description: >- - Indicates if there are more content pages to fetch - next_page: - type: string - description: The token for the next page, if any + type: object + properties: + job_uuid: + type: string + additionalProperties: false + required: + - job_uuid + title: PostTrainingJob additionalProperties: false required: - - object - data - - has_more - title: VectorStoreFileContentResponse + title: ListPostTrainingJobsResponse + DPOAlignmentConfig: + type: object + properties: + beta: + type: number + description: Temperature parameter for the DPO loss + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid + description: The type of loss function to use for DPO + additionalProperties: false + required: + - beta + - loss_type + title: DPOAlignmentConfig description: >- - Represents the parsed content of a vector store file. - OpenaiSearchVectorStoreRequest: + Configuration for Direct Preference Optimization (DPO) alignment. + DPOLossType: + type: string + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + DataConfig: type: object properties: - query: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - The query string or array for performing the search. - filters: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + dataset_id: + type: string description: >- - Filters based on file attributes to narrow the search results. - max_num_results: + Unique identifier for the training dataset + batch_size: type: integer - description: >- - Maximum number of results to return (1 to 50 inclusive, default 10). - 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: >- - Ranking options for fine-tuning the search results. - rewrite_query: + description: Number of samples per training batch + shuffle: type: boolean description: >- - Whether to rewrite the natural language query for vector search (default - false) - search_mode: - type: string + Whether to shuffle the dataset during training + data_format: + $ref: '#/components/schemas/DatasetFormat' description: >- - The search mode to use - "keyword", "vector", or "hybrid" (default "vector") - additionalProperties: false - required: - - query - title: OpenaiSearchVectorStoreRequest - VectorStoreSearchResponse: - type: object - properties: - file_id: + Format of the dataset (instruct or dialog) + validation_dataset_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 - attributes: - type: object - additionalProperties: - oneOf: - - type: string - - type: number - - type: boolean + (Optional) Unique identifier for the validation dataset + packed: + type: boolean + default: false description: >- - (Optional) Key-value attributes associated with the file - content: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' + (Optional) Whether to pack multiple samples into a single sequence for + efficiency + train_on_input: + type: boolean + default: false description: >- - List of content items matching the search query + (Optional) Whether to compute loss on input tokens as well as output tokens additionalProperties: false required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - description: Response from searching a vector store. - VectorStoreSearchResponsePage: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: >- + Configuration for training data and data loading. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + EfficiencyConfig: type: object properties: - object: - type: string - default: vector_store.search_results.page + enable_activation_checkpointing: + type: boolean + default: false description: >- - Object type identifier for the search results page - search_query: - type: array - items: - type: string + (Optional) Whether to use activation checkpointing to reduce memory usage + enable_activation_offloading: + type: boolean + default: false description: >- - The original search query that was executed - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - description: List of search result objects - has_more: + (Optional) Whether to offload activations to CPU to save GPU memory + memory_efficient_fsdp_wrap: type: boolean default: false description: >- - Whether there are more results available beyond this page - next_page: - type: string + (Optional) Whether to use memory-efficient FSDP wrapping + fsdp_cpu_offload: + type: boolean + default: false description: >- - (Optional) Token for retrieving the next page of results + (Optional) Whether to offload FSDP parameters to CPU additionalProperties: false - required: - - object - - search_query - - data - - has_more - title: VectorStoreSearchResponsePage + title: EfficiencyConfig description: >- - Paginated response from searching a vector store. - VersionInfo: - type: object - properties: - version: - type: string - description: Version number of the service - additionalProperties: false - required: - - version - title: VersionInfo - description: Version information for the service. - AppendRowsRequest: + Configuration for memory and compute efficiency optimizations. + OptimizerConfig: type: object properties: - rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to append to the dataset. + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + description: >- + Type of optimizer to use (adam, adamw, or sgd) + lr: + type: number + description: Learning rate for the optimizer + weight_decay: + type: number + description: >- + Weight decay coefficient for regularization + num_warmup_steps: + type: integer + description: Number of steps for learning rate warmup additionalProperties: false required: - - rows - title: AppendRowsRequest - PaginatedResponse: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + description: >- + Configuration parameters for the optimization algorithm. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: >- + Available optimizer algorithms for training. + TrainingConfig: type: object properties: - data: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The list of items for the current page - has_more: - type: boolean + n_epochs: + type: integer + description: Number of training epochs to run + max_steps_per_epoch: + type: integer + default: 1 + description: Maximum number of steps to run per epoch + gradient_accumulation_steps: + type: integer + default: 1 description: >- - Whether there are more items available after this set - url: + Number of steps to accumulate gradients before updating + max_validation_steps: + type: integer + default: 1 + description: >- + (Optional) Maximum number of validation steps per epoch + data_config: + $ref: '#/components/schemas/DataConfig' + description: >- + (Optional) Configuration for data loading and formatting + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + description: >- + (Optional) Configuration for the optimization algorithm + efficiency_config: + $ref: '#/components/schemas/EfficiencyConfig' + description: >- + (Optional) Configuration for memory and compute optimizations + dtype: type: string - description: The URL for accessing this list + default: bf16 + description: >- + (Optional) Data type for model parameters (bf16, fp16, fp32) additionalProperties: false required: - - data - - has_more - title: PaginatedResponse + - n_epochs + - max_steps_per_epoch + - gradient_accumulation_steps + title: TrainingConfig description: >- - A generic paginated response that follows a simple format. - Dataset: + Comprehensive configuration for the training process. + PreferenceOptimizeRequest: type: object properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: + job_uuid: type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: dataset - default: dataset - description: >- - Type of resource, always 'dataset' for datasets - purpose: + description: The UUID of the job to create. + finetuned_model: type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - description: >- - Purpose of the dataset indicating its intended use - source: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - description: >- - Data source configuration for the dataset - metadata: + description: The model to fine-tune. + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + description: The algorithm configuration. + training_config: + $ref: '#/components/schemas/TrainingConfig' + description: The training configuration. + hyperparam_search_config: type: object additionalProperties: oneOf: @@ -10644,1001 +18584,1509 @@ components: - type: string - type: array - type: object - description: Additional metadata for the dataset + description: The hyperparam search configuration. + logger_config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The logger configuration. + additionalProperties: false + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: PreferenceOptimizeRequest + PostTrainingJob: + type: object + properties: + job_uuid: + type: string additionalProperties: false required: - - identifier - - provider_id - - type - - purpose - - source - - metadata - title: Dataset - description: >- - Dataset resource for storing and accessing training or evaluation data. - RowsDataSource: + - job_uuid + title: PostTrainingJob + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + - $ref: '#/components/schemas/QATFinetuningConfig' + SpanEndPayload: + description: Payload for a span end event. + properties: + type: + const: span_end + default: span_end + title: Type + type: string + status: + $ref: '#/components/schemas/SpanStatus' + required: + - status + title: SpanEndPayload type: object + SpanStartPayload: + description: Payload for a span start event. properties: type: + const: span_start + default: span_start + title: Type type: string - const: rows - default: rows - rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", - "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, - world!"}]} ] - additionalProperties: false + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + title: Parent Span Id + nullable: true required: - - type - - rows - title: RowsDataSource - description: A dataset stored in rows. - URIDataSource: + - name + title: SpanStartPayload type: object + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes type: + const: metric + default: metric + title: Type type: string - const: uri - default: uri - uri: + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: Value + unit: + title: Unit type: string - description: >- - The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" - - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" - additionalProperties: false required: - - type - - uri - title: URIDataSource - description: >- - A dataset that can be obtained from a URI. - ListDatasetsResponse: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. properties: - data: - type: array - items: - $ref: '#/components/schemas/Dataset' - description: List of datasets - additionalProperties: false + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + title: Payload required: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - Benchmark: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. properties: - identifier: + trace_id: + title: Trace Id type: string - provider_resource_id: + span_id: + title: Span Id type: string - provider_id: + timestamp: + format: date-time + title: Timestamp type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes type: + const: unstructured_log + default: unstructured_log + title: Type type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: benchmark - default: benchmark - description: The resource type, always benchmark - dataset_id: + message: + title: Message type: string - description: >- - Identifier of the dataset to use for the benchmark evaluation - scoring_functions: - type: array - items: - type: string - description: >- - List of scoring function identifiers to apply during evaluation - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Metadata for this evaluation task - additionalProperties: false + severity: + $ref: '#/components/schemas/LogSeverity' required: - - identifier - - provider_id - - type - - dataset_id - - scoring_functions - - metadata - title: Benchmark - description: >- - A benchmark resource for evaluating model performance. - ListBenchmarksResponse: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + - $ref: '#/components/schemas/MetricEvent' + - $ref: '#/components/schemas/StructuredLogEvent' + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. properties: data: - type: array items: - $ref: '#/components/schemas/Benchmark' - additionalProperties: false + 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: ListBenchmarksResponse - BenchmarkConfig: + - data + title: ListOpenAIResponseInputItem type: object + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - description: The candidate to evaluate. - scoring_params: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringFnParams' - description: >- - Map between scoring function id and parameters for each scoring function - you want to run - num_examples: + created_at: + title: Created At type: integer - description: >- - (Optional) The number of examples to evaluate. If not provided, all examples - in the dataset will be evaluated - additionalProperties: false + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + nullable: true + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + nullable: true + status: + title: Status + type: string + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + nullable: true + tools: + anyOf: + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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 + - type: 'null' + title: Tools + nullable: true + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + nullable: true + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + nullable: true + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + 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: - - eval_candidate - - scoring_params - title: BenchmarkConfig - description: >- - A benchmark configuration for evaluation. - GreedySamplingStrategy: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput + type: object + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. + 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 + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. properties: type: + title: Type type: string - const: greedy - default: greedy - description: >- - Must be "greedy" to identify this sampling strategy - additionalProperties: false required: - - type - title: GreedySamplingStrategy - description: >- - Greedy sampling strategy that selects the highest probability token at each - step. - ModelCandidate: + - type + title: ResponseGuardrailSpec type: object + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - type: - type: string - const: model - default: model - model: + object: + const: list + default: list + title: Object type: string - description: The model ID to evaluate. - sampling_params: - $ref: '#/components/schemas/SamplingParams' - description: The sampling parameters for the model. - system_message: - $ref: '#/components/schemas/SystemMessage' - description: >- - (Optional) The system message providing instructions or context to the - model. - additionalProperties: false + data: + description: List of batch objects + items: + $ref: '#/components/schemas/Batch' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + description: ID of the first batch in the list + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + description: ID of the last batch in the list + title: Last Id + nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean required: - - type - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - SamplingParams: + - data + title: ListBatchesResponse type: object + MetricInResponse: + description: A metric value included in API responses. properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - - $ref: '#/components/schemas/TopPSamplingStrategy' - - $ref: '#/components/schemas/TopKSamplingStrategy' - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - description: The sampling strategy. - max_tokens: - type: integer - description: >- - 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. - repetition_penalty: - type: number - default: 1.0 - description: >- - 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. - stop: - type: array + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: Value + unit: + anyOf: + - type: string + - type: 'null' + title: Unit + nullable: true + required: + - metric + - value + title: MetricInResponse + type: object + PaginatedResponse: + description: A generic paginated response that follows a simple format. + properties: + data: items: - type: string - description: >- - Up to 4 sequences where the API will stop generating further tokens. The - returned text will not contain the stop sequence. - additionalProperties: false + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + anyOf: + - type: string + - type: 'null' + title: Url + nullable: true required: - - strategy - title: SamplingParams - description: Sampling parameters. - SystemMessage: + - data + - has_more + title: PaginatedResponse type: object + PostTrainingMetric: + description: Training metrics captured during post-training jobs. properties: - role: - type: string - const: system - default: system - description: >- - Must be "system" to identify this as a system message - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - 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). - additionalProperties: false + 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: - - role - - content - title: SystemMessage - description: >- - A system message providing instructions or context to the model. - TopKSamplingStrategy: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric type: object + Checkpoint: + description: Checkpoint created during training runs. properties: - type: + identifier: + title: Identifier type: string - const: top_k - default: top_k - description: >- - Must be "top_k" to identify this sampling strategy - top_k: + created_at: + format: date-time + title: Created At + type: string + epoch: + title: Epoch type: integer - description: >- - Number of top tokens to consider for sampling. Must be at least 1 - additionalProperties: false + post_training_job_id: + title: Post Training Job Id + type: string + path: + title: Path + type: string + training_metrics: + anyOf: + - $ref: '#/components/schemas/PostTrainingMetric' + - type: 'null' + nullable: true required: - - type - - top_k - title: TopKSamplingStrategy - description: >- - Top-k sampling strategy that restricts sampling to the k most likely tokens. - TopPSamplingStrategy: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint type: object + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: type: + const: dialog + default: dialog + title: Type type: string - const: top_p - default: top_p - description: >- - Must be "top_p" to identify this sampling strategy - temperature: - type: number - description: >- - Controls randomness in sampling. Higher values increase randomness - top_p: - type: number - default: 0.95 - description: >- - Cumulative probability threshold for nucleus sampling. Defaults to 0.95 - additionalProperties: false - required: - - type - title: TopPSamplingStrategy - description: >- - Top-p (nucleus) sampling strategy that samples from the smallest set of tokens - with cumulative probability >= p. - EvaluateRowsRequest: + title: DialogType type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. properties: - input_rows: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: + 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' + 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/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + maxItems: 20 + title: Items type: array + required: + - items + title: ConversationItemCreateRequest + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content items: + additionalProperties: true type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to evaluate. - scoring_functions: + title: Content type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage + type: object + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. + properties: + data: items: - type: string - description: >- - The scoring functions to use for the evaluation. - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. - additionalProperties: false + $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: - - input_rows - - scoring_functions - - benchmark_config - title: EvaluateRowsRequest - EvaluateResponse: + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse + type: object + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). + properties: + type: + const: bf16 + default: bf16 + title: Type + type: string + title: Bf16QuantizationConfig + type: object + LogProbConfig: + description: '' + properties: + top_k: + anyOf: + - type: integer + - type: 'null' + default: 0 + title: Top K + title: LogProbConfig + type: object + SystemMessageBehavior: + description: Config for how to override the default system prompt. + enum: + - append + - replace + title: SystemMessageBehavior + 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. + enum: + - auto + - required + - none + title: ToolChoice + type: string + ToolConfig: + description: Configuration for tool use. + properties: + tool_choice: + anyOf: + - $ref: '#/components/schemas/ToolChoice' + - type: string + - type: 'null' + default: auto + title: Tool Choice + tool_prompt_format: + anyOf: + - $ref: '#/components/schemas/ToolPromptFormat' + - type: 'null' + nullable: true + system_message_behavior: + anyOf: + - $ref: '#/components/schemas/SystemMessageBehavior' + - type: 'null' + default: append + title: ToolConfig type: object + ToolPromptFormat: + description: Prompt format for calling custom / zero shot tools. + enum: + - json + - function_tag + - python_list + title: ToolPromptFormat + type: string + ChatCompletionRequest: properties: - generations: - type: array + model: + title: Model + type: string + messages: items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The generations from the evaluation. - scores: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: The scores from the evaluation. - additionalProperties: false + discriminator: + mapping: + assistant: '#/components/schemas/CompletionMessage' + system: '#/components/schemas/SystemMessage' + tool: '#/components/schemas/ToolResponseMessage' + user: '#/components/schemas/UserMessage' + propertyName: role + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/SystemMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + - $ref: '#/components/schemas/CompletionMessage' + title: Messages + type: array + sampling_params: + anyOf: + - $ref: '#/components/schemas/SamplingParams' + - type: 'null' + tools: + anyOf: + - items: + $ref: '#/components/schemas/ToolDefinition' + type: array + - type: 'null' + title: Tools + tool_config: + anyOf: + - $ref: '#/components/schemas/ToolConfig' + - type: 'null' + response_format: + anyOf: + - discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + - type: 'null' + title: Response Format + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Stream + logprobs: + anyOf: + - $ref: '#/components/schemas/LogProbConfig' + - type: 'null' + nullable: true required: - - generations - - scores - title: EvaluateResponse - description: The response from an evaluation. - RunEvalRequest: + - model + - messages + title: ChatCompletionRequest type: object + TokenLogProbs: + description: Log probabilities for generated tokens. properties: - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. - additionalProperties: false + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object required: - - benchmark_config - title: RunEvalRequest - Job: + - logprobs_by_token + title: TokenLogProbs type: object + ChatCompletionResponse: + description: Response from a chat completion request. properties: - job_id: - type: string - description: Unique identifier for the job - status: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current execution status of the job - additionalProperties: false + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + completion_message: + $ref: '#/components/schemas/CompletionMessage' + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true required: - - job_id - - status - title: Job - description: >- - A job execution instance with status tracking. - RerankRequest: + - completion_message + title: ChatCompletionResponse type: object + ChatCompletionResponseEventType: + description: Types of events that can occur during chat completion. + enum: + - start + - complete + - progress + title: ChatCompletionResponseEventType + type: string + ChatCompletionResponseEvent: + description: An event during chat completion generation. properties: - model: - type: string - description: >- - The identifier of the reranking model to use. - query: + event_type: + $ref: '#/components/schemas/ChatCompletionResponseEventType' + delta: + discriminator: + mapping: + image: '#/components/schemas/ImageDelta' + text: '#/components/schemas/TextDelta' + tool_call: '#/components/schemas/ToolCallDelta' + propertyName: type oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - description: >- - 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. - items: - type: array - items: - oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - description: >- - 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. - max_num_results: - type: integer - description: >- - (Optional) Maximum number of results to return. Default: returns all. - additionalProperties: false + - $ref: '#/components/schemas/TextDelta' + - $ref: '#/components/schemas/ImageDelta' + - $ref: '#/components/schemas/ToolCallDelta' + title: Delta + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true + stop_reason: + anyOf: + - $ref: '#/components/schemas/StopReason' + - type: 'null' + nullable: true required: - - model - - query - - items - title: RerankRequest - RerankData: + - event_type + - delta + title: ChatCompletionResponseEvent type: object + ChatCompletionResponseStreamChunk: + description: A chunk of a streamed chat completion response. properties: - index: - type: integer - description: >- - The original index of the document in the input list - relevance_score: - type: number - description: >- - The relevance score from the model output. Values are inverted when applicable - so that higher scores indicate greater relevance. - additionalProperties: false + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + event: + $ref: '#/components/schemas/ChatCompletionResponseEvent' required: - - index - - relevance_score - title: RerankData - description: >- - A single rerank result from a reranking response. - RerankResponse: + - event + title: ChatCompletionResponseStreamChunk type: object + CompletionResponse: + description: Response from a completion request. properties: - data: - type: array - items: - $ref: '#/components/schemas/RerankData' - description: >- - List of rerank result objects, sorted by relevance score (descending) - additionalProperties: false + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + content: + title: Content + type: string + stop_reason: + $ref: '#/components/schemas/StopReason' + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true required: - - data - title: RerankResponse - description: Response from a reranking request. - Checkpoint: + - content + - stop_reason + title: CompletionResponse type: object + CompletionResponseStreamChunk: + description: A chunk of a streamed completion response. properties: - identifier: - type: string - description: Unique identifier for the checkpoint - created_at: - type: string - format: date-time - description: >- - Timestamp when the checkpoint was created - epoch: - type: integer - description: >- - Training epoch when the checkpoint was saved - post_training_job_id: - type: string - description: >- - Identifier of the training job that created this checkpoint - path: + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + delta: + title: Delta type: string - description: >- - File system path where the checkpoint is stored - training_metrics: - $ref: '#/components/schemas/PostTrainingMetric' - description: >- - (Optional) Training metrics associated with this checkpoint - additionalProperties: false + stop_reason: + anyOf: + - $ref: '#/components/schemas/StopReason' + - type: 'null' + nullable: true + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - PostTrainingJobArtifactsResponse: + - delta + title: CompletionResponseStreamChunk type: object + EmbeddingsResponse: + description: Response containing generated embeddings. properties: - job_uuid: - type: string - description: Unique identifier for the training job - checkpoints: - type: array + embeddings: items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false + items: + type: number + type: array + title: Embeddings + type: array required: - - job_uuid - - checkpoints - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingMetric: + - embeddings + title: EmbeddingsResponse type: object + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. properties: - epoch: - type: integer - description: Training epoch number - train_loss: - type: number - description: Loss value on the training dataset - validation_loss: - type: number - description: Loss value on the validation dataset - perplexity: - type: number - description: >- - Perplexity metric indicating model confidence - additionalProperties: false - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: >- - Training metrics captured during post-training jobs. - CancelTrainingJobRequest: + type: + const: fp8_mixed + default: fp8_mixed + title: Type + type: string + title: Fp8QuantizationConfig type: object + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. properties: - job_uuid: + type: + const: int4_mixed + default: int4_mixed + title: Type + type: string + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Scheme + title: Int4QuantizationConfig + type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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 - description: The UUID of the job to cancel. - additionalProperties: false + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true required: - - job_uuid - title: CancelTrainingJobRequest - PostTrainingJobStatusResponse: + - 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. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + nullable: true + title: OpenAIChoiceLogprobs type: object + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. properties: - job_uuid: - type: string - description: Unique identifier for the training job - status: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current status of the training job - scheduled_at: + data: + items: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - format: date-time - description: >- - (Optional) Timestamp when the job was scheduled - started_at: + last_id: + title: Last Id type: string - format: date-time - description: >- - (Optional) Timestamp when the job execution began - completed_at: + object: + const: list + default: list + title: Object type: string - format: date-time - description: >- - (Optional) Timestamp when the job finished, if completed - resources_allocated: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Information about computational resources allocated to the - job - checkpoints: - type: array - items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false required: - - job_uuid - - status - - checkpoints - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - ListPostTrainingJobsResponse: + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse type: object + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. properties: - data: - type: array - items: - type: object - properties: - job_uuid: - type: string - additionalProperties: false - required: - - job_uuid - title: PostTrainingJob - additionalProperties: false - required: - - data - title: ListPostTrainingJobsResponse - DPOAlignmentConfig: + content: + anyOf: + - type: string + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - type: string + - type: 'null' + title: Refusal + nullable: true + role: + anyOf: + - type: string + - type: 'null' + title: Role + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + nullable: true + reasoning_content: + anyOf: + - type: string + - type: 'null' + title: Reasoning Content + nullable: true + title: OpenAIChoiceDelta type: object + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: - beta: - type: number - description: Temperature parameter for the DPO loss - loss_type: - $ref: '#/components/schemas/DPOLossType' - default: sigmoid - description: The type of loss function to use for DPO - additionalProperties: false + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true required: - - beta - - loss_type - title: DPOAlignmentConfig - description: >- - Configuration for Direct Preference Optimization (DPO) alignment. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: + - delta + - finish_reason + - index + title: OpenAIChunkChoice type: object + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: - dataset_id: + id: + title: Id type: string - description: >- - Unique identifier for the training dataset - batch_size: + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object + type: string + created: + title: Created type: integer - description: Number of samples per training batch - shuffle: - type: boolean - description: >- - Whether to shuffle the dataset during training - data_format: - $ref: '#/components/schemas/DatasetFormat' - description: >- - Format of the dataset (instruct or dialog) - validation_dataset_id: + model: + title: Model type: string - description: >- - (Optional) Unique identifier for the validation dataset - packed: - type: boolean - default: false - description: >- - (Optional) Whether to pack multiple samples into a single sequence for - efficiency - train_on_input: - type: boolean - default: false - description: >- - (Optional) Whether to compute loss on input tokens as well as output tokens - additionalProperties: false + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + nullable: true required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: >- - Configuration for training data and data loading. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - EfficiencyConfig: - type: object - properties: - enable_activation_checkpointing: - type: boolean - default: false - description: >- - (Optional) Whether to use activation checkpointing to reduce memory usage - enable_activation_offloading: - type: boolean - default: false - description: >- - (Optional) Whether to offload activations to CPU to save GPU memory - memory_efficient_fsdp_wrap: - type: boolean - default: false - description: >- - (Optional) Whether to use memory-efficient FSDP wrapping - fsdp_cpu_offload: - type: boolean - default: false - description: >- - (Optional) Whether to offload FSDP parameters to CPU - additionalProperties: false - title: EfficiencyConfig - description: >- - Configuration for memory and compute efficiency optimizations. - OptimizerConfig: + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk 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: - optimizer_type: - $ref: '#/components/schemas/OptimizerType' - description: >- - Type of optimizer to use (adam, adamw, or sgd) - lr: - type: number - description: Learning rate for the optimizer - weight_decay: - type: number - description: >- - Weight decay coefficient for regularization - num_warmup_steps: + finish_reason: + title: Finish Reason + type: string + text: + title: Text + type: string + index: + title: Index type: integer - description: Number of steps for learning rate warmup - additionalProperties: false + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: >- - Configuration parameters for the optimization algorithm. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: >- - Available optimizer algorithms for training. - TrainingConfig: + - finish_reason + - text + - index + title: OpenAICompletionChoice + type: object + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens + properties: + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Text Offset + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Token Logprobs + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Tokens + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + title: Top Logprobs + nullable: true + title: OpenAICompletionLogprobs type: object + ToolResponse: + description: Response from a tool invocation. properties: - n_epochs: - type: integer - description: Number of training epochs to run - max_steps_per_epoch: - type: integer - default: 1 - description: Maximum number of steps to run per epoch - gradient_accumulation_steps: - type: integer - default: 1 - description: >- - Number of steps to accumulate gradients before updating - max_validation_steps: - type: integer - default: 1 - description: >- - (Optional) Maximum number of validation steps per epoch - data_config: - $ref: '#/components/schemas/DataConfig' - description: >- - (Optional) Configuration for data loading and formatting - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - description: >- - (Optional) Configuration for the optimization algorithm - efficiency_config: - $ref: '#/components/schemas/EfficiencyConfig' - description: >- - (Optional) Configuration for memory and compute optimizations - dtype: + call_id: + title: Call Id type: string - default: bf16 - description: >- - (Optional) Data type for model parameters (bf16, fp16, fp32) - additionalProperties: false + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + nullable: true required: - - n_epochs - - max_steps_per_epoch - - gradient_accumulation_steps - title: TrainingConfig - description: >- - Comprehensive configuration for the training process. - PreferenceOptimizeRequest: + - call_id + - tool_name + - content + title: ToolResponse type: object + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - job_uuid: + route: + title: Route type: string - description: The UUID of the job to create. - finetuned_model: + method: + title: Method type: string - description: The model to fine-tune. - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - description: The algorithm configuration. - training_config: - $ref: '#/components/schemas/TrainingConfig' - description: The training configuration. - hyperparam_search_config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The hyperparam search configuration. - logger_config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The logger configuration. - additionalProperties: false + provider_types: + items: + type: string + title: Provider Types + type: array required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: PreferenceOptimizeRequest - PostTrainingJob: + - route + - method + - provider_types + title: RouteInfo + type: object + ListRoutesResponse: + description: Response containing a list of all available API routes. + properties: + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array + required: + - data + title: ListRoutesResponse type: object + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. properties: job_uuid: + title: Job Uuid type: string - additionalProperties: false + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - job_uuid - title: PostTrainingJob - AlgorithmConfig: - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - - $ref: '#/components/schemas/QATFinetuningConfig' - discriminator: - propertyName: type - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - LoraFinetuningConfig: + - job_uuid + title: PostTrainingJobArtifactsResponse type: object + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: - type: + job_uuid: + title: Job Uuid type: string - const: LoRA - default: LoRA - description: Algorithm type identifier, always "LoRA" - lora_attn_modules: - type: array + log_lines: items: type: string - description: >- - List of attention module names to apply LoRA to - apply_lora_to_mlp: - type: boolean - description: Whether to apply LoRA to MLP layers - apply_lora_to_output: - type: boolean - description: >- - Whether to apply LoRA to output projection layers - rank: - type: integer - description: >- - Rank of the LoRA adaptation (lower rank = fewer parameters) - alpha: - type: integer - description: >- - LoRA scaling parameter that controls adaptation strength - use_dora: - type: boolean - default: false - description: >- - (Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation) - quantize_base: - type: boolean - default: false - description: >- - (Optional) Whether to quantize the base model weights - additionalProperties: false + title: Log Lines + type: array required: - - type - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: >- - Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - QATFinetuningConfig: + - job_uuid + - log_lines + title: PostTrainingJobLogStream type: object + PostTrainingJobStatusResponse: + description: Status of a finetuning job. properties: - type: - type: string - const: QAT - default: QAT - description: Algorithm type identifier, always "QAT" - quantizer_name: + job_uuid: + title: Job Uuid type: string - description: >- - Name of the quantization algorithm to use - group_size: - type: integer - description: Size of groups for grouped quantization - additionalProperties: false + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Scheduled At + nullable: true + started_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Started At + nullable: true + completed_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Completed At + nullable: true + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Resources Allocated + nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - type - - quantizer_name - - group_size - title: QATFinetuningConfig - description: >- - Configuration for Quantization-Aware Training (QAT) fine-tuning. - SupervisedFineTuneRequest: + - job_uuid + - status + title: PostTrainingJobStatusResponse type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. properties: job_uuid: + title: Job Uuid type: string - description: The UUID of the job to create. + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' training_config: $ref: '#/components/schemas/TrainingConfig' - description: The training configuration. hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The hyperparam search configuration. logger_config: + additionalProperties: true + title: Logger Config type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The logger configuration. - model: - type: string - description: The model to fine-tune. - checkpoint_dir: - type: string - description: The directory to save checkpoint(s) to. - algorithm_config: - $ref: '#/components/schemas/AlgorithmConfig' - description: The algorithm configuration. - additionalProperties: false required: - job_uuid - training_config @@ -11906,8 +20354,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: @@ -11915,11 +20362,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: @@ -11927,127 +20372,10 @@ 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: $ref: '#/components/schemas/Error' - example: - status: 0 - title: Error - detail: An unexpected error occurred -security: - - Default: [] -tags: - - name: Agents - description: >- - APIs for creating and interacting with agentic systems. - x-displayName: Agents - - name: Batches - description: >- - The API is designed to allow use of openai client libraries for seamless integration. - - - This API provides the following extensions: - - idempotent batch creation - - Note: This API is currently under active development and may undergo changes. - x-displayName: >- - The Batches API enables efficient processing of multiple requests in a single - operation, particularly useful for processing large datasets, batch evaluation - workflows, and cost-effective inference at scale. - - name: Benchmarks - description: '' - - name: Conversations - description: >- - Protocol for conversation management operations. - x-displayName: Conversations - - name: DatasetIO - description: '' - - name: Datasets - description: '' - - name: Eval - description: >- - Llama Stack Evaluation API for running evaluations on model and agent candidates. - x-displayName: Evaluations - - name: Files - description: >- - This API is used to upload documents that can be used with other Llama Stack - APIs. - x-displayName: Files - - name: Inference - description: >- - Llama Stack Inference API for generating completions, chat completions, and - embeddings. - - - This API provides the raw interface to the underlying models. Three kinds of - models are supported: - - - LLM models: these models generate "raw" and "chat" (conversational) completions. - - - Embedding models: these models generate embeddings to be used for semantic - search. - - - Rerank models: these models reorder the documents based on their relevance - to a query. - x-displayName: Inference - - name: Inspect - description: >- - APIs for inspecting the Llama Stack service, including health status, available - API routes with methods and implementing providers. - x-displayName: Inspect - - name: Models - description: '' - - name: PostTraining (Coming Soon) - description: '' - - name: Prompts - description: >- - Protocol for prompt management operations. - x-displayName: Prompts - - name: Providers - description: >- - Providers API for inspecting, listing, and modifying providers and their configurations. - x-displayName: Providers - - name: Safety - description: OpenAI-compatible Moderations API. - x-displayName: Safety - - name: Scoring - description: '' - - name: ScoringFunctions - description: '' - - name: Shields - description: '' - - name: ToolGroups - description: '' - - name: ToolRuntime - description: '' - - name: VectorIO - description: '' -x-tagGroups: - - name: Operations - tags: - - Agents - - Batches - - Benchmarks - - Conversations - - DatasetIO - - Datasets - - Eval - - Files - - Inference - - Inspect - - Models - - PostTraining (Coming Soon) - - Prompts - - Providers - - Safety - - Scoring - - ScoringFunctions - - Shields - - ToolGroups - - ToolRuntime - - VectorIO diff --git a/pyproject.toml b/pyproject.toml index 34728d6ea9..1538d74911 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ dependencies = [ "httpx", "jinja2>=3.1.6", "jsonschema", - "llama-stack-api", # API and provider specifications (local dev via tool.uv.sources) + "llama-stack-api", # API and provider specifications (local dev via tool.uv.sources) "openai>=2.5.0", "prompt-toolkit", "python-dotenv", @@ -50,11 +50,12 @@ dependencies = [ "aiosqlite>=0.21.0", # server - for metadata store "asyncpg", # for metadata store "sqlalchemy[asyncio]>=2.0.41", # server - for conversations + "pyyaml>=6.0.2", ] [project.optional-dependencies] client = [ - "llama-stack-client>=0.3.0", # Optional for library-only usage + "llama-stack-client>=0.3.0", # Optional for library-only usage ] [dependency-groups] @@ -65,13 +66,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>=4.4.0", - "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 @@ -181,7 +183,12 @@ install-wheel-from-presigned = "llama_stack.cli.scripts.run:install_wheel_from_p [tool.setuptools.packages.find] where = ["src"] -include = ["llama_stack", "llama_stack.*", "llama_stack_api", "llama_stack_api.*"] +include = [ + "llama_stack", + "llama_stack.*", + "llama_stack_api", + "llama_stack_api.*", +] [[tool.uv.index]] name = "pytorch-cpu" @@ -248,7 +255,9 @@ unfixable = [ # Ignore the following errors for the following files [tool.ruff.lint.per-file-ignores] "tests/**/*.py" = ["DTZ"] # Ignore datetime rules for tests -"src/llama_stack/providers/inline/scoring/basic/utils/ifeval_utils.py" = ["RUF001"] +"src/llama_stack/providers/inline/scoring/basic/utils/ifeval_utils.py" = [ + "RUF001", +] "src/llama_stack/providers/inline/scoring/basic/scoring_fn/fn_defs/regex_parser_multiple_choice_answer.py" = [ "RUF001", "PLE2515", @@ -340,7 +349,6 @@ exclude = [ "^src/llama_stack/providers/utils/telemetry/dataset_mixin\\.py$", "^src/llama_stack/providers/utils/telemetry/trace_protocol\\.py$", "^src/llama_stack/providers/utils/telemetry/tracing\\.py$", - "^src/llama_stack_api/strong_typing/auxiliary\\.py$", "^src/llama_stack/distributions/template\\.py$", ] diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py new file mode 100755 index 0000000000..a4c7e7cc6e --- /dev/null +++ b/scripts/fastapi_generator.py @@ -0,0 +1,1591 @@ +#!/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. + +""" +FastAPI-based OpenAPI generator for Llama Stack. +""" + +import importlib +import inspect +import json +import pkgutil +from pathlib import Path +from typing import Annotated, Any, 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.apis.version import ( + LLAMA_STACK_API_V1, + LLAMA_STACK_API_V1ALPHA, + LLAMA_STACK_API_V1BETA, +) +from llama_stack.core.resolver import api_protocol_map + +# Global list to store dynamic models created during endpoint generation +_dynamic_models = [] + + +# Cache for protocol methods to avoid repeated lookups +_protocol_methods_cache: dict[Api, dict[str, Any]] | None = None + + +def create_llama_stack_app() -> FastAPI: + """ + Create a FastAPI app that represents the Llama Stack API. + This uses the existing route discovery system to automatically find all routes. + """ + app = FastAPI( + title="Llama Stack API", + description="A comprehensive API for building and deploying AI applications", + version="1.0.0", + servers=[ + {"url": "http://any-hosted-llama-stack.com"}, + ], + ) + + # Get all API routes + from llama_stack.core.server.routes import get_all_api_routes + + api_routes = get_all_api_routes() + + # Create FastAPI routes from the discovered routes + for api, routes in api_routes.items(): + for route, webmethod in routes: + # Convert the route to a FastAPI endpoint + _create_fastapi_endpoint(app, route, webmethod, api) + + return app + + +def _get_protocol_method(api: Api, method_name: str) -> Any | None: + """ + Get a protocol method function by API and method name. + Uses caching to avoid repeated lookups. + + Args: + api: The API enum + method_name: The method name (function name) + + Returns: + The function object, or None if not found + """ + global _protocol_methods_cache + + if _protocol_methods_cache is None: + _protocol_methods_cache = {} + protocols = api_protocol_map() + from llama_stack.apis.tools import SpecialToolGroup, ToolRuntime + + toolgroup_protocols = { + SpecialToolGroup.rag_tool: ToolRuntime, + } + + for api_key, protocol in protocols.items(): + method_map: dict[str, Any] = {} + protocol_methods = inspect.getmembers(protocol, predicate=inspect.isfunction) + for name, method in protocol_methods: + method_map[name] = method + + # Handle tool_runtime special case + if api_key == Api.tool_runtime: + for tool_group, sub_protocol in toolgroup_protocols.items(): + sub_protocol_methods = inspect.getmembers(sub_protocol, predicate=inspect.isfunction) + for name, method in sub_protocol_methods: + if hasattr(method, "__webmethod__"): + method_map[f"{tool_group.value}.{name}"] = method + + _protocol_methods_cache[api_key] = method_map + + return _protocol_methods_cache.get(api, {}).get(method_name) + + +def _extract_path_parameters(path: str) -> list[dict[str, Any]]: + """Extract path parameters from a URL path and return them as OpenAPI parameter definitions.""" + import re + + matches = re.findall(r"\{([^}:]+)(?::[^}]+)?\}", path) + return [ + { + "name": param_name, + "in": "path", + "required": True, + "schema": {"type": "string"}, + "description": f"Path parameter: {param_name}", + } + for param_name in matches + ] + + +def _create_endpoint_with_request_model( + request_model: type, response_model: type | None, operation_description: str | None +): + """Create an endpoint function with a request body model.""" + + async def endpoint(request: request_model) -> response_model: + return response_model() if response_model else {} + + if operation_description: + endpoint.__doc__ = operation_description + return endpoint + + +def _build_field_definitions(query_parameters: list[tuple[str, type, Any]], use_any: bool = False) -> dict[str, tuple]: + """Build field definitions for a Pydantic model from query parameters.""" + from typing import Any + + from pydantic import Field + + field_definitions = {} + for param_name, param_type, default_value in query_parameters: + if use_any: + field_definitions[param_name] = (Any, ... if default_value is inspect.Parameter.empty else default_value) + continue + + base_type = param_type + extracted_field = None + if get_origin(param_type) is Annotated: + args = get_args(param_type) + if args: + base_type = args[0] + for arg in args[1:]: + if isinstance(arg, Field): + extracted_field = arg + break + + try: + if extracted_field: + field_definitions[param_name] = (base_type, extracted_field) + else: + field_definitions[param_name] = ( + base_type, + ... if default_value is inspect.Parameter.empty else default_value, + ) + except (TypeError, ValueError): + field_definitions[param_name] = (Any, ... if default_value is inspect.Parameter.empty else default_value) + + # Ensure all parameters are included + expected_params = {name for name, _, _ in query_parameters} + missing = expected_params - set(field_definitions.keys()) + if missing: + for param_name, _, default_value in query_parameters: + if param_name in missing: + field_definitions[param_name] = ( + Any, + ... if default_value is inspect.Parameter.empty else default_value, + ) + + return field_definitions + + +def _create_dynamic_request_model( + webmethod, query_parameters: list[tuple[str, type, Any]], use_any: bool = False, add_uuid: bool = False +) -> type | None: + """Create a dynamic Pydantic model for request body.""" + import uuid + + from pydantic import create_model + + try: + field_definitions = _build_field_definitions(query_parameters, use_any) + clean_route = webmethod.route.replace("/", "_").replace("{", "").replace("}", "").replace("-", "_") + model_name = f"{clean_route}_Request" + if add_uuid: + model_name = f"{model_name}_{uuid.uuid4().hex[:8]}" + + request_model = create_model(model_name, **field_definitions) + _dynamic_models.append(request_model) + return request_model + except Exception: + return None + + +def _build_signature_params( + query_parameters: list[tuple[str, type, Any]], +) -> tuple[list[inspect.Parameter], dict[str, type]]: + """Build signature parameters and annotations from query parameters.""" + signature_params = [] + param_annotations = {} + for param_name, param_type, default_value in query_parameters: + param_annotations[param_name] = param_type + signature_params.append( + inspect.Parameter( + param_name, + inspect.Parameter.POSITIONAL_OR_KEYWORD, + default=default_value if default_value is not inspect.Parameter.empty else inspect.Parameter.empty, + annotation=param_type, + ) + ) + return signature_params, param_annotations + + +def _create_fastapi_endpoint(app: FastAPI, route, webmethod, api: Api): + """Create a FastAPI endpoint from a discovered route and webmethod.""" + path = route.path + methods = route.methods + name = route.name + fastapi_path = path.replace("{", "{").replace("}", "}") + + request_model, response_model, query_parameters, file_form_params = _find_models_for_endpoint(webmethod, api, name) + operation_description = _extract_operation_description_from_docstring(api, name) + response_description = _extract_response_description_from_docstring(webmethod, response_model, api, name) + is_post_put = any(method.upper() in ["POST", "PUT", "PATCH"] for method in methods) + + if file_form_params and is_post_put: + signature_params = list(file_form_params) + param_annotations = {param.name: param.annotation for param in file_form_params} + for param_name, param_type, default_value in query_parameters: + signature_params.append( + inspect.Parameter( + param_name, + inspect.Parameter.POSITIONAL_OR_KEYWORD, + default=default_value if default_value is not inspect.Parameter.empty else inspect.Parameter.empty, + annotation=param_type, + ) + ) + param_annotations[param_name] = param_type + + async def file_form_endpoint(): + return response_model() if response_model else {} + + if operation_description: + file_form_endpoint.__doc__ = operation_description + file_form_endpoint.__signature__ = inspect.Signature(signature_params) + file_form_endpoint.__annotations__ = param_annotations + endpoint_func = file_form_endpoint + elif request_model and response_model: + endpoint_func = _create_endpoint_with_request_model(request_model, response_model, operation_description) + elif response_model and query_parameters: + if is_post_put: + # Try creating request model with type preservation, fallback to Any, then minimal + request_model = _create_dynamic_request_model(webmethod, query_parameters, use_any=False) + if not request_model: + request_model = _create_dynamic_request_model(webmethod, query_parameters, use_any=True) + if not request_model: + request_model = _create_dynamic_request_model(webmethod, query_parameters, use_any=True, add_uuid=True) + + if request_model: + endpoint_func = _create_endpoint_with_request_model( + request_model, response_model, operation_description + ) + else: + + async def empty_endpoint() -> response_model: + return response_model() if response_model else {} + + if operation_description: + empty_endpoint.__doc__ = operation_description + endpoint_func = empty_endpoint + else: + sorted_params = sorted(query_parameters, key=lambda x: (x[2] is not inspect.Parameter.empty, x[0])) + signature_params, param_annotations = _build_signature_params(sorted_params) + + async def query_endpoint(): + return response_model() + + if operation_description: + query_endpoint.__doc__ = operation_description + query_endpoint.__signature__ = inspect.Signature(signature_params) + query_endpoint.__annotations__ = param_annotations + endpoint_func = query_endpoint + elif response_model: + + async def response_only_endpoint() -> response_model: + return response_model() + + if operation_description: + response_only_endpoint.__doc__ = operation_description + endpoint_func = response_only_endpoint + elif query_parameters: + signature_params, param_annotations = _build_signature_params(query_parameters) + + async def params_only_endpoint(): + return {} + + if operation_description: + params_only_endpoint.__doc__ = operation_description + params_only_endpoint.__signature__ = inspect.Signature(signature_params) + params_only_endpoint.__annotations__ = param_annotations + endpoint_func = params_only_endpoint + else: + + async def no_params_endpoint(): + return {} + + if operation_description: + no_params_endpoint.__doc__ = operation_description + endpoint_func = no_params_endpoint + + # Add the endpoint to the FastAPI app + is_deprecated = webmethod.deprecated or False + route_kwargs = { + "name": name, + "tags": [_get_tag_from_api(api)], + "deprecated": is_deprecated, + "responses": { + 200: { + "description": response_description, + "content": { + "application/json": { + "schema": {"$ref": f"#/components/schemas/{response_model.__name__}"} if response_model else {} + } + }, + }, + 400: {"$ref": "#/components/responses/BadRequest400"}, + 429: {"$ref": "#/components/responses/TooManyRequests429"}, + 500: {"$ref": "#/components/responses/InternalServerError500"}, + "default": {"$ref": "#/components/responses/DefaultError"}, + }, + } + + method_map = {"GET": app.get, "POST": app.post, "PUT": app.put, "DELETE": app.delete, "PATCH": app.patch} + for method in methods: + if handler := method_map.get(method.upper()): + handler(fastapi_path, **route_kwargs)(endpoint_func) + + +def _extract_operation_description_from_docstring(api: Api, method_name: str) -> str | None: + """Extract operation description from the actual function docstring.""" + func = _get_protocol_method(api, method_name) + if not func or not func.__doc__: + return None + + doc_lines = func.__doc__.split("\n") + description_lines = [] + metadata_markers = (":param", ":type", ":return", ":returns", ":raises", ":exception", ":yield", ":yields", ":cvar") + + for line in doc_lines: + if line.strip().startswith(metadata_markers): + break + description_lines.append(line) + + description = "\n".join(description_lines).strip() + return description if description else None + + +def _extract_response_description_from_docstring(webmethod, response_model, api: Api, method_name: str) -> str: + """Extract response description from the actual function docstring.""" + func = _get_protocol_method(api, method_name) + if not func or not func.__doc__: + return "Successful Response" + for line in func.__doc__.split("\n"): + if line.strip().startswith(":returns:"): + if desc := line.strip()[9:].strip(): + return desc + return "Successful Response" + + +def _get_tag_from_api(api: Api) -> str: + """Extract a tag name from the API enum for API grouping.""" + return api.value.replace("_", " ").title() + + +def _is_file_or_form_param(param_type: Any) -> bool: + """Check if a parameter type is annotated with File() or Form().""" + if get_origin(param_type) is Annotated: + args = get_args(param_type) + if len(args) > 1: + # Check metadata for File or Form + for metadata in args[1:]: + # Check if it's a File or Form instance + if hasattr(metadata, "__class__"): + class_name = metadata.__class__.__name__ + if class_name in ("File", "Form"): + return True + return False + + +def _find_models_for_endpoint( + webmethod, api: Api, method_name: str +) -> tuple[type | None, type | None, list[tuple[str, type, Any]], list[inspect.Parameter]]: + """ + Find appropriate request and response models for an endpoint by analyzing the actual function signature. + This uses the protocol function to determine the correct models dynamically. + + Args: + webmethod: The webmethod metadata + api: The API enum for looking up the function + method_name: The method name (function name) + + Returns: + tuple: (request_model, response_model, query_parameters, file_form_params) + where query_parameters is a list of (name, type, default_value) tuples + and file_form_params is a list of inspect.Parameter objects for File()/Form() params + """ + try: + # Get the function from the protocol + func = _get_protocol_method(api, method_name) + if not func: + return None, None, [], [] + + # Analyze the function signature + sig = inspect.signature(func) + + # Find request model and collect all body parameters + request_model = None + query_parameters = [] + file_form_params = [] + path_params = set() + + # Extract path parameters from the route + if webmethod and hasattr(webmethod, "route"): + import re + + path_matches = re.findall(r"\{([^}:]+)(?::[^}]+)?\}", webmethod.route) + path_params = set(path_matches) + + for param_name, param in sig.parameters.items(): + 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 this is a path parameter + if param_name in path_params: + # Path parameters are handled separately, skip them + continue + + # Check if it's a File() or Form() parameter - these need special handling + param_type = param.annotation + if _is_file_or_form_param(param_type): + # File() and Form() parameters must be in the function signature directly + # They cannot be part of a Pydantic model + file_form_params.append(param) + continue + + # Check if it's a Pydantic model (for POST/PUT requests) + if hasattr(param_type, "model_json_schema"): + # Collect all body parameters including Pydantic models + # We'll decide later whether to use a single model or create a combined one + query_parameters.append((param_name, param_type, param.default)) + elif get_origin(param_type) is Annotated: + # Handle Annotated types - get the base type + args = get_args(param_type) + if args and hasattr(args[0], "model_json_schema"): + # Collect Pydantic models from Annotated types + query_parameters.append((param_name, args[0], param.default)) + else: + # Regular annotated parameter (but not File/Form, already handled above) + query_parameters.append((param_name, param_type, param.default)) + else: + # This is likely a body parameter for POST/PUT or query parameter for GET + # Store the parameter info for later use + # Preserve inspect.Parameter.empty to distinguish "no default" from "default=None" + default_value = param.default + + # Extract the base type from union types (e.g., str | None -> str) + # Also make it safe for FastAPI to avoid forward reference issues + query_parameters.append((param_name, param_type, default_value)) + + # If there's exactly one body parameter and it's a Pydantic model, use it directly + # Otherwise, we'll create a combined request model from all parameters + if len(query_parameters) == 1: + param_name, param_type, default_value = query_parameters[0] + if hasattr(param_type, "model_json_schema"): + request_model = param_type + query_parameters = [] # Clear query_parameters so we use the single model + + # Find response model from return annotation + response_model = None + return_annotation = sig.return_annotation + if return_annotation != inspect.Signature.empty: + if hasattr(return_annotation, "model_json_schema"): + response_model = return_annotation + elif get_origin(return_annotation) is Annotated: + # Handle Annotated return types + args = get_args(return_annotation) + 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) + for arg in args: + if hasattr(arg, "model_json_schema"): + response_model = arg + break + + return request_model, response_model, query_parameters, file_form_params + + except Exception: + # If we can't analyze the function signature, return None + return None, None, [], [] + + +def _ensure_components_schemas(openapi_schema: dict[str, Any]) -> None: + """Ensure components.schemas exists in the schema.""" + if "components" not in openapi_schema: + openapi_schema["components"] = {} + if "schemas" not in openapi_schema["components"]: + openapi_schema["components"]["schemas"] = {} + + +def _import_all_modules_in_package(package_name: str) -> list[Any]: + """ + Dynamically import all modules in a package to trigger register_schema calls. + + This walks through all modules in the package and imports them, ensuring + that any register_schema() calls at module level are executed. + + Args: + package_name: The fully qualified package name (e.g., 'llama_stack.apis') + + Returns: + List of imported module objects + """ + modules = [] + try: + package = importlib.import_module(package_name) + except ImportError: + return modules + + package_path = getattr(package, "__path__", None) + if not package_path: + return modules + + # Walk packages and modules recursively + for _, modname, ispkg in pkgutil.walk_packages(package_path, prefix=f"{package_name}."): + if not modname.startswith("_"): + try: + module = importlib.import_module(modname) + modules.append(module) + + # If this is a package, also try to import any .py files directly + # (e.g., llama_stack.apis.scoring_functions.scoring_functions) + if ispkg: + try: + # Try importing the module file with the same name as the package + # This handles cases like scoring_functions/scoring_functions.py + module_file_name = f"{modname}.{modname.split('.')[-1]}" + module_file = importlib.import_module(module_file_name) + if module_file not in modules: + modules.append(module_file) + except (ImportError, AttributeError, TypeError): + # It's okay if this fails - not all packages have a module file with the same name + pass + except (ImportError, AttributeError, TypeError): + # Skip modules that can't be imported (e.g., missing dependencies) + continue + + return modules + + +def _extract_and_fix_defs(schema: dict[str, Any], openapi_schema: dict[str, Any]) -> None: + """ + Extract $defs from a schema, move them to components/schemas, and fix references. + This handles both TypeAdapter-generated schemas and model_json_schema() schemas. + """ + if "$defs" in schema: + defs = schema.pop("$defs") + for def_name, def_schema in defs.items(): + if def_name not in openapi_schema["components"]["schemas"]: + openapi_schema["components"]["schemas"][def_name] = def_schema + # Recursively handle $defs in nested schemas + _extract_and_fix_defs(def_schema, openapi_schema) + + # Fix any references in the main schema that point to $defs + def fix_refs_in_schema(obj: Any) -> None: + if isinstance(obj, dict): + if "$ref" in obj and obj["$ref"].startswith("#/$defs/"): + obj["$ref"] = obj["$ref"].replace("#/$defs/", "#/components/schemas/") + for value in obj.values(): + fix_refs_in_schema(value) + elif isinstance(obj, list): + for item in obj: + fix_refs_in_schema(item) + + fix_refs_in_schema(schema) + + +def _ensure_json_schema_types_included(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Ensure all @json_schema_type decorated models and registered schemas are included in the OpenAPI schema. + This finds all models with the _llama_stack_schema_type attribute and schemas registered via register_schema. + """ + _ensure_components_schemas(openapi_schema) + + # Import TypeAdapter for handling union types and other non-model types + from pydantic import TypeAdapter + + # Dynamically import all modules in packages that might register schemas + # This ensures register_schema() calls execute and populate _registered_schemas + # Also collect the modules for later scanning of @json_schema_type decorated classes + apis_modules = _import_all_modules_in_package("llama_stack.apis") + _import_all_modules_in_package("llama_stack.core.telemetry") + + # First, handle registered schemas (union types, etc.) + from llama_stack.schema_utils import _registered_schemas + + for schema_type, registration_info in _registered_schemas.items(): + schema_name = registration_info["name"] + if schema_name not in openapi_schema["components"]["schemas"]: + try: + # Use TypeAdapter for union types and other non-model types + # Use ref_template to generate references in the format we need + adapter = TypeAdapter(schema_type) + schema = adapter.json_schema(ref_template="#/components/schemas/{model}") + + # Extract and fix $defs if present + _extract_and_fix_defs(schema, openapi_schema) + + openapi_schema["components"]["schemas"][schema_name] = schema + except Exception as e: + # Skip if we can't generate the schema + print(f"Warning: Failed to generate schema for registered type {schema_name}: {e}") + import traceback + + traceback.print_exc() + continue + + # Find all classes with the _llama_stack_schema_type attribute + # Use the modules we already imported above + 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: + # Use ref_template to ensure consistent reference format and $defs handling + schema = attr.model_json_schema(ref_template="#/components/schemas/{model}") + # Extract and fix $defs if present (model_json_schema can also generate $defs) + _extract_and_fix_defs(schema, openapi_schema) + openapi_schema["components"]["schemas"][schema_name] = schema + except Exception as e: + # Skip if we can't generate the schema + print(f"Warning: Failed to generate schema for {schema_name}: {e}") + 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(ref_template="#/components/schemas/{model}") + # Extract and fix $defs if present + _extract_and_fix_defs(schema, openapi_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 _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. + """ + _ensure_components_schemas(openapi_schema) + + # 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. + Uses the actual Error model from the codebase for consistency. + """ + if "components" not in openapi_schema: + openapi_schema["components"] = {} + if "responses" not in openapi_schema["components"]: + openapi_schema["components"]["responses"] = {} + + try: + from llama_stack.apis.datatypes import Error + + _ensure_components_schemas(openapi_schema) + if "Error" not in openapi_schema["components"]["schemas"]: + openapi_schema["components"]["schemas"]["Error"] = Error.model_json_schema() + except ImportError: + pass + + # Define standard HTTP error responses + error_responses = { + 400: { + "name": "BadRequest400", + "description": "The request was invalid or malformed", + "example": {"status": 400, "title": "Bad Request", "detail": "The request was invalid or malformed"}, + }, + 429: { + "name": "TooManyRequests429", + "description": "The client has sent too many requests in a given amount of time", + "example": { + "status": 429, + "title": "Too Many Requests", + "detail": "You have exceeded the rate limit. Please try again later.", + }, + }, + 500: { + "name": "InternalServerError500", + "description": "The server encountered an unexpected error", + "example": {"status": 500, "title": "Internal Server Error", "detail": "An unexpected error occurred"}, + }, + } + + # Add each error response to the schema + for _, error_info in error_responses.items(): + response_name = error_info["name"] + openapi_schema["components"]["responses"][response_name] = { + "description": error_info["description"], + "content": { + "application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "example": error_info["example"]} + }, + } + + # Add a default error response + openapi_schema["components"]["responses"]["DefaultError"] = { + "description": "An error occurred", + "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}, + } + + 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: exclusiveMinimum and null defaults.""" + if "components" in openapi_schema and "schemas" in openapi_schema["components"]: + for schema_def in openapi_schema["components"]["schemas"].values(): + _fix_schema_recursive(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_schema_recursive(obj: Any) -> None: + """Recursively fix schema issues: exclusiveMinimum and null defaults.""" + if isinstance(obj, dict): + if "exclusiveMinimum" in obj and isinstance(obj["exclusiveMinimum"], int | float): + obj["minimum"] = obj.pop("exclusiveMinimum") + if "default" in obj and obj["default"] is None: + del obj["default"] + obj["nullable"] = True + for value in obj.values(): + _fix_schema_recursive(value) + elif isinstance(obj, list): + for item in obj: + _fix_schema_recursive(item) + + +def _clean_description(description: str) -> str: + """Remove :param, :type, :returns, and other docstring metadata from description.""" + if not description: + return description + + lines = description.split("\n") + cleaned_lines = [] + skip_until_empty = False + + for line in lines: + stripped = line.strip() + # Skip lines that start with docstring metadata markers + if stripped.startswith( + (":param", ":type", ":return", ":returns", ":raises", ":exception", ":yield", ":yields", ":cvar") + ): + skip_until_empty = True + continue + # If we're skipping and hit an empty line, resume normal processing + if skip_until_empty: + if not stripped: + skip_until_empty = False + continue + # Include the line if we're not skipping + cleaned_lines.append(line) + + # Join and strip trailing whitespace + result = "\n".join(cleaned_lines).strip() + return result + + +def _clean_schema_descriptions(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """Clean descriptions in schema definitions by removing docstring metadata.""" + if "components" not in openapi_schema or "schemas" not in openapi_schema["components"]: + return openapi_schema + + schemas = openapi_schema["components"]["schemas"] + for schema_def in schemas.values(): + if isinstance(schema_def, dict) and "description" in schema_def and isinstance(schema_def["description"], str): + schema_def["description"] = _clean_description(schema_def["description"]) + + return openapi_schema + + +def _remove_query_params_from_body_endpoints(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Remove query parameters from POST/PUT/PATCH endpoints that have a request body. + FastAPI sometimes infers parameters as query params even when they should be in the request body. + """ + if "paths" not in openapi_schema: + return openapi_schema + + body_methods = {"post", "put", "patch"} + + for _path, path_item in openapi_schema["paths"].items(): + if not isinstance(path_item, dict): + continue + + for method in body_methods: + if method not in path_item: + continue + + operation = path_item[method] + if not isinstance(operation, dict): + continue + + # Check if this operation has a request body + has_request_body = "requestBody" in operation and operation["requestBody"] + + if has_request_body: + # Remove all query parameters (parameters with "in": "query") + if "parameters" in operation: + # Filter out query parameters, keep path and header parameters + operation["parameters"] = [ + param + for param in operation["parameters"] + if isinstance(param, dict) and param.get("in") != "query" + ] + # Remove the parameters key if it's now empty + if not operation["parameters"]: + del operation["parameters"] + + return openapi_schema + + +def _convert_multiline_strings_to_literal(obj: Any) -> Any: + """Recursively convert multi-line strings to LiteralScalarString for YAML block scalar formatting.""" + try: + from ruamel.yaml.scalarstring import LiteralScalarString + + if isinstance(obj, str) and "\n" in obj: + return LiteralScalarString(obj) + elif isinstance(obj, dict): + return {key: _convert_multiline_strings_to_literal(value) for key, value in obj.items()} + elif isinstance(obj, list): + return [_convert_multiline_strings_to_literal(item) for item in obj] + else: + return obj + except ImportError: + return obj + + +def _write_yaml_file(file_path: Path, schema: dict[str, Any]) -> None: + """Write schema to YAML file using ruamel.yaml if available, otherwise standard 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 + yaml_writer.allow_unicode = True + schema = _convert_multiline_strings_to_literal(schema) + with open(file_path, "w") as f: + yaml_writer.dump(schema, f) + except ImportError: + with open(file_path, "w") as f: + yaml.dump(schema, f, default_flow_style=False, sort_keys=False) + + +def _filter_schema_by_version( + openapi_schema: dict[str, Any], stable_only: bool = True, exclude_deprecated: bool = True +) -> dict[str, Any]: + """ + Filter OpenAPI schema by API version. + + Args: + openapi_schema: The full OpenAPI schema + stable_only: If True, return only /v1/ paths (stable). If False, return only /v1alpha/ and /v1beta/ paths (experimental). + exclude_deprecated: If True, exclude deprecated endpoints from the result. + + Returns: + Filtered OpenAPI schema + """ + filtered_schema = openapi_schema.copy() + + if "paths" not in filtered_schema: + return filtered_schema + + # Filter paths based on version prefix and deprecated status + 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 exclude_deprecated is True + if exclude_deprecated and is_deprecated: + continue + + if stable_only: + # Only include stable v1 paths, exclude v1alpha and v1beta + if _is_stable_path(path): + filtered_paths[path] = path_item + else: + # Only include experimental paths (v1alpha or v1beta), exclude v1 + if _is_experimental_path(path): + 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"]: + # Find all schemas that are actually referenced by the filtered paths + # Use the original schema to find all references, not the filtered one + referenced_schemas = _find_schemas_referenced_by_paths(filtered_paths, openapi_schema) + + # Also include all registered schemas and @json_schema_type decorated models + # (they should always be included) and all schemas they reference (transitive references) + from llama_stack.schema_utils import _registered_schemas + + # Use the original schema to find registered schema definitions + all_schemas = openapi_schema.get("components", {}).get("schemas", {}) + registered_schema_names = set() + for registration_info in _registered_schemas.values(): + registered_schema_names.add(registration_info["name"]) + + # Also include all @json_schema_type decorated models + json_schema_type_names = _get_all_json_schema_type_names() + all_explicit_schema_names = registered_schema_names | json_schema_type_names + + # Find all schemas referenced by registered schemas and @json_schema_type models (transitive) + additional_schemas = set() + for schema_name in all_explicit_schema_names: + referenced_schemas.add(schema_name) + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + + # Keep adding transitive references until no new ones are found + while additional_schemas: + new_schemas = additional_schemas - referenced_schemas + if not new_schemas: + break + referenced_schemas.update(new_schemas) + additional_schemas = set() + for schema_name in new_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + + # Only keep schemas that are referenced by the filtered paths or are registered/@json_schema_type + 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 + + # 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"] + + return filtered_schema + + +def _find_schemas_referenced_by_paths(filtered_paths: dict[str, Any], openapi_schema: dict[str, Any]) -> set[str]: + """ + Find all schemas that are referenced by the filtered paths. + This recursively traverses the path definitions to find all $ref references. + """ + referenced_schemas = set() + + # Traverse all filtered paths + for _, path_item in filtered_paths.items(): + if not isinstance(path_item, dict): + continue + + # Check each HTTP method in the path + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + if method in path_item: + operation = path_item[method] + if isinstance(operation, dict): + # Find all schema references in this operation + referenced_schemas.update(_find_schema_refs_in_object(operation)) + + # Also check the responses section for schema references + if "components" in openapi_schema and "responses" in openapi_schema["components"]: + referenced_schemas.update(_find_schema_refs_in_object(openapi_schema["components"]["responses"])) + + # Also include schemas that are referenced by other schemas (transitive references) + # This ensures we include all dependencies + all_schemas = openapi_schema.get("components", {}).get("schemas", {}) + additional_schemas = set() + + for schema_name in referenced_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + + # Keep adding transitive references until no new ones are found + while additional_schemas: + new_schemas = additional_schemas - referenced_schemas + if not new_schemas: + break + referenced_schemas.update(new_schemas) + additional_schemas = set() + for schema_name in new_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + + return referenced_schemas + + +def _find_schema_refs_in_object(obj: Any) -> set[str]: + """ + Recursively find all schema references ($ref) in an object. + """ + refs = set() + + if isinstance(obj, dict): + for key, value in obj.items(): + if key == "$ref" and isinstance(value, str) and value.startswith("#/components/schemas/"): + schema_name = value.split("/")[-1] + refs.add(schema_name) + else: + refs.update(_find_schema_refs_in_object(value)) + elif isinstance(obj, list): + for item in obj: + refs.update(_find_schema_refs_in_object(item)) + + return refs + + +def _get_all_json_schema_type_names() -> set[str]: + """ + Get all schema names from @json_schema_type decorated models. + This ensures they are included in filtered schemas even if not directly referenced by paths. + """ + schema_names = set() + apis_modules = _import_all_modules_in_package("llama_stack.apis") + 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_names.add(attr.__name__) + except (AttributeError, TypeError): + continue + return schema_names + + +def _is_path_deprecated(path_item: dict[str, Any]) -> bool: + """Check if a path item has any deprecated operations.""" + if not isinstance(path_item, dict): + return False + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + if isinstance(path_item.get(method), dict) and path_item[method].get("deprecated", False): + return True + return False + + +def _path_starts_with_version(path: str, version: str) -> bool: + """Check if a path starts with a specific API version prefix.""" + return path.startswith(f"/{version}/") + + +def _is_stable_path(path: str) -> bool: + """Check if a path is a stable v1 path (not v1alpha or v1beta).""" + return ( + _path_starts_with_version(path, LLAMA_STACK_API_V1) + and not _path_starts_with_version(path, LLAMA_STACK_API_V1ALPHA) + and not _path_starts_with_version(path, LLAMA_STACK_API_V1BETA) + ) + + +def _is_experimental_path(path: str) -> bool: + """Check if a path is an experimental path (v1alpha or v1beta).""" + return _path_starts_with_version(path, LLAMA_STACK_API_V1ALPHA) or _path_starts_with_version( + path, LLAMA_STACK_API_V1BETA + ) + + +def _filter_deprecated_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Filter OpenAPI schema to include only deprecated endpoints. + Includes all deprecated endpoints regardless of version (v1, v1alpha, v1beta). + """ + filtered_schema = openapi_schema.copy() + + if "paths" not in filtered_schema: + return filtered_schema + + # Filter paths to only include deprecated ones + filtered_paths = {} + for path, path_item in filtered_schema["paths"].items(): + if _is_path_deprecated(path_item): + filtered_paths[path] = path_item + + filtered_schema["paths"] = filtered_paths + + 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 stable v1 paths + if _is_stable_path(path): + filtered_paths[path] = path_item + # Include experimental paths (v1alpha or v1beta) + elif _is_experimental_path(path): + 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) + + # Also include all registered schemas and @json_schema_type decorated models + # (they should always be included) and all schemas they reference (transitive references) + from llama_stack.schema_utils import _registered_schemas + + # Use the original schema to find registered schema definitions + all_schemas = openapi_schema.get("components", {}).get("schemas", {}) + registered_schema_names = set() + for registration_info in _registered_schemas.values(): + registered_schema_names.add(registration_info["name"]) + + # Also include all @json_schema_type decorated models + json_schema_type_names = _get_all_json_schema_type_names() + all_explicit_schema_names = registered_schema_names | json_schema_type_names + + # Find all schemas referenced by registered schemas and @json_schema_type models (transitive) + additional_schemas = set() + for schema_name in all_explicit_schema_names: + referenced_schemas.add(schema_name) + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + + # Keep adding transitive references until no new ones are found + while additional_schemas: + new_schemas = additional_schemas - referenced_schemas + if not new_schemas: + break + referenced_schemas.update(new_schemas) + additional_schemas = set() + for schema_name in new_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + + 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) -> dict[str, Any]: + """ + Generate OpenAPI specification using FastAPI's built-in method. + + Args: + output_dir: Directory to save the generated files + + Returns: + The generated OpenAPI specification as a dictionary + """ + # Create the FastAPI app + app = create_llama_stack_app() + + # Generate the OpenAPI schema + openapi_schema = get_openapi( + title=app.title, + version=app.version, + description=app.description, + routes=app.routes, + servers=app.servers, + ) + + # Set OpenAPI version to 3.1.0 + openapi_schema["openapi"] = "3.1.0" + + # 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) + + # 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) + + # Clean descriptions in schema definitions by removing docstring metadata + openapi_schema = _clean_schema_descriptions(openapi_schema) + + # Remove query parameters from POST/PUT/PATCH endpoints that have a request body + # FastAPI sometimes infers parameters as query params even when they should be in the request body + openapi_schema = _remove_query_params_from_body_endpoints(openapi_schema) + + # 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 + + stable_schema = _filter_schema_by_version(copy.deepcopy(openapi_schema), stable_only=True, exclude_deprecated=True) + experimental_schema = _filter_schema_by_version( + 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)) + + # Base description for all specs + base_description = ( + "This is the specification of the Llama Stack that provides\n" + " a set of endpoints and their corresponding interfaces that are\n" + " tailored to\n" + " best leverage Llama Models." + ) + + # Update info section for stable schema + if "info" not in stable_schema: + stable_schema["info"] = {} + stable_schema["info"]["title"] = "Llama Stack Specification" + stable_schema["info"]["version"] = "v1" + stable_schema["info"]["description"] = ( + base_description + "\n\n **✅ STABLE**: Production-ready APIs with backward compatibility guarantees." + ) + + # Update info section for experimental schema + if "info" not in experimental_schema: + experimental_schema["info"] = {} + experimental_schema["info"]["title"] = "Llama Stack Specification - Experimental APIs" + experimental_schema["info"]["version"] = "v1" + experimental_schema["info"]["description"] = ( + base_description + "\n\n **🧪 EXPERIMENTAL**: Pre-release APIs (v1alpha, v1beta) that may change before\n" + " becoming stable." + ) + + # Update info section for deprecated schema + if "info" not in deprecated_schema: + deprecated_schema["info"] = {} + deprecated_schema["info"]["title"] = "Llama Stack Specification - Deprecated APIs" + deprecated_schema["info"]["version"] = "v1" + deprecated_schema["info"]["description"] = ( + base_description + "\n\n **⚠️ DEPRECATED**: Legacy APIs that may be removed in future versions. Use for\n" + " migration reference only." + ) + + # Update info section for combined schema + if "info" not in combined_schema: + combined_schema["info"] = {} + combined_schema["info"]["title"] = "Llama Stack Specification - Stable & Experimental APIs" + combined_schema["info"]["version"] = "v1" + combined_schema["info"]["description"] = ( + base_description + "\n\n\n" + " **🔗 COMBINED**: This specification includes both stable production-ready APIs\n" + " and experimental pre-release APIs. Use stable APIs for production deployments\n" + " and experimental APIs for testing new features." + ) + + # 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...") + + # Ensure output directory exists + output_path = Path(output_dir) + output_path.mkdir(parents=True, exist_ok=True) + + # Save the stable specification + yaml_path = output_path / "llama-stack-spec.yaml" + _write_yaml_file(yaml_path, stable_schema) + # 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: + # Use string replacement to fix references directly + if "#/$defs/" in yaml_content: + yaml_content = yaml_content.replace("#/$defs/", "#/components/schemas/") + + # Parse the YAML content + yaml_data = yaml.safe_load(yaml_content) + + # Move $defs to components/schemas if it exists + if "$defs" in yaml_data: + 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"] + + # Write the modified YAML back + _write_yaml_file(yaml_path, yaml_data) + + print(f"✅ Generated YAML (stable): {yaml_path}") + + experimental_yaml_path = output_path / "experimental-llama-stack-spec.yaml" + _write_yaml_file(experimental_yaml_path, experimental_schema) + print(f"✅ Generated YAML (experimental): {experimental_yaml_path}") + + deprecated_yaml_path = output_path / "deprecated-llama-stack-spec.yaml" + _write_yaml_file(deprecated_yaml_path, deprecated_schema) + print(f"✅ Generated YAML (deprecated): {deprecated_yaml_path}") + + # Generate combined (stainless) spec + stainless_yaml_path = output_path / "stainless-llama-stack-spec.yaml" + _write_yaml_file(stainless_yaml_path, combined_schema) + print(f"✅ Generated YAML (stainless/combined): {stainless_yaml_path}") + + return stable_schema + + +def main(): + """Main entry point for the FastAPI OpenAPI generator.""" + import argparse + + parser = argparse.ArgumentParser(description="Generate OpenAPI specification using FastAPI") + parser.add_argument("output_dir", help="Output directory for generated files") + + args = parser.parse_args() + + print("🚀 Generating OpenAPI specification using FastAPI...") + print(f"📁 Output directory: {args.output_dir}") + + try: + openapi_schema = generate_openapi_spec(output_dir=args.output_dir) + + print("\n✅ OpenAPI specification generated successfully!") + print(f"📊 Schemas: {len(openapi_schema.get('components', {}).get('schemas', {}))}") + print(f"🛣️ Paths: {len(openapi_schema.get('paths', {}))}") + operation_count = sum( + 1 + for path_info in openapi_schema.get("paths", {}).values() + for method in ["get", "post", "put", "delete", "patch"] + if method in path_info + ) + print(f"🔧 Operations: {operation_count}") + + except Exception as e: + print(f"❌ Error generating OpenAPI specification: {e}") + raise + + +if __name__ == "__main__": + main() diff --git a/scripts/run_openapi_generator.sh b/scripts/run_openapi_generator.sh new file mode 100755 index 0000000000..c6c61453df --- /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 0000000000..ddc88f0f8d --- /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/core/library_client.py b/src/llama_stack/core/library_client.py index 2a224d9158..5f95fcbdd4 100644 --- a/src/llama_stack/core/library_client.py +++ b/src/llama_stack/core/library_client.py @@ -42,22 +42,16 @@ from llama_stack.core.build import print_pip_install_help from llama_stack.core.configure import parse_and_maybe_upgrade_config from llama_stack.core.datatypes import BuildConfig, BuildProvider, DistributionSpec -from llama_stack.core.request_headers import ( - PROVIDER_DATA_VAR, - request_provider_data_context, -) +from llama_stack.core.request_headers import PROVIDER_DATA_VAR, request_provider_data_context from llama_stack.core.resolver import ProviderRegistry from llama_stack.core.server.routes import RouteImpls, find_matching_route, initialize_route_impls -from llama_stack.core.stack import ( - Stack, - get_stack_run_config_from_distro, - replace_env_vars, -) +from llama_stack.core.stack import Stack, get_stack_run_config_from_distro, replace_env_vars from llama_stack.core.telemetry import Telemetry from llama_stack.core.telemetry.tracing import CURRENT_TRACE_CONTEXT, end_trace, setup_logger, start_trace from llama_stack.core.utils.config import redact_sensitive_fields from llama_stack.core.utils.context import preserve_contexts_async_generator from llama_stack.core.utils.exec import in_notebook +from llama_stack.core.utils.type_inspection import is_unwrapped_body_param from llama_stack.log import get_logger, setup_logging logger = get_logger(name=__name__, category="core") diff --git a/src/llama_stack/core/utils/type_inspection.py b/src/llama_stack/core/utils/type_inspection.py new file mode 100644 index 0000000000..31e7f23289 --- /dev/null +++ b/src/llama_stack/core/utils/type_inspection.py @@ -0,0 +1,45 @@ +# 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. + +""" +Utility functions for type inspection and parameter handling. +""" + +import inspect +import typing +from typing import Any, get_args, get_origin + +from pydantic import BaseModel +from pydantic.fields import FieldInfo + + +def is_unwrapped_body_param(param_type: Any) -> bool: + """ + Check if a parameter type represents an unwrapped body parameter. + An unwrapped body parameter is an Annotated type with Body(embed=False) + + This is used to determine whether request parameters should be flattened + in OpenAPI specs and client libraries (matching FastAPI's embed=False behavior). + + Args: + param_type: The parameter type annotation to check + + Returns: + True if the parameter should be treated as an unwrapped body parameter + """ + # Check if it's Annotated with Body(embed=False) + if get_origin(param_type) is typing.Annotated: + args = get_args(param_type) + base_type = args[0] + metadata = args[1:] + + # Look for Body annotation with embed=False + # Body() returns a FieldInfo object, so we check for that type and the embed attribute + for item in metadata: + if isinstance(item, FieldInfo) and hasattr(item, "embed") and not item.embed: + return inspect.isclass(base_type) and issubclass(base_type, BaseModel) + + return False diff --git a/src/llama_stack_api/inspect.py b/src/llama_stack_api/inspect.py index 8326e9e6b0..b9e5a68434 100644 --- a/src/llama_stack_api/inspect.py +++ b/src/llama_stack_api/inspect.py @@ -54,6 +54,7 @@ class VersionInfo(BaseModel): version: str +@json_schema_type class ListRoutesResponse(BaseModel): """Response containing a list of all available API routes. diff --git a/src/llama_stack_api/openai_responses.py b/src/llama_stack_api/openai_responses.py index 70139a98a5..1ae5eac8d5 100644 --- a/src/llama_stack_api/openai_responses.py +++ b/src/llama_stack_api/openai_responses.py @@ -1314,6 +1314,7 @@ class OpenAIResponseInputFunctionToolCallOutput(BaseModel): register_schema(OpenAIResponseInput, name="OpenAIResponseInput") +@json_schema_type class ListOpenAIResponseInputItem(BaseModel): """List container for OpenAI response input items. diff --git a/src/llama_stack_api/schema_utils.py b/src/llama_stack_api/schema_utils.py index 8444d2a340..8760988d40 100644 --- a/src/llama_stack_api/schema_utils.py +++ b/src/llama_stack_api/schema_utils.py @@ -8,8 +8,6 @@ from dataclasses import dataclass from typing import Any, TypeVar -from .strong_typing.schema import json_schema_type, register_schema # noqa: F401 - class ExtraBodyField[T]: """ @@ -48,6 +46,47 @@ def __init__(self, description: str | None = None): self.description = description +def json_schema_type(cls): + """ + Decorator to mark a Pydantic model for top-level component registration. + + Models marked with this decorator will be registered as top-level components + in the OpenAPI schema, while unmarked models will be inlined. + + This provides control over schema registration to avoid unnecessary indirection + for simple one-off types while keeping complex reusable types as components. + """ + cls._llama_stack_schema_type = True + return cls + + +# Global registry for registered schemas +_registered_schemas = {} + + +def register_schema(schema_type, name: str | None = None): + """ + Register a schema type for top-level component registration. + + This replicates the behavior of strong_typing's register_schema function. + It's used for union types and other complex types that should appear as + top-level components in the OpenAPI schema. + + Args: + schema_type: The type to register (e.g., union types, Annotated types) + name: Optional name for the schema in the OpenAPI spec. If not provided, + uses the type's __name__ or a generated name. + """ + if name is None: + name = getattr(schema_type, "__name__", f"Anonymous_{id(schema_type)}") + + # Store the registration information in a global registry + # since union types don't allow setting attributes + _registered_schemas[schema_type] = {"name": name, "type": schema_type} + + return schema_type + + @dataclass class WebMethod: level: str | None = None diff --git a/src/llama_stack_api/strong_typing/__init__.py b/src/llama_stack_api/strong_typing/__init__.py deleted file mode 100644 index d832dcf6f8..0000000000 --- a/src/llama_stack_api/strong_typing/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -""" -Type-safe data interchange for Python data classes. - -Provides auxiliary services for working with Python type annotations, converting typed data to and from JSON, -and generating a JSON schema for a complex type. -""" - -__version__ = "0.3.4" -__author__ = "Levente Hunyadi" -__copyright__ = "Copyright 2021-2024, Levente Hunyadi" -__license__ = "MIT" -__maintainer__ = "Levente Hunyadi" -__status__ = "Production" diff --git a/src/llama_stack_api/strong_typing/auxiliary.py b/src/llama_stack_api/strong_typing/auxiliary.py deleted file mode 100644 index eb067b38b3..0000000000 --- a/src/llama_stack_api/strong_typing/auxiliary.py +++ /dev/null @@ -1,229 +0,0 @@ -# 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. - -""" -Type-safe data interchange for Python data classes. - -:see: https://github.com/hunyadi/strong_typing -""" - -import dataclasses -import sys -from collections.abc import Callable -from dataclasses import is_dataclass -from typing import TypeVar, overload - -if sys.version_info >= (3, 9): - from typing import Annotated as Annotated -else: - from typing import Annotated as Annotated - -if sys.version_info >= (3, 10): - from typing import TypeAlias as TypeAlias -else: - from typing import TypeAlias as TypeAlias - -if sys.version_info >= (3, 11): - from typing import dataclass_transform as dataclass_transform -else: - from typing import dataclass_transform as dataclass_transform - -T = TypeVar("T") - - -def _compact_dataclass_repr(obj: object) -> str: - """ - Compact data-class representation where positional arguments are used instead of keyword arguments. - - :param obj: A data-class object. - :returns: A string that matches the pattern `Class(arg1, arg2, ...)`. - """ - - if is_dataclass(obj): - arglist = ", ".join(repr(getattr(obj, field.name)) for field in dataclasses.fields(obj)) - return f"{obj.__class__.__name__}({arglist})" - else: - return obj.__class__.__name__ - - -class CompactDataClass: - "A data class whose repr() uses positional rather than keyword arguments." - - def __repr__(self) -> str: - return _compact_dataclass_repr(self) - - -@overload -def typeannotation(cls: type[T], /) -> type[T]: ... - - -@overload -def typeannotation(cls: None, *, eq: bool = True, order: bool = False) -> Callable[[type[T]], type[T]]: ... - - -@dataclass_transform(eq_default=True, order_default=False) -def typeannotation( - cls: type[T] | None = None, *, eq: bool = True, order: bool = False -) -> type[T] | Callable[[type[T]], type[T]]: - """ - Returns the same class as was passed in, with dunder methods added based on the fields defined in the class. - - :param cls: The data-class type to transform into a type annotation. - :param eq: Whether to generate functions to support equality comparison. - :param order: Whether to generate functions to support ordering. - :returns: A data-class type, or a wrapper for data-class types. - """ - - def wrap(cls: type[T]) -> type[T]: - # mypy fails to equate bound-y functions (first argument interpreted as - # the bound object) with class methods, hence the `ignore` directive. - cls.__repr__ = _compact_dataclass_repr # type: ignore[method-assign] - if not dataclasses.is_dataclass(cls): - cls = dataclasses.dataclass( # type: ignore[call-overload] - cls, - init=True, - repr=False, - eq=eq, - order=order, - unsafe_hash=False, - frozen=True, - ) - return cls - - # see if decorator is used as @typeannotation or @typeannotation() - if cls is None: - # called with parentheses - return wrap - else: - # called without parentheses - return wrap(cls) - - -@typeannotation -class Alias: - "Alternative name of a property, typically used in JSON serialization." - - name: str - - -@typeannotation -class Signed: - "Signedness of an integer type." - - is_signed: bool - - -@typeannotation -class Storage: - "Number of bytes the binary representation of an integer type takes, e.g. 4 bytes for an int32." - - bytes: int - - -@typeannotation -class IntegerRange: - "Minimum and maximum value of an integer. The range is inclusive." - - minimum: int - maximum: int - - -@typeannotation -class Precision: - "Precision of a floating-point value." - - significant_digits: int - decimal_digits: int = 0 - - @property - def integer_digits(self) -> int: - return self.significant_digits - self.decimal_digits - - -@typeannotation -class TimePrecision: - """ - Precision of a timestamp or time interval. - - :param decimal_digits: Number of fractional digits retained in the sub-seconds field for a timestamp. - """ - - decimal_digits: int = 0 - - -@typeannotation -class Length: - "Exact length of a string." - - value: int - - -@typeannotation -class MinLength: - "Minimum length of a string." - - value: int - - -@typeannotation -class MaxLength: - "Maximum length of a string." - - value: int - - -@typeannotation -class SpecialConversion: - "Indicates that the annotated type is subject to custom conversion rules." - - -int8: TypeAlias = Annotated[int, Signed(True), Storage(1), IntegerRange(-128, 127)] -int16: TypeAlias = Annotated[int, Signed(True), Storage(2), IntegerRange(-32768, 32767)] -int32: TypeAlias = Annotated[ - int, - Signed(True), - Storage(4), - IntegerRange(-2147483648, 2147483647), -] -int64: TypeAlias = Annotated[ - int, - Signed(True), - Storage(8), - IntegerRange(-9223372036854775808, 9223372036854775807), -] - -uint8: TypeAlias = Annotated[int, Signed(False), Storage(1), IntegerRange(0, 255)] -uint16: TypeAlias = Annotated[int, Signed(False), Storage(2), IntegerRange(0, 65535)] -uint32: TypeAlias = Annotated[ - int, - Signed(False), - Storage(4), - IntegerRange(0, 4294967295), -] -uint64: TypeAlias = Annotated[ - int, - Signed(False), - Storage(8), - IntegerRange(0, 18446744073709551615), -] - -float32: TypeAlias = Annotated[float, Storage(4)] -float64: TypeAlias = Annotated[float, Storage(8)] - -# maps globals of type Annotated[T, ...] defined in this module to their string names -_auxiliary_types: dict[object, str] = {} -module = sys.modules[__name__] -for var in dir(module): - typ = getattr(module, var) - if getattr(typ, "__metadata__", None) is not None: - # type is Annotated[T, ...] - _auxiliary_types[typ] = var - - -def get_auxiliary_format(data_type: object) -> str | None: - "Returns the JSON format string corresponding to an auxiliary type." - - return _auxiliary_types.get(data_type) diff --git a/src/llama_stack_api/strong_typing/classdef.py b/src/llama_stack_api/strong_typing/classdef.py deleted file mode 100644 index e54e3a9d68..0000000000 --- a/src/llama_stack_api/strong_typing/classdef.py +++ /dev/null @@ -1,440 +0,0 @@ -# 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. - -import copy -import dataclasses -import datetime -import decimal -import enum -import ipaddress -import math -import re -import sys -import types -import typing -import uuid -from dataclasses import dataclass -from typing import Any, Literal, TypeVar, Union - -from .auxiliary import ( - Alias, - Annotated, - MaxLength, - Precision, - float32, - float64, - int16, - int32, - int64, -) -from .core import JsonType, Schema -from .docstring import Docstring, DocstringParam -from .inspection import TypeLike -from .serialization import json_to_object, object_to_json - -T = TypeVar("T") - - -@dataclass -class JsonSchemaNode: - title: str | None - description: str | None - - -@dataclass -class JsonSchemaType(JsonSchemaNode): - type: str - format: str | None - - -@dataclass -class JsonSchemaBoolean(JsonSchemaType): - type: Literal["boolean"] - const: bool | None - default: bool | None - examples: list[bool] | None - - -@dataclass -class JsonSchemaInteger(JsonSchemaType): - type: Literal["integer"] - const: int | None - default: int | None - examples: list[int] | None - enum: list[int] | None - minimum: int | None - maximum: int | None - - -@dataclass -class JsonSchemaNumber(JsonSchemaType): - type: Literal["number"] - const: float | None - default: float | None - examples: list[float] | None - minimum: float | None - maximum: float | None - exclusiveMinimum: float | None - exclusiveMaximum: float | None - multipleOf: float | None - - -@dataclass -class JsonSchemaString(JsonSchemaType): - type: Literal["string"] - const: str | None - default: str | None - examples: list[str] | None - enum: list[str] | None - minLength: int | None - maxLength: int | None - - -@dataclass -class JsonSchemaArray(JsonSchemaType): - type: Literal["array"] - items: "JsonSchemaAny" - - -@dataclass -class JsonSchemaObject(JsonSchemaType): - type: Literal["object"] - properties: dict[str, "JsonSchemaAny"] | None - additionalProperties: bool | None - required: list[str] | None - - -@dataclass -class JsonSchemaRef(JsonSchemaNode): - ref: Annotated[str, Alias("$ref")] - - -@dataclass -class JsonSchemaAllOf(JsonSchemaNode): - allOf: list["JsonSchemaAny"] - - -@dataclass -class JsonSchemaAnyOf(JsonSchemaNode): - anyOf: list["JsonSchemaAny"] - - -@dataclass -class Discriminator: - propertyName: str - mapping: dict[str, str] - - -@dataclass -class JsonSchemaOneOf(JsonSchemaNode): - oneOf: list["JsonSchemaAny"] - discriminator: Discriminator | None - - -JsonSchemaAny = Union[ - JsonSchemaRef, - JsonSchemaBoolean, - JsonSchemaInteger, - JsonSchemaNumber, - JsonSchemaString, - JsonSchemaArray, - JsonSchemaObject, - JsonSchemaOneOf, -] - - -@dataclass -class JsonSchemaTopLevelObject(JsonSchemaObject): - schema: Annotated[str, Alias("$schema")] - definitions: dict[str, JsonSchemaAny] | None - - -def integer_range_to_type(min_value: float, max_value: float) -> type: - if min_value >= -(2**15) and max_value < 2**15: - return int16 - elif min_value >= -(2**31) and max_value < 2**31: - return int32 - else: - return int64 - - -def enum_safe_name(name: str) -> str: - name = re.sub(r"\W", "_", name) - is_dunder = name.startswith("__") - is_sunder = name.startswith("_") and name.endswith("_") - if is_dunder or is_sunder: # provide an alternative for dunder and sunder names - name = f"v{name}" - return name - - -def enum_values_to_type( - module: types.ModuleType, - name: str, - values: dict[str, Any], - title: str | None = None, - description: str | None = None, -) -> type[enum.Enum]: - enum_class: type[enum.Enum] = enum.Enum(name, values) # type: ignore - - # assign the newly created type to the same module where the defining class is - enum_class.__module__ = module.__name__ - enum_class.__doc__ = str(Docstring(short_description=title, long_description=description)) - setattr(module, name, enum_class) - - return enum.unique(enum_class) - - -def schema_to_type(schema: Schema, *, module: types.ModuleType, class_name: str) -> TypeLike: - """ - Creates a Python type from a JSON schema. - - :param schema: The JSON schema that the types would correspond to. - :param module: The module in which to create the new types. - :param class_name: The name assigned to the top-level class. - """ - - top_node = typing.cast(JsonSchemaTopLevelObject, json_to_object(JsonSchemaTopLevelObject, schema)) - if top_node.definitions is not None: - for type_name, type_node in top_node.definitions.items(): - type_def = node_to_typedef(module, type_name, type_node) - if type_def.default is not dataclasses.MISSING: - raise TypeError("disallowed: `default` for top-level type definitions") - - type_def.type.__module__ = module.__name__ - setattr(module, type_name, type_def.type) - - return node_to_typedef(module, class_name, top_node).type - - -@dataclass -class TypeDef: - type: TypeLike - default: Any = dataclasses.MISSING - - -def json_to_value(target_type: TypeLike, data: JsonType) -> Any: - if data is not None: - return json_to_object(target_type, data) - else: - return dataclasses.MISSING - - -def node_to_typedef(module: types.ModuleType, context: str, node: JsonSchemaNode) -> TypeDef: - if isinstance(node, JsonSchemaRef): - match_obj = re.match(r"^#/definitions/(\w+)$", node.ref) - if not match_obj: - raise ValueError(f"invalid reference: {node.ref}") - - type_name = match_obj.group(1) - return TypeDef(getattr(module, type_name), dataclasses.MISSING) - - elif isinstance(node, JsonSchemaBoolean): - if node.const is not None: - return TypeDef(Literal[node.const], dataclasses.MISSING) - - default = json_to_value(bool, node.default) - return TypeDef(bool, default) - - elif isinstance(node, JsonSchemaInteger): - if node.const is not None: - return TypeDef(Literal[node.const], dataclasses.MISSING) - - integer_type: TypeLike - if node.format == "int16": - integer_type = int16 - elif node.format == "int32": - integer_type = int32 - elif node.format == "int64": - integer_type = int64 - else: - if node.enum is not None: - integer_type = integer_range_to_type(min(node.enum), max(node.enum)) - elif node.minimum is not None and node.maximum is not None: - integer_type = integer_range_to_type(node.minimum, node.maximum) - else: - integer_type = int - - default = json_to_value(integer_type, node.default) - return TypeDef(integer_type, default) - - elif isinstance(node, JsonSchemaNumber): - if node.const is not None: - return TypeDef(Literal[node.const], dataclasses.MISSING) - - number_type: TypeLike - if node.format == "float32": - number_type = float32 - elif node.format == "float64": - number_type = float64 - else: - if ( - node.exclusiveMinimum is not None - and node.exclusiveMaximum is not None - and node.exclusiveMinimum == -node.exclusiveMaximum - ): - integer_digits = round(math.log10(node.exclusiveMaximum)) - else: - integer_digits = None - - if node.multipleOf is not None: - decimal_digits = -round(math.log10(node.multipleOf)) - else: - decimal_digits = None - - if integer_digits is not None and decimal_digits is not None: - number_type = Annotated[ - decimal.Decimal, - Precision(integer_digits + decimal_digits, decimal_digits), - ] - else: - number_type = float - - default = json_to_value(number_type, node.default) - return TypeDef(number_type, default) - - elif isinstance(node, JsonSchemaString): - if node.const is not None: - return TypeDef(Literal[node.const], dataclasses.MISSING) - - string_type: TypeLike - if node.format == "date-time": - string_type = datetime.datetime - elif node.format == "uuid": - string_type = uuid.UUID - elif node.format == "ipv4": - string_type = ipaddress.IPv4Address - elif node.format == "ipv6": - string_type = ipaddress.IPv6Address - - elif node.enum is not None: - string_type = enum_values_to_type( - module, - context, - {enum_safe_name(e): e for e in node.enum}, - title=node.title, - description=node.description, - ) - - elif node.maxLength is not None: - string_type = Annotated[str, MaxLength(node.maxLength)] - else: - string_type = str - - default = json_to_value(string_type, node.default) - return TypeDef(string_type, default) - - elif isinstance(node, JsonSchemaArray): - type_def = node_to_typedef(module, context, node.items) - if type_def.default is not dataclasses.MISSING: - raise TypeError("disallowed: `default` for array element type") - list_type = list[(type_def.type,)] # type: ignore - return TypeDef(list_type, dataclasses.MISSING) - - elif isinstance(node, JsonSchemaObject): - if node.properties is None: - return TypeDef(JsonType, dataclasses.MISSING) - - if node.additionalProperties is None or node.additionalProperties is not False: - raise TypeError("expected: `additionalProperties` equals `false`") - - required = node.required if node.required is not None else [] - - class_name = context - - fields: list[tuple[str, Any, dataclasses.Field]] = [] - params: dict[str, DocstringParam] = {} - for prop_name, prop_node in node.properties.items(): - type_def = node_to_typedef(module, f"{class_name}__{prop_name}", prop_node) - if prop_name in required: - prop_type = type_def.type - else: - prop_type = Union[(None, type_def.type)] - fields.append((prop_name, prop_type, dataclasses.field(default=type_def.default))) - prop_desc = prop_node.title or prop_node.description - if prop_desc is not None: - params[prop_name] = DocstringParam(prop_name, prop_desc) - - fields.sort(key=lambda t: t[2].default is not dataclasses.MISSING) - if sys.version_info >= (3, 12): - class_type = dataclasses.make_dataclass(class_name, fields, module=module.__name__) - else: - class_type = dataclasses.make_dataclass(class_name, fields, namespace={"__module__": module.__name__}) - class_type.__doc__ = str( - Docstring( - short_description=node.title, - long_description=node.description, - params=params, - ) - ) - setattr(module, class_name, class_type) - return TypeDef(class_type, dataclasses.MISSING) - - elif isinstance(node, JsonSchemaOneOf): - union_defs = tuple(node_to_typedef(module, context, n) for n in node.oneOf) - if any(d.default is not dataclasses.MISSING for d in union_defs): - raise TypeError("disallowed: `default` for union member type") - union_types = tuple(d.type for d in union_defs) - return TypeDef(Union[union_types], dataclasses.MISSING) - - raise NotImplementedError() - - -@dataclass -class SchemaFlatteningOptions: - qualified_names: bool = False - recursive: bool = False - - -def flatten_schema(schema: Schema, *, options: SchemaFlatteningOptions | None = None) -> Schema: - top_node = typing.cast(JsonSchemaTopLevelObject, json_to_object(JsonSchemaTopLevelObject, schema)) - flattener = SchemaFlattener(options) - obj = flattener.flatten(top_node) - return typing.cast(Schema, object_to_json(obj)) - - -class SchemaFlattener: - options: SchemaFlatteningOptions - - def __init__(self, options: SchemaFlatteningOptions | None = None) -> None: - self.options = options or SchemaFlatteningOptions() - - def flatten(self, source_node: JsonSchemaObject) -> JsonSchemaObject: - if source_node.type != "object": - return source_node - - source_props = source_node.properties or {} - target_props: dict[str, JsonSchemaAny] = {} - - source_reqs = source_node.required or [] - target_reqs: list[str] = [] - - for name, prop in source_props.items(): - if not isinstance(prop, JsonSchemaObject): - target_props[name] = prop - if name in source_reqs: - target_reqs.append(name) - continue - - if self.options.recursive: - obj = self.flatten(prop) - else: - obj = prop - if obj.properties is not None: - if self.options.qualified_names: - target_props.update((f"{name}.{n}", p) for n, p in obj.properties.items()) - else: - target_props.update(obj.properties.items()) - if obj.required is not None: - if self.options.qualified_names: - target_reqs.extend(f"{name}.{n}" for n in obj.required) - else: - target_reqs.extend(obj.required) - - target_node = copy.copy(source_node) - target_node.properties = target_props or None - target_node.additionalProperties = False - target_node.required = target_reqs or None - return target_node diff --git a/src/llama_stack_api/strong_typing/core.py b/src/llama_stack_api/strong_typing/core.py deleted file mode 100644 index 5f3764aeb2..0000000000 --- a/src/llama_stack_api/strong_typing/core.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -""" -Type-safe data interchange for Python data classes. - -:see: https://github.com/hunyadi/strong_typing -""" - -from typing import Union - - -class JsonObject: - "Placeholder type for an unrestricted JSON object." - - -class JsonArray: - "Placeholder type for an unrestricted JSON array." - - -# a JSON type with possible `null` values -JsonType = Union[ - None, - bool, - int, - float, - str, - dict[str, "JsonType"], - list["JsonType"], -] - -# a JSON type that cannot contain `null` values -StrictJsonType = Union[ - bool, - int, - float, - str, - dict[str, "StrictJsonType"], - list["StrictJsonType"], -] - -# a meta-type that captures the object type in a JSON schema -Schema = dict[str, JsonType] diff --git a/src/llama_stack_api/strong_typing/deserializer.py b/src/llama_stack_api/strong_typing/deserializer.py deleted file mode 100644 index 58dfe53a46..0000000000 --- a/src/llama_stack_api/strong_typing/deserializer.py +++ /dev/null @@ -1,872 +0,0 @@ -# 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. - -""" -Type-safe data interchange for Python data classes. - -:see: https://github.com/hunyadi/strong_typing -""" - -import abc -import base64 -import dataclasses -import datetime -import enum -import inspect -import ipaddress -import sys -import typing -import uuid -from collections.abc import Callable -from types import ModuleType -from typing import ( - Any, - Generic, - Literal, - NamedTuple, - Optional, - TypeVar, - Union, -) - -from .core import JsonType -from .exception import JsonKeyError, JsonTypeError, JsonValueError -from .inspection import ( - TypeLike, - create_object, - enum_value_types, - evaluate_type, - get_class_properties, - get_class_property, - get_resolved_hints, - is_dataclass_instance, - is_dataclass_type, - is_named_tuple_type, - is_type_annotated, - is_type_literal, - is_type_optional, - unwrap_annotated_type, - unwrap_literal_values, - unwrap_optional_type, -) -from .mapping import python_field_to_json_property -from .name import python_type_to_str - -E = TypeVar("E", bound=enum.Enum) -T = TypeVar("T") -R = TypeVar("R") -K = TypeVar("K") -V = TypeVar("V") - - -class Deserializer(abc.ABC, Generic[T]): - "Parses a JSON value into a Python type." - - def build(self, context: ModuleType | None) -> None: - """ - Creates auxiliary parsers that this parser is depending on. - - :param context: A module context for evaluating types specified as a string. - """ - - @abc.abstractmethod - def parse(self, data: JsonType) -> T: - """ - Parses a JSON value into a Python type. - - :param data: The JSON value to de-serialize. - :returns: The Python object that the JSON value de-serializes to. - """ - - -class NoneDeserializer(Deserializer[None]): - "Parses JSON `null` values into Python `None`." - - def parse(self, data: JsonType) -> None: - if data is not None: - raise JsonTypeError(f"`None` type expects JSON `null` but instead received: {data}") - return None - - -class BoolDeserializer(Deserializer[bool]): - "Parses JSON `boolean` values into Python `bool` type." - - def parse(self, data: JsonType) -> bool: - if not isinstance(data, bool): - raise JsonTypeError(f"`bool` type expects JSON `boolean` data but instead received: {data}") - return bool(data) - - -class IntDeserializer(Deserializer[int]): - "Parses JSON `number` values into Python `int` type." - - def parse(self, data: JsonType) -> int: - if not isinstance(data, int): - raise JsonTypeError(f"`int` type expects integer data as JSON `number` but instead received: {data}") - return int(data) - - -class FloatDeserializer(Deserializer[float]): - "Parses JSON `number` values into Python `float` type." - - def parse(self, data: JsonType) -> float: - if not isinstance(data, float) and not isinstance(data, int): - raise JsonTypeError(f"`int` type expects data as JSON `number` but instead received: {data}") - return float(data) - - -class StringDeserializer(Deserializer[str]): - "Parses JSON `string` values into Python `str` type." - - def parse(self, data: JsonType) -> str: - if not isinstance(data, str): - raise JsonTypeError(f"`str` type expects JSON `string` data but instead received: {data}") - return str(data) - - -class BytesDeserializer(Deserializer[bytes]): - "Parses JSON `string` values of Base64-encoded strings into Python `bytes` type." - - def parse(self, data: JsonType) -> bytes: - if not isinstance(data, str): - raise JsonTypeError(f"`bytes` type expects JSON `string` data but instead received: {data}") - return base64.b64decode(data, validate=True) - - -class DateTimeDeserializer(Deserializer[datetime.datetime]): - "Parses JSON `string` values representing timestamps in ISO 8601 format to Python `datetime` with time zone." - - def parse(self, data: JsonType) -> datetime.datetime: - if not isinstance(data, str): - raise JsonTypeError(f"`datetime` type expects JSON `string` data but instead received: {data}") - - if data.endswith("Z"): - data = f"{data[:-1]}+00:00" # Python's isoformat() does not support military time zones like "Zulu" for UTC - timestamp = datetime.datetime.fromisoformat(data) - if timestamp.tzinfo is None: - raise JsonValueError(f"timestamp lacks explicit time zone designator: {data}") - return timestamp - - -class DateDeserializer(Deserializer[datetime.date]): - "Parses JSON `string` values representing dates in ISO 8601 format to Python `date` type." - - def parse(self, data: JsonType) -> datetime.date: - if not isinstance(data, str): - raise JsonTypeError(f"`date` type expects JSON `string` data but instead received: {data}") - - return datetime.date.fromisoformat(data) - - -class TimeDeserializer(Deserializer[datetime.time]): - "Parses JSON `string` values representing time instances in ISO 8601 format to Python `time` type with time zone." - - def parse(self, data: JsonType) -> datetime.time: - if not isinstance(data, str): - raise JsonTypeError(f"`time` type expects JSON `string` data but instead received: {data}") - - return datetime.time.fromisoformat(data) - - -class UUIDDeserializer(Deserializer[uuid.UUID]): - "Parses JSON `string` values of UUID strings into Python `uuid.UUID` type." - - def parse(self, data: JsonType) -> uuid.UUID: - if not isinstance(data, str): - raise JsonTypeError(f"`UUID` type expects JSON `string` data but instead received: {data}") - return uuid.UUID(data) - - -class IPv4Deserializer(Deserializer[ipaddress.IPv4Address]): - "Parses JSON `string` values of IPv4 address strings into Python `ipaddress.IPv4Address` type." - - def parse(self, data: JsonType) -> ipaddress.IPv4Address: - if not isinstance(data, str): - raise JsonTypeError(f"`IPv4Address` type expects JSON `string` data but instead received: {data}") - return ipaddress.IPv4Address(data) - - -class IPv6Deserializer(Deserializer[ipaddress.IPv6Address]): - "Parses JSON `string` values of IPv6 address strings into Python `ipaddress.IPv6Address` type." - - def parse(self, data: JsonType) -> ipaddress.IPv6Address: - if not isinstance(data, str): - raise JsonTypeError(f"`IPv6Address` type expects JSON `string` data but instead received: {data}") - return ipaddress.IPv6Address(data) - - -class ListDeserializer(Deserializer[list[T]]): - "Recursively de-serializes a JSON array into a Python `list`." - - item_type: type[T] - item_parser: Deserializer - - def __init__(self, item_type: type[T]) -> None: - self.item_type = item_type - - def build(self, context: ModuleType | None) -> None: - self.item_parser = _get_deserializer(self.item_type, context) - - def parse(self, data: JsonType) -> list[T]: - if not isinstance(data, list): - type_name = python_type_to_str(self.item_type) - raise JsonTypeError(f"type `List[{type_name}]` expects JSON `array` data but instead received: {data}") - - return [self.item_parser.parse(item) for item in data] - - -class DictDeserializer(Deserializer[dict[K, V]]): - "Recursively de-serializes a JSON object into a Python `dict`." - - key_type: type[K] - value_type: type[V] - value_parser: Deserializer[V] - - def __init__(self, key_type: type[K], value_type: type[V]) -> None: - self.key_type = key_type - self.value_type = value_type - self._check_key_type() - - def build(self, context: ModuleType | None) -> None: - self.value_parser = _get_deserializer(self.value_type, context) - - def _check_key_type(self) -> None: - if self.key_type is str: - return - - if issubclass(self.key_type, enum.Enum): - value_types = enum_value_types(self.key_type) - if len(value_types) != 1: - raise JsonTypeError( - f"type `{self.container_type}` has invalid key type, " - f"enumerations must have a consistent member value type but several types found: {value_types}" - ) - value_type = value_types.pop() - if value_type is not str: - f"`type `{self.container_type}` has invalid enumeration key type, expected `enum.Enum` with string values" - return - - raise JsonTypeError( - f"`type `{self.container_type}` has invalid key type, expected `str` or `enum.Enum` with string values" - ) - - @property - def container_type(self) -> str: - key_type_name = python_type_to_str(self.key_type) - value_type_name = python_type_to_str(self.value_type) - return f"Dict[{key_type_name}, {value_type_name}]" - - def parse(self, data: JsonType) -> dict[K, V]: - if not isinstance(data, dict): - raise JsonTypeError( - f"`type `{self.container_type}` expects JSON `object` data but instead received: {data}" - ) - - return dict( - (self.key_type(key), self.value_parser.parse(value)) # type: ignore[call-arg] - for key, value in data.items() - ) - - -class SetDeserializer(Deserializer[set[T]]): - "Recursively de-serializes a JSON list into a Python `set`." - - member_type: type[T] - member_parser: Deserializer - - def __init__(self, member_type: type[T]) -> None: - self.member_type = member_type - - def build(self, context: ModuleType | None) -> None: - self.member_parser = _get_deserializer(self.member_type, context) - - def parse(self, data: JsonType) -> set[T]: - if not isinstance(data, list): - type_name = python_type_to_str(self.member_type) - raise JsonTypeError(f"type `Set[{type_name}]` expects JSON `array` data but instead received: {data}") - - return set(self.member_parser.parse(item) for item in data) - - -class TupleDeserializer(Deserializer[tuple[Any, ...]]): - "Recursively de-serializes a JSON list into a Python `tuple`." - - item_types: tuple[type[Any], ...] - item_parsers: tuple[Deserializer[Any], ...] - - def __init__(self, item_types: tuple[type[Any], ...]) -> None: - self.item_types = item_types - - def build(self, context: ModuleType | None) -> None: - self.item_parsers = tuple(_get_deserializer(item_type, context) for item_type in self.item_types) - - @property - def container_type(self) -> str: - type_names = ", ".join(python_type_to_str(item_type) for item_type in self.item_types) - return f"Tuple[{type_names}]" - - def parse(self, data: JsonType) -> tuple[Any, ...]: - if not isinstance(data, list) or len(data) != len(self.item_parsers): - if not isinstance(data, list): - raise JsonTypeError( - f"type `{self.container_type}` expects JSON `array` data but instead received: {data}" - ) - else: - count = len(self.item_parsers) - raise JsonValueError( - f"type `{self.container_type}` expects a JSON `array` of length {count} but received length {len(data)}" - ) - - return tuple(item_parser.parse(item) for item_parser, item in zip(self.item_parsers, data, strict=False)) - - -class UnionDeserializer(Deserializer): - "De-serializes a JSON value (of any type) into a Python union type." - - member_types: tuple[type, ...] - member_parsers: tuple[Deserializer, ...] - - def __init__(self, member_types: tuple[type, ...]) -> None: - self.member_types = member_types - - def build(self, context: ModuleType | None) -> None: - self.member_parsers = tuple(_get_deserializer(member_type, context) for member_type in self.member_types) - - def parse(self, data: JsonType) -> Any: - for member_parser in self.member_parsers: - # iterate over potential types of discriminated union - try: - return member_parser.parse(data) - except (JsonKeyError, JsonTypeError): - # indicates a required field is missing from JSON dict -OR- the data cannot be cast to the expected type, - # i.e. we don't have the type that we are looking for - continue - - type_names = ", ".join(python_type_to_str(member_type) for member_type in self.member_types) - raise JsonKeyError(f"type `Union[{type_names}]` could not be instantiated from: {data}") - - -def get_literal_properties(typ: type) -> set[str]: - "Returns the names of all properties in a class that are of a literal type." - - return set( - property_name for property_name, property_type in get_class_properties(typ) if is_type_literal(property_type) - ) - - -def get_discriminating_properties(types: tuple[type, ...]) -> set[str]: - "Returns a set of properties with literal type that are common across all specified classes." - - if not types or not all(isinstance(typ, type) for typ in types): - return set() - - props = get_literal_properties(types[0]) - for typ in types[1:]: - props = props & get_literal_properties(typ) - - return props - - -class TaggedUnionDeserializer(Deserializer): - "De-serializes a JSON value with one or more disambiguating properties into a Python union type." - - member_types: tuple[type, ...] - disambiguating_properties: set[str] - member_parsers: dict[tuple[str, Any], Deserializer] - - def __init__(self, member_types: tuple[type, ...]) -> None: - self.member_types = member_types - self.disambiguating_properties = get_discriminating_properties(member_types) - - def build(self, context: ModuleType | None) -> None: - self.member_parsers = {} - for member_type in self.member_types: - for property_name in self.disambiguating_properties: - literal_type = get_class_property(member_type, property_name) - if not literal_type: - continue - - for literal_value in unwrap_literal_values(literal_type): - tpl = (property_name, literal_value) - if tpl in self.member_parsers: - raise JsonTypeError( - f"disambiguating property `{property_name}` in type `{self.union_type}` has a duplicate value: {literal_value}" - ) - - self.member_parsers[tpl] = _get_deserializer(member_type, context) - - @property - def union_type(self) -> str: - type_names = ", ".join(python_type_to_str(member_type) for member_type in self.member_types) - return f"Union[{type_names}]" - - def parse(self, data: JsonType) -> Any: - if not isinstance(data, dict): - raise JsonTypeError( - f"tagged union type `{self.union_type}` expects JSON `object` data but instead received: {data}" - ) - - for property_name in self.disambiguating_properties: - disambiguating_value = data.get(property_name) - if disambiguating_value is None: - continue - - member_parser = self.member_parsers.get((property_name, disambiguating_value)) - if member_parser is None: - raise JsonTypeError( - f"disambiguating property value is invalid for tagged union type `{self.union_type}`: {data}" - ) - - return member_parser.parse(data) - - raise JsonTypeError( - f"disambiguating property value is missing for tagged union type `{self.union_type}`: {data}" - ) - - -class LiteralDeserializer(Deserializer): - "De-serializes a JSON value into a Python literal type." - - values: tuple[Any, ...] - parser: Deserializer - - def __init__(self, values: tuple[Any, ...]) -> None: - self.values = values - - def build(self, context: ModuleType | None) -> None: - literal_type_tuple = tuple(type(value) for value in self.values) - literal_type_set = set(literal_type_tuple) - if len(literal_type_set) != 1: - value_names = ", ".join(repr(value) for value in self.values) - raise TypeError( - f"type `Literal[{value_names}]` expects consistent literal value types but got: {literal_type_tuple}" - ) - - literal_type = literal_type_set.pop() - self.parser = _get_deserializer(literal_type, context) - - def parse(self, data: JsonType) -> Any: - value = self.parser.parse(data) - if value not in self.values: - value_names = ", ".join(repr(value) for value in self.values) - raise JsonTypeError(f"type `Literal[{value_names}]` could not be instantiated from: {data}") - return value - - -class EnumDeserializer(Deserializer[E]): - "Returns an enumeration instance based on the enumeration value read from a JSON value." - - enum_type: type[E] - - def __init__(self, enum_type: type[E]) -> None: - self.enum_type = enum_type - - def parse(self, data: JsonType) -> E: - return self.enum_type(data) - - -class CustomDeserializer(Deserializer[T]): - "Uses the `from_json` class method in class to de-serialize the object from JSON." - - converter: Callable[[JsonType], T] - - def __init__(self, converter: Callable[[JsonType], T]) -> None: - self.converter = converter - - def parse(self, data: JsonType) -> T: - return self.converter(data) - - -class FieldDeserializer(abc.ABC, Generic[T, R]): - """ - Deserializes a JSON property into a Python object field. - - :param property_name: The name of the JSON property to read from a JSON `object`. - :param field_name: The name of the field in a Python class to write data to. - :param parser: A compatible deserializer that can handle the field's type. - """ - - property_name: str - field_name: str - parser: Deserializer[T] - - def __init__(self, property_name: str, field_name: str, parser: Deserializer[T]) -> None: - self.property_name = property_name - self.field_name = field_name - self.parser = parser - - @abc.abstractmethod - def parse_field(self, data: dict[str, JsonType]) -> R: ... - - -class RequiredFieldDeserializer(FieldDeserializer[T, T]): - "Deserializes a JSON property into a mandatory Python object field." - - def parse_field(self, data: dict[str, JsonType]) -> T: - if self.property_name not in data: - raise JsonKeyError(f"missing required property `{self.property_name}` from JSON object: {data}") - - return self.parser.parse(data[self.property_name]) - - -class OptionalFieldDeserializer(FieldDeserializer[T, Optional[T]]): - "Deserializes a JSON property into an optional Python object field with a default value of `None`." - - def parse_field(self, data: dict[str, JsonType]) -> T | None: - value = data.get(self.property_name) - if value is not None: - return self.parser.parse(value) - else: - return None - - -class DefaultFieldDeserializer(FieldDeserializer[T, T]): - "Deserializes a JSON property into a Python object field with an explicit default value." - - default_value: T - - def __init__( - self, - property_name: str, - field_name: str, - parser: Deserializer, - default_value: T, - ) -> None: - super().__init__(property_name, field_name, parser) - self.default_value = default_value - - def parse_field(self, data: dict[str, JsonType]) -> T: - value = data.get(self.property_name) - if value is not None: - return self.parser.parse(value) - else: - return self.default_value - - -class DefaultFactoryFieldDeserializer(FieldDeserializer[T, T]): - "Deserializes a JSON property into an optional Python object field with an explicit default value factory." - - default_factory: Callable[[], T] - - def __init__( - self, - property_name: str, - field_name: str, - parser: Deserializer[T], - default_factory: Callable[[], T], - ) -> None: - super().__init__(property_name, field_name, parser) - self.default_factory = default_factory - - def parse_field(self, data: dict[str, JsonType]) -> T: - value = data.get(self.property_name) - if value is not None: - return self.parser.parse(value) - else: - return self.default_factory() - - -class ClassDeserializer(Deserializer[T]): - "Base class for de-serializing class-like types such as data classes, named tuples and regular classes." - - class_type: type - property_parsers: list[FieldDeserializer] - property_fields: set[str] - - def __init__(self, class_type: type[T]) -> None: - self.class_type = class_type - - def assign(self, property_parsers: list[FieldDeserializer]) -> None: - self.property_parsers = property_parsers - self.property_fields = set(property_parser.property_name for property_parser in property_parsers) - - def parse(self, data: JsonType) -> T: - if not isinstance(data, dict): - type_name = python_type_to_str(self.class_type) - raise JsonTypeError(f"`type `{type_name}` expects JSON `object` data but instead received: {data}") - - object_data: dict[str, JsonType] = typing.cast(dict[str, JsonType], data) - - field_values = {} - for property_parser in self.property_parsers: - field_values[property_parser.field_name] = property_parser.parse_field(object_data) - - if not self.property_fields.issuperset(object_data): - unassigned_names = [name for name in object_data if name not in self.property_fields] - raise JsonKeyError(f"unrecognized fields in JSON object: {unassigned_names}") - - return self.create(**field_values) - - def create(self, **field_values: Any) -> T: - "Instantiates an object with a collection of property values." - - obj: T = create_object(self.class_type) - - # use `setattr` on newly created object instance - for field_name, field_value in field_values.items(): - setattr(obj, field_name, field_value) - return obj - - -class NamedTupleDeserializer(ClassDeserializer[NamedTuple]): - "De-serializes a named tuple from a JSON `object`." - - def build(self, context: ModuleType | None) -> None: - property_parsers: list[FieldDeserializer] = [ - RequiredFieldDeserializer(field_name, field_name, _get_deserializer(field_type, context)) - for field_name, field_type in get_resolved_hints(self.class_type).items() - ] - super().assign(property_parsers) - - def create(self, **field_values: Any) -> NamedTuple: - # mypy fails to deduce that this class returns NamedTuples only, hence the `ignore` directive - return self.class_type(**field_values) # type: ignore[no-any-return] - - -class DataclassDeserializer(ClassDeserializer[T]): - "De-serializes a data class from a JSON `object`." - - def __init__(self, class_type: type[T]) -> None: - if not dataclasses.is_dataclass(class_type): - raise TypeError("expected: data-class type") - super().__init__(class_type) # type: ignore[arg-type] - - def build(self, context: ModuleType | None) -> None: - property_parsers: list[FieldDeserializer] = [] - resolved_hints = get_resolved_hints(self.class_type) - for field in dataclasses.fields(self.class_type): - field_type = resolved_hints[field.name] - property_name = python_field_to_json_property(field.name, field_type) - - is_optional = is_type_optional(field_type) - has_default = field.default is not dataclasses.MISSING - has_default_factory = field.default_factory is not dataclasses.MISSING - - if is_optional: - required_type: type[T] = unwrap_optional_type(field_type) - else: - required_type = field_type - - parser = _get_deserializer(required_type, context) - - if has_default: - field_parser: FieldDeserializer = DefaultFieldDeserializer( - property_name, field.name, parser, field.default - ) - elif has_default_factory: - default_factory = typing.cast(Callable[[], Any], field.default_factory) - field_parser = DefaultFactoryFieldDeserializer(property_name, field.name, parser, default_factory) - elif is_optional: - field_parser = OptionalFieldDeserializer(property_name, field.name, parser) - else: - field_parser = RequiredFieldDeserializer(property_name, field.name, parser) - - property_parsers.append(field_parser) - - super().assign(property_parsers) - - -class FrozenDataclassDeserializer(DataclassDeserializer[T]): - "De-serializes a frozen data class from a JSON `object`." - - def create(self, **field_values: Any) -> T: - "Instantiates an object with a collection of property values." - - # create object instance without calling `__init__` - obj: T = create_object(self.class_type) - - # can't use `setattr` on frozen dataclasses, pass member variable values to `__init__` - obj.__init__(**field_values) # type: ignore - return obj - - -class TypedClassDeserializer(ClassDeserializer[T]): - "De-serializes a class with type annotations from a JSON `object` by iterating over class properties." - - def build(self, context: ModuleType | None) -> None: - property_parsers: list[FieldDeserializer] = [] - for field_name, field_type in get_resolved_hints(self.class_type).items(): - property_name = python_field_to_json_property(field_name, field_type) - - is_optional = is_type_optional(field_type) - - if is_optional: - required_type: type[T] = unwrap_optional_type(field_type) - else: - required_type = field_type - - parser = _get_deserializer(required_type, context) - - if is_optional: - field_parser: FieldDeserializer = OptionalFieldDeserializer(property_name, field_name, parser) - else: - field_parser = RequiredFieldDeserializer(property_name, field_name, parser) - - property_parsers.append(field_parser) - - super().assign(property_parsers) - - -def create_deserializer(typ: TypeLike, context: ModuleType | None = None) -> Deserializer: - """ - Creates a de-serializer engine to produce a Python object from an object obtained from a JSON string. - - When de-serializing a JSON object into a Python object, the following transformations are applied: - - * Fundamental types are parsed as `bool`, `int`, `float` or `str`. - * Date and time types are parsed from the ISO 8601 format with time zone into the corresponding Python type - `datetime`, `date` or `time`. - * Byte arrays are read from a string with Base64 encoding into a `bytes` instance. - * UUIDs are extracted from a UUID string compliant with RFC 4122 into a `uuid.UUID` instance. - * Enumerations are instantiated with a lookup on enumeration value. - * Containers (e.g. `list`, `dict`, `set`, `tuple`) are parsed recursively. - * Complex objects with properties (including data class types) are populated from dictionaries of key-value pairs - using reflection (enumerating type annotations). - - :raises TypeError: A de-serializer engine cannot be constructed for the input type. - """ - - if context is None: - if isinstance(typ, type): - context = sys.modules[typ.__module__] - - return _get_deserializer(typ, context) - - -_CACHE: dict[tuple[str, str], Deserializer] = {} - - -def _get_deserializer(typ: TypeLike, context: ModuleType | None) -> Deserializer: - "Creates or re-uses a de-serializer engine to parse an object obtained from a JSON string." - - cache_key = None - - if isinstance(typ, (str, typing.ForwardRef)): - if context is None: - raise TypeError(f"missing context for evaluating type: {typ}") - - if isinstance(typ, str): - if hasattr(context, typ): - cache_key = (context.__name__, typ) - elif isinstance(typ, typing.ForwardRef): - if hasattr(context, typ.__forward_arg__): - cache_key = (context.__name__, typ.__forward_arg__) - - typ = evaluate_type(typ, context) - - typ = unwrap_annotated_type(typ) if is_type_annotated(typ) else typ - - if isinstance(typ, type) and typing.get_origin(typ) is None: - cache_key = (typ.__module__, typ.__name__) - - if cache_key is not None: - deserializer = _CACHE.get(cache_key) - if deserializer is None: - deserializer = _create_deserializer(typ) - - # store de-serializer immediately in cache to avoid stack overflow for recursive types - _CACHE[cache_key] = deserializer - - if isinstance(typ, type): - # use type's own module as context for evaluating member types - context = sys.modules[typ.__module__] - - # create any de-serializers this de-serializer is depending on - deserializer.build(context) - else: - # special forms are not always hashable, create a new de-serializer every time - deserializer = _create_deserializer(typ) - deserializer.build(context) - - return deserializer - - -def _create_deserializer(typ: TypeLike) -> Deserializer: - "Creates a de-serializer engine to parse an object obtained from a JSON string." - - # check for well-known types - if typ is type(None): - return NoneDeserializer() - elif typ is bool: - return BoolDeserializer() - elif typ is int: - return IntDeserializer() - elif typ is float: - return FloatDeserializer() - elif typ is str: - return StringDeserializer() - elif typ is bytes: - return BytesDeserializer() - elif typ is datetime.datetime: - return DateTimeDeserializer() - elif typ is datetime.date: - return DateDeserializer() - elif typ is datetime.time: - return TimeDeserializer() - elif typ is uuid.UUID: - return UUIDDeserializer() - elif typ is ipaddress.IPv4Address: - return IPv4Deserializer() - elif typ is ipaddress.IPv6Address: - return IPv6Deserializer() - - # dynamically-typed collection types - if typ is list: - raise TypeError("explicit item type required: use `List[T]` instead of `list`") - if typ is dict: - raise TypeError("explicit key and value types required: use `Dict[K, V]` instead of `dict`") - if typ is set: - raise TypeError("explicit member type required: use `Set[T]` instead of `set`") - if typ is tuple: - raise TypeError("explicit item type list required: use `Tuple[T, ...]` instead of `tuple`") - - # generic types (e.g. list, dict, set, etc.) - origin_type = typing.get_origin(typ) - if origin_type is list: - (list_item_type,) = typing.get_args(typ) # unpack single tuple element - return ListDeserializer(list_item_type) - elif origin_type is dict: - key_type, value_type = typing.get_args(typ) - return DictDeserializer(key_type, value_type) - elif origin_type is set: - (set_member_type,) = typing.get_args(typ) # unpack single tuple element - return SetDeserializer(set_member_type) - elif origin_type is tuple: - return TupleDeserializer(typing.get_args(typ)) - elif origin_type is Union: - union_args = typing.get_args(typ) - if get_discriminating_properties(union_args): - return TaggedUnionDeserializer(union_args) - else: - return UnionDeserializer(union_args) - elif origin_type is Literal: - return LiteralDeserializer(typing.get_args(typ)) - - if not inspect.isclass(typ): - if is_dataclass_instance(typ): - raise TypeError(f"dataclass type expected but got instance: {typ}") - else: - raise TypeError(f"unable to de-serialize unrecognized type: {typ}") - - if issubclass(typ, enum.Enum): - return EnumDeserializer(typ) - - if is_named_tuple_type(typ): - return NamedTupleDeserializer(typ) - - # check if object has custom serialization method - convert_func = getattr(typ, "from_json", None) - if callable(convert_func): - return CustomDeserializer(convert_func) - - if is_dataclass_type(typ): - dataclass_params = getattr(typ, "__dataclass_params__", None) - if dataclass_params is not None and dataclass_params.frozen: - return FrozenDataclassDeserializer(typ) - else: - return DataclassDeserializer(typ) - - return TypedClassDeserializer(typ) diff --git a/src/llama_stack_api/strong_typing/docstring.py b/src/llama_stack_api/strong_typing/docstring.py deleted file mode 100644 index 4c9ea49e50..0000000000 --- a/src/llama_stack_api/strong_typing/docstring.py +++ /dev/null @@ -1,410 +0,0 @@ -# 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. - -""" -Type-safe data interchange for Python data classes. - -:see: https://github.com/hunyadi/strong_typing -""" - -import builtins -import collections.abc -import dataclasses -import inspect -import re -import sys -import types -import typing -from collections.abc import Callable -from dataclasses import dataclass -from io import StringIO -from typing import Any, Protocol, TypeVar - -if sys.version_info >= (3, 10): - from typing import TypeGuard -else: - from typing import TypeGuard - -from .inspection import ( - DataclassInstance, - get_class_properties, - get_signature, - is_dataclass_type, - is_type_enum, -) - -T = TypeVar("T") - - -@dataclass -class DocstringParam: - """ - A parameter declaration in a parameter block. - - :param name: The name of the parameter. - :param description: The description text for the parameter. - """ - - name: str - description: str - param_type: type | str = inspect.Signature.empty - - def __str__(self) -> str: - return f":param {self.name}: {self.description}" - - -@dataclass -class DocstringReturns: - """ - A `returns` declaration extracted from a docstring. - - :param description: The description text for the return value. - """ - - description: str - return_type: type = inspect.Signature.empty - - def __str__(self) -> str: - return f":returns: {self.description}" - - -@dataclass -class DocstringRaises: - """ - A `raises` declaration extracted from a docstring. - - :param typename: The type name of the exception raised. - :param description: The description associated with the exception raised. - """ - - typename: str - description: str - raise_type: type = inspect.Signature.empty - - def __str__(self) -> str: - return f":raises {self.typename}: {self.description}" - - -@dataclass -class Docstring: - """ - Represents the documentation string (a.k.a. docstring) for a type such as a (data) class or function. - - A docstring is broken down into the following components: - * A short description, which is the first block of text in the documentation string, and ends with a double - newline or a parameter block. - * A long description, which is the optional block of text following the short description, and ends with - a parameter block. - * A parameter block of named parameter and description string pairs in ReST-style. - * A `returns` declaration, which adds explanation to the return value. - * A `raises` declaration, which adds explanation to the exception type raised by the function on error. - - When the docstring is attached to a data class, it is understood as the documentation string of the class - `__init__` method. - - :param short_description: The short description text parsed from a docstring. - :param long_description: The long description text parsed from a docstring. - :param params: The parameter block extracted from a docstring. - :param returns: The returns declaration extracted from a docstring. - """ - - short_description: str | None = None - long_description: str | None = None - params: dict[str, DocstringParam] = dataclasses.field(default_factory=dict) - returns: DocstringReturns | None = None - raises: dict[str, DocstringRaises] = dataclasses.field(default_factory=dict) - - @property - def full_description(self) -> str | None: - if self.short_description and self.long_description: - return f"{self.short_description}\n\n{self.long_description}" - elif self.short_description: - return self.short_description - else: - return None - - def __str__(self) -> str: - output = StringIO() - - has_description = self.short_description or self.long_description - has_blocks = self.params or self.returns or self.raises - - if has_description: - if self.short_description and self.long_description: - output.write(self.short_description) - output.write("\n\n") - output.write(self.long_description) - elif self.short_description: - output.write(self.short_description) - - if has_blocks: - if has_description: - output.write("\n") - - for param in self.params.values(): - output.write("\n") - output.write(str(param)) - if self.returns: - output.write("\n") - output.write(str(self.returns)) - for raises in self.raises.values(): - output.write("\n") - output.write(str(raises)) - - s = output.getvalue() - output.close() - return s - - -def is_exception(member: object) -> TypeGuard[type[BaseException]]: - return isinstance(member, type) and issubclass(member, BaseException) - - -def get_exceptions(module: types.ModuleType) -> dict[str, type[BaseException]]: - "Returns all exception classes declared in a module." - - return {name: class_type for name, class_type in inspect.getmembers(module, is_exception)} - - -class SupportsDoc(Protocol): - __doc__: str | None - - -def _maybe_unwrap_async_iterator(t): - origin_type = typing.get_origin(t) - if origin_type is collections.abc.AsyncIterator: - return typing.get_args(t)[0] - return t - - -def parse_type(typ: SupportsDoc) -> Docstring: - """ - Parse the docstring of a type into its components. - - :param typ: The type whose documentation string to parse. - :returns: Components of the documentation string. - """ - # Use docstring from the iterator origin type for streaming apis - typ = _maybe_unwrap_async_iterator(typ) - - doc = get_docstring(typ) - if doc is None: - return Docstring() - - docstring = parse_text(doc) - check_docstring(typ, docstring) - - # assign parameter and return types - if is_dataclass_type(typ): - properties = dict(get_class_properties(typing.cast(type, typ))) - - for name, param in docstring.params.items(): - param.param_type = properties[name] - - elif inspect.isfunction(typ): - signature = get_signature(typ) - for name, param in docstring.params.items(): - param.param_type = signature.parameters[name].annotation - if docstring.returns: - docstring.returns.return_type = signature.return_annotation - - # assign exception types - defining_module = inspect.getmodule(typ) - if defining_module: - context: dict[str, type] = {} - context.update(get_exceptions(builtins)) - context.update(get_exceptions(defining_module)) - for exc_name, exc in docstring.raises.items(): - raise_type = context.get(exc_name) - if raise_type is None: - type_name = getattr(typ, "__qualname__", None) or getattr(typ, "__name__", None) or None - raise TypeError( - f"doc-string exception type `{exc_name}` is not an exception defined in the context of `{type_name}`" - ) - - exc.raise_type = raise_type - - return docstring - - -def parse_text(text: str) -> Docstring: - """ - Parse a ReST-style docstring into its components. - - :param text: The documentation string to parse, typically acquired as `type.__doc__`. - :returns: Components of the documentation string. - """ - - if not text: - return Docstring() - - # find block that starts object metadata block (e.g. `:param p:` or `:returns:`) - text = inspect.cleandoc(text) - match = re.search("^:", text, flags=re.MULTILINE) - if match: - desc_chunk = text[: match.start()] - meta_chunk = text[match.start() :] # noqa: E203 - else: - desc_chunk = text - meta_chunk = "" - - # split description text into short and long description - parts = desc_chunk.split("\n\n", 1) - - # ensure short description has no newlines - short_description = parts[0].strip().replace("\n", " ") or None - - # ensure long description preserves its structure (e.g. preformatted text) - if len(parts) > 1: - long_description = parts[1].strip() or None - else: - long_description = None - - params: dict[str, DocstringParam] = {} - raises: dict[str, DocstringRaises] = {} - returns = None - for match in re.finditer(r"(^:.*?)(?=^:|\Z)", meta_chunk, flags=re.DOTALL | re.MULTILINE): - chunk = match.group(0) - if not chunk: - continue - - args_chunk, desc_chunk = chunk.lstrip(":").split(":", 1) - args = args_chunk.split() - desc = re.sub(r"\s+", " ", desc_chunk.strip()) - - if len(args) > 0: - kw = args[0] - if len(args) == 2: - if kw == "param": - params[args[1]] = DocstringParam( - name=args[1], - description=desc, - ) - elif kw == "raise" or kw == "raises": - raises[args[1]] = DocstringRaises( - typename=args[1], - description=desc, - ) - - elif len(args) == 1: - if kw == "return" or kw == "returns": - returns = DocstringReturns(description=desc) - - return Docstring( - long_description=long_description, - short_description=short_description, - params=params, - returns=returns, - raises=raises, - ) - - -def has_default_docstring(typ: SupportsDoc) -> bool: - "Check if class has the auto-generated string assigned by @dataclass." - - if not isinstance(typ, type): - return False - - if is_dataclass_type(typ): - return typ.__doc__ is not None and re.match(f"^{re.escape(typ.__name__)}[(].*[)]$", typ.__doc__) is not None - - if is_type_enum(typ): - return typ.__doc__ is not None and typ.__doc__ == "An enumeration." - - return False - - -def has_docstring(typ: SupportsDoc) -> bool: - "Check if class has a documentation string other than the auto-generated string assigned by @dataclass." - - if has_default_docstring(typ): - return False - - return bool(typ.__doc__) - - -def get_docstring(typ: SupportsDoc) -> str | None: - if typ.__doc__ is None: - return None - - if has_default_docstring(typ): - return None - - return typ.__doc__ - - -def check_docstring(typ: SupportsDoc, docstring: Docstring, strict: bool = False) -> None: - """ - Verifies the doc-string of a type. - - :raises TypeError: Raised on a mismatch between doc-string parameters, and function or type signature. - """ - - if is_dataclass_type(typ): - check_dataclass_docstring(typ, docstring, strict) - elif inspect.isfunction(typ): - check_function_docstring(typ, docstring, strict) - - -def check_dataclass_docstring(typ: type[DataclassInstance], docstring: Docstring, strict: bool = False) -> None: - """ - Verifies the doc-string of a data-class type. - - :param strict: Whether to check if all data-class members have doc-strings. - :raises TypeError: Raised on a mismatch between doc-string parameters and data-class members. - """ - - if not is_dataclass_type(typ): - raise TypeError("not a data-class type") - - properties = dict(get_class_properties(typ)) - class_name = typ.__name__ - - for name in docstring.params: - if name not in properties: - raise TypeError(f"doc-string parameter `{name}` is not a member of the data-class `{class_name}`") - - if not strict: - return - - for name in properties: - if name not in docstring.params: - raise TypeError(f"member `{name}` in data-class `{class_name}` is missing its doc-string") - - -def check_function_docstring(fn: Callable[..., Any], docstring: Docstring, strict: bool = False) -> None: - """ - Verifies the doc-string of a function or member function. - - :param strict: Whether to check if all function parameters and the return type have doc-strings. - :raises TypeError: Raised on a mismatch between doc-string parameters and function signature. - """ - - signature = get_signature(fn) - func_name = fn.__qualname__ - - for name in docstring.params: - if name not in signature.parameters: - raise TypeError(f"doc-string parameter `{name}` is absent from signature of function `{func_name}`") - - if docstring.returns is not None and signature.return_annotation is inspect.Signature.empty: - raise TypeError(f"doc-string has returns description in function `{func_name}` with no return type annotation") - - if not strict: - return - - for name, param in signature.parameters.items(): - # ignore `self` in member function signatures - if name == "self" and ( - param.kind is inspect.Parameter.POSITIONAL_ONLY or param.kind is inspect.Parameter.POSITIONAL_OR_KEYWORD - ): - continue - - if name not in docstring.params: - raise TypeError(f"function parameter `{name}` in `{func_name}` is missing its doc-string") - - if signature.return_annotation is not inspect.Signature.empty and docstring.returns is None: - raise TypeError(f"function `{func_name}` has no returns description in its doc-string") diff --git a/src/llama_stack_api/strong_typing/exception.py b/src/llama_stack_api/strong_typing/exception.py deleted file mode 100644 index af037cc3c8..0000000000 --- a/src/llama_stack_api/strong_typing/exception.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. - -""" -Type-safe data interchange for Python data classes. - -:see: https://github.com/hunyadi/strong_typing -""" - - -class JsonKeyError(Exception): - "Raised when deserialization for a class or union type has failed because a matching member was not found." - - -class JsonValueError(Exception): - "Raised when (de)serialization of data has failed due to invalid value." - - -class JsonTypeError(Exception): - "Raised when deserialization of data has failed due to a type mismatch." diff --git a/src/llama_stack_api/strong_typing/inspection.py b/src/llama_stack_api/strong_typing/inspection.py deleted file mode 100644 index 319d126577..0000000000 --- a/src/llama_stack_api/strong_typing/inspection.py +++ /dev/null @@ -1,1104 +0,0 @@ -# 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. - -""" -Type-safe data interchange for Python data classes. - -:see: https://github.com/hunyadi/strong_typing -""" - -import dataclasses -import datetime -import enum -import importlib -import importlib.machinery -import importlib.util -import inspect -import re -import sys -import types -import typing -import uuid -from collections.abc import Callable, Iterable -from typing import ( - Any, - Literal, - NamedTuple, - Protocol, - TypeVar, - Union, - runtime_checkable, -) - -if sys.version_info >= (3, 9): - from typing import Annotated -else: - from typing import Annotated - -if sys.version_info >= (3, 10): - from typing import TypeGuard -else: - from typing import TypeGuard - - -from pydantic import BaseModel -from pydantic.fields import FieldInfo - -S = TypeVar("S") -T = TypeVar("T") -K = TypeVar("K") -V = TypeVar("V") - - -def _is_type_like(data_type: object) -> bool: - """ - Checks if the object is a type or type-like object (e.g. generic type). - - :param data_type: The object to validate. - :returns: True if the object is a type or type-like object. - """ - - if isinstance(data_type, type): - # a standard type - return True - elif typing.get_origin(data_type) is not None: - # a generic type such as `list`, `dict` or `set` - return True - elif hasattr(data_type, "__forward_arg__"): - # an instance of `ForwardRef` - return True - elif data_type is Any: - # the special form `Any` - return True - else: - return False - - -if sys.version_info >= (3, 9): - TypeLike = Union[type, types.GenericAlias, typing.ForwardRef, Any] - - def is_type_like( - data_type: object, - ) -> TypeGuard[TypeLike]: - """ - Checks if the object is a type or type-like object (e.g. generic type). - - :param data_type: The object to validate. - :returns: True if the object is a type or type-like object. - """ - - return _is_type_like(data_type) - -else: - TypeLike = object - - def is_type_like( - data_type: object, - ) -> bool: - return _is_type_like(data_type) - - -def evaluate_member_type(typ: Any, cls: type) -> Any: - """ - Evaluates a forward reference type in a dataclass member. - - :param typ: The dataclass member type to convert. - :param cls: The dataclass in which the member is defined. - :returns: The evaluated type. - """ - - return evaluate_type(typ, sys.modules[cls.__module__]) - - -def evaluate_type(typ: Any, module: types.ModuleType) -> Any: - """ - Evaluates a forward reference type. - - :param typ: The type to convert, typically a dataclass member type. - :param module: The context for the type, i.e. the module in which the member is defined. - :returns: The evaluated type. - """ - - if isinstance(typ, str): - # evaluate data-class field whose type annotation is a string - return eval(typ, module.__dict__, locals()) - if isinstance(typ, typing.ForwardRef): - if sys.version_info >= (3, 9): - return typ._evaluate(module.__dict__, locals(), recursive_guard=frozenset()) - else: - return typ._evaluate(module.__dict__, locals()) - else: - return typ - - -@runtime_checkable -class DataclassInstance(Protocol): - __dataclass_fields__: typing.ClassVar[dict[str, dataclasses.Field]] - - -def is_dataclass_type(typ: Any) -> TypeGuard[type[DataclassInstance]]: - "True if the argument corresponds to a data class type (but not an instance)." - - typ = unwrap_annotated_type(typ) - return isinstance(typ, type) and dataclasses.is_dataclass(typ) - - -def is_dataclass_instance(obj: Any) -> TypeGuard[DataclassInstance]: - "True if the argument corresponds to a data class instance (but not a type)." - - return not isinstance(obj, type) and dataclasses.is_dataclass(obj) - - -@dataclasses.dataclass -class DataclassField: - name: str - type: Any - default: Any - - def __init__(self, name: str, type: Any, default: Any = dataclasses.MISSING) -> None: - self.name = name - self.type = type - self.default = default - - -def dataclass_fields(cls: type[DataclassInstance]) -> Iterable[DataclassField]: - "Generates the fields of a data-class resolving forward references." - - for field in dataclasses.fields(cls): - yield DataclassField(field.name, evaluate_member_type(field.type, cls), field.default) - - -def dataclass_field_by_name(cls: type[DataclassInstance], name: str) -> DataclassField: - "Looks up a field in a data-class by its field name." - - for field in dataclasses.fields(cls): - if field.name == name: - return DataclassField(field.name, evaluate_member_type(field.type, cls)) - - raise LookupError(f"field `{name}` missing from class `{cls.__name__}`") - - -def is_named_tuple_instance(obj: Any) -> TypeGuard[NamedTuple]: - "True if the argument corresponds to a named tuple instance." - - return is_named_tuple_type(type(obj)) - - -def is_named_tuple_type(typ: Any) -> TypeGuard[type[NamedTuple]]: - """ - True if the argument corresponds to a named tuple type. - - Calling the function `collections.namedtuple` gives a new type that is a subclass of `tuple` (and no other classes) - with a member named `_fields` that is a tuple whose items are all strings. - """ - - if not isinstance(typ, type): - return False - - typ = unwrap_annotated_type(typ) - - b = getattr(typ, "__bases__", None) - if b is None: - return False - - if len(b) != 1 or b[0] != tuple: - return False - - f = getattr(typ, "_fields", None) - if not isinstance(f, tuple): - return False - - return all(isinstance(n, str) for n in f) - - -if sys.version_info >= (3, 11): - - def is_type_enum(typ: object) -> TypeGuard[type[enum.Enum]]: - "True if the specified type is an enumeration type." - - typ = unwrap_annotated_type(typ) - return isinstance(typ, enum.EnumType) - -else: - - def is_type_enum(typ: object) -> TypeGuard[type[enum.Enum]]: - "True if the specified type is an enumeration type." - - typ = unwrap_annotated_type(typ) - - # use an explicit isinstance(..., type) check to filter out special forms like generics - return isinstance(typ, type) and issubclass(typ, enum.Enum) - - -def enum_value_types(enum_type: type[enum.Enum]) -> list[type]: - """ - Returns all unique value types of the `enum.Enum` type in definition order. - """ - - # filter unique enumeration value types by keeping definition order - return list(dict.fromkeys(type(e.value) for e in enum_type)) - - -def extend_enum( - source: type[enum.Enum], -) -> Callable[[type[enum.Enum]], type[enum.Enum]]: - """ - Creates a new enumeration type extending the set of values in an existing type. - - :param source: The existing enumeration type to be extended with new values. - :returns: A new enumeration type with the extended set of values. - """ - - def wrap(extend: type[enum.Enum]) -> type[enum.Enum]: - # create new enumeration type combining the values from both types - values: dict[str, Any] = {} - values.update((e.name, e.value) for e in source) - values.update((e.name, e.value) for e in extend) - # mypy fails to determine that __name__ is always a string; hence the `ignore` directive. - enum_class: type[enum.Enum] = enum.Enum(extend.__name__, values) # type: ignore[misc] - - # assign the newly created type to the same module where the extending class is defined - enum_class.__module__ = extend.__module__ - enum_class.__doc__ = extend.__doc__ - setattr(sys.modules[extend.__module__], extend.__name__, enum_class) - - return enum.unique(enum_class) - - return wrap - - -if sys.version_info >= (3, 10): - - def _is_union_like(typ: object) -> bool: - "True if type is a union such as `Union[T1, T2, ...]` or a union type `T1 | T2`." - - return typing.get_origin(typ) is Union or isinstance(typ, types.UnionType) - -else: - - def _is_union_like(typ: object) -> bool: - "True if type is a union such as `Union[T1, T2, ...]` or a union type `T1 | T2`." - - return typing.get_origin(typ) is Union - - -def is_type_optional(typ: object, strict: bool = False) -> TypeGuard[type[Any | None]]: - """ - True if the type annotation corresponds to an optional type (e.g. `Optional[T]` or `Union[T1,T2,None]`). - - `Optional[T]` is represented as `Union[T, None]` is classic style, and is equivalent to `T | None` in new style. - - :param strict: True if only `Optional[T]` qualifies as an optional type but `Union[T1, T2, None]` does not. - """ - - typ = unwrap_annotated_type(typ) - - if _is_union_like(typ): - args = typing.get_args(typ) - if strict and len(args) != 2: - return False - - return type(None) in args - - return False - - -def unwrap_optional_type(typ: type[T | None]) -> type[T]: - """ - Extracts the inner type of an optional type. - - :param typ: The optional type `Optional[T]`. - :returns: The inner type `T`. - """ - - return rewrap_annotated_type(_unwrap_optional_type, typ) - - -def _unwrap_optional_type(typ: type[T | None]) -> type[T]: - "Extracts the type qualified as optional (e.g. returns `T` for `Optional[T]`)." - - # Optional[T] is represented internally as Union[T, None] - if not _is_union_like(typ): - raise TypeError("optional type must have un-subscripted type of Union") - - # will automatically unwrap Union[T] into T - return Union[tuple(filter(lambda item: item is not type(None), typing.get_args(typ)))] # type: ignore[return-value] - - -def is_type_union(typ: object) -> bool: - "True if the type annotation corresponds to a union type (e.g. `Union[T1,T2,T3]`)." - - typ = unwrap_annotated_type(typ) - if _is_union_like(typ): - args = typing.get_args(typ) - return len(args) > 2 or type(None) not in args - - return False - - -def unwrap_union_types(typ: object) -> tuple[object, ...]: - """ - Extracts the inner types of a union type. - - :param typ: The union type `Union[T1, T2, ...]`. - :returns: The inner types `T1`, `T2`, etc. - """ - - typ = unwrap_annotated_type(typ) - return _unwrap_union_types(typ) - - -def _unwrap_union_types(typ: object) -> tuple[object, ...]: - "Extracts the types in a union (e.g. returns a tuple of types `T1` and `T2` for `Union[T1, T2]`)." - - if not _is_union_like(typ): - raise TypeError("union type must have un-subscripted type of Union") - - return typing.get_args(typ) - - -def is_type_literal(typ: object) -> bool: - "True if the specified type is a literal of one or more constant values, e.g. `Literal['string']` or `Literal[42]`." - - typ = unwrap_annotated_type(typ) - return typing.get_origin(typ) is Literal - - -def unwrap_literal_value(typ: object) -> Any: - """ - Extracts the single constant value captured by a literal type. - - :param typ: The literal type `Literal[value]`. - :returns: The values captured by the literal type. - """ - - args = unwrap_literal_values(typ) - if len(args) != 1: - raise TypeError("too many values in literal type") - - return args[0] - - -def unwrap_literal_values(typ: object) -> tuple[Any, ...]: - """ - Extracts the constant values captured by a literal type. - - :param typ: The literal type `Literal[value, ...]`. - :returns: A tuple of values captured by the literal type. - """ - - typ = unwrap_annotated_type(typ) - return typing.get_args(typ) - - -def unwrap_literal_types(typ: object) -> tuple[type, ...]: - """ - Extracts the types of the constant values captured by a literal type. - - :param typ: The literal type `Literal[value, ...]`. - :returns: A tuple of item types `T` such that `type(value) == T`. - """ - - return tuple(type(t) for t in unwrap_literal_values(typ)) - - -def is_generic_list(typ: object) -> TypeGuard[type[list]]: - "True if the specified type is a generic list, i.e. `List[T]`." - - typ = unwrap_annotated_type(typ) - return typing.get_origin(typ) is list - - -def unwrap_generic_list(typ: type[list[T]]) -> type[T]: - """ - Extracts the item type of a list type. - - :param typ: The list type `List[T]`. - :returns: The item type `T`. - """ - - return rewrap_annotated_type(_unwrap_generic_list, typ) - - -def _unwrap_generic_list(typ: type[list[T]]) -> type[T]: - "Extracts the item type of a list type (e.g. returns `T` for `List[T]`)." - - (list_type,) = typing.get_args(typ) # unpack single tuple element - return list_type # type: ignore[no-any-return] - - -def is_generic_sequence(typ: object) -> bool: - "True if the specified type is a generic Sequence, i.e. `Sequence[T]`." - import collections.abc - - typ = unwrap_annotated_type(typ) - return typing.get_origin(typ) is collections.abc.Sequence - - -def unwrap_generic_sequence(typ: object) -> type: - """ - Extracts the item type of a Sequence type. - - :param typ: The Sequence type `Sequence[T]`. - :returns: The item type `T`. - """ - - return rewrap_annotated_type(_unwrap_generic_sequence, typ) # type: ignore[arg-type] - - -def _unwrap_generic_sequence(typ: object) -> type: - "Extracts the item type of a Sequence type (e.g. returns `T` for `Sequence[T]`)." - - (sequence_type,) = typing.get_args(typ) # unpack single tuple element - return sequence_type # type: ignore[no-any-return] - - -def is_generic_set(typ: object) -> TypeGuard[type[set]]: - "True if the specified type is a generic set, i.e. `Set[T]`." - - typ = unwrap_annotated_type(typ) - return typing.get_origin(typ) is set - - -def unwrap_generic_set(typ: type[set[T]]) -> type[T]: - """ - Extracts the item type of a set type. - - :param typ: The set type `Set[T]`. - :returns: The item type `T`. - """ - - return rewrap_annotated_type(_unwrap_generic_set, typ) - - -def _unwrap_generic_set(typ: type[set[T]]) -> type[T]: - "Extracts the item type of a set type (e.g. returns `T` for `Set[T]`)." - - (set_type,) = typing.get_args(typ) # unpack single tuple element - return set_type # type: ignore[no-any-return] - - -def is_generic_dict(typ: object) -> TypeGuard[type[dict]]: - "True if the specified type is a generic dictionary, i.e. `Dict[KeyType, ValueType]`." - - typ = unwrap_annotated_type(typ) - return typing.get_origin(typ) is dict - - -def unwrap_generic_dict(typ: type[dict[K, V]]) -> tuple[type[K], type[V]]: - """ - Extracts the key and value types of a dictionary type as a tuple. - - :param typ: The dictionary type `Dict[K, V]`. - :returns: The key and value types `K` and `V`. - """ - - return _unwrap_generic_dict(unwrap_annotated_type(typ)) - - -def _unwrap_generic_dict(typ: type[dict[K, V]]) -> tuple[type[K], type[V]]: - "Extracts the key and value types of a dict type (e.g. returns (`K`, `V`) for `Dict[K, V]`)." - - key_type, value_type = typing.get_args(typ) - return key_type, value_type - - -def is_type_annotated(typ: TypeLike) -> bool: - "True if the type annotation corresponds to an annotated type (i.e. `Annotated[T, ...]`)." - - return getattr(typ, "__metadata__", None) is not None - - -def get_annotation(data_type: TypeLike, annotation_type: type[T]) -> T | None: - """ - Returns the first annotation on a data type that matches the expected annotation type. - - :param data_type: The annotated type from which to extract the annotation. - :param annotation_type: The annotation class to look for. - :returns: The annotation class instance found (if any). - """ - - metadata = getattr(data_type, "__metadata__", None) - if metadata is not None: - for annotation in metadata: - if isinstance(annotation, annotation_type): - return annotation - - return None - - -def unwrap_annotated_type(typ: T) -> T: - "Extracts the wrapped type from an annotated type (e.g. returns `T` for `Annotated[T, ...]`)." - - if is_type_annotated(typ): - # type is Annotated[T, ...] - return typing.get_args(typ)[0] # type: ignore[no-any-return] - else: - # type is a regular type - return typ - - -def rewrap_annotated_type(transform: Callable[[type[S]], type[T]], typ: type[S]) -> type[T]: - """ - Un-boxes, transforms and re-boxes an optionally annotated type. - - :param transform: A function that maps an un-annotated type to another type. - :param typ: A type to un-box (if necessary), transform, and re-box (if necessary). - """ - - metadata = getattr(typ, "__metadata__", None) - if metadata is not None: - # type is Annotated[T, ...] - inner_type = typing.get_args(typ)[0] - else: - # type is a regular type - inner_type = typ - - transformed_type = transform(inner_type) - - if metadata is not None: - return Annotated[(transformed_type, *metadata)] # type: ignore[return-value] - else: - return transformed_type - - -def get_module_classes(module: types.ModuleType) -> list[type]: - "Returns all classes declared directly in a module." - - def is_class_member(member: object) -> TypeGuard[type]: - return inspect.isclass(member) and member.__module__ == module.__name__ - - return [class_type for _, class_type in inspect.getmembers(module, is_class_member)] - - -if sys.version_info >= (3, 9): - - def get_resolved_hints(typ: type) -> dict[str, type]: - return typing.get_type_hints(typ, include_extras=True) - -else: - - def get_resolved_hints(typ: type) -> dict[str, type]: - return typing.get_type_hints(typ) - - -def get_class_properties(typ: type) -> Iterable[tuple[str, type | str]]: - "Returns all properties of a class." - - if is_dataclass_type(typ): - return ((field.name, field.type) for field in dataclasses.fields(typ)) - elif hasattr(typ, "model_fields"): - # Pydantic BaseModel - use model_fields to exclude ClassVar and other non-field attributes - # Reconstruct Annotated type if discriminator exists to preserve metadata - from typing import Annotated, Any - - from pydantic.fields import FieldInfo - - def get_field_type(name: str, field: Any) -> type | str: - # If field has discriminator, wrap in Annotated to preserve it for schema generation - if field.discriminator: - field_info = FieldInfo(annotation=None, discriminator=field.discriminator) - # Annotated returns _AnnotatedAlias which isn't a type but is valid here - return Annotated[field.annotation, field_info] # type: ignore[return-value] - # field.annotation can be Union types, Annotated, etc. which aren't type but are valid - return field.annotation # type: ignore[return-value,no-any-return] - - return ((name, get_field_type(name, field)) for name, field in typ.model_fields.items()) - else: - resolved_hints = get_resolved_hints(typ) - return resolved_hints.items() - - -def get_class_property(typ: type, name: str) -> type | str | None: - "Looks up the annotated type of a property in a class by its property name." - - for property_name, property_type in get_class_properties(typ): - if name == property_name: - return property_type - return None - - -@dataclasses.dataclass -class _ROOT: - pass - - -def get_referenced_types(typ: TypeLike, module: types.ModuleType | None = None) -> set[type]: - """ - Extracts types directly or indirectly referenced by this type. - - For example, extract `T` from `List[T]`, `Optional[T]` or `Annotated[T, ...]`, `K` and `V` from `Dict[K,V]`, - `A` and `B` from `Union[A,B]`. - - :param typ: A type or special form. - :param module: The context in which types are evaluated. - :returns: Types referenced by the given type or special form. - """ - - collector = TypeCollector() - collector.run(typ, _ROOT, module) - return collector.references - - -class TypeCollector: - """ - Collects types directly or indirectly referenced by a type. - - :param graph: The type dependency graph, linking types to types they depend on. - """ - - graph: dict[type, set[type]] - - @property - def references(self) -> set[type]: - "Types collected by the type collector." - - dependencies = set() - for edges in self.graph.values(): - dependencies.update(edges) - return dependencies - - def __init__(self) -> None: - self.graph = {_ROOT: set()} - - def traverse(self, typ: type) -> None: - "Finds all dependent types of a type." - - self.run(typ, _ROOT, sys.modules[typ.__module__]) - - def traverse_all(self, types: Iterable[type]) -> None: - "Finds all dependent types of a list of types." - - for typ in types: - self.traverse(typ) - - def run( - self, - typ: TypeLike, - cls: type[DataclassInstance], - module: types.ModuleType | None, - ) -> None: - """ - Extracts types indirectly referenced by this type. - - For example, extract `T` from `List[T]`, `Optional[T]` or `Annotated[T, ...]`, `K` and `V` from `Dict[K,V]`, - `A` and `B` from `Union[A,B]`. - - :param typ: A type or special form. - :param cls: A dataclass type being expanded for dependent types. - :param module: The context in which types are evaluated. - :returns: Types referenced by the given type or special form. - """ - - if typ is type(None) or typ is Any: - return - - if isinstance(typ, type): - self.graph[cls].add(typ) - - if typ in self.graph: - return - - self.graph[typ] = set() - - metadata = getattr(typ, "__metadata__", None) - if metadata is not None: - # type is Annotated[T, ...] - arg = typing.get_args(typ)[0] - return self.run(arg, cls, module) - - # type is a forward reference - if isinstance(typ, str) or isinstance(typ, typing.ForwardRef): - if module is None: - raise ValueError("missing context for evaluating types") - - evaluated_type = evaluate_type(typ, module) - return self.run(evaluated_type, cls, module) - - # type is a special form - origin = typing.get_origin(typ) - if origin in [list, dict, frozenset, set, tuple, Union]: - for arg in typing.get_args(typ): - self.run(arg, cls, module) - return - elif origin is Literal: - return - - # type is optional or a union type - if is_type_optional(typ): - return self.run(unwrap_optional_type(typ), cls, module) - if is_type_union(typ): - for union_type in unwrap_union_types(typ): - self.run(union_type, cls, module) - return - - # type is a regular type - elif is_dataclass_type(typ) or is_type_enum(typ) or isinstance(typ, type): - context = sys.modules[typ.__module__] - if is_dataclass_type(typ): - for field in dataclass_fields(typ): - self.run(field.type, typ, context) - else: - for field_name, field_type in get_resolved_hints(typ).items(): - self.run(field_type, typ, context) - return - - raise TypeError(f"expected: type-like; got: {typ}") - - -if sys.version_info >= (3, 10): - - def get_signature(fn: Callable[..., Any]) -> inspect.Signature: - "Extracts the signature of a function." - - return inspect.signature(fn, eval_str=True) - -else: - - def get_signature(fn: Callable[..., Any]) -> inspect.Signature: - "Extracts the signature of a function." - - return inspect.signature(fn) - - -def is_reserved_property(name: str) -> bool: - "True if the name stands for an internal property." - - # filter built-in and special properties - if re.match(r"^__.+__$", name): - return True - - # filter built-in special names - if name in ["_abc_impl"]: - return True - - return False - - -def create_module(name: str) -> types.ModuleType: - """ - Creates a new module dynamically at run-time. - - :param name: Fully qualified name of the new module (with dot notation). - """ - - if name in sys.modules: - raise KeyError(f"{name!r} already in sys.modules") - - spec = importlib.machinery.ModuleSpec(name, None) - module = importlib.util.module_from_spec(spec) - sys.modules[name] = module - if spec.loader is not None: - spec.loader.exec_module(module) - return module - - -if sys.version_info >= (3, 10): - - def create_data_type(class_name: str, fields: list[tuple[str, type]]) -> type: - """ - Creates a new data-class type dynamically. - - :param class_name: The name of new data-class type. - :param fields: A list of fields (and their type) that the new data-class type is expected to have. - :returns: The newly created data-class type. - """ - - # has the `slots` parameter - return dataclasses.make_dataclass(class_name, fields, slots=True) - -else: - - def create_data_type(class_name: str, fields: list[tuple[str, type]]) -> type: - """ - Creates a new data-class type dynamically. - - :param class_name: The name of new data-class type. - :param fields: A list of fields (and their type) that the new data-class type is expected to have. - :returns: The newly created data-class type. - """ - - cls = dataclasses.make_dataclass(class_name, fields) - - cls_dict = dict(cls.__dict__) - field_names = tuple(field.name for field in dataclasses.fields(cls)) - - cls_dict["__slots__"] = field_names - - for field_name in field_names: - cls_dict.pop(field_name, None) - cls_dict.pop("__dict__", None) - - qualname = getattr(cls, "__qualname__", None) - cls = type(cls)(cls.__name__, (), cls_dict) - if qualname is not None: - cls.__qualname__ = qualname - - return cls - - -def create_object(typ: type[T]) -> T: - "Creates an instance of a type." - - if issubclass(typ, Exception): - # exception types need special treatment - e = typ.__new__(typ) - return typing.cast(T, e) - else: - return object.__new__(typ) - - -if sys.version_info >= (3, 9): - TypeOrGeneric = Union[type, types.GenericAlias] - -else: - TypeOrGeneric = object - - -def is_generic_instance(obj: Any, typ: TypeLike) -> bool: - """ - Returns whether an object is an instance of a generic class, a standard class or of a subclass thereof. - - This function checks the following items recursively: - * items of a list - * keys and values of a dictionary - * members of a set - * items of a tuple - * members of a union type - - :param obj: The (possibly generic container) object to check recursively. - :param typ: The expected type of the object. - """ - - if isinstance(typ, typing.ForwardRef): - fwd: typing.ForwardRef = typ - identifier = fwd.__forward_arg__ - typ = eval(identifier) - if isinstance(typ, type): - return isinstance(obj, typ) - else: - return False - - # generic types (e.g. list, dict, set, etc.) - origin_type = typing.get_origin(typ) - if origin_type is list: - if not isinstance(obj, list): - return False - (list_item_type,) = typing.get_args(typ) # unpack single tuple element - list_obj: list = obj - return all(is_generic_instance(item, list_item_type) for item in list_obj) - elif origin_type is dict: - if not isinstance(obj, dict): - return False - key_type, value_type = typing.get_args(typ) - dict_obj: dict = obj - return all( - is_generic_instance(key, key_type) and is_generic_instance(value, value_type) - for key, value in dict_obj.items() - ) - elif origin_type is set: - if not isinstance(obj, set): - return False - (set_member_type,) = typing.get_args(typ) # unpack single tuple element - set_obj: set = obj - return all(is_generic_instance(item, set_member_type) for item in set_obj) - elif origin_type is tuple: - if not isinstance(obj, tuple): - return False - return all( - is_generic_instance(item, tuple_item_type) - for tuple_item_type, item in zip( - (tuple_item_type for tuple_item_type in typing.get_args(typ)), - (item for item in obj), - strict=False, - ) - ) - elif origin_type is Union: - return any(is_generic_instance(obj, member_type) for member_type in typing.get_args(typ)) - elif isinstance(typ, type): - return isinstance(obj, typ) - else: - raise TypeError(f"expected `type` but got: {typ}") - - -class RecursiveChecker: - _pred: Callable[[type, Any], bool] | None - - def __init__(self, pred: Callable[[type, Any], bool]) -> None: - """ - Creates a checker to verify if a predicate applies to all nested member properties of an object recursively. - - :param pred: The predicate to test on member properties. Takes a property type and a property value. - """ - - self._pred = pred - - def pred(self, typ: type, obj: Any) -> bool: - "Acts as a workaround for the type checker mypy." - - assert self._pred is not None - return self._pred(typ, obj) - - def check(self, typ: TypeLike, obj: Any) -> bool: - """ - Checks if a predicate applies to all nested member properties of an object recursively. - - :param typ: The type to recurse into. - :param obj: The object to inspect recursively. Must be an instance of the given type. - :returns: True if all member properties pass the filter predicate. - """ - - # check for well-known types - if ( - typ is type(None) - or typ is bool - or typ is int - or typ is float - or typ is str - or typ is bytes - or typ is datetime.datetime - or typ is datetime.date - or typ is datetime.time - or typ is uuid.UUID - ): - return self.pred(typing.cast(type, typ), obj) - - # generic types (e.g. list, dict, set, etc.) - origin_type = typing.get_origin(typ) - if origin_type is list: - if not isinstance(obj, list): - raise TypeError(f"expected `list` but got: {obj}") - (list_item_type,) = typing.get_args(typ) # unpack single tuple element - list_obj: list = obj - return all(self.check(list_item_type, item) for item in list_obj) - elif origin_type is dict: - if not isinstance(obj, dict): - raise TypeError(f"expected `dict` but got: {obj}") - key_type, value_type = typing.get_args(typ) - dict_obj: dict = obj - return all(self.check(value_type, item) for item in dict_obj.values()) - elif origin_type is set: - if not isinstance(obj, set): - raise TypeError(f"expected `set` but got: {obj}") - (set_member_type,) = typing.get_args(typ) # unpack single tuple element - set_obj: set = obj - return all(self.check(set_member_type, item) for item in set_obj) - elif origin_type is tuple: - if not isinstance(obj, tuple): - raise TypeError(f"expected `tuple` but got: {obj}") - return all( - self.check(tuple_item_type, item) - for tuple_item_type, item in zip( - (tuple_item_type for tuple_item_type in typing.get_args(typ)), - (item for item in obj), - strict=False, - ) - ) - elif origin_type is Union: - return self.pred(typ, obj) # type: ignore[arg-type] - - if not inspect.isclass(typ): - raise TypeError(f"expected `type` but got: {typ}") - - # enumeration type - if issubclass(typ, enum.Enum): - if not isinstance(obj, enum.Enum): - raise TypeError(f"expected `{typ}` but got: {obj}") - return self.pred(typ, obj) - - # class types with properties - if is_named_tuple_type(typ): - if not isinstance(obj, tuple): - raise TypeError(f"expected `NamedTuple` but got: {obj}") - return all( - self.check(field_type, getattr(obj, field_name)) - for field_name, field_type in typing.get_type_hints(typ).items() - ) - elif is_dataclass_type(typ): - if not isinstance(obj, typ): - raise TypeError(f"expected `{typ}` but got: {obj}") - resolved_hints = get_resolved_hints(typ) - return all( - self.check(resolved_hints[field.name], getattr(obj, field.name)) for field in dataclasses.fields(typ) - ) - else: - if not isinstance(obj, typ): - raise TypeError(f"expected `{typ}` but got: {obj}") - return all( - self.check(property_type, getattr(obj, property_name)) - for property_name, property_type in get_class_properties(typ) - ) - - -def check_recursive( - obj: object, - /, - *, - pred: Callable[[type, Any], bool] | None = None, - type_pred: Callable[[type], bool] | None = None, - value_pred: Callable[[Any], bool] | None = None, -) -> bool: - """ - Checks if a predicate applies to all nested member properties of an object recursively. - - :param obj: The object to inspect recursively. - :param pred: The predicate to test on member properties. Takes a property type and a property value. - :param type_pred: Constrains the check to properties of an expected type. Properties of other types pass automatically. - :param value_pred: Verifies a condition on member property values (of an expected type). - :returns: True if all member properties pass the filter predicate(s). - """ - - if type_pred is not None and value_pred is not None: - if pred is not None: - raise TypeError("filter predicate not permitted when type and value predicates are present") - - type_p: Callable[[type[T]], bool] = type_pred - value_p: Callable[[T], bool] = value_pred - pred = lambda typ, obj: not type_p(typ) or value_p(obj) # noqa: E731 - - elif value_pred is not None: - if pred is not None: - raise TypeError("filter predicate not permitted when value predicate is present") - - value_only_p: Callable[[T], bool] = value_pred - pred = lambda typ, obj: value_only_p(obj) # noqa: E731 - - elif type_pred is not None: - raise TypeError("value predicate required when type predicate is present") - - elif pred is None: - pred = lambda typ, obj: True # noqa: E731 - - return RecursiveChecker(pred).check(type(obj), obj) - - -def is_unwrapped_body_param(param_type: Any) -> bool: - """ - Check if a parameter type represents an unwrapped body parameter. - An unwrapped body parameter is an Annotated type with Body(embed=False) - - This is used to determine whether request parameters should be flattened - in OpenAPI specs and client libraries (matching FastAPI's embed=False behavior). - - Args: - param_type: The parameter type annotation to check - - Returns: - True if the parameter should be treated as an unwrapped body parameter - """ - # Check if it's Annotated with Body(embed=False) - if typing.get_origin(param_type) is Annotated: - args = typing.get_args(param_type) - base_type = args[0] - metadata = args[1:] - - # Look for Body annotation with embed=False - # Body() returns a FieldInfo object, so we check for that type and the embed attribute - for item in metadata: - if isinstance(item, FieldInfo) and hasattr(item, "embed") and not item.embed: - return inspect.isclass(base_type) and issubclass(base_type, BaseModel) - - return False diff --git a/src/llama_stack_api/strong_typing/mapping.py b/src/llama_stack_api/strong_typing/mapping.py deleted file mode 100644 index d6c1a3172a..0000000000 --- a/src/llama_stack_api/strong_typing/mapping.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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. - -""" -Type-safe data interchange for Python data classes. - -:see: https://github.com/hunyadi/strong_typing -""" - -import keyword - -from .auxiliary import Alias -from .inspection import get_annotation - - -def python_field_to_json_property(python_id: str, python_type: object | None = None) -> str: - """ - Map a Python field identifier to a JSON property name. - - Authors may use an underscore appended at the end of a Python identifier as per PEP 8 if it clashes with a Python - keyword: e.g. `in` would become `in_` and `from` would become `from_`. Remove these suffixes when exporting to JSON. - - Authors may supply an explicit alias with the type annotation `Alias`, e.g. `Annotated[MyType, Alias("alias")]`. - """ - - if python_type is not None: - alias = get_annotation(python_type, Alias) - if alias: - return alias.name - - if python_id.endswith("_"): - id = python_id[:-1] - if keyword.iskeyword(id): - return id - - return python_id diff --git a/src/llama_stack_api/strong_typing/name.py b/src/llama_stack_api/strong_typing/name.py deleted file mode 100644 index 60501ac431..0000000000 --- a/src/llama_stack_api/strong_typing/name.py +++ /dev/null @@ -1,188 +0,0 @@ -# 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. - -""" -Type-safe data interchange for Python data classes. - -:see: https://github.com/hunyadi/strong_typing -""" - -import typing -from typing import Any, Literal, Union - -from .auxiliary import _auxiliary_types -from .inspection import ( - TypeLike, - is_generic_dict, - is_generic_list, - is_generic_sequence, - is_type_optional, - is_type_union, - unwrap_generic_dict, - unwrap_generic_list, - unwrap_generic_sequence, - unwrap_optional_type, - unwrap_union_types, -) - - -class TypeFormatter: - """ - Type formatter. - - :param use_union_operator: Whether to emit union types as `X | Y` as per PEP 604. - """ - - use_union_operator: bool - - def __init__(self, use_union_operator: bool = False) -> None: - self.use_union_operator = use_union_operator - - def union_to_str(self, data_type_args: tuple[TypeLike, ...]) -> str: - if self.use_union_operator: - return " | ".join(self.python_type_to_str(t) for t in data_type_args) - else: - if len(data_type_args) == 2 and type(None) in data_type_args: - # Optional[T] is represented as Union[T, None] - origin_name = "Optional" - data_type_args = tuple(t for t in data_type_args if t is not type(None)) - else: - origin_name = "Union" - - args = ", ".join(self.python_type_to_str(t) for t in data_type_args) - return f"{origin_name}[{args}]" - - def plain_type_to_str(self, data_type: TypeLike) -> str: - "Returns the string representation of a Python type without metadata." - - # return forward references as the annotation string - if isinstance(data_type, typing.ForwardRef): - fwd: typing.ForwardRef = data_type - return fwd.__forward_arg__ - elif isinstance(data_type, str): - return data_type - - origin = typing.get_origin(data_type) - if origin is not None: - data_type_args = typing.get_args(data_type) - - if origin is dict: # Dict[T] - origin_name = "Dict" - elif origin is list: # List[T] - origin_name = "List" - elif origin is set: # Set[T] - origin_name = "Set" - elif origin is Union: - return self.union_to_str(data_type_args) - elif origin is Literal: - args = ", ".join(repr(arg) for arg in data_type_args) - return f"Literal[{args}]" - else: - origin_name = origin.__name__ - - args = ", ".join(self.python_type_to_str(t) for t in data_type_args) - return f"{origin_name}[{args}]" - - return data_type.__name__ - - def python_type_to_str(self, data_type: TypeLike) -> str: - "Returns the string representation of a Python type." - - if data_type is type(None): - return "None" - - # use compact name for alias types - name = _auxiliary_types.get(data_type) - if name is not None: - return name - - metadata = getattr(data_type, "__metadata__", None) - if metadata is not None: - # type is Annotated[T, ...] - metatuple: tuple[Any, ...] = metadata - arg = typing.get_args(data_type)[0] - - # check for auxiliary types with user-defined annotations - metaset = set(metatuple) - for auxiliary_type, auxiliary_name in _auxiliary_types.items(): - auxiliary_arg = typing.get_args(auxiliary_type)[0] - if arg is not auxiliary_arg: - continue - - auxiliary_metatuple: tuple[Any, ...] | None = getattr(auxiliary_type, "__metadata__", None) - if auxiliary_metatuple is None: - continue - - if metaset.issuperset(auxiliary_metatuple): - # type is an auxiliary type with extra annotations - auxiliary_args = ", ".join(repr(m) for m in metatuple if m not in auxiliary_metatuple) - return f"Annotated[{auxiliary_name}, {auxiliary_args}]" - - # type is an annotated type - args = ", ".join(repr(m) for m in metatuple) - return f"Annotated[{self.plain_type_to_str(arg)}, {args}]" - else: - # type is a regular type - return self.plain_type_to_str(data_type) - - -def python_type_to_str(data_type: TypeLike, use_union_operator: bool = False) -> str: - """ - Returns the string representation of a Python type. - - :param use_union_operator: Whether to emit union types as `X | Y` as per PEP 604. - """ - - fmt = TypeFormatter(use_union_operator) - return fmt.python_type_to_str(data_type) - - -def python_type_to_name(data_type: TypeLike, force: bool = False) -> str: - """ - Returns the short name of a Python type. - - :param force: Whether to produce a name for composite types such as generics. - """ - - # use compact name for alias types - name = _auxiliary_types.get(data_type) - if name is not None: - return name - - # unwrap annotated types - metadata = getattr(data_type, "__metadata__", None) - if metadata is not None: - # type is Annotated[T, ...] - arg = typing.get_args(data_type)[0] - return python_type_to_name(arg, force=force) - - if force: - # generic types - if is_type_optional(data_type, strict=True): - inner_name = python_type_to_name(unwrap_optional_type(data_type), force=True) - return f"Optional__{inner_name}" - elif is_generic_list(data_type): - item_name = python_type_to_name(unwrap_generic_list(data_type), force=True) - return f"List__{item_name}" - elif is_generic_sequence(data_type): - # Treat Sequence the same as List for schema generation purposes - item_name = python_type_to_name(unwrap_generic_sequence(data_type), force=True) - return f"List__{item_name}" - elif is_generic_dict(data_type): - key_type, value_type = unwrap_generic_dict(data_type) - key_name = python_type_to_name(key_type, force=True) - value_name = python_type_to_name(value_type, force=True) - return f"Dict__{key_name}__{value_name}" - elif is_type_union(data_type): - member_types = unwrap_union_types(data_type) - member_names = "__".join(python_type_to_name(member_type, force=True) for member_type in member_types) - return f"Union__{member_names}" - - # named system or user-defined type - if hasattr(data_type, "__name__") and not typing.get_args(data_type): - return data_type.__name__ - - raise TypeError(f"cannot assign a simple name to type: {data_type}") diff --git a/src/llama_stack_api/strong_typing/schema.py b/src/llama_stack_api/strong_typing/schema.py deleted file mode 100644 index 916690e414..0000000000 --- a/src/llama_stack_api/strong_typing/schema.py +++ /dev/null @@ -1,791 +0,0 @@ -# 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. - -""" -Type-safe data interchange for Python data classes. - -:see: https://github.com/hunyadi/strong_typing -""" - -import collections.abc -import dataclasses -import datetime -import decimal -import enum -import functools -import inspect -import json -import types -import typing -import uuid -from collections.abc import Callable -from copy import deepcopy -from typing import ( - Annotated, - Any, - ClassVar, - Literal, - TypeVar, - Union, - overload, -) - -import jsonschema - -from . import docstring -from .auxiliary import ( - Alias, - IntegerRange, - MaxLength, - MinLength, - Precision, - get_auxiliary_format, -) -from .core import JsonArray, JsonObject, JsonType, Schema, StrictJsonType -from .inspection import ( - TypeLike, - enum_value_types, - get_annotation, - get_class_properties, - is_type_enum, - is_type_like, - is_type_optional, - unwrap_optional_type, -) -from .name import python_type_to_name -from .serialization import object_to_json - -# determines the maximum number of distinct enum members up to which a Dict[EnumType, Any] is converted into a JSON -# schema with explicitly listed properties (rather than employing a pattern constraint on property names) -OBJECT_ENUM_EXPANSION_LIMIT = 4 - - -T = TypeVar("T") - - -def get_class_docstrings(data_type: type) -> tuple[str | None, str | None]: - docstr = docstring.parse_type(data_type) - - # check if class has a doc-string other than the auto-generated string assigned by @dataclass - if docstring.has_default_docstring(data_type): - return None, None - - return docstr.short_description, docstr.long_description - - -def get_class_property_docstrings( - data_type: type, transform_fun: Callable[[type, str, str], str] | None = None -) -> dict[str, str]: - """ - Extracts the documentation strings associated with the properties of a composite type. - - :param data_type: The object whose properties to iterate over. - :param transform_fun: An optional function that maps a property documentation string to a custom tailored string. - :returns: A dictionary mapping property names to descriptions. - """ - - result: dict[str, str] = {} - # Only try to get MRO if data_type is actually a class - # Special types like Literal, Union, etc. don't have MRO - if not inspect.isclass(data_type): - return result - - for base in inspect.getmro(data_type): - docstr = docstring.parse_type(base) - for param in docstr.params.values(): - if param.name in result: - continue - - if transform_fun: - description = transform_fun(data_type, param.name, param.description) - else: - description = param.description - - result[param.name] = description - return result - - -def docstring_to_schema(data_type: type) -> Schema: - short_description, long_description = get_class_docstrings(data_type) - schema: Schema = { - "title": python_type_to_name(data_type, force=True), - } - - description = "\n".join(filter(None, [short_description, long_description])) - if description: - schema["description"] = description - return schema - - -def id_from_ref(data_type: typing.ForwardRef | str | type) -> str: - "Extracts the name of a possibly forward-referenced type." - - if isinstance(data_type, typing.ForwardRef): - forward_type: typing.ForwardRef = data_type - return forward_type.__forward_arg__ - elif isinstance(data_type, str): - return data_type - else: - return data_type.__name__ - - -def type_from_ref(data_type: typing.ForwardRef | str | type) -> tuple[str, type]: - "Creates a type from a forward reference." - - if isinstance(data_type, typing.ForwardRef): - forward_type: typing.ForwardRef = data_type - true_type = eval(forward_type.__forward_code__) - return forward_type.__forward_arg__, true_type - elif isinstance(data_type, str): - true_type = eval(data_type) - return data_type, true_type - else: - return data_type.__name__, data_type - - -@dataclasses.dataclass -class TypeCatalogEntry: - schema: Schema | None - identifier: str - examples: JsonType | None = None - - -class TypeCatalog: - "Maintains an association of well-known Python types to their JSON schema." - - _by_type: dict[TypeLike, TypeCatalogEntry] - _by_name: dict[str, TypeCatalogEntry] - - def __init__(self) -> None: - self._by_type = {} - self._by_name = {} - - def __contains__(self, data_type: TypeLike) -> bool: - if isinstance(data_type, typing.ForwardRef): - fwd: typing.ForwardRef = data_type - name = fwd.__forward_arg__ - return name in self._by_name - else: - return data_type in self._by_type - - def add( - self, - data_type: TypeLike, - schema: Schema | None, - identifier: str, - examples: list[JsonType] | None = None, - ) -> None: - if isinstance(data_type, typing.ForwardRef): - raise TypeError("forward references cannot be used to register a type") - - if data_type in self._by_type: - raise ValueError(f"type {data_type} is already registered in the catalog") - - entry = TypeCatalogEntry(schema, identifier, examples) - self._by_type[data_type] = entry - self._by_name[identifier] = entry - - def get(self, data_type: TypeLike) -> TypeCatalogEntry: - if isinstance(data_type, typing.ForwardRef): - fwd: typing.ForwardRef = data_type - name = fwd.__forward_arg__ - return self._by_name[name] - else: - return self._by_type[data_type] - - -@dataclasses.dataclass -class SchemaOptions: - definitions_path: str = "#/definitions/" - use_descriptions: bool = True - use_examples: bool = True - property_description_fun: Callable[[type, str, str], str] | None = None - - -class JsonSchemaGenerator: - "Creates a JSON schema with user-defined type definitions." - - type_catalog: ClassVar[TypeCatalog] = TypeCatalog() - types_used: dict[str, TypeLike] - options: SchemaOptions - - def __init__(self, options: SchemaOptions | None = None): - if options is None: - self.options = SchemaOptions() - else: - self.options = options - self.types_used = {} - - @functools.singledispatchmethod - def _metadata_to_schema(self, arg: object) -> Schema: - # unrecognized annotation - return {} - - @_metadata_to_schema.register - def _(self, arg: IntegerRange) -> Schema: - return {"minimum": arg.minimum, "maximum": arg.maximum} - - @_metadata_to_schema.register - def _(self, arg: Precision) -> Schema: - return { - "multipleOf": 10 ** (-arg.decimal_digits), - "exclusiveMinimum": -(10**arg.integer_digits), - "exclusiveMaximum": (10**arg.integer_digits), - } - - @_metadata_to_schema.register - def _(self, arg: MinLength) -> Schema: - return {"minLength": arg.value} - - @_metadata_to_schema.register - def _(self, arg: MaxLength) -> Schema: - return {"maxLength": arg.value} - - def _with_metadata(self, type_schema: Schema, metadata: tuple[Any, ...] | None) -> Schema: - if metadata: - for m in metadata: - type_schema.update(self._metadata_to_schema(m)) - return type_schema - - def _simple_type_to_schema(self, typ: TypeLike, json_schema_extra: dict | None = None) -> Schema | None: - """ - Returns the JSON schema associated with a simple, unrestricted type. - - :returns: The schema for a simple type, or `None`. - """ - - if typ is type(None): - return {"type": "null"} - elif typ is bool: - return {"type": "boolean"} - elif typ is int: - return {"type": "integer"} - elif typ is float: - return {"type": "number"} - elif typ is str: - if json_schema_extra and "contentEncoding" in json_schema_extra: - return { - "type": "string", - "contentEncoding": json_schema_extra["contentEncoding"], - } - return {"type": "string"} - elif typ is bytes: - return {"type": "string", "contentEncoding": "base64"} - elif typ is datetime.datetime: - # 2018-11-13T20:20:39+00:00 - return { - "type": "string", - "format": "date-time", - } - elif typ is datetime.date: - # 2018-11-13 - return {"type": "string", "format": "date"} - elif typ is datetime.time: - # 20:20:39+00:00 - return {"type": "string", "format": "time"} - elif typ is decimal.Decimal: - return {"type": "number"} - elif typ is uuid.UUID: - # f81d4fae-7dec-11d0-a765-00a0c91e6bf6 - return {"type": "string", "format": "uuid"} - elif typ is Any: - return { - "oneOf": [ - {"type": "null"}, - {"type": "boolean"}, - {"type": "number"}, - {"type": "string"}, - {"type": "array"}, - {"type": "object"}, - ] - } - elif typ is JsonObject: - return {"type": "object"} - elif typ is JsonArray: - return {"type": "array"} - else: - # not a simple type - return None - - def type_to_schema( - self, - data_type: TypeLike, - force_expand: bool = False, - json_schema_extra: dict | None = None, - ) -> Schema: - common_info = {} - if json_schema_extra and "deprecated" in json_schema_extra: - common_info["deprecated"] = json_schema_extra["deprecated"] - return self._type_to_schema(data_type, force_expand, json_schema_extra) | common_info - - def _type_to_schema( - self, - data_type: TypeLike, - force_expand: bool = False, - json_schema_extra: dict | None = None, - ) -> Schema: - """ - Returns the JSON schema associated with a type. - - :param data_type: The Python type whose JSON schema to return. - :param force_expand: Forces a JSON schema to be returned even if the type is registered in the catalog of known types. - :returns: The JSON schema associated with the type. - """ - - # short-circuit for common simple types - schema = self._simple_type_to_schema(data_type, json_schema_extra) - if schema is not None: - return schema - - # types registered in the type catalog of well-known types - type_catalog = JsonSchemaGenerator.type_catalog - if not force_expand and data_type in type_catalog: - # user-defined type - identifier = type_catalog.get(data_type).identifier - self.types_used.setdefault(identifier, data_type) - return {"$ref": f"{self.options.definitions_path}{identifier}"} - - # unwrap annotated types - metadata = getattr(data_type, "__metadata__", None) - if metadata is not None: - # type is Annotated[T, ...] - typ = typing.get_args(data_type)[0] - schema = self._simple_type_to_schema(typ) - if schema is not None: - # recognize well-known auxiliary types - fmt = get_auxiliary_format(data_type) - if fmt is not None: - schema.update({"format": fmt}) - return schema - else: - return self._with_metadata(schema, metadata) - - else: - # type is a regular type - typ = data_type - - if isinstance(typ, typing.ForwardRef) or isinstance(typ, str): - if force_expand: - identifier, true_type = type_from_ref(typ) - return self.type_to_schema(true_type, force_expand=True) - else: - try: - identifier, true_type = type_from_ref(typ) - self.types_used[identifier] = true_type - except NameError: - identifier = id_from_ref(typ) - - return {"$ref": f"{self.options.definitions_path}{identifier}"} - - if is_type_enum(typ): - enum_type: type[enum.Enum] = typ - value_types = enum_value_types(enum_type) - if len(value_types) != 1: - raise ValueError( - f"enumerations must have a consistent member value type but several types found: {value_types}" - ) - enum_value_type = value_types.pop() - - enum_schema: Schema - if enum_value_type is bool or enum_value_type is int or enum_value_type is float or enum_value_type is str: - if enum_value_type is bool: - enum_schema_type = "boolean" - elif enum_value_type is int: - enum_schema_type = "integer" - elif enum_value_type is float: - enum_schema_type = "number" - elif enum_value_type is str: - enum_schema_type = "string" - - enum_schema = { - "type": enum_schema_type, - "enum": [object_to_json(e.value) for e in enum_type], - } - if self.options.use_descriptions: - enum_schema.update(docstring_to_schema(typ)) - return enum_schema - else: - enum_schema = self.type_to_schema(enum_value_type) - if self.options.use_descriptions: - enum_schema.update(docstring_to_schema(typ)) - return enum_schema - - origin_type = typing.get_origin(typ) - if origin_type is list: - (list_type,) = typing.get_args(typ) # unpack single tuple element - return {"type": "array", "items": self.type_to_schema(list_type)} - elif origin_type is collections.abc.Sequence: - # Treat Sequence the same as list for JSON schema (both are arrays) - (sequence_type,) = typing.get_args(typ) # unpack single tuple element - return {"type": "array", "items": self.type_to_schema(sequence_type)} - elif origin_type is dict: - key_type, value_type = typing.get_args(typ) - if not (key_type is str or key_type is int or is_type_enum(key_type)): - raise ValueError("`dict` with key type not coercible to `str` is not supported") - - dict_schema: Schema - value_schema = self.type_to_schema(value_type) - if is_type_enum(key_type): - enum_values = [str(e.value) for e in key_type] - if len(enum_values) > OBJECT_ENUM_EXPANSION_LIMIT: - dict_schema = { - "propertyNames": {"pattern": "^(" + "|".join(enum_values) + ")$"}, - "additionalProperties": value_schema, - } - else: - dict_schema = { - "properties": dict.fromkeys(enum_values, value_schema), - "additionalProperties": False, - } - else: - dict_schema = {"additionalProperties": value_schema} - - schema = {"type": "object"} - schema.update(dict_schema) - return schema - elif origin_type is set: - (set_type,) = typing.get_args(typ) # unpack single tuple element - return { - "type": "array", - "items": self.type_to_schema(set_type), - "uniqueItems": True, - } - elif origin_type is tuple: - args = typing.get_args(typ) - return { - "type": "array", - "minItems": len(args), - "maxItems": len(args), - "prefixItems": [self.type_to_schema(member_type) for member_type in args], - } - elif origin_type in (Union, types.UnionType): - discriminator = None - if typing.get_origin(data_type) is Annotated: - discriminator = typing.get_args(data_type)[1].discriminator - ret: Schema = {"oneOf": [self.type_to_schema(union_type) for union_type in typing.get_args(typ)]} - if discriminator: - # for each union type, we need to read the value of the discriminator - mapping: dict[str, JsonType] = {} - for union_type in typing.get_args(typ): - props = self.type_to_schema(union_type, force_expand=True)["properties"] - # mypy is confused here because JsonType allows multiple types, some of them - # not indexable (bool?) or not indexable by string (list?). The correctness of - # types depends on correct model definitions. Hence multiple ignore statements below. - discriminator_value = props[discriminator]["default"] # type: ignore[index,call-overload] - mapping[discriminator_value] = self.type_to_schema(union_type)["$ref"] # type: ignore[index] - - ret["discriminator"] = { - "propertyName": discriminator, - "mapping": mapping, - } - return ret - elif origin_type is Literal: - literal_args = typing.get_args(typ) - if len(literal_args) == 1: - (literal_value,) = literal_args - schema = self.type_to_schema(type(literal_value)) - schema["const"] = literal_value - return schema - elif len(literal_args) > 1: - first_value = literal_args[0] - schema = self.type_to_schema(type(first_value)) - schema["enum"] = list(literal_args) - return schema - else: - return {"enum": []} - elif origin_type is type: - (concrete_type,) = typing.get_args(typ) # unpack single tuple element - return {"const": self.type_to_schema(concrete_type, force_expand=True)} - elif origin_type is collections.abc.AsyncIterator: - (concrete_type,) = typing.get_args(typ) - return self.type_to_schema(concrete_type) - - # dictionary of class attributes - members = dict(inspect.getmembers(typ, lambda a: not inspect.isroutine(a))) - - property_docstrings = get_class_property_docstrings(typ, self.options.property_description_fun) - properties: dict[str, Schema] = {} - required: list[str] = [] - for property_name, property_type in get_class_properties(typ): - # rename property if an alias name is specified - alias = get_annotation(property_type, Alias) - if alias: - output_name = alias.name - else: - output_name = property_name - - defaults = {} - json_schema_extra = None - if "model_fields" in members: - f = members["model_fields"] - defaults = {k: finfo.default for k, finfo in f.items()} - if output_name in f: - finfo = f[output_name] - json_schema_extra = finfo.json_schema_extra or {} - if finfo.deprecated: - json_schema_extra["deprecated"] = True - - if is_type_optional(property_type): - optional_type: type = unwrap_optional_type(property_type) - property_def = self.type_to_schema(optional_type, json_schema_extra=json_schema_extra) - else: - property_def = self.type_to_schema(property_type, json_schema_extra=json_schema_extra) - required.append(output_name) - - # check if attribute has a default value initializer - if defaults.get(property_name) is not None: - def_value = defaults[property_name] - # check if value can be directly represented in JSON - if isinstance( - def_value, - ( - bool, - int, - float, - str, - enum.Enum, - datetime.datetime, - datetime.date, - datetime.time, - ), - ): - property_def["default"] = object_to_json(def_value) - - # add property docstring if available - property_doc = property_docstrings.get(property_name) - if property_doc: - # print(output_name, property_doc) - property_def.pop("title", None) - property_def["description"] = property_doc - - properties[output_name] = property_def - - schema = {"type": "object"} - if len(properties) > 0: - schema["properties"] = typing.cast(JsonType, properties) - schema["additionalProperties"] = False - if len(required) > 0: - schema["required"] = typing.cast(JsonType, required) - if self.options.use_descriptions: - schema.update(docstring_to_schema(typ)) - return schema - - def _type_to_schema_with_lookup(self, data_type: TypeLike) -> Schema: - """ - Returns the JSON schema associated with a type that may be registered in the catalog of known types. - - :param data_type: The type whose JSON schema we seek. - :returns: The JSON schema associated with the type. - """ - - entry = JsonSchemaGenerator.type_catalog.get(data_type) - if entry.schema is None: - type_schema = self.type_to_schema(data_type, force_expand=True) - else: - type_schema = deepcopy(entry.schema) - - # add descriptive text (if present) - if self.options.use_descriptions: - if isinstance(data_type, type) and not isinstance(data_type, typing.ForwardRef): - type_schema.update(docstring_to_schema(data_type)) - - # add example (if present) - if self.options.use_examples and entry.examples: - type_schema["examples"] = entry.examples - - return type_schema - - def classdef_to_schema(self, data_type: TypeLike, force_expand: bool = False) -> tuple[Schema, dict[str, Schema]]: - """ - Returns the JSON schema associated with a type and any nested types. - - :param data_type: The type whose JSON schema to return. - :param force_expand: True if a full JSON schema is to be returned even for well-known types; false if a schema - reference is to be used for well-known types. - :returns: A tuple of the JSON schema, and a mapping between nested type names and their corresponding schema. - """ - - if not is_type_like(data_type): - raise TypeError(f"expected a type-like object but got: {data_type}") - - self.types_used = {} - try: - type_schema = self.type_to_schema(data_type, force_expand=force_expand) - - types_defined: dict[str, Schema] = {} - while len(self.types_used) > len(types_defined): - # make a snapshot copy; original collection is going to be modified - types_undefined = { - sub_name: sub_type - for sub_name, sub_type in self.types_used.items() - if sub_name not in types_defined - } - - # expand undefined types, which may lead to additional types to be defined - for sub_name, sub_type in types_undefined.items(): - types_defined[sub_name] = self._type_to_schema_with_lookup(sub_type) - - type_definitions = dict(sorted(types_defined.items())) - finally: - self.types_used = {} - - return type_schema, type_definitions - - -class Validator(enum.Enum): - "Defines constants for JSON schema standards." - - Draft7 = jsonschema.Draft7Validator - Draft201909 = jsonschema.Draft201909Validator - Draft202012 = jsonschema.Draft202012Validator - Latest = jsonschema.Draft202012Validator - - -def classdef_to_schema( - data_type: TypeLike, - options: SchemaOptions | None = None, - validator: Validator = Validator.Latest, -) -> Schema: - """ - Returns the JSON schema corresponding to the given type. - - :param data_type: The Python type used to generate the JSON schema - :returns: A JSON object that you can serialize to a JSON string with json.dump or json.dumps - :raises TypeError: Indicates that the generated JSON schema does not validate against the desired meta-schema. - """ - - # short-circuit with an error message when passing invalid data - if not is_type_like(data_type): - raise TypeError(f"expected a type-like object but got: {data_type}") - - generator = JsonSchemaGenerator(options) - type_schema, type_definitions = generator.classdef_to_schema(data_type) - - class_schema: Schema = {} - if type_definitions: - class_schema["definitions"] = typing.cast(JsonType, type_definitions) - class_schema.update(type_schema) - - validator_id = validator.value.META_SCHEMA["$id"] - try: - validator.value.check_schema(class_schema) - except jsonschema.exceptions.SchemaError: - raise TypeError(f"schema does not validate against meta-schema <{validator_id}>") - - schema = {"$schema": validator_id} - schema.update(class_schema) - return schema - - -def validate_object(data_type: TypeLike, json_dict: JsonType) -> None: - """ - Validates if the JSON dictionary object conforms to the expected type. - - :param data_type: The type to match against. - :param json_dict: A JSON object obtained with `json.load` or `json.loads`. - :raises jsonschema.exceptions.ValidationError: Indicates that the JSON object cannot represent the type. - """ - - schema_dict = classdef_to_schema(data_type) - jsonschema.validate(json_dict, schema_dict, format_checker=jsonschema.FormatChecker()) - - -def print_schema(data_type: type) -> None: - """Pretty-prints the JSON schema corresponding to the type.""" - - s = classdef_to_schema(data_type) - print(json.dumps(s, indent=4)) - - -def get_schema_identifier(data_type: type) -> str | None: - if data_type in JsonSchemaGenerator.type_catalog: - return JsonSchemaGenerator.type_catalog.get(data_type).identifier - else: - return None - - -def register_schema( - data_type: T, - schema: Schema | None = None, - name: str | None = None, - examples: list[JsonType] | None = None, -) -> T: - """ - Associates a type with a JSON schema definition. - - :param data_type: The type to associate with a JSON schema. - :param schema: The schema to associate the type with. Derived automatically if omitted. - :param name: The name used for looking uo the type. Determined automatically if omitted. - :returns: The input type. - """ - - JsonSchemaGenerator.type_catalog.add( - data_type, - schema, - name if name is not None else python_type_to_name(data_type), - examples, - ) - return data_type - - -@overload -def json_schema_type(cls: type[T], /) -> type[T]: ... - - -@overload -def json_schema_type(cls: None, *, schema: Schema | None = None) -> Callable[[type[T]], type[T]]: ... - - -def json_schema_type( - cls: type[T] | None = None, - *, - schema: Schema | None = None, - examples: list[JsonType] | None = None, -) -> type[T] | Callable[[type[T]], type[T]]: - """Decorator to add user-defined schema definition to a class.""" - - def wrap(cls: type[T]) -> type[T]: - return register_schema(cls, schema, examples=examples) - - # see if decorator is used as @json_schema_type or @json_schema_type() - if cls is None: - # called with parentheses - return wrap - else: - # called as @json_schema_type without parentheses - return wrap(cls) - - -register_schema(JsonObject, name="JsonObject") -register_schema(JsonArray, name="JsonArray") - -register_schema( - JsonType, - name="JsonType", - examples=[ - { - "property1": None, - "property2": True, - "property3": 64, - "property4": "string", - "property5": ["item"], - "property6": {"key": "value"}, - } - ], -) -register_schema( - StrictJsonType, - name="StrictJsonType", - examples=[ - { - "property1": True, - "property2": 64, - "property3": "string", - "property4": ["item"], - "property5": {"key": "value"}, - } - ], -) diff --git a/src/llama_stack_api/strong_typing/serialization.py b/src/llama_stack_api/strong_typing/serialization.py deleted file mode 100644 index 3e34945add..0000000000 --- a/src/llama_stack_api/strong_typing/serialization.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. - -""" -Type-safe data interchange for Python data classes. - -:see: https://github.com/hunyadi/strong_typing -""" - -import inspect -import json -import sys -from types import ModuleType -from typing import Any, TextIO, TypeVar - -from .core import JsonType -from .deserializer import create_deserializer -from .inspection import TypeLike -from .serializer import create_serializer - -T = TypeVar("T") - - -def object_to_json(obj: Any) -> JsonType: - """ - Converts a Python object to a representation that can be exported to JSON. - - * Fundamental types (e.g. numeric types) are written as is. - * Date and time types are serialized in the ISO 8601 format with time zone. - * A byte array is written as a string with Base64 encoding. - * UUIDs are written as a UUID string. - * Enumerations are written as their value. - * Containers (e.g. `list`, `dict`, `set`, `tuple`) are exported recursively. - * Objects with properties (including data class types) are converted to a dictionaries of key-value pairs. - """ - - typ: type = type(obj) - generator = create_serializer(typ) - return generator.generate(obj) - - -def json_to_object(typ: TypeLike, data: JsonType, *, context: ModuleType | None = None) -> object: - """ - Creates an object from a representation that has been de-serialized from JSON. - - When de-serializing a JSON object into a Python object, the following transformations are applied: - - * Fundamental types are parsed as `bool`, `int`, `float` or `str`. - * Date and time types are parsed from the ISO 8601 format with time zone into the corresponding Python type - `datetime`, `date` or `time` - * A byte array is read from a string with Base64 encoding into a `bytes` instance. - * UUIDs are extracted from a UUID string into a `uuid.UUID` instance. - * Enumerations are instantiated with a lookup on enumeration value. - * Containers (e.g. `list`, `dict`, `set`, `tuple`) are parsed recursively. - * Complex objects with properties (including data class types) are populated from dictionaries of key-value pairs - using reflection (enumerating type annotations). - - :raises TypeError: A de-serializing engine cannot be constructed for the input type. - :raises JsonKeyError: Deserialization for a class or union type has failed because a matching member was not found. - :raises JsonTypeError: Deserialization for data has failed due to a type mismatch. - """ - - # use caller context for evaluating types if no context is supplied - if context is None: - this_frame = inspect.currentframe() - if this_frame is not None: - caller_frame = this_frame.f_back - del this_frame - - if caller_frame is not None: - try: - context = sys.modules[caller_frame.f_globals["__name__"]] - finally: - del caller_frame - - parser = create_deserializer(typ, context) - return parser.parse(data) - - -def json_dump_string(json_object: JsonType) -> str: - "Dump an object as a JSON string with a compact representation." - - return json.dumps(json_object, ensure_ascii=False, check_circular=False, separators=(",", ":")) - - -def json_dump(json_object: JsonType, file: TextIO) -> None: - json.dump( - json_object, - file, - ensure_ascii=False, - check_circular=False, - separators=(",", ":"), - ) - file.write("\n") diff --git a/src/llama_stack_api/strong_typing/serializer.py b/src/llama_stack_api/strong_typing/serializer.py deleted file mode 100644 index 4a12a1f4b3..0000000000 --- a/src/llama_stack_api/strong_typing/serializer.py +++ /dev/null @@ -1,494 +0,0 @@ -# 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. - -""" -Type-safe data interchange for Python data classes. - -:see: https://github.com/hunyadi/strong_typing -""" - -import abc -import base64 -import datetime -import enum -import functools -import inspect -import ipaddress -import sys -import typing -import uuid -from collections.abc import Callable -from types import FunctionType, MethodType, ModuleType -from typing import ( - Any, - Generic, - Literal, - NamedTuple, - TypeVar, - Union, -) - -from .core import JsonType -from .exception import JsonTypeError, JsonValueError -from .inspection import ( - TypeLike, - enum_value_types, - evaluate_type, - get_class_properties, - get_resolved_hints, - is_dataclass_type, - is_named_tuple_type, - is_reserved_property, - is_type_annotated, - is_type_enum, - unwrap_annotated_type, -) -from .mapping import python_field_to_json_property - -T = TypeVar("T") - - -class Serializer(abc.ABC, Generic[T]): - @abc.abstractmethod - def generate(self, data: T) -> JsonType: ... - - -class NoneSerializer(Serializer[None]): - def generate(self, data: None) -> None: - # can be directly represented in JSON - return None - - -class BoolSerializer(Serializer[bool]): - def generate(self, data: bool) -> bool: - # can be directly represented in JSON - return data - - -class IntSerializer(Serializer[int]): - def generate(self, data: int) -> int: - # can be directly represented in JSON - return data - - -class FloatSerializer(Serializer[float]): - def generate(self, data: float) -> float: - # can be directly represented in JSON - return data - - -class StringSerializer(Serializer[str]): - def generate(self, data: str) -> str: - # can be directly represented in JSON - return data - - -class BytesSerializer(Serializer[bytes]): - def generate(self, data: bytes) -> str: - return base64.b64encode(data).decode("ascii") - - -class DateTimeSerializer(Serializer[datetime.datetime]): - def generate(self, obj: datetime.datetime) -> str: - if obj.tzinfo is None: - raise JsonValueError(f"timestamp lacks explicit time zone designator: {obj}") - fmt = obj.isoformat() - if fmt.endswith("+00:00"): - fmt = f"{fmt[:-6]}Z" # Python's isoformat() does not support military time zones like "Zulu" for UTC - return fmt - - -class DateSerializer(Serializer[datetime.date]): - def generate(self, obj: datetime.date) -> str: - return obj.isoformat() - - -class TimeSerializer(Serializer[datetime.time]): - def generate(self, obj: datetime.time) -> str: - return obj.isoformat() - - -class UUIDSerializer(Serializer[uuid.UUID]): - def generate(self, obj: uuid.UUID) -> str: - return str(obj) - - -class IPv4Serializer(Serializer[ipaddress.IPv4Address]): - def generate(self, obj: ipaddress.IPv4Address) -> str: - return str(obj) - - -class IPv6Serializer(Serializer[ipaddress.IPv6Address]): - def generate(self, obj: ipaddress.IPv6Address) -> str: - return str(obj) - - -class EnumSerializer(Serializer[enum.Enum]): - def generate(self, obj: enum.Enum) -> int | str: - value = obj.value - if isinstance(value, int): - return value - return str(value) - - -class UntypedListSerializer(Serializer[list]): - def generate(self, obj: list) -> list[JsonType]: - return [object_to_json(item) for item in obj] - - -class UntypedDictSerializer(Serializer[dict]): - def generate(self, obj: dict) -> dict[str, JsonType]: - if obj and isinstance(next(iter(obj.keys())), enum.Enum): - iterator = ((key.value, object_to_json(value)) for key, value in obj.items()) - else: - iterator = ((str(key), object_to_json(value)) for key, value in obj.items()) - return dict(iterator) - - -class UntypedSetSerializer(Serializer[set]): - def generate(self, obj: set) -> list[JsonType]: - return [object_to_json(item) for item in obj] - - -class UntypedTupleSerializer(Serializer[tuple]): - def generate(self, obj: tuple) -> list[JsonType]: - return [object_to_json(item) for item in obj] - - -class TypedCollectionSerializer(Serializer, Generic[T]): - generator: Serializer[T] - - def __init__(self, item_type: type[T], context: ModuleType | None) -> None: - self.generator = _get_serializer(item_type, context) - - -class TypedListSerializer(TypedCollectionSerializer[T]): - def generate(self, obj: list[T]) -> list[JsonType]: - return [self.generator.generate(item) for item in obj] - - -class TypedStringDictSerializer(TypedCollectionSerializer[T]): - def __init__(self, value_type: type[T], context: ModuleType | None) -> None: - super().__init__(value_type, context) - - def generate(self, obj: dict[str, T]) -> dict[str, JsonType]: - return {key: self.generator.generate(value) for key, value in obj.items()} - - -class TypedEnumDictSerializer(TypedCollectionSerializer[T]): - def __init__( - self, - key_type: type[enum.Enum], - value_type: type[T], - context: ModuleType | None, - ) -> None: - super().__init__(value_type, context) - - value_types = enum_value_types(key_type) - if len(value_types) != 1: - raise JsonTypeError( - f"invalid key type, enumerations must have a consistent member value type but several types found: {value_types}" - ) - - value_type = value_types.pop() - if value_type is not str: - raise JsonTypeError("invalid enumeration key type, expected `enum.Enum` with string values") - - def generate(self, obj: dict[enum.Enum, T]) -> dict[str, JsonType]: - return {key.value: self.generator.generate(value) for key, value in obj.items()} - - -class TypedSetSerializer(TypedCollectionSerializer[T]): - def generate(self, obj: set[T]) -> JsonType: - return [self.generator.generate(item) for item in obj] - - -class TypedTupleSerializer(Serializer[tuple]): - item_generators: tuple[Serializer, ...] - - def __init__(self, item_types: tuple[type, ...], context: ModuleType | None) -> None: - self.item_generators = tuple(_get_serializer(item_type, context) for item_type in item_types) - - def generate(self, obj: tuple) -> list[JsonType]: - return [item_generator.generate(item) for item_generator, item in zip(self.item_generators, obj, strict=False)] - - -class CustomSerializer(Serializer): - converter: Callable[[object], JsonType] - - def __init__(self, converter: Callable[[object], JsonType]) -> None: - self.converter = converter - - def generate(self, obj: object) -> JsonType: - return self.converter(obj) - - -class FieldSerializer(Generic[T]): - """ - Serializes a Python object field into a JSON property. - - :param field_name: The name of the field in a Python class to read data from. - :param property_name: The name of the JSON property to write to a JSON `object`. - :param generator: A compatible serializer that can handle the field's type. - """ - - field_name: str - property_name: str - generator: Serializer - - def __init__(self, field_name: str, property_name: str, generator: Serializer[T]) -> None: - self.field_name = field_name - self.property_name = property_name - self.generator = generator - - def generate_field(self, obj: object, object_dict: dict[str, JsonType]) -> None: - value = getattr(obj, self.field_name) - if value is not None: - object_dict[self.property_name] = self.generator.generate(value) - - -class TypedClassSerializer(Serializer[T]): - property_generators: list[FieldSerializer] - - def __init__(self, class_type: type[T], context: ModuleType | None) -> None: - self.property_generators = [ - FieldSerializer( - field_name, - python_field_to_json_property(field_name, field_type), - _get_serializer(field_type, context), - ) - for field_name, field_type in get_class_properties(class_type) - ] - - def generate(self, obj: T) -> dict[str, JsonType]: - object_dict: dict[str, JsonType] = {} - for property_generator in self.property_generators: - property_generator.generate_field(obj, object_dict) - - return object_dict - - -class TypedNamedTupleSerializer(TypedClassSerializer[NamedTuple]): - def __init__(self, class_type: type[NamedTuple], context: ModuleType | None) -> None: - super().__init__(class_type, context) - - -class DataclassSerializer(TypedClassSerializer[T]): - def __init__(self, class_type: type[T], context: ModuleType | None) -> None: - super().__init__(class_type, context) - - -class UnionSerializer(Serializer): - def generate(self, obj: Any) -> JsonType: - return object_to_json(obj) - - -class LiteralSerializer(Serializer): - generator: Serializer - - def __init__(self, values: tuple[Any, ...], context: ModuleType | None) -> None: - literal_type_tuple = tuple(type(value) for value in values) - literal_type_set = set(literal_type_tuple) - if len(literal_type_set) != 1: - value_names = ", ".join(repr(value) for value in values) - raise TypeError( - f"type `Literal[{value_names}]` expects consistent literal value types but got: {literal_type_tuple}" - ) - - literal_type = literal_type_set.pop() - self.generator = _get_serializer(literal_type, context) - - def generate(self, obj: Any) -> JsonType: - return self.generator.generate(obj) - - -class UntypedNamedTupleSerializer(Serializer): - fields: dict[str, str] - - def __init__(self, class_type: type[NamedTuple]) -> None: - # named tuples are also instances of tuple - self.fields = {} - field_names: tuple[str, ...] = class_type._fields - for field_name in field_names: - self.fields[field_name] = python_field_to_json_property(field_name) - - def generate(self, obj: NamedTuple) -> JsonType: - object_dict = {} - for field_name, property_name in self.fields.items(): - value = getattr(obj, field_name) - object_dict[property_name] = object_to_json(value) - - return object_dict - - -class UntypedClassSerializer(Serializer): - def generate(self, obj: object) -> JsonType: - # iterate over object attributes to get a standard representation - object_dict = {} - for name in dir(obj): - if is_reserved_property(name): - continue - - value = getattr(obj, name) - if value is None: - continue - - # filter instance methods - if inspect.ismethod(value): - continue - - object_dict[python_field_to_json_property(name)] = object_to_json(value) - - return object_dict - - -def create_serializer(typ: TypeLike, context: ModuleType | None = None) -> Serializer: - """ - Creates a serializer engine to produce an object that can be directly converted into a JSON string. - - When serializing a Python object into a JSON object, the following transformations are applied: - - * Fundamental types (`bool`, `int`, `float` or `str`) are returned as-is. - * Date and time types (`datetime`, `date` or `time`) produce an ISO 8601 format string with time zone - (ending with `Z` for UTC). - * Byte arrays (`bytes`) are written as a string with Base64 encoding. - * UUIDs (`uuid.UUID`) are written as a UUID string as per RFC 4122. - * Enumerations yield their enumeration value. - * Containers (e.g. `list`, `dict`, `set`, `tuple`) are processed recursively. - * Complex objects with properties (including data class types) generate dictionaries of key-value pairs. - - :raises TypeError: A serializer engine cannot be constructed for the input type. - """ - - if context is None: - if isinstance(typ, type): - context = sys.modules[typ.__module__] - - return _get_serializer(typ, context) - - -def _get_serializer(typ: TypeLike, context: ModuleType | None) -> Serializer: - if isinstance(typ, (str, typing.ForwardRef)): - if context is None: - raise TypeError(f"missing context for evaluating type: {typ}") - - typ = evaluate_type(typ, context) - - if isinstance(typ, type): - return _fetch_serializer(typ) - else: - # special forms are not always hashable - return _create_serializer(typ, context) - - -@functools.cache -def _fetch_serializer(typ: type) -> Serializer: - context = sys.modules[typ.__module__] - return _create_serializer(typ, context) - - -def _create_serializer(typ: TypeLike, context: ModuleType | None) -> Serializer: - # check for well-known types - if typ is type(None): - return NoneSerializer() - elif typ is bool: - return BoolSerializer() - elif typ is int: - return IntSerializer() - elif typ is float: - return FloatSerializer() - elif typ is str: - return StringSerializer() - elif typ is bytes: - return BytesSerializer() - elif typ is datetime.datetime: - return DateTimeSerializer() - elif typ is datetime.date: - return DateSerializer() - elif typ is datetime.time: - return TimeSerializer() - elif typ is uuid.UUID: - return UUIDSerializer() - elif typ is ipaddress.IPv4Address: - return IPv4Serializer() - elif typ is ipaddress.IPv6Address: - return IPv6Serializer() - - # dynamically-typed collection types - if typ is list: - return UntypedListSerializer() - elif typ is dict: - return UntypedDictSerializer() - elif typ is set: - return UntypedSetSerializer() - elif typ is tuple: - return UntypedTupleSerializer() - - # generic types (e.g. list, dict, set, etc.) - origin_type = typing.get_origin(typ) - if origin_type is list: - (list_item_type,) = typing.get_args(typ) # unpack single tuple element - return TypedListSerializer(list_item_type, context) - elif origin_type is dict: - key_type, value_type = typing.get_args(typ) - if key_type is str: - return TypedStringDictSerializer(value_type, context) - elif issubclass(key_type, enum.Enum): - return TypedEnumDictSerializer(key_type, value_type, context) - elif origin_type is set: - (set_member_type,) = typing.get_args(typ) # unpack single tuple element - return TypedSetSerializer(set_member_type, context) - elif origin_type is tuple: - return TypedTupleSerializer(typing.get_args(typ), context) - elif origin_type is Union: - return UnionSerializer() - elif origin_type is Literal: - return LiteralSerializer(typing.get_args(typ), context) - - if is_type_annotated(typ): - return create_serializer(unwrap_annotated_type(typ)) - - # check if object has custom serialization method - convert_func = getattr(typ, "to_json", None) - if callable(convert_func): - return CustomSerializer(convert_func) - - if is_type_enum(typ): - return EnumSerializer() - if is_dataclass_type(typ): - return DataclassSerializer(typ, context) - if is_named_tuple_type(typ): - if getattr(typ, "__annotations__", None): - return TypedNamedTupleSerializer(typ, context) - else: - return UntypedNamedTupleSerializer(typ) - - # fail early if caller passes an object with an exotic type - if not isinstance(typ, type) or typ is FunctionType or typ is MethodType or typ is type or typ is ModuleType: - raise TypeError(f"object of type {typ} cannot be represented in JSON") - - if get_resolved_hints(typ): - return TypedClassSerializer(typ, context) - else: - return UntypedClassSerializer() - - -def object_to_json(obj: Any) -> JsonType: - """ - Converts a Python object to a representation that can be exported to JSON. - - * Fundamental types (e.g. numeric types) are written as is. - * Date and time types are serialized in the ISO 8601 format with time zone. - * A byte array is written as a string with Base64 encoding. - * UUIDs are written as a UUID string. - * Enumerations are written as their value. - * Containers (e.g. `list`, `dict`, `set`, `tuple`) are exported recursively. - * Objects with properties (including data class types) are converted to a dictionaries of key-value pairs. - """ - - typ: type = type(obj) - generator = create_serializer(typ) - return generator.generate(obj) diff --git a/src/llama_stack_api/strong_typing/slots.py b/src/llama_stack_api/strong_typing/slots.py deleted file mode 100644 index 7728341405..0000000000 --- a/src/llama_stack_api/strong_typing/slots.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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. - -from typing import Any, TypeVar - -T = TypeVar("T") - - -class SlotsMeta(type): - def __new__(cls: type[T], name: str, bases: tuple[type, ...], ns: dict[str, Any]) -> T: - # caller may have already provided slots, in which case just retain them and keep going - slots: tuple[str, ...] = ns.get("__slots__", ()) - - # add fields with type annotations to slots - annotations: dict[str, Any] = ns.get("__annotations__", {}) - members = tuple(member for member in annotations.keys() if member not in slots) - - # assign slots - ns["__slots__"] = slots + tuple(members) - return super().__new__(cls, name, bases, ns) # type: ignore - - -class Slots(metaclass=SlotsMeta): - pass diff --git a/src/llama_stack_api/strong_typing/topological.py b/src/llama_stack_api/strong_typing/topological.py deleted file mode 100644 index 9502a58879..0000000000 --- a/src/llama_stack_api/strong_typing/topological.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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. - -""" -Type-safe data interchange for Python data classes. - -:see: https://github.com/hunyadi/strong_typing -""" - -from collections.abc import Callable, Iterable -from typing import TypeVar - -from .inspection import TypeCollector - -T = TypeVar("T") - - -def topological_sort(graph: dict[T, set[T]]) -> list[T]: - """ - Performs a topological sort of a graph. - - Nodes with no outgoing edges are first. Nodes with no incoming edges are last. - The topological ordering is not unique. - - :param graph: A dictionary of mappings from nodes to adjacent nodes. Keys and set members must be hashable. - :returns: The list of nodes in topological order. - """ - - # empty list that will contain the sorted nodes (in reverse order) - ordered: list[T] = [] - - seen: dict[T, bool] = {} - - def _visit(n: T) -> None: - status = seen.get(n) - if status is not None: - if status: # node has a permanent mark - return - else: # node has a temporary mark - raise RuntimeError(f"cycle detected in graph for node {n}") - - seen[n] = False # apply temporary mark - for m in graph[n]: # visit all adjacent nodes - if m != n: # ignore self-referencing nodes - _visit(m) - - seen[n] = True # apply permanent mark - ordered.append(n) - - for n in graph.keys(): - _visit(n) - - return ordered - - -def type_topological_sort( - types: Iterable[type], - dependency_fn: Callable[[type], Iterable[type]] | None = None, -) -> list[type]: - """ - Performs a topological sort of a list of types. - - Types that don't depend on other types (i.e. fundamental types) are first. Types on which no other types depend - are last. The topological ordering is not unique. - - :param types: A list of types (simple or composite). - :param dependency_fn: Returns a list of additional dependencies for a class (e.g. classes referenced by a foreign key). - :returns: The list of types in topological order. - """ - - if not all(isinstance(typ, type) for typ in types): - raise TypeError("expected a list of types") - - collector = TypeCollector() - collector.traverse_all(types) - graph = collector.graph - - if dependency_fn: - new_types: set[type] = set() - for source_type, references in graph.items(): - dependent_types = dependency_fn(source_type) - references.update(dependent_types) - new_types.update(dependent_types) - for new_type in new_types: - graph[new_type] = set() - - return topological_sort(graph) diff --git a/src/llama_stack_api/tools.py b/src/llama_stack_api/tools.py index 6571c20479..ad5edb2b0d 100644 --- a/src/llama_stack_api/tools.py +++ b/src/llama_stack_api/tools.py @@ -97,6 +97,7 @@ class ListToolGroupsResponse(BaseModel): data: list[ToolGroup] +@json_schema_type class ListToolDefsResponse(BaseModel): """Response containing a list of tool definitions. diff --git a/src/llama_stack_api/vector_io.py b/src/llama_stack_api/vector_io.py index 053e569f44..899b077987 100644 --- a/src/llama_stack_api/vector_io.py +++ b/src/llama_stack_api/vector_io.py @@ -15,8 +15,7 @@ from llama_stack_api.common.tracing import telemetry_traceable from llama_stack_api.inference import InterleavedContent -from llama_stack_api.schema_utils import json_schema_type, webmethod -from llama_stack_api.strong_typing.schema import register_schema +from llama_stack_api.schema_utils import json_schema_type, register_schema, webmethod from llama_stack_api.vector_stores import VectorStore from llama_stack_api.version import LLAMA_STACK_API_V1 diff --git a/uv.lock b/uv.lock index 0b8b555f68..2dddcb1c86 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" @@ -1982,6 +2029,7 @@ dev = [ { name = "black" }, { name = "mypy" }, { name = "nbval" }, + { name = "openapi-spec-validator" }, { name = "pre-commit" }, { name = "pytest" }, { name = "pytest-asyncio" }, @@ -2107,6 +2155,7 @@ requires-dist = [ { name = "python-dotenv" }, { name = "python-multipart", specifier = ">=0.0.20" }, { name = "pyyaml", specifier = ">=6.0" }, + { name = "pyyaml", specifier = ">=6.0.2" }, { name = "rich" }, { name = "sqlalchemy", extras = ["asyncio"], specifier = ">=2.0.41" }, { name = "starlette" }, @@ -3000,6 +3049,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" @@ -3236,6 +3314,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" @@ -4393,6 +4480,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" @@ -4505,40 +4604,46 @@ wheels = [ [[package]] name = "ruamel-yaml" -version = "0.18.14" +version = "0.18.16" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "ruamel-yaml-clib", marker = "python_full_version < '3.14' and platform_python_implementation == 'CPython'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/39/87/6da0df742a4684263261c253f00edd5829e6aca970fff69e75028cccc547/ruamel.yaml-0.18.14.tar.gz", hash = "sha256:7227b76aaec364df15936730efbf7d72b30c0b79b1d578bbb8e3dcb2d81f52b7", size = 145511, upload-time = "2025-06-09T08:51:09.828Z" } +sdist = { url = "https://files.pythonhosted.org/packages/9f/c7/ee630b29e04a672ecfc9b63227c87fd7a37eb67c1bf30fe95376437f897c/ruamel.yaml-0.18.16.tar.gz", hash = "sha256:a6e587512f3c998b2225d68aa1f35111c29fad14aed561a26e73fab729ec5e5a", size = 147269, upload-time = "2025-10-22T17:54:02.346Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/af/6d/6fe4805235e193aad4aaf979160dd1f3c487c57d48b810c816e6e842171b/ruamel.yaml-0.18.14-py3-none-any.whl", hash = "sha256:710ff198bb53da66718c7db27eec4fbcc9aa6ca7204e4c1df2f282b6fe5eb6b2", size = 118570, upload-time = "2025-06-09T08:51:06.348Z" }, + { url = "https://files.pythonhosted.org/packages/0f/73/bb1bc2529f852e7bf64a2dec885e89ff9f5cc7bbf6c9340eed30ff2c69c5/ruamel.yaml-0.18.16-py3-none-any.whl", hash = "sha256:048f26d64245bae57a4f9ef6feb5b552a386830ef7a826f235ffb804c59efbba", size = 119858, upload-time = "2025-10-22T17:53:59.012Z" }, ] [[package]] name = "ruamel-yaml-clib" -version = "0.2.12" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/20/84/80203abff8ea4993a87d823a5f632e4d92831ef75d404c9fc78d0176d2b5/ruamel.yaml.clib-0.2.12.tar.gz", hash = "sha256:6c8fbb13ec503f99a91901ab46e0b07ae7941cd527393187039aec586fdfd36f", size = 225315, upload-time = "2024-10-20T10:10:56.22Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/48/41/e7a405afbdc26af961678474a55373e1b323605a4f5e2ddd4a80ea80f628/ruamel.yaml.clib-0.2.12-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:20b0f8dc160ba83b6dcc0e256846e1a02d044e13f7ea74a3d1d56ede4e48c632", size = 133433, upload-time = "2024-10-20T10:12:55.657Z" }, - { url = "https://files.pythonhosted.org/packages/ec/b0/b850385604334c2ce90e3ee1013bd911aedf058a934905863a6ea95e9eb4/ruamel.yaml.clib-0.2.12-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:943f32bc9dedb3abff9879edc134901df92cfce2c3d5c9348f172f62eb2d771d", size = 647362, upload-time = "2024-10-20T10:12:57.155Z" }, - { url = "https://files.pythonhosted.org/packages/44/d0/3f68a86e006448fb6c005aee66565b9eb89014a70c491d70c08de597f8e4/ruamel.yaml.clib-0.2.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95c3829bb364fdb8e0332c9931ecf57d9be3519241323c5274bd82f709cebc0c", size = 754118, upload-time = "2024-10-20T10:12:58.501Z" }, - { url = "https://files.pythonhosted.org/packages/52/a9/d39f3c5ada0a3bb2870d7db41901125dbe2434fa4f12ca8c5b83a42d7c53/ruamel.yaml.clib-0.2.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:749c16fcc4a2b09f28843cda5a193e0283e47454b63ec4b81eaa2242f50e4ccd", size = 706497, upload-time = "2024-10-20T10:13:00.211Z" }, - { url = "https://files.pythonhosted.org/packages/b0/fa/097e38135dadd9ac25aecf2a54be17ddf6e4c23e43d538492a90ab3d71c6/ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bf165fef1f223beae7333275156ab2022cffe255dcc51c27f066b4370da81e31", size = 698042, upload-time = "2024-10-21T11:26:46.038Z" }, - { url = "https://files.pythonhosted.org/packages/ec/d5/a659ca6f503b9379b930f13bc6b130c9f176469b73b9834296822a83a132/ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:32621c177bbf782ca5a18ba4d7af0f1082a3f6e517ac2a18b3974d4edf349680", size = 745831, upload-time = "2024-10-21T11:26:47.487Z" }, - { url = "https://files.pythonhosted.org/packages/db/5d/36619b61ffa2429eeaefaab4f3374666adf36ad8ac6330d855848d7d36fd/ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b82a7c94a498853aa0b272fd5bc67f29008da798d4f93a2f9f289feb8426a58d", size = 715692, upload-time = "2024-12-11T19:58:17.252Z" }, - { url = "https://files.pythonhosted.org/packages/b1/82/85cb92f15a4231c89b95dfe08b09eb6adca929ef7df7e17ab59902b6f589/ruamel.yaml.clib-0.2.12-cp312-cp312-win32.whl", hash = "sha256:e8c4ebfcfd57177b572e2040777b8abc537cdef58a2120e830124946aa9b42c5", size = 98777, upload-time = "2024-10-20T10:13:01.395Z" }, - { url = "https://files.pythonhosted.org/packages/d7/8f/c3654f6f1ddb75daf3922c3d8fc6005b1ab56671ad56ffb874d908bfa668/ruamel.yaml.clib-0.2.12-cp312-cp312-win_amd64.whl", hash = "sha256:0467c5965282c62203273b838ae77c0d29d7638c8a4e3a1c8bdd3602c10904e4", size = 115523, upload-time = "2024-10-20T10:13:02.768Z" }, - { url = "https://files.pythonhosted.org/packages/29/00/4864119668d71a5fa45678f380b5923ff410701565821925c69780356ffa/ruamel.yaml.clib-0.2.12-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:4c8c5d82f50bb53986a5e02d1b3092b03622c02c2eb78e29bec33fd9593bae1a", size = 132011, upload-time = "2024-10-20T10:13:04.377Z" }, - { url = "https://files.pythonhosted.org/packages/7f/5e/212f473a93ae78c669ffa0cb051e3fee1139cb2d385d2ae1653d64281507/ruamel.yaml.clib-0.2.12-cp313-cp313-manylinux2014_aarch64.whl", hash = "sha256:e7e3736715fbf53e9be2a79eb4db68e4ed857017344d697e8b9749444ae57475", size = 642488, upload-time = "2024-10-20T10:13:05.906Z" }, - { url = "https://files.pythonhosted.org/packages/1f/8f/ecfbe2123ade605c49ef769788f79c38ddb1c8fa81e01f4dbf5cf1a44b16/ruamel.yaml.clib-0.2.12-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b7e75b4965e1d4690e93021adfcecccbca7d61c7bddd8e22406ef2ff20d74ef", size = 745066, upload-time = "2024-10-20T10:13:07.26Z" }, - { url = "https://files.pythonhosted.org/packages/e2/a9/28f60726d29dfc01b8decdb385de4ced2ced9faeb37a847bd5cf26836815/ruamel.yaml.clib-0.2.12-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96777d473c05ee3e5e3c3e999f5d23c6f4ec5b0c38c098b3a5229085f74236c6", size = 701785, upload-time = "2024-10-20T10:13:08.504Z" }, - { url = "https://files.pythonhosted.org/packages/84/7e/8e7ec45920daa7f76046578e4f677a3215fe8f18ee30a9cb7627a19d9b4c/ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:3bc2a80e6420ca8b7d3590791e2dfc709c88ab9152c00eeb511c9875ce5778bf", size = 693017, upload-time = "2024-10-21T11:26:48.866Z" }, - { url = "https://files.pythonhosted.org/packages/c5/b3/d650eaade4ca225f02a648321e1ab835b9d361c60d51150bac49063b83fa/ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:e188d2699864c11c36cdfdada94d781fd5d6b0071cd9c427bceb08ad3d7c70e1", size = 741270, upload-time = "2024-10-21T11:26:50.213Z" }, - { url = "https://files.pythonhosted.org/packages/87/b8/01c29b924dcbbed75cc45b30c30d565d763b9c4d540545a0eeecffb8f09c/ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4f6f3eac23941b32afccc23081e1f50612bdbe4e982012ef4f5797986828cd01", size = 709059, upload-time = "2024-12-11T19:58:18.846Z" }, - { url = "https://files.pythonhosted.org/packages/30/8c/ed73f047a73638257aa9377ad356bea4d96125b305c34a28766f4445cc0f/ruamel.yaml.clib-0.2.12-cp313-cp313-win32.whl", hash = "sha256:6442cb36270b3afb1b4951f060eccca1ce49f3d087ca1ca4563a6eb479cb3de6", size = 98583, upload-time = "2024-10-20T10:13:09.658Z" }, - { url = "https://files.pythonhosted.org/packages/b0/85/e8e751d8791564dd333d5d9a4eab0a7a115f7e349595417fd50ecae3395c/ruamel.yaml.clib-0.2.12-cp313-cp313-win_amd64.whl", hash = "sha256:e5b8daf27af0b90da7bb903a876477a9e6d7270be6146906b276605997c7e9a3", size = 115190, upload-time = "2024-10-20T10:13:10.66Z" }, +version = "0.2.14" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/e9/39ec4d4b3f91188fad1842748f67d4e749c77c37e353c4e545052ee8e893/ruamel.yaml.clib-0.2.14.tar.gz", hash = "sha256:803f5044b13602d58ea378576dd75aa759f52116a0232608e8fdada4da33752e", size = 225394, upload-time = "2025-09-22T19:51:23.753Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b4/42/ccfb34a25289afbbc42017e4d3d4288e61d35b2e00cfc6b92974a6a1f94b/ruamel.yaml.clib-0.2.14-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:6aeadc170090ff1889f0d2c3057557f9cd71f975f17535c26a5d37af98f19c27", size = 271775, upload-time = "2025-09-23T14:24:12.771Z" }, + { url = "https://files.pythonhosted.org/packages/82/73/e628a92e80197ff6a79ab81ec3fa00d4cc082d58ab78d3337b7ba7043301/ruamel.yaml.clib-0.2.14-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:5e56ac47260c0eed992789fa0b8efe43404a9adb608608631a948cee4fc2b052", size = 138842, upload-time = "2025-09-22T19:50:49.156Z" }, + { url = "https://files.pythonhosted.org/packages/2b/c5/346c7094344a60419764b4b1334d9e0285031c961176ff88ffb652405b0c/ruamel.yaml.clib-0.2.14-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:a911aa73588d9a8b08d662b9484bc0567949529824a55d3885b77e8dd62a127a", size = 647404, upload-time = "2025-09-22T19:50:52.921Z" }, + { url = "https://files.pythonhosted.org/packages/df/99/65080c863eb06d4498de3d6c86f3e90595e02e159fd8529f1565f56cfe2c/ruamel.yaml.clib-0.2.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a05ba88adf3d7189a974b2de7a9d56731548d35dc0a822ec3dc669caa7019b29", size = 753141, upload-time = "2025-09-22T19:50:50.294Z" }, + { url = "https://files.pythonhosted.org/packages/3d/e3/0de85f3e3333f8e29e4b10244374a202a87665d1131798946ee22cf05c7c/ruamel.yaml.clib-0.2.14-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fb04c5650de6668b853623eceadcdb1a9f2fee381f5d7b6bc842ee7c239eeec4", size = 703477, upload-time = "2025-09-22T19:50:51.508Z" }, + { url = "https://files.pythonhosted.org/packages/d9/25/0d2f09d8833c7fd77ab8efeff213093c16856479a9d293180a0d89f6bed9/ruamel.yaml.clib-0.2.14-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:df3ec9959241d07bc261f4983d25a1205ff37703faf42b474f15d54d88b4f8c9", size = 741157, upload-time = "2025-09-23T18:42:50.408Z" }, + { url = "https://files.pythonhosted.org/packages/d3/8c/959f10c2e2153cbdab834c46e6954b6dd9e3b109c8f8c0a3cf1618310985/ruamel.yaml.clib-0.2.14-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:fbc08c02e9b147a11dfcaa1ac8a83168b699863493e183f7c0c8b12850b7d259", size = 745859, upload-time = "2025-09-22T19:50:54.497Z" }, + { url = "https://files.pythonhosted.org/packages/ed/6b/e580a7c18b485e1a5f30a32cda96b20364b0ba649d9d2baaf72f8bd21f83/ruamel.yaml.clib-0.2.14-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c099cafc1834d3c5dac305865d04235f7c21c167c8dd31ebc3d6bbc357e2f023", size = 770200, upload-time = "2025-09-22T19:50:55.718Z" }, + { url = "https://files.pythonhosted.org/packages/ef/44/3455eebc761dc8e8fdced90f2b0a3fa61e32ba38b50de4130e2d57db0f21/ruamel.yaml.clib-0.2.14-cp312-cp312-win32.whl", hash = "sha256:b5b0f7e294700b615a3bcf6d28b26e6da94e8eba63b079f4ec92e9ba6c0d6b54", size = 98829, upload-time = "2025-09-22T19:50:58.895Z" }, + { url = "https://files.pythonhosted.org/packages/76/ab/5121f7f3b651db93de546f8c982c241397aad0a4765d793aca1dac5eadee/ruamel.yaml.clib-0.2.14-cp312-cp312-win_amd64.whl", hash = "sha256:a37f40a859b503304dd740686359fcf541d6fb3ff7fc10f539af7f7150917c68", size = 115570, upload-time = "2025-09-22T19:50:57.981Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ae/e3811f05415594025e96000349d3400978adaed88d8f98d494352d9761ee/ruamel.yaml.clib-0.2.14-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7e4f9da7e7549946e02a6122dcad00b7c1168513acb1f8a726b1aaf504a99d32", size = 269205, upload-time = "2025-09-23T14:24:15.06Z" }, + { url = "https://files.pythonhosted.org/packages/72/06/7d51f4688d6d72bb72fa74254e1593c4f5ebd0036be5b41fe39315b275e9/ruamel.yaml.clib-0.2.14-cp313-cp313-macosx_15_0_arm64.whl", hash = "sha256:dd7546c851e59c06197a7c651335755e74aa383a835878ca86d2c650c07a2f85", size = 137417, upload-time = "2025-09-22T19:50:59.82Z" }, + { url = "https://files.pythonhosted.org/packages/5a/08/b4499234a420ef42960eeb05585df5cc7eb25ccb8c980490b079e6367050/ruamel.yaml.clib-0.2.14-cp313-cp313-manylinux2014_aarch64.whl", hash = "sha256:1c1acc3a0209ea9042cc3cfc0790edd2eddd431a2ec3f8283d081e4d5018571e", size = 642558, upload-time = "2025-09-22T19:51:03.388Z" }, + { url = "https://files.pythonhosted.org/packages/b6/ba/1975a27dedf1c4c33306ee67c948121be8710b19387aada29e2f139c43ee/ruamel.yaml.clib-0.2.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2070bf0ad1540d5c77a664de07ebcc45eebd1ddcab71a7a06f26936920692beb", size = 744087, upload-time = "2025-09-22T19:51:00.897Z" }, + { url = "https://files.pythonhosted.org/packages/20/15/8a19a13d27f3bd09fa18813add8380a29115a47b553845f08802959acbce/ruamel.yaml.clib-0.2.14-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd8fe07f49c170e09d76773fb86ad9135e0beee44f36e1576a201b0676d3d1d", size = 699709, upload-time = "2025-09-22T19:51:02.075Z" }, + { url = "https://files.pythonhosted.org/packages/19/ee/8d6146a079ad21e534b5083c9ee4a4c8bec42f79cf87594b60978286b39a/ruamel.yaml.clib-0.2.14-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ff86876889ea478b1381089e55cf9e345707b312beda4986f823e1d95e8c0f59", size = 708926, upload-time = "2025-09-23T18:42:51.707Z" }, + { url = "https://files.pythonhosted.org/packages/a9/f5/426b714abdc222392e68f3b8ad323930d05a214a27c7e7a0f06c69126401/ruamel.yaml.clib-0.2.14-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:1f118b707eece8cf84ecbc3e3ec94d9db879d85ed608f95870d39b2d2efa5dca", size = 740202, upload-time = "2025-09-22T19:51:04.673Z" }, + { url = "https://files.pythonhosted.org/packages/3d/ac/3c5c2b27a183f4fda8a57c82211721c016bcb689a4a175865f7646db9f94/ruamel.yaml.clib-0.2.14-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b30110b29484adc597df6bd92a37b90e63a8c152ca8136aad100a02f8ba6d1b6", size = 765196, upload-time = "2025-09-22T19:51:05.916Z" }, + { url = "https://files.pythonhosted.org/packages/92/2e/06f56a71fd55021c993ed6e848c9b2e5e9cfce180a42179f0ddd28253f7c/ruamel.yaml.clib-0.2.14-cp313-cp313-win32.whl", hash = "sha256:f4e97a1cf0b7a30af9e1d9dad10a5671157b9acee790d9e26996391f49b965a2", size = 98635, upload-time = "2025-09-22T19:51:08.183Z" }, + { url = "https://files.pythonhosted.org/packages/51/79/76aba16a1689b50528224b182f71097ece338e7a4ab55e84c2e73443b78a/ruamel.yaml.clib-0.2.14-cp313-cp313-win_amd64.whl", hash = "sha256:090782b5fb9d98df96509eecdbcaffd037d47389a89492320280d52f91330d78", size = 115238, upload-time = "2025-09-22T19:51:07.081Z" }, + { url = "https://files.pythonhosted.org/packages/21/e2/a59ff65c26aaf21a24eb38df777cb9af5d87ba8fc8107c163c2da9d1e85e/ruamel.yaml.clib-0.2.14-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:7df6f6e9d0e33c7b1d435defb185095386c469109de723d514142632a7b9d07f", size = 271441, upload-time = "2025-09-23T14:24:16.498Z" }, + { url = "https://files.pythonhosted.org/packages/6b/fa/3234f913fe9a6525a7b97c6dad1f51e72b917e6872e051a5e2ffd8b16fbb/ruamel.yaml.clib-0.2.14-cp314-cp314-macosx_15_0_arm64.whl", hash = "sha256:70eda7703b8126f5e52fcf276e6c0f40b0d314674f896fc58c47b0aef2b9ae83", size = 137970, upload-time = "2025-09-22T19:51:09.472Z" }, + { url = "https://files.pythonhosted.org/packages/ef/ec/4edbf17ac2c87fa0845dd366ef8d5852b96eb58fcd65fc1ecf5fe27b4641/ruamel.yaml.clib-0.2.14-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:a0cb71ccc6ef9ce36eecb6272c81afdc2f565950cdcec33ae8e6cd8f7fc86f27", size = 739639, upload-time = "2025-09-22T19:51:10.566Z" }, + { url = "https://files.pythonhosted.org/packages/15/18/b0e1fafe59051de9e79cdd431863b03593ecfa8341c110affad7c8121efc/ruamel.yaml.clib-0.2.14-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:e7cb9ad1d525d40f7d87b6df7c0ff916a66bc52cb61b66ac1b2a16d0c1b07640", size = 764456, upload-time = "2025-09-22T19:51:11.736Z" }, ] [[package]] From 9d14d6d3137bc9c91abef7449a2bf188ec913134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 12 Nov 2025 10:52:31 +0100 Subject: [PATCH 02/46] chore: rm unused func MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- scripts/fastapi_generator.py | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index a4c7e7cc6e..bbf55f8ed2 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -11,7 +11,6 @@ import importlib import inspect -import json import pkgutil from pathlib import Path from typing import Annotated, Any, get_args, get_origin @@ -908,32 +907,6 @@ def validate_openapi_schema(schema: dict[str, Any], schema_name: str = "OpenAPI 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_schema_recursive(obj: Any) -> None: """Recursively fix schema issues: exclusiveMinimum and null defaults.""" if isinstance(obj, dict): From 20615eca254e2387341ffddb39e96a8e8af3621f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 12 Nov 2025 10:52:55 +0100 Subject: [PATCH 03/46] chore: fail if any schema is invalid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not continue the generation, print which schema failed. Signed-off-by: Sébastien Han --- scripts/fastapi_generator.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index bbf55f8ed2..054db71cf9 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -1472,8 +1472,17 @@ def generate_openapi_spec(output_dir: str) -> dict[str, Any]: 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...") + failed_schemas = [] + if not stable_valid: + failed_schemas.append("Stable schema") + if not experimental_valid: + failed_schemas.append("Experimental schema") + if not deprecated_valid: + failed_schemas.append("Deprecated schema") + if not combined_valid: + failed_schemas.append("Combined (stainless) schema") + if failed_schemas: + raise ValueError(f"Invalid schemas: {', '.join(failed_schemas)}") # Ensure output directory exists output_path = Path(output_dir) From 8e1f89b32ee27362a1299262f984258a2122fc58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 12 Nov 2025 10:53:38 +0100 Subject: [PATCH 04/46] chore: update generator script location MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- CONTRIBUTING.md | 2 +- client-sdks/stainless/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d843328294..ba6c2eaf2d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -231,7 +231,7 @@ npm run serve If you modify or add new API endpoints, update the API documentation accordingly. You can do this by running the following command: ```bash -uv run ./docs/openapi_generator/run_openapi_generator.sh +uv run ./scripts/run_openapi_generator.sh ``` The generated API schema will be available in `docs/static/`. Make sure to review the changes before committing. diff --git a/client-sdks/stainless/README.md b/client-sdks/stainless/README.md index 5551e90d50..73e7082d4a 100644 --- a/client-sdks/stainless/README.md +++ b/client-sdks/stainless/README.md @@ -5,4 +5,4 @@ These are the source-of-truth configuration files used to generate the Stainless A small side note: notice the `.yml` suffixes since Stainless uses that suffix typically for its configuration files. -These files go hand-in-hand. As of now, only the `openapi.yml` file is automatically generated using the `run_openapi_generator.sh` script. +These files go hand-in-hand. As of now, only the `openapi.yml` file is automatically generated using the `scripts/run_openapi_generator.sh` script. From b450955df5c5b100af5627845236885759176351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 12 Nov 2025 10:53:55 +0100 Subject: [PATCH 05/46] chore: add new generator location to precommit 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ddc27e01eb..2d8fdf8a2c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -105,7 +105,7 @@ repos: language: python pass_filenames: false require_serial: true - files: ^src/llama_stack/providers/.*$ + files: ^src/llama_stack/providers/.*$|^scripts/run_openapi_generator.sh$ - id: openapi-codegen name: API Spec Codegen additional_dependencies: From c4cad890ccfba813e8389c37bfc79f8ff5216f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 12 Nov 2025 11:03:13 +0100 Subject: [PATCH 06/46] chore: regen scehma with main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 9304 ++----- docs/static/deprecated-llama-stack-spec.yaml | 4706 +++- .../static/experimental-llama-stack-spec.yaml | 4163 ++- docs/static/llama-stack-spec.yaml | 22093 ++++++---------- docs/static/stainless-llama-stack-spec.yaml | 3 - 5 files changed, 17258 insertions(+), 23011 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index 76bb8b08dd..73186f912e 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -1799,6 +1799,8 @@ paths: description: Internal Server Error default: $ref: '#/components/responses/DefaultError' + description: Default Response + post: tags: - ScoringFunctions summary: List all scoring functions. @@ -1960,6 +1962,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + /v1alpha/inference/rerank: + post: tags: - Shields summary: List all shields. @@ -2020,15 +2024,53 @@ paths: /v1/health: get: tags: - - Shields - summary: Get a shield by its identifier. - description: Get a shield by its identifier. + - Inspect + summary: Health + description: |- + Get health status. + + Get the current health status of the service. + 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: + - Inspect + summary: List Routes + description: |- + List routes. + + List all available API routes with their methods and implementing providers. + operationId: list_routes_v1_inspect_routes_get parameters: - - name: identifier - in: path - description: The identifier of the shield to get. - required: true - schema: + - name: api_filter + in: query + required: false + schema: + anyOf: + - enum: + - v1 + - v1alpha + - v1beta + - deprecated type: string deprecated: false delete: @@ -2085,38 +2127,41 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: tool_group_id - in: query - description: >- - The ID of the tool group to list tools for. - required: false - schema: - type: string - - name: mcp_endpoint - in: query - description: >- - The MCP endpoint to use for the tool group. - required: false - schema: - $ref: '#/components/schemas/URL' - deprecated: false - /v1/toolgroups: - get: + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' + /v1/batches: + post: + tags: + - Batches + summary: Create Batch + description: Create a new batch for processing multiple API requests. + operationId: create_batch_v1_batches_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_batches_Request' responses: '200': - description: A ListToolGroupsResponse. + description: The created batch object. content: application/json: schema: - $ref: '#/components/schemas/ListToolGroupsResponse' + $ref: '#/components/schemas/Batch' '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: @@ -2153,27 +2198,11 @@ paths: deprecated: true /v1/toolgroups/{toolgroup_id}: get: - responses: - '200': - description: A ToolGroup. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolGroup' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - ToolGroups - summary: Get a tool group by its ID. - description: Get a tool group by its ID. + - Batches + summary: List Batches + description: List all batches for the current user. + operationId: list_batches_v1_batches_get parameters: - name: toolgroup_id in: path @@ -2212,65 +2241,56 @@ paths: get: responses: '200': - description: A ListToolDefsResponse. + description: A list of batch objects. content: application/json: schema: - $ref: '#/components/schemas/ListToolDefsResponse' + $ref: '#/components/schemas/ListBatchesResponse' '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: - - ToolGroups - summary: List tools with optional tool group. - description: List tools with optional tool group. - parameters: - - name: toolgroup_id - in: query - description: >- - The ID of the tool group to list tools for. - required: false - schema: - type: string - deprecated: false - /v1/tools/{tool_name}: + description: Default Response + /v1/batches/{batch_id}: get: + tags: + - Batches + summary: Retrieve Batch + description: Retrieve information about a specific batch. + operationId: retrieve_batch_v1_batches__batch_id__get responses: '200': - description: A ToolDef. + description: The batch object. content: application/json: schema: - $ref: '#/components/schemas/ToolDef' + $ref: '#/components/schemas/Batch' '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: - - ToolGroups - summary: Get a tool by its name. - description: Get a tool by its name. parameters: - - name: tool_name - in: path - description: The name of the tool to get. - required: true - schema: - type: string - deprecated: false + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' /v1/vector-io/insert: post: tags: @@ -2954,11 +2974,11 @@ paths: operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get responses: '200': - description: A list of InterleavedContent representing the file contents. + description: A VectorStoreFileContentResponse representing the file contents. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileContentsResponse' + $ref: '#/components/schemas/VectorStoreFileContentResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3058,23 +3078,29 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/models/{model_id}: - get: + /v1/moderations: + post: tags: - - Models - summary: Get Model + - Safety + summary: Run Moderation description: |- - Get model. + Create moderation. - Get a model by its identifier. - operationId: get_model_v1_models__model_id__get + Classifies if text and/or image inputs are potentially harmful. + operationId: run_moderation_v1_moderations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_moderations_Request' + required: true responses: '200': - description: A Model. + description: A moderation object. content: application/json: schema: - $ref: '#/components/schemas/Model' + $ref: '#/components/schemas/ModerationObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3087,28 +3113,29 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: model_id - in: path - required: true - schema: - type: string - description: 'Path parameter: model_id' - delete: + /v1/safety/run-shield: + post: tags: - - Models - summary: Unregister Model + - Safety + summary: Run Shield description: |- - Unregister model. + Run shield. - Unregister a model. - operationId: unregister_model_v1_models__model_id__delete + Run a shield. + 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: Successful Response + description: A RunShieldResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/RunShieldResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3121,27 +3148,21 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: model_id - in: path - required: true - schema: - type: string - description: 'Path parameter: model_id' - /v1/models: +<<<<<<< HEAD + /v1/shields/{identifier}: get: tags: - - Models - summary: Openai List Models - description: List models using the OpenAI API. - operationId: openai_list_models_v1_models_get + - Shields + summary: Get Shield + description: Get a shield by its identifier. + operationId: get_shield_v1_shields__identifier__get responses: '200': - description: A OpenAIListModelsResponse. + description: A Shield. content: application/json: schema: - $ref: '#/components/schemas/OpenAIListModelsResponse' + $ref: '#/components/schemas/Shield' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3154,155 +3175,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: - tags: - - Models - summary: Register Model - description: |- - Register model. - - Register a model. - operationId: register_model_v1_models_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_models_Request' + parameters: + - name: identifier + in: path required: true + schema: + type: string + description: 'Path parameter: identifier' + delete: + tags: + - Shields + summary: Unregister Shield + description: Unregister a shield. + operationId: unregister_shield_v1_shields__identifier__delete responses: '200': - description: A Model. + description: Successful Response 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/moderations: - post: - tags: - - Safety - summary: Run Moderation - description: |- - Create moderation. - - Classifies if text and/or image inputs are potentially harmful. - 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/safety/run-shield: - post: - tags: - - Safety - summary: Run Shield - description: |- - Run shield. - - Run a shield. - 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/shields/{identifier}: - get: - tags: - - Shields - summary: Get Shield - description: Get a shield by its identifier. - operationId: get_shield_v1_shields__identifier__get - 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' - parameters: - - name: identifier - in: path - required: true - schema: - type: string - description: 'Path parameter: identifier' - delete: - tags: - - Shields - summary: Unregister Shield - description: Unregister a shield. - operationId: unregister_shield_v1_shields__identifier__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3420,6 +3311,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' +======= +>>>>>>> 4cc87bbe1 (chore: regen scehma with main) /v1beta/datasetio/append-rows/{dataset_id}: post: tags: @@ -3520,118 +3413,26 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - /v1beta/datasets/{dataset_id}: - get: - tags: - - Datasets - summary: Get Dataset - description: Get a dataset by its ID. - operationId: get_dataset_v1beta_datasets__dataset_id__get - 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' - parameters: - - name: dataset_id - in: path - required: true - schema: - type: string - description: 'Path parameter: dataset_id' - delete: - tags: - - Datasets - summary: Unregister Dataset - description: Unregister a dataset by its ID. - operationId: unregister_dataset_v1beta_datasets__dataset_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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: dataset_id - in: path - required: true - schema: - type: string - description: 'Path parameter: dataset_id' - /v1beta/datasets: - get: - tags: - - Datasets - summary: List Datasets - description: List all datasets. - operationId: list_datasets_v1beta_datasets_get - responses: - '200': - description: A ListDatasetsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListDatasetsResponse' - '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: post: tags: - - Datasets - summary: Register Dataset - description: Register a new dataset. - operationId: register_dataset_v1beta_datasets_post + - Scoring + summary: Score + description: Score a list of rows. + operationId: score_v1_scoring_score_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/_datasets_Request' + $ref: '#/components/schemas/_scoring_score_Request' required: true - deprecated: true - /v1beta/datasets/{dataset_id}: - get: responses: '200': - description: A Dataset. + description: A ScoreResponse object containing rows and aggregated results. content: application/json: schema: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/ScoreResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3644,26 +3445,26 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring/score: + /v1/scoring/score-batch: post: tags: - Scoring - summary: Score - description: Score a list of rows. - operationId: score_v1_scoring_score_post + summary: Score Batch + description: Score a batch of rows. + operationId: score_batch_v1_scoring_score_batch_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/_scoring_score_Request' + $ref: '#/components/schemas/_scoring_score_batch_Request' required: true responses: '200': - description: A ScoreResponse object containing rows and aggregated results. + description: A ScoreBatchResponse. content: application/json: schema: - $ref: '#/components/schemas/ScoreResponse' + $ref: '#/components/schemas/ScoreBatchResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3676,26 +3477,26 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring/score-batch: + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: tags: - - Scoring - summary: Score Batch - description: Score a batch of rows. - operationId: score_batch_v1_scoring_score_batch_post + - Eval + summary: Evaluate Rows + description: Evaluate a list of rows on a benchmark. + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/_scoring_score_batch_Request' + $ref: '#/components/schemas/_eval_benchmarks_benchmark_id_evaluations_Request' required: true responses: '200': - description: A ScoreBatchResponse. + description: EvaluateResponse object containing generations and scores. content: application/json: schema: - $ref: '#/components/schemas/ScoreBatchResponse' + $ref: '#/components/schemas/EvaluateResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3708,20 +3509,27 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring-functions/{scoring_fn_id}: + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: get: tags: - - Scoring Functions - summary: Get Scoring Function - description: Get a scoring function by its ID. - operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get + - Eval + summary: Job Status + description: Get the status of a job. + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': - description: A ScoringFn. + description: The status of the evaluation job. content: application/json: schema: - $ref: '#/components/schemas/ScoringFn' + $ref: '#/components/schemas/Job' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3735,18 +3543,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: scoring_fn_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: scoring_fn_id' + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' delete: tags: - - Scoring Functions - summary: Unregister Scoring Function - description: Unregister a scoring function. - operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete + - Eval + summary: Job Cancel + description: Cancel a job. + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete responses: '200': description: Successful Response @@ -3766,88 +3580,77 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: scoring_fn_id + - 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: scoring_fn_id' - /v1/scoring-functions: + description: 'Path parameter: job_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: get: tags: - - Scoring Functions - summary: List Scoring Functions - description: List all scoring functions. - operationId: list_scoring_functions_v1_scoring_functions_get + - Eval + summary: Job Result + description: Get the result of a job. + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get responses: '200': - description: A ListScoringFunctionsResponse. + description: The result of the job. content: application/json: schema: - $ref: '#/components/schemas/ListScoringFunctionsResponse' + $ref: '#/components/schemas/EvaluateResponse' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '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: - - Scoring Functions - summary: Register Scoring Function - description: Register a scoring function. - operationId: register_scoring_function_v1_scoring_functions_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' - 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 + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + $ref: '#/components/responses/DefaultError' + parameters: + - 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' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs: post: tags: - Eval - summary: Evaluate Rows - description: Evaluate a list of rows on a benchmark. - operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post + summary: Run Eval + description: Run an evaluation on a benchmark. + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/_eval_benchmarks_benchmark_id_evaluations_Request' + $ref: '#/components/schemas/BenchmarkConfig' required: true responses: '200': - description: EvaluateResponse object containing generations and scores. + description: The job that was created to run the evaluation. content: application/json: schema: - $ref: '#/components/schemas/EvaluateResponse' + $ref: '#/components/schemas/Job' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3861,111 +3664,13 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: dataset_id - in: path - description: The ID of the dataset to unregister. - required: true - schema: - type: string - deprecated: true - /v1alpha/eval/benchmarks: - get: - tags: - - Benchmarks - summary: List Benchmarks - description: List all benchmarks. - operationId: list_benchmarks_v1alpha_eval_benchmarks_get - responses: - '200': - description: A ListBenchmarksResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListBenchmarksResponse' - '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: - - Benchmarks - summary: Register Benchmark - description: Register a benchmark. - operationId: register_benchmark_v1alpha_eval_benchmarks_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterBenchmarkRequest' + - name: benchmark_id + in: path required: true - deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}: - get: - 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: - - Benchmarks - summary: Get a benchmark by its ID. - description: Get a benchmark by its ID. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to get. - required: true - schema: - type: string - 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. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to unregister. - required: true - schema: - type: string - deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/post-training/job/cancel: post: tags: - Post Training @@ -4186,125 +3891,6 @@ paths: schema: type: string description: 'Path parameter: tool_name' - /v1/toolgroups/{toolgroup_id}: - get: - tags: - - Tool Groups - summary: Get Tool Group - description: Get a tool group by its ID. - operationId: get_tool_group_v1_toolgroups__toolgroup_id__get - responses: - '200': - description: A ToolGroup. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolGroup' - '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: toolgroup_id - in: path - required: true - schema: - type: string - description: 'Path parameter: toolgroup_id' - delete: - tags: - - Tool Groups - summary: Unregister Toolgroup - description: Unregister a tool group. - operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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: toolgroup_id - in: path - required: true - schema: - type: string - description: 'Path parameter: toolgroup_id' - /v1/toolgroups: - get: - tags: - - Tool Groups - summary: List Tool Groups - description: List tool groups with optional provider. - 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: - - Tool Groups - summary: Register Tool Group - description: Register a tool group. - operationId: register_tool_group_v1_toolgroups_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' - 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/tools: get: tags: @@ -5546,80 +5132,17 @@ components: - file - purpose title: Body_openai_upload_file_v1_files_post - Body_register_benchmark_v1alpha_eval_benchmarks_post: + BooleanType: properties: - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata + type: + type: string + const: boolean + title: Type + default: boolean type: object - required: - - scoring_functions - title: Body_register_benchmark_v1alpha_eval_benchmarks_post - Body_register_scoring_function_v1_scoring_functions_post: - properties: - return_type: - anyOf: - - $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' - title: Return Type - 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 - type: object - required: - - return_type - title: Body_register_scoring_function_v1_scoring_functions_post - Body_register_tool_group_v1_toolgroups_post: - properties: - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Args - type: object - title: Body_register_tool_group_v1_toolgroups_post - BooleanType: - properties: - type: - type: string - const: boolean - title: Type - default: boolean - type: object - title: BooleanType - description: Parameter type for boolean values. - ChatCompletionInputType: + title: BooleanType + description: Parameter type for boolean values. + ChatCompletionInputType: properties: type: type: string @@ -6284,29 +5807,6 @@ components: - judge_model title: LLMAsJudgeScoringFnParams description: Parameters for LLM-as-judge scoring function configuration. - 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. ListPostTrainingJobsResponse: properties: data: @@ -6342,40 +5842,6 @@ components: - data title: ListProvidersResponse description: Response containing a list of all available providers. - ListScoringFunctionsResponse: - properties: - data: - items: - $ref: '#/components/schemas/ScoringFn' - 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. LoraFinetuningConfig: properties: type: @@ -7581,17 +7047,6 @@ components: type: object title: OpenAIJSONSchema description: JSON schema specification for OpenAI-compatible structured response format. - OpenAIListModelsResponse: - properties: - data: - items: - $ref: '#/components/schemas/OpenAIModel' - type: array - title: Data - type: object - required: - - data - title: OpenAIListModelsResponse OpenAIModel: properties: id: @@ -8276,6 +7731,11 @@ components: - type: string - type: 'null' title: Instructions + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls type: object required: - created_at @@ -9664,31 +9124,32 @@ components: - file_counts title: VectorStoreFileBatchObject description: OpenAI Vector Store File Batch object. - VectorStoreFileContentsResponse: + VectorStoreFileContentResponse: properties: - file_id: - type: string - title: File Id - filename: + object: type: string - title: Filename - attributes: - additionalProperties: true - type: object - title: Attributes - content: + const: vector_store.file_content.page + title: Object + default: vector_store.file_content.page + data: items: $ref: '#/components/schemas/VectorStoreContent' type: array - title: Content + title: Data + has_more: + type: boolean + title: Has More + next_page: + anyOf: + - type: string + - type: 'null' + title: Next Page type: object required: - - file_id - - filename - - attributes - - content - title: VectorStoreFileContentsResponse - description: Response from retrieving the contents of a vector store file. + - data + - has_more + title: VectorStoreFileContentResponse + description: Represents the parsed content of a vector store file. VectorStoreFileCounts: properties: completed: @@ -10072,21 +9533,6 @@ components: required: - items title: _conversations_conversation_id_items_Request - _datasets_Request: - properties: - purpose: - title: Purpose - source: - title: Source - metadata: - title: Metadata - dataset_id: - title: Dataset Id - type: object - required: - - purpose - - source - title: _datasets_Request _eval_benchmarks_benchmark_id_evaluations_Request: properties: input_rows: @@ -10138,35 +9584,6 @@ components: - query - items title: _inference_rerank_Request - _models_Request: - properties: - model_id: - type: string - title: Model Id - provider_model_id: - anyOf: - - type: string - - type: 'null' - title: Provider Model Id - provider_id: - anyOf: - - type: string - - type: 'null' - title: Provider Id - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata - model_type: - anyOf: - - $ref: '#/components/schemas/ModelType' - - type: 'null' - type: object - required: - - model_id - title: _models_Request _moderations_Request: properties: input: @@ -10341,6 +9758,8 @@ components: default: 10 guardrails: title: Guardrails + max_tool_calls: + title: Max Tool Calls type: object required: - input @@ -10405,31 +9824,6 @@ components: - dataset_id - scoring_functions title: _scoring_score_batch_Request - _shields_Request: - properties: - shield_id: - type: string - title: Shield Id - provider_shield_id: - anyOf: - - type: string - - type: 'null' - title: Provider Shield Id - provider_id: - anyOf: - - type: string - - type: 'null' - title: Provider Id - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Params - type: object - required: - - shield_id - title: _shields_Request _tool_runtime_invoke_Request: properties: tool_name: @@ -10747,37 +10141,6 @@ components: - $ref: '#/components/schemas/TextDelta' - $ref: '#/components/schemas/ImageDelta' - $ref: '#/components/schemas/ToolCallDelta' - ToolDefinition: - properties: - tool_name: - anyOf: - - $ref: '#/components/schemas/BuiltinTool' - - type: string - title: Tool Name - description: - anyOf: - - type: string - - type: 'null' - title: Description - nullable: true - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Input Schema - nullable: true - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Output Schema - nullable: true - required: - - tool_name - title: ToolDefinition - type: object SamplingStrategy: discriminator: mapping: @@ -10789,173 +10152,13 @@ components: - $ref: '#/components/schemas/GreedySamplingStrategy' - $ref: '#/components/schemas/TopPSamplingStrategy' - $ref: '#/components/schemas/TopKSamplingStrategy' - CompletionMessage: - description: A message containing the model's (assistant) response in a chat conversation. + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - title: Content - stop_reason: - $ref: '#/components/schemas/StopReason' - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/ToolCall' - type: array - - type: 'null' - title: Tool Calls - required: - - content - - stop_reason - title: CompletionMessage - type: object - StopReason: - enum: - - end_of_turn - - end_of_message - - out_of_tokens - title: StopReason - type: string - ToolResponseMessage: - description: A message representing the result of a tool invocation. - properties: - role: - const: tool - default: tool - title: Role - type: string - call_id: - title: Call Id - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - title: Content - required: - - call_id - - content - title: ToolResponseMessage - type: object - UserMessage: - description: A message from the user in a chat conversation. - properties: - role: - const: user - default: user - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - title: Content - context: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - - type: 'null' - title: Context - nullable: true - required: - - content - title: UserMessage - type: object - Message: - discriminator: - mapping: - assistant: '#/components/schemas/CompletionMessage' - system: '#/components/schemas/SystemMessage' - tool: '#/components/schemas/ToolResponseMessage' - user: '#/components/schemas/UserMessage' - propertyName: role - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type + type: + const: grammar + default: grammar + title: Type type: string bnf: additionalProperties: true @@ -12469,1237 +11672,1198 @@ components: mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse' mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - OpenAIResponseAnnotationCitation: + 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/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + - $ref: '#/components/schemas/RowsDataSource' + ParamType: + discriminator: + mapping: + 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' + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: +<<<<<<< HEAD + - type: string + const: completed + - type: string + const: in_progress + - type: string + const: cancelled + - type: string + const: failed + VectorStoreFileLastError: 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 + code: + oneOf: + - type: string + const: server_error + - type: string + const: rate_limit_exceeded description: >- - Start position of the citation span in the content - title: - type: string - description: Title of the referenced web resource - url: + Error code indicating the type of failure + message: type: string - description: URL of the referenced web resource + description: >- + Human-readable error message describing the failure additionalProperties: false required: - - type - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation + - code + - message + title: VectorStoreFileLastError 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: + Error information for failed vector store file processing. + VectorStoreFileObject: type: object properties: - type: - type: string - const: file_citation - default: file_citation - description: >- - Annotation type identifier, always "file_citation" - file_id: + id: type: string - description: Unique identifier of the referenced file - filename: + description: Unique identifier for the file + object: type: string - description: Name of the referenced file - index: - type: integer + default: vector_store.file 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: + Object type identifier, always "vector_store.file" + attributes: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Key-value attributes associated with the file + chunking_strategy: + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + description: >- + Strategy used for splitting the file into chunks + created_at: 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: + Timestamp when the file was added to the vector store + last_error: + $ref: '#/components/schemas/VectorStoreFileLastError' + description: >- + (Optional) Error information if file processing failed + status: + $ref: '#/components/schemas/VectorStoreFileStatus' + description: Current processing status of the file + usage_bytes: + type: integer + default: 0 + description: Storage space used by this file in bytes + vector_store_id: type: string - description: Refusal text supplied by the model + description: >- + ID of the vector store containing this file additionalProperties: false required: - - type - - refusal - title: OpenAIResponseContentPartRefusal - description: >- - Refusal content within a streamed response part. - "OpenAIResponseInputFunctionToolCallOutput": + - id + - object + - attributes + - chunking_strategy + - created_at + - status + - usage_bytes + - vector_store_id + title: VectorStoreFileObject + description: OpenAI Vector Store File object. + VectorStoreFilesListInBatchResponse: type: object properties: - call_id: - type: string - output: - type: string - type: + object: type: string - const: function_call_output - default: function_call_output - id: + default: list + description: Object type identifier, always "list" + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreFileObject' + description: >- + List of vector store file objects in the batch + first_id: type: string - status: + description: >- + (Optional) ID of the first file in the list for pagination + last_id: type: string + description: >- + (Optional) ID of the last file in the list for pagination + has_more: + type: boolean + default: false + description: >- + Whether there are more files available beyond this page additionalProperties: false required: - - call_id - - output - - type - title: >- - OpenAIResponseInputFunctionToolCallOutput + - object + - data + - has_more + title: VectorStoreFilesListInBatchResponse 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: + Response from listing files in a vector store file batch. + VectorStoreListFilesResponse: type: object properties: - type: - type: string - const: input_file - default: input_file - description: >- - The type of the input item. Always `input_file`. - file_data: + object: type: string - description: >- - The data of the file to be sent to the model. - file_id: + default: list + description: Object type identifier, always "list" + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreFileObject' + description: List of vector store file objects + first_id: type: string description: >- - (Optional) The ID of the file to be sent to the model. - file_url: + (Optional) ID of the first file in the list for pagination + last_id: type: string description: >- - The URL of the file to be sent to the model. - filename: - type: string + (Optional) ID of the last file in the list for pagination + has_more: + type: boolean + default: false description: >- - The name of the file to be sent to the model. + Whether there are more files available beyond this page additionalProperties: false required: - - type - title: OpenAIResponseInputMessageContentFile + - object + - data + - has_more + title: VectorStoreListFilesResponse description: >- - File content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentImage: + Response from listing files in a vector store. + OpenaiAttachFileToVectorStoreRequest: 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 + The ID of the file to attach to the vector store. + attributes: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The key-value attributes stored with the file, which can be used for filtering. + chunking_strategy: + $ref: '#/components/schemas/VectorStoreChunkingStrategy' + description: >- + The chunking strategy to use for the file. additionalProperties: false required: - - detail - - type - title: OpenAIResponseInputMessageContentImage - description: >- - Image content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentText: + - file_id + title: OpenaiAttachFileToVectorStoreRequest + OpenaiUpdateVectorStoreFileRequest: type: object properties: - text: - type: string - description: The text content of the input message - type: - type: string - const: input_text - default: input_text + attributes: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - Content type identifier, always "input_text" + The updated key-value attributes to store with the file. additionalProperties: false required: - - text - - type - title: OpenAIResponseInputMessageContentText - description: >- - Text content for input messages in OpenAI response format. - OpenAIResponseMCPApprovalRequest: + - attributes + title: OpenaiUpdateVectorStoreFileRequest + VectorStoreFileDeleteResponse: type: object properties: - arguments: - type: string id: type: string - name: - type: string - server_label: - type: string - type: + description: Unique identifier of the deleted file + object: type: string - const: mcp_approval_request - default: mcp_approval_request + default: vector_store.file.deleted + description: >- + Object type identifier for the deletion response + deleted: + type: boolean + default: true + description: >- + Whether the deletion operation was successful additionalProperties: false required: - - arguments - id - - name - - server_label - - type - title: OpenAIResponseMCPApprovalRequest - description: >- - A request for human approval of a tool invocation. - OpenAIResponseMCPApprovalResponse: + - object + - deleted + title: VectorStoreFileDeleteResponse + description: >- + Response from deleting a vector store file. + bool: + type: boolean + VectorStoreContent: type: object properties: - approval_request_id: - type: string - approve: - type: boolean type: type: string - const: mcp_approval_response - default: mcp_approval_response - id: - type: string - reason: + const: text + description: >- + Content type, currently only "text" is supported + text: type: string + description: The actual text content + embedding: + type: array + items: + type: number + description: >- + Optional embedding vector for this content chunk + chunk_metadata: + $ref: '#/components/schemas/ChunkMetadata' + description: Optional chunk metadata + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Optional user-defined metadata additionalProperties: false required: - - approval_request_id - - approve - type - title: OpenAIResponseMCPApprovalResponse - description: A response to an MCP approval request. - OpenAIResponseMessage: + - text + title: VectorStoreContent + description: >- + Content item from a vector store file or search result. + VectorStoreFileContentResponse: type: object 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: + object: type: string - status: + const: vector_store.file_content.page + default: vector_store.file_content.page + description: >- + The object type, which is always `vector_store.file_content.page` + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreContent' + description: Parsed content of the file + has_more: + type: boolean + default: false + description: >- + Indicates if there are more content pages to fetch + next_page: type: string + description: The token for the next page, if any additionalProperties: false required: - - content - - role - - type - title: OpenAIResponseMessage + - object + - data + - has_more + title: VectorStoreFileContentResponse 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": + Represents the parsed content of a vector store file. + OpenaiSearchVectorStoreRequest: type: object properties: - text: - type: string - type: + query: + oneOf: + - type: string + - type: array + items: + type: string + description: >- + The query string or array for performing the search. + filters: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Filters based on file attributes to narrow the search results. + max_num_results: + type: integer + description: >- + Maximum number of results to return (1 to 50 inclusive, default 10). + 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: >- + Ranking options for fine-tuning the search results. + rewrite_query: + type: boolean + description: >- + Whether to rewrite the natural language query for vector search (default + false) + search_mode: type: string - const: output_text - default: output_text - annotations: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseAnnotations' + description: >- + The search mode to use - "keyword", "vector", or "hybrid" (default "vector") additionalProperties: false required: - - text - - type - - annotations - title: >- - OpenAIResponseOutputMessageContentOutputText - "OpenAIResponseOutputMessageFileSearchToolCall": + - query + title: OpenaiSearchVectorStoreRequest + VectorStoreSearchResponse: 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: + file_id: type: string description: >- - Current status of the file search operation - type: + Unique identifier of the file containing the result + filename: type: string - const: file_search_call - default: file_search_call + description: Name of the file containing the result + score: + type: number + description: Relevance score for this search result + attributes: + type: object + additionalProperties: + oneOf: + - type: string + - type: number + - type: boolean description: >- - Tool call type identifier, always "file_search_call" - results: + (Optional) Key-value attributes associated with the file + content: type: array items: - 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. + $ref: '#/components/schemas/VectorStoreContent' description: >- - (Optional) Search results returned by the file search operation + List of content items matching the search query additionalProperties: false required: - - id - - queries - - status - - type - title: >- - OpenAIResponseOutputMessageFileSearchToolCall - description: >- - File search tool call output message for OpenAI responses. - "OpenAIResponseOutputMessageFunctionToolCall": + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + description: Response from searching a vector store. + VectorStoreSearchResponsePage: type: object properties: - call_id: - type: string - description: Unique identifier for the function call - name: - type: string - description: Name of the function being called - arguments: + object: type: string + default: vector_store.search_results.page description: >- - JSON string containing the function arguments - type: - type: string - const: function_call - default: function_call + Object type identifier for the search results page + search_query: + type: array + items: + type: string description: >- - Tool call type identifier, always "function_call" - id: - type: string + The original search query that was executed + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + description: List of search result objects + has_more: + type: boolean + default: false description: >- - (Optional) Additional identifier for the tool call - status: + Whether there are more results available beyond this page + next_page: type: string description: >- - (Optional) Current status of the function call execution + (Optional) Token for retrieving the next page of results additionalProperties: false required: - - call_id - - name - - arguments - - type - title: >- - OpenAIResponseOutputMessageFunctionToolCall + - object + - search_query + - data + - has_more + title: VectorStoreSearchResponsePage description: >- - Function tool call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPCall: + Paginated response from searching a vector store. + VersionInfo: type: object properties: - id: + version: 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 + description: Version number of the service additionalProperties: false required: - - id - - type - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - description: >- - Model Context Protocol (MCP) call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPListTools: + - version + title: VersionInfo + description: Version information for the service. + AppendRowsRequest: 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: + rows: 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: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to append to the dataset. additionalProperties: false required: - - id - - type - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - description: >- - MCP list tools output message containing available tools from an MCP server. - "OpenAIResponseOutputMessageWebSearchToolCall": + - rows + title: AppendRowsRequest + PaginatedResponse: type: object properties: - id: - type: string - description: Unique identifier for this tool call - status: - type: string + data: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The list of items for the current page + has_more: + type: boolean description: >- - Current status of the web search operation - type: + Whether there are more items available after this set + url: type: string - const: web_search_call - default: web_search_call - description: >- - Tool call type identifier, always "web_search_call" + description: The URL for accessing this list additionalProperties: false required: - - id - - status - - type - title: >- - OpenAIResponseOutputMessageWebSearchToolCall + - data + - has_more + title: PaginatedResponse description: >- - Web search tool call output message for OpenAI responses. - CreateConversationRequest: + A generic paginated response that follows a simple format. + Dataset: type: object properties: - items: - type: array - items: - $ref: '#/components/schemas/ConversationItem' + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: dataset + default: dataset + description: >- + Type of resource, always 'dataset' for datasets + purpose: + type: string + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + description: >- + Purpose of the dataset indicating its intended use + source: + oneOf: + - $ref: '#/components/schemas/URIDataSource' + - $ref: '#/components/schemas/RowsDataSource' + discriminator: + propertyName: type + mapping: + uri: '#/components/schemas/URIDataSource' + rows: '#/components/schemas/RowsDataSource' description: >- - Initial items to include in the conversation context. + Data source configuration for the dataset metadata: type: object additionalProperties: - type: string - description: >- - Set of key-value pairs that can be attached to an object. + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Additional metadata for the dataset additionalProperties: false - title: CreateConversationRequest - Conversation: + required: + - identifier + - provider_id + - type + - purpose + - source + - metadata + title: Dataset + description: >- + Dataset resource for storing and accessing training or evaluation data. + RowsDataSource: type: object properties: - id: - type: string - object: + type: type: string - const: conversation - default: conversation - created_at: - type: integer - metadata: - type: object - additionalProperties: - type: string - items: + const: rows + default: rows + rows: type: array items: type: object - title: dict - description: >- - dict() -> new empty dictionary dict(mapping) -> new dictionary initialized - from a mapping object's (key, value) pairs dict(iterable) -> new - dictionary initialized as if via: d = {} for k, v in iterable: d[k] - = v dict(**kwargs) -> new dictionary initialized with the name=value - pairs in the keyword argument list. For example: dict(one=1, two=2) - additionalProperties: false - required: - - id - - object - - created_at - title: Conversation - description: OpenAI-compatible conversation object. - UpdateConversationRequest: - type: object - properties: - metadata: - type: object - additionalProperties: - type: string + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - Set of key-value pairs that can be attached to an object. + The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", + "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, + world!"}]} ] additionalProperties: false required: - - metadata - title: UpdateConversationRequest - ConversationDeletedResource: + - type + - rows + title: RowsDataSource + description: A dataset stored in rows. + URIDataSource: type: object properties: - id: + type: type: string - object: + const: uri + default: uri + uri: type: string - default: conversation.deleted - deleted: - type: boolean - default: true + description: >- + The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" + - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" additionalProperties: false required: - - id - - object - - deleted - title: ConversationDeletedResource - description: Response for deleted conversation. - ConversationItemList: + - type + - uri + title: URIDataSource + description: >- + A dataset that can be obtained from a URI. + ListDatasetsResponse: type: object properties: - object: - type: string - default: list data: type: array items: - $ref: '#/components/schemas/ConversationItem' - first_id: - type: string - last_id: - type: string - has_more: - type: boolean - default: false + $ref: '#/components/schemas/Dataset' + description: List of datasets additionalProperties: false required: - - object - data - - has_more - title: ConversationItemList - description: >- - List of conversation items with pagination. - AddItemsRequest: + title: ListDatasetsResponse + description: Response from listing datasets. + Benchmark: type: object properties: - items: - type: array + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: benchmark + default: benchmark + description: The resource type, always benchmark + dataset_id: + type: string + description: >- + Identifier of the dataset to use for the benchmark evaluation + scoring_functions: + type: array items: - $ref: '#/components/schemas/ConversationItem' + type: string description: >- - Items to include in the conversation context. + List of scoring function identifiers to apply during evaluation + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Metadata for this evaluation task additionalProperties: false required: - - items - title: AddItemsRequest - ConversationItemDeletedResource: + - identifier + - provider_id + - type + - dataset_id + - scoring_functions + - metadata + title: Benchmark + description: >- + A benchmark resource for evaluating model performance. + ListBenchmarksResponse: type: object properties: - id: - type: string - object: - type: string - default: conversation.item.deleted - deleted: - type: boolean - default: true + data: + type: array + items: + $ref: '#/components/schemas/Benchmark' additionalProperties: false required: - - id - - object - - deleted - title: ConversationItemDeletedResource - description: Response for deleted conversation item. - OpenAIEmbeddingsRequestWithExtraBody: + - data + title: ListBenchmarksResponse + BenchmarkConfig: type: object properties: - model: - type: string - description: >- - The identifier of the model to use. The model must be an embedding model - registered with Llama Stack and available via the /models endpoint. - input: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - 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. - encoding_format: - type: string - default: float + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + description: The candidate to evaluate. + scoring_params: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringFnParams' description: >- - (Optional) The format to return the embeddings in. Can be either "float" - or "base64". Defaults to "float". - dimensions: + Map between scoring function id and parameters for each scoring function + you want to run + num_examples: type: integer description: >- - (Optional) The number of dimensions the resulting output embeddings should - have. Only supported in text-embedding-3 and later models. - user: - type: string - description: >- - (Optional) A unique identifier representing your end-user, which can help - OpenAI to monitor and detect abuse. + (Optional) The number of examples to evaluate. If not provided, all examples + in the dataset will be evaluated additionalProperties: false required: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody + - eval_candidate + - scoring_params + title: BenchmarkConfig description: >- - Request parameters for OpenAI-compatible embeddings endpoint. - OpenAIEmbeddingData: + A benchmark configuration for evaluation. + GreedySamplingStrategy: type: object properties: - object: + type: type: string - const: embedding - default: embedding - description: >- - The object type, which will be "embedding" - embedding: - oneOf: - - type: array - items: - type: number - - type: string - description: >- - The embedding vector as a list of floats (when encoding_format="float") - or as a base64-encoded string (when encoding_format="base64") - index: - type: integer + const: greedy + default: greedy description: >- - The index of the embedding in the input list - additionalProperties: false - required: - - object - - embedding - - index - title: OpenAIEmbeddingData - description: >- - A single embedding data object from an OpenAI-compatible embeddings response. - OpenAIEmbeddingUsage: - type: object - properties: - prompt_tokens: - type: integer - description: The number of tokens in the input - total_tokens: - type: integer - description: The total number of tokens used + Must be "greedy" to identify this sampling strategy additionalProperties: false required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage + - type + title: GreedySamplingStrategy description: >- - Usage information for an OpenAI-compatible embeddings response. - OpenAIEmbeddingsResponse: + Greedy sampling strategy that selects the highest probability token at each + step. + ModelCandidate: type: object properties: - object: + type: type: string - const: list - default: list - description: The object type, which will be "list" - data: - type: array - items: - $ref: '#/components/schemas/OpenAIEmbeddingData' - description: List of embedding data objects + const: model + default: model model: type: string + description: The model ID to evaluate. + sampling_params: + $ref: '#/components/schemas/SamplingParams' + description: The sampling parameters for the model. + system_message: + $ref: '#/components/schemas/SystemMessage' description: >- - The model that was used to generate the embeddings - usage: - $ref: '#/components/schemas/OpenAIEmbeddingUsage' - description: Usage information + (Optional) The system message providing instructions or context to the + model. additionalProperties: false required: - - object - - data + - type - model - - usage - title: OpenAIEmbeddingsResponse - description: >- - Response from an OpenAI-compatible embeddings request. - OpenAIFilePurpose: - type: string - enum: - - assistants - - batch - title: OpenAIFilePurpose - description: >- - Valid purpose values for OpenAI Files API. - ListOpenAIFileResponse: + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + SamplingParams: type: object properties: - data: + strategy: + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + description: The sampling strategy. + max_tokens: + type: integer + description: >- + 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. + repetition_penalty: + type: number + default: 1.0 + description: >- + 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. + stop: type: array items: - $ref: '#/components/schemas/OpenAIFileObject' - description: List of file objects - has_more: - type: boolean + type: string description: >- - Whether there are more files available beyond this page - first_id: + Up to 4 sequences where the API will stop generating further tokens. The + returned text will not contain the stop sequence. + additionalProperties: false + required: + - strategy + title: SamplingParams + description: Sampling parameters. + SystemMessage: + type: object + properties: + role: type: string + const: system + default: system description: >- - ID of the first file in the list for pagination - last_id: - type: string + Must be "system" to identify this as a system message + content: + $ref: '#/components/schemas/InterleavedContent' description: >- - ID of the last file in the list for pagination - object: - type: string - const: list - default: list - description: The object type, which is always "list" + 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). additionalProperties: false required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIFileResponse + - role + - content + title: SystemMessage description: >- - Response for listing files in OpenAI Files API. - OpenAIFileObject: + A system message providing instructions or context to the model. + TopKSamplingStrategy: type: object properties: - object: - type: string - const: file - default: file - description: The object type, which is always "file" - id: + type: type: string + const: top_k + default: top_k description: >- - The file identifier, which can be referenced in the API endpoints - bytes: - type: integer - description: The size of the file, in bytes - created_at: - type: integer - description: >- - The Unix timestamp (in seconds) for when the file was created - expires_at: + Must be "top_k" to identify this sampling strategy + top_k: type: integer description: >- - The Unix timestamp (in seconds) for when the file expires - filename: - type: string - description: The name of the file - purpose: - type: string - enum: - - assistants - - batch - description: The intended purpose of the file + Number of top tokens to consider for sampling. Must be at least 1 additionalProperties: false required: - - object - - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject + - type + - top_k + title: TopKSamplingStrategy description: >- - OpenAI File object as defined in the OpenAI Files API. - ExpiresAfter: + Top-k sampling strategy that restricts sampling to the k most likely tokens. + TopPSamplingStrategy: type: object properties: - anchor: + type: type: string - const: created_at - seconds: - type: integer + const: top_p + default: top_p + description: >- + Must be "top_p" to identify this sampling strategy + temperature: + type: number + description: >- + Controls randomness in sampling. Higher values increase randomness + top_p: + type: number + default: 0.95 + description: >- + Cumulative probability threshold for nucleus sampling. Defaults to 0.95 additionalProperties: false required: - - anchor - - seconds - title: ExpiresAfter + - type + title: TopPSamplingStrategy 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) - OpenAIFileDeleteResponse: + Top-p (nucleus) sampling strategy that samples from the smallest set of tokens + with cumulative probability >= p. + EvaluateRowsRequest: type: object properties: - id: - type: string - description: The file identifier that was deleted - object: - type: string - const: file - default: file - description: The object type, which is always "file" - deleted: - type: boolean + input_rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to evaluate. + scoring_functions: + type: array + items: + type: string description: >- - Whether the file was successfully deleted + The scoring functions to use for the evaluation. + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + description: The configuration for the benchmark. additionalProperties: false required: - - id - - object - - deleted - title: OpenAIFileDeleteResponse - description: >- - Response for deleting a file in OpenAI Files API. - Response: + - input_rows + - scoring_functions + - benchmark_config + title: EvaluateRowsRequest + EvaluateResponse: type: object - title: Response - HealthInfo: + properties: + generations: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The generations from the evaluation. + scores: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + description: The scores from the evaluation. + additionalProperties: false + required: + - generations + - scores + title: EvaluateResponse + description: The response from an evaluation. + RunEvalRequest: type: object properties: - status: - type: string - enum: - - OK - - Error - - Not Implemented - description: Current health status of the service + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + description: The configuration for the benchmark. additionalProperties: false required: - - status - title: HealthInfo - description: >- - Health status information for the service. - RouteInfo: + - benchmark_config + title: RunEvalRequest + Job: type: object properties: - route: + job_id: type: string - description: The API endpoint path - method: + description: Unique identifier for the job + status: type: string - description: HTTP method for the route - provider_types: - type: array - items: - type: string - description: >- - List of provider types that implement this route + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + description: Current execution status of the job additionalProperties: false required: - - route - - method - - provider_types - title: RouteInfo + - job_id + - status + title: Job description: >- - Information about an API route including its path, method, and implementing - providers. - ListRoutesResponse: + A job execution instance with status tracking. + RerankRequest: type: object properties: - data: + model: + type: string + description: >- + The identifier of the reranking model to use. + query: + oneOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + description: >- + 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. + items: type: array items: - $ref: '#/components/schemas/RouteInfo' + oneOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + description: >- + 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. + max_num_results: + type: integer description: >- - List of available route information objects + (Optional) Maximum number of results to return. Default: returns all. additionalProperties: false required: - - data - title: ListRoutesResponse - description: >- - Response containing a list of all available API routes. - OpenAIModel: + - model + - query + - items + title: RerankRequest + RerankData: type: object properties: - id: - type: string - object: - type: string - const: model - default: model - created: + index: type: integer - owned_by: - type: string - custom_metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + description: >- + The original index of the document in the input list + relevance_score: + type: number + description: >- + The relevance score from the model output. Values are inverted when applicable + so that higher scores indicate greater relevance. additionalProperties: false required: - - id - - object - - created - - owned_by - title: OpenAIModel - description: A model from OpenAI. - OpenAIListModelsResponse: + - index + - relevance_score + title: RerankData + description: >- + A single rerank result from a reranking response. + RerankResponse: type: object properties: data: type: array items: - $ref: '#/components/schemas/OpenAIModel' + $ref: '#/components/schemas/RerankData' + description: >- + List of rerank result objects, sorted by relevance score (descending) additionalProperties: false required: - data - title: OpenAIListModelsResponse - Model: + title: RerankResponse + description: Response from a reranking request. + Checkpoint: type: object properties: identifier: type: string - description: >- - Unique identifier for this resource in llama stack - provider_resource_id: + description: Unique identifier for the checkpoint + created_at: type: string + format: date-time description: >- - Unique identifier for this resource in the provider - provider_id: + Timestamp when the checkpoint was created + epoch: + type: integer + description: >- + Training epoch when the checkpoint was saved + post_training_job_id: type: string description: >- - ID of the provider that owns this resource - type: + Identifier of the training job that created this checkpoint + path: type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: model - default: model description: >- - The resource type, always 'model' for model resources - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Any additional metadata for this model - model_type: - $ref: '#/components/schemas/ModelType' - default: llm + File system path where the checkpoint is stored + training_metrics: + $ref: '#/components/schemas/PostTrainingMetric' description: >- - The type of model (LLM or embedding model) + (Optional) Training metrics associated with this checkpoint additionalProperties: false required: - identifier - - provider_id - - type - - metadata - - model_type - title: Model - description: >- - A model resource representing an AI model registered in Llama Stack. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType - description: >- - Enumeration of supported model types in Llama Stack. - RunModerationRequest: + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. + PostTrainingJobArtifactsResponse: type: object properties: - input: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - Input (or inputs) to classify. Can be a single string, an array of strings, - or an array of multi-modal input objects similar to other models. - model: + job_uuid: type: string + description: Unique identifier for the training job + checkpoints: + type: array + items: + $ref: '#/components/schemas/Checkpoint' description: >- - (Optional) The content moderation model you would like to use. + List of model checkpoints created during training additionalProperties: false required: - - input - title: RunModerationRequest - ModerationObject: + - job_uuid + - checkpoints + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingMetric: type: object properties: - id: - type: string + epoch: + type: integer + description: Training epoch number + train_loss: + type: number + description: Loss value on the training dataset + validation_loss: + type: number + description: Loss value on the validation dataset + perplexity: + type: number description: >- - The unique identifier for the moderation request. - model: + Perplexity metric indicating model confidence + additionalProperties: false + required: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: >- + Training metrics captured during post-training jobs. + CancelTrainingJobRequest: + type: object + properties: + job_uuid: type: string - description: >- - The model used to generate the moderation results. - results: - type: array - items: - $ref: '#/components/schemas/ModerationObjectResults' - description: A list of moderation objects + description: The UUID of the job to cancel. additionalProperties: false required: - - id - - model - - results - title: ModerationObject - description: A moderation object. - ModerationObjectResults: + - job_uuid + title: CancelTrainingJobRequest + PostTrainingJobStatusResponse: type: object properties: - flagged: - type: boolean - description: >- - Whether any of the below categories are flagged. - categories: - type: object - additionalProperties: - type: boolean - description: >- - A list of the categories, and whether they are flagged or not. - category_applied_input_types: - type: object - additionalProperties: - type: array - items: - type: string + job_uuid: + type: string + description: Unique identifier for the training job + status: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + description: Current status of the training job + scheduled_at: + type: string + format: date-time description: >- - A list of the categories along with the input type(s) that the score applies - to. - category_scores: - type: object - additionalProperties: - type: number + (Optional) Timestamp when the job was scheduled + started_at: + type: string + format: date-time description: >- - A list of the categories along with their scores as predicted by model. - user_message: + (Optional) Timestamp when the job execution began + completed_at: type: string - metadata: + format: date-time + description: >- + (Optional) Timestamp when the job finished, if completed + resources_allocated: type: object additionalProperties: oneOf: @@ -13709,128 +12873,237 @@ components: - type: string - type: array - type: object - additionalProperties: false - required: - - flagged - - metadata - title: ModerationObjectResults - description: A moderation object. - Prompt: - type: object - properties: - prompt: - type: string - description: >- - The system prompt text with variable placeholders. Variables are only - supported when using the Responses API. - version: - type: integer - description: >- - Version (integer starting at 1, incremented on save) - prompt_id: - type: string description: >- - Unique identifier formatted as 'pmpt_<48-digit-hash>' - variables: + (Optional) Information about computational resources allocated to the + job + checkpoints: type: array items: - type: string - description: >- - List of prompt variable names that can be used in the prompt template - is_default: - type: boolean - default: false + $ref: '#/components/schemas/Checkpoint' description: >- - Boolean indicating whether this version is the default version for this - prompt + List of model checkpoints created during training additionalProperties: false required: - - version - - prompt_id - - variables - - is_default - title: Prompt - description: >- - A prompt resource representing a stored OpenAI Compatible prompt template - in Llama Stack. - ListPromptsResponse: + - job_uuid + - status + - checkpoints + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + ListPostTrainingJobsResponse: type: object properties: data: type: array items: - $ref: '#/components/schemas/Prompt' + type: object + properties: + job_uuid: + type: string + additionalProperties: false + required: + - job_uuid + title: PostTrainingJob additionalProperties: false required: - data - title: ListPromptsResponse - description: Response model to list prompts. - CreatePromptRequest: + title: ListPostTrainingJobsResponse + DPOAlignmentConfig: type: object properties: - prompt: - type: string - description: >- - The prompt text content with variable placeholders. - variables: - type: array - items: - type: string - description: >- - List of variable names that can be used in the prompt template. + beta: + type: number + description: Temperature parameter for the DPO loss + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid + description: The type of loss function to use for DPO additionalProperties: false required: - - prompt - title: CreatePromptRequest - UpdatePromptRequest: + - beta + - loss_type + title: DPOAlignmentConfig + description: >- + Configuration for Direct Preference Optimization (DPO) alignment. + DPOLossType: + type: string + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + DataConfig: type: object properties: - prompt: + dataset_id: type: string - description: The updated prompt text content. - version: + description: >- + Unique identifier for the training dataset + batch_size: type: integer + description: Number of samples per training batch + shuffle: + type: boolean description: >- - The current version of the prompt being updated. - variables: - type: array - items: - type: string + Whether to shuffle the dataset during training + data_format: + $ref: '#/components/schemas/DatasetFormat' description: >- - Updated list of variable names that can be used in the prompt template. - set_as_default: + Format of the dataset (instruct or dialog) + validation_dataset_id: + type: string + description: >- + (Optional) Unique identifier for the validation dataset + packed: type: boolean + default: false description: >- - Set the new version as the default (default=True). + (Optional) Whether to pack multiple samples into a single sequence for + efficiency + train_on_input: + type: boolean + default: false + description: >- + (Optional) Whether to compute loss on input tokens as well as output tokens additionalProperties: false required: - - prompt - - version - - set_as_default - title: UpdatePromptRequest - SetDefaultVersionRequest: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: >- + Configuration for training data and data loading. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + EfficiencyConfig: type: object properties: - version: + enable_activation_checkpointing: + type: boolean + default: false + description: >- + (Optional) Whether to use activation checkpointing to reduce memory usage + enable_activation_offloading: + type: boolean + default: false + description: >- + (Optional) Whether to offload activations to CPU to save GPU memory + memory_efficient_fsdp_wrap: + type: boolean + default: false + description: >- + (Optional) Whether to use memory-efficient FSDP wrapping + fsdp_cpu_offload: + type: boolean + default: false + description: >- + (Optional) Whether to offload FSDP parameters to CPU + additionalProperties: false + title: EfficiencyConfig + description: >- + Configuration for memory and compute efficiency optimizations. + OptimizerConfig: + type: object + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + description: >- + Type of optimizer to use (adam, adamw, or sgd) + lr: + type: number + description: Learning rate for the optimizer + weight_decay: + type: number + description: >- + Weight decay coefficient for regularization + num_warmup_steps: type: integer - description: The version to set as default. + description: Number of steps for learning rate warmup additionalProperties: false required: - - version - title: SetDefaultVersionRequest - ProviderInfo: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + description: >- + Configuration parameters for the optimization algorithm. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: >- + Available optimizer algorithms for training. + TrainingConfig: type: object properties: - api: + n_epochs: + type: integer + description: Number of training epochs to run + max_steps_per_epoch: + type: integer + default: 1 + description: Maximum number of steps to run per epoch + gradient_accumulation_steps: + type: integer + default: 1 + description: >- + Number of steps to accumulate gradients before updating + max_validation_steps: + type: integer + default: 1 + description: >- + (Optional) Maximum number of validation steps per epoch + data_config: + $ref: '#/components/schemas/DataConfig' + description: >- + (Optional) Configuration for data loading and formatting + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + description: >- + (Optional) Configuration for the optimization algorithm + efficiency_config: + $ref: '#/components/schemas/EfficiencyConfig' + description: >- + (Optional) Configuration for memory and compute optimizations + dtype: type: string - description: The API name this provider implements - provider_id: + default: bf16 + description: >- + (Optional) Data type for model parameters (bf16, fp16, fp32) + additionalProperties: false + required: + - n_epochs + - max_steps_per_epoch + - gradient_accumulation_steps + title: TrainingConfig + description: >- + Comprehensive configuration for the training process. + PreferenceOptimizeRequest: + type: object + properties: + job_uuid: type: string - description: Unique identifier for the provider - provider_type: + description: The UUID of the job to create. + finetuned_model: type: string - description: The type of provider implementation - config: + description: The model to fine-tune. + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + description: The algorithm configuration. + training_config: + $ref: '#/components/schemas/TrainingConfig' + description: The training configuration. + hyperparam_search_config: type: object additionalProperties: oneOf: @@ -13840,9 +13113,8 @@ components: - type: string - type: array - type: object - description: >- - Configuration parameters for the provider - health: + description: The hyperparam search configuration. + logger_config: type: object additionalProperties: oneOf: @@ -13852,4811 +13124,73 @@ components: - type: string - type: array - type: object - description: Current health status of the provider + description: The logger configuration. additionalProperties: false required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo - description: >- - Information about a registered provider including its configuration and health - status. - ListProvidersResponse: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: PreferenceOptimizeRequest + PostTrainingJob: type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/ProviderInfo' - description: List of provider information objects + job_uuid: + type: string additionalProperties: false required: - - data - title: ListProvidersResponse - description: >- - Response containing a list of all available providers. - ListOpenAIResponseObject: - type: object + - job_uuid + title: PostTrainingJob +======= + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' +>>>>>>> 4cc87bbe1 (chore: regen scehma with main) + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + - $ref: '#/components/schemas/QATFinetuningConfig' + SpanEndPayload: + description: Payload for a span end event. properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - description: >- - List of response objects with their input context - has_more: - type: boolean - description: >- - Whether there are more results available beyond this page - first_id: - type: string - description: >- - Identifier of the first item in this page - last_id: - type: string - description: Identifier of the last item in this page - object: + type: + const: span_end + default: span_end + title: Type type: string - const: list - default: list - description: Object type identifier, always "list" - additionalProperties: false + status: + $ref: '#/components/schemas/SpanStatus' required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIResponseObject - description: >- - Paginated list of OpenAI response objects with navigation metadata. - OpenAIResponseError: + - status + title: SpanEndPayload type: object + SpanStartPayload: + description: Payload for a span start event. properties: - code: + type: + const: span_start + default: span_start + title: Type type: string - description: >- - Error code identifying the type of failure - message: + name: + title: Name type: string - description: >- - Human-readable error message describing the failure - additionalProperties: false + parent_span_id: + anyOf: + - type: string + - type: 'null' + title: Parent Span Id + nullable: true 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 - - type: string - const: web_search_2025_08_26 - 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 - max_tool_calls: - type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response - 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' - propertyName: type - 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' - DataSource: - discriminator: - 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 - max_tool_calls: - type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response. - additionalProperties: false - required: - - input - - model - title: CreateOpenaiResponseRequest - OpenAIResponseObject: - 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 - max_tool_calls: - type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response - additionalProperties: false - required: - - created_at - - id - - model - - object - - output - - parallel_tool_calls - - status - - text - title: OpenAIResponseObject - description: >- - Complete OpenAI response object containing generation results and metadata. - OpenAIResponseContentPartOutputText: - type: object - properties: - type: - type: string - const: output_text - default: output_text - description: >- - Content part type identifier, always "output_text" - text: - type: string - description: Text emitted for this content part - annotations: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseAnnotations' - description: >- - Structured annotations associated with the text - logprobs: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) Token log probability details - additionalProperties: false - required: - - type - - text - - annotations - title: OpenAIResponseContentPartOutputText - description: >- - Text content within a streamed response part. - "OpenAIResponseContentPartReasoningSummary": - type: object - properties: - type: - type: string - const: summary_text - default: summary_text - description: >- - Content part type identifier, always "summary_text" - text: - type: string - description: Summary text - additionalProperties: false - required: - - type - - text - title: >- - OpenAIResponseContentPartReasoningSummary - description: >- - Reasoning summary part in a streamed response. - OpenAIResponseContentPartReasoningText: - type: object - properties: - type: - type: string - const: reasoning_text - default: reasoning_text - description: >- - Content part type identifier, always "reasoning_text" - text: - type: string - description: Reasoning text supplied by the model - additionalProperties: false - required: - - type - - text - title: OpenAIResponseContentPartReasoningText - description: >- - Reasoning text emitted as part of a streamed response. - OpenAIResponseObjectStream: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - discriminator: - propertyName: type - mapping: - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - "OpenAIResponseObjectStreamResponseCompleted": - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Completed response object - type: - type: string - const: response.completed - default: response.completed - description: >- - Event type identifier, always "response.completed" - additionalProperties: false - required: - - response - - type - title: >- - OpenAIResponseObjectStreamResponseCompleted - description: >- - Streaming event indicating a response has been completed. - "OpenAIResponseObjectStreamResponseContentPartAdded": - type: object - properties: - content_index: - type: integer - description: >- - Index position of the part within the content array - response_id: - type: string - description: >- - Unique identifier of the response containing this content - item_id: - type: string - description: >- - Unique identifier of the output item containing this content part - output_index: - type: integer - description: >- - Index position of the output item in the response - part: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - description: The content part that was added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.content_part.added - default: response.content_part.added - description: >- - Event type identifier, always "response.content_part.added" - additionalProperties: false - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseContentPartAdded - description: >- - Streaming event for when a new content part is added to a response item. - "OpenAIResponseObjectStreamResponseContentPartDone": - type: object - properties: - content_index: - type: integer - description: >- - Index position of the part within the content array - response_id: - type: string - description: >- - Unique identifier of the response containing this content - item_id: - type: string - description: >- - Unique identifier of the output item containing this content part - output_index: - type: integer - description: >- - Index position of the output item in the response - part: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - description: The completed content part - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.content_part.done - default: response.content_part.done - description: >- - Event type identifier, always "response.content_part.done" - additionalProperties: false - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseContentPartDone - description: >- - Streaming event for when a content part is completed. - "OpenAIResponseObjectStreamResponseCreated": - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: The response object that was created - type: - type: string - const: response.created - default: response.created - description: >- - Event type identifier, always "response.created" - additionalProperties: false - required: - - response - - type - title: >- - OpenAIResponseObjectStreamResponseCreated - description: >- - Streaming event indicating a new response has been created. - OpenAIResponseObjectStreamResponseFailed: - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Response object describing the failure - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.failed - default: response.failed - description: >- - Event type identifier, always "response.failed" - additionalProperties: false - required: - - response - - sequence_number - - type - title: OpenAIResponseObjectStreamResponseFailed - description: >- - Streaming event emitted when a response fails. - "OpenAIResponseObjectStreamResponseFileSearchCallCompleted": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the completed file search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.file_search_call.completed - default: response.file_search_call.completed - description: >- - Event type identifier, always "response.file_search_call.completed" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFileSearchCallCompleted - description: >- - Streaming event for completed file search calls. - "OpenAIResponseObjectStreamResponseFileSearchCallInProgress": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the file search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - description: >- - Event type identifier, always "response.file_search_call.in_progress" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFileSearchCallInProgress - description: >- - Streaming event for file search calls in progress. - "OpenAIResponseObjectStreamResponseFileSearchCallSearching": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the file search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.file_search_call.searching - default: response.file_search_call.searching - description: >- - Event type identifier, always "response.file_search_call.searching" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFileSearchCallSearching - description: >- - Streaming event for file search currently searching. - "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta": - type: object - properties: - delta: - type: string - description: >- - Incremental function call arguments being added - item_id: - type: string - description: >- - Unique identifier of the function call being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - description: >- - Event type identifier, always "response.function_call_arguments.delta" - additionalProperties: false - required: - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - description: >- - Streaming event for incremental function call argument updates. - "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone": - type: object - properties: - arguments: - type: string - description: >- - Final complete arguments JSON string for the function call - item_id: - type: string - description: >- - Unique identifier of the completed function call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.function_call_arguments.done - default: response.function_call_arguments.done - description: >- - Event type identifier, always "response.function_call_arguments.done" - additionalProperties: false - required: - - arguments - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - description: >- - Streaming event for when function call arguments are completed. - "OpenAIResponseObjectStreamResponseInProgress": - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Current response state while in progress - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.in_progress - default: response.in_progress - description: >- - Event type identifier, always "response.in_progress" - additionalProperties: false - required: - - response - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseInProgress - description: >- - Streaming event indicating the response remains in progress. - "OpenAIResponseObjectStreamResponseIncomplete": - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: >- - Response object describing the incomplete state - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.incomplete - default: response.incomplete - description: >- - Event type identifier, always "response.incomplete" - additionalProperties: false - required: - - response - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseIncomplete - description: >- - Streaming event emitted when a response ends in an incomplete state. - "OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta": - type: object - properties: - delta: - type: string - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer - type: - type: string - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - additionalProperties: false - required: - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - "OpenAIResponseObjectStreamResponseMcpCallArgumentsDone": - type: object - properties: - arguments: - type: string - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer - type: - type: string - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - additionalProperties: false - required: - - arguments - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - "OpenAIResponseObjectStreamResponseMcpCallCompleted": - type: object - properties: - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.mcp_call.completed - default: response.mcp_call.completed - description: >- - Event type identifier, always "response.mcp_call.completed" - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallCompleted - description: Streaming event for completed MCP calls. - "OpenAIResponseObjectStreamResponseMcpCallFailed": - type: object - properties: - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.mcp_call.failed - default: response.mcp_call.failed - description: >- - Event type identifier, always "response.mcp_call.failed" - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallFailed - description: Streaming event for failed MCP calls. - "OpenAIResponseObjectStreamResponseMcpCallInProgress": - type: object - properties: - item_id: - type: string - description: Unique identifier of the MCP call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - description: >- - Event type identifier, always "response.mcp_call.in_progress" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallInProgress - description: >- - Streaming event for MCP calls in progress. - "OpenAIResponseObjectStreamResponseMcpListToolsCompleted": - type: object - properties: - sequence_number: - type: integer - type: - type: string - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsCompleted - "OpenAIResponseObjectStreamResponseMcpListToolsFailed": - type: object - properties: - sequence_number: - type: integer - type: - type: string - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsFailed - "OpenAIResponseObjectStreamResponseMcpListToolsInProgress": - type: object - properties: - sequence_number: - type: integer - type: - type: string - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsInProgress - "OpenAIResponseObjectStreamResponseOutputItemAdded": - type: object - properties: - response_id: - type: string - description: >- - Unique identifier of the response containing this output - item: - 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' - description: >- - The output item that was added (message, tool call, etc.) - output_index: - type: integer - description: >- - Index position of this item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_item.added - default: response.output_item.added - description: >- - Event type identifier, always "response.output_item.added" - additionalProperties: false - required: - - response_id - - item - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputItemAdded - description: >- - Streaming event for when a new output item is added to the response. - "OpenAIResponseObjectStreamResponseOutputItemDone": - type: object - properties: - response_id: - type: string - description: >- - Unique identifier of the response containing this output - item: - 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' - description: >- - The completed output item (message, tool call, etc.) - output_index: - type: integer - description: >- - Index position of this item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_item.done - default: response.output_item.done - description: >- - Event type identifier, always "response.output_item.done" - additionalProperties: false - required: - - response_id - - item - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputItemDone - description: >- - Streaming event for when an output item is completed. - "OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the item to which the annotation is being added - output_index: - type: integer - description: >- - Index position of the output item in the response's output array - content_index: - type: integer - description: >- - Index position of the content part within the output item - annotation_index: - type: integer - description: >- - Index of the annotation within the content part - annotation: - 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' - description: The annotation object being added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_text.annotation.added - default: response.output_text.annotation.added - description: >- - Event type identifier, always "response.output_text.annotation.added" - additionalProperties: false - required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - description: >- - Streaming event for when an annotation is added to output text. - "OpenAIResponseObjectStreamResponseOutputTextDelta": - type: object - properties: - content_index: - type: integer - description: Index position within the text content - delta: - type: string - description: Incremental text content being added - item_id: - type: string - description: >- - Unique identifier of the output item being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_text.delta - default: response.output_text.delta - description: >- - Event type identifier, always "response.output_text.delta" - additionalProperties: false - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextDelta - description: >- - Streaming event for incremental text content updates. - "OpenAIResponseObjectStreamResponseOutputTextDone": - type: object - properties: - content_index: - type: integer - description: Index position within the text content - text: - type: string - description: >- - Final complete text content of the output item - item_id: - type: string - description: >- - Unique identifier of the completed output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_text.done - default: response.output_text.done - description: >- - Event type identifier, always "response.output_text.done" - additionalProperties: false - required: - - content_index - - text - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextDone - description: >- - Streaming event for when text output is completed. - "OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded": - type: object - properties: - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - description: The summary part that was added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - description: >- - Event type identifier, always "response.reasoning_summary_part.added" - additionalProperties: false - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - description: >- - Streaming event for when a new reasoning summary part is added. - "OpenAIResponseObjectStreamResponseReasoningSummaryPartDone": - type: object - properties: - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - description: The completed summary part - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - description: >- - Event type identifier, always "response.reasoning_summary_part.done" - additionalProperties: false - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - description: >- - Streaming event for when a reasoning summary part is completed. - "OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta": - type: object - properties: - delta: - type: string - description: Incremental summary text being added - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - description: >- - Event type identifier, always "response.reasoning_summary_text.delta" - additionalProperties: false - required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - description: >- - Streaming event for incremental reasoning summary text updates. - "OpenAIResponseObjectStreamResponseReasoningSummaryTextDone": - type: object - properties: - text: - type: string - description: Final complete summary text - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - description: >- - Event type identifier, always "response.reasoning_summary_text.done" - additionalProperties: false - required: - - text - - item_id - - output_index - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - description: >- - Streaming event for when reasoning summary text is completed. - "OpenAIResponseObjectStreamResponseReasoningTextDelta": - type: object - properties: - content_index: - type: integer - description: >- - Index position of the reasoning content part - delta: - type: string - description: Incremental reasoning text being added - item_id: - type: string - description: >- - Unique identifier of the output item being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.reasoning_text.delta - default: response.reasoning_text.delta - description: >- - Event type identifier, always "response.reasoning_text.delta" - additionalProperties: false - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningTextDelta - description: >- - Streaming event for incremental reasoning text updates. - "OpenAIResponseObjectStreamResponseReasoningTextDone": - type: object - properties: - content_index: - type: integer - description: >- - Index position of the reasoning content part - text: - type: string - description: Final complete reasoning text - item_id: - type: string - description: >- - Unique identifier of the completed output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.reasoning_text.done - default: response.reasoning_text.done - description: >- - Event type identifier, always "response.reasoning_text.done" - additionalProperties: false - required: - - content_index - - text - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningTextDone - description: >- - Streaming event for when reasoning text is completed. - "OpenAIResponseObjectStreamResponseRefusalDelta": - type: object - properties: - content_index: - type: integer - description: Index position of the content part - delta: - type: string - description: Incremental refusal text being added - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.refusal.delta - default: response.refusal.delta - description: >- - Event type identifier, always "response.refusal.delta" - additionalProperties: false - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseRefusalDelta - description: >- - Streaming event for incremental refusal text updates. - "OpenAIResponseObjectStreamResponseRefusalDone": - type: object - properties: - content_index: - type: integer - description: Index position of the content part - refusal: - type: string - description: Final complete refusal text - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.refusal.done - default: response.refusal.done - description: >- - Event type identifier, always "response.refusal.done" - additionalProperties: false - required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseRefusalDone - description: >- - Streaming event for when refusal text is completed. - "OpenAIResponseObjectStreamResponseWebSearchCallCompleted": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the completed web search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.web_search_call.completed - default: response.web_search_call.completed - description: >- - Event type identifier, always "response.web_search_call.completed" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallCompleted - description: >- - Streaming event for completed web search calls. - "OpenAIResponseObjectStreamResponseWebSearchCallInProgress": - type: object - properties: - item_id: - type: string - description: Unique identifier of the web search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - description: >- - Event type identifier, always "response.web_search_call.in_progress" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallInProgress - description: >- - Streaming event for web search calls in progress. - "OpenAIResponseObjectStreamResponseWebSearchCallSearching": - type: object - properties: - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer - type: - type: string - const: response.web_search_call.searching - default: response.web_search_call.searching - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallSearching - OpenAIDeleteResponseObject: - type: object - properties: - id: - type: string - description: >- - Unique identifier of the deleted response - object: - type: string - const: response - default: response - description: >- - Object type identifier, always "response" - deleted: - type: boolean - default: true - description: Deletion confirmation flag, always True - additionalProperties: false - required: - - id - - object - - deleted - title: OpenAIDeleteResponseObject - description: >- - Response object confirming deletion of an OpenAI response. - ListOpenAIResponseInputItem: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: List of input items - object: - type: string - const: list - default: list - description: Object type identifier, always "list" - additionalProperties: false - required: - - data - - object - title: ListOpenAIResponseInputItem - description: >- - List container for OpenAI response input items. - RunShieldRequest: - type: object - properties: - shield_id: - type: string - description: The identifier of the shield to run. - messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - description: The messages to run the shield on. - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The parameters of the shield. - additionalProperties: false - required: - - shield_id - - messages - - params - title: RunShieldRequest - RunShieldResponse: - type: object - properties: - violation: - $ref: '#/components/schemas/SafetyViolation' - description: >- - (Optional) Safety violation detected by the shield, if any - additionalProperties: false - title: RunShieldResponse - description: Response from running a safety shield. - SafetyViolation: - type: object - properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - description: Severity level of the violation - user_message: - type: string - description: >- - (Optional) Message to convey to the user about the violation - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Additional metadata including specific violation codes for debugging and - telemetry - additionalProperties: false - required: - - violation_level - - metadata - title: SafetyViolation - description: >- - Details of a safety violation detected by content moderation. - ViolationLevel: - type: string - enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: >- - Types of aggregation functions for scoring results. - ArrayType: - type: object - properties: - type: - type: string - const: array - default: array - description: Discriminator type. Always "array" - additionalProperties: false - required: - - type - title: ArrayType - description: Parameter type for array values. - BasicScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: basic - default: basic - description: >- - The type of scoring function parameters, always basic - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - aggregation_functions - title: BasicScoringFnParams - description: >- - Parameters for basic scoring function configuration. - BooleanType: - type: object - properties: - type: - type: string - const: boolean - default: boolean - description: Discriminator type. Always "boolean" - additionalProperties: false - required: - - type - title: BooleanType - description: Parameter type for boolean values. - ChatCompletionInputType: - type: object - properties: - type: - type: string - const: chat_completion_input - default: chat_completion_input - description: >- - Discriminator type. Always "chat_completion_input" - additionalProperties: false - required: - - type - title: ChatCompletionInputType - description: >- - Parameter type for chat completion input. - CompletionInputType: - type: object - properties: - type: - type: string - const: completion_input - default: completion_input - description: >- - Discriminator type. Always "completion_input" - additionalProperties: false - required: - - type - title: CompletionInputType - description: Parameter type for completion input. - JsonType: - type: object - properties: - type: - type: string - const: json - default: json - description: Discriminator type. Always "json" - additionalProperties: false - required: - - type - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: llm_as_judge - default: llm_as_judge - description: >- - The type of scoring function parameters, always llm_as_judge - judge_model: - type: string - description: >- - Identifier of the LLM model to use as a judge for scoring - prompt_template: - type: string - description: >- - (Optional) Custom prompt template for the judge model - judge_score_regexes: - type: array - items: - type: string - description: >- - Regexes to extract the answer from generated response - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - judge_model - - judge_score_regexes - - aggregation_functions - title: LLMAsJudgeScoringFnParams - description: >- - Parameters for LLM-as-judge scoring function configuration. - NumberType: - type: object - properties: - type: - type: string - const: number - default: number - description: Discriminator type. Always "number" - additionalProperties: false - required: - - type - title: NumberType - description: Parameter type for numeric values. - ObjectType: - type: object - properties: - type: - type: string - const: object - default: object - description: Discriminator type. Always "object" - additionalProperties: false - required: - - type - title: ObjectType - description: Parameter type for object values. - RegexParserScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: regex_parser - default: regex_parser - description: >- - The type of scoring function parameters, always regex_parser - parsing_regexes: - type: array - items: - type: string - description: >- - Regex to extract the answer from generated response - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - parsing_regexes - - aggregation_functions - title: RegexParserScoringFnParams - description: >- - Parameters for regex parser scoring function configuration. - ScoringFn: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: scoring_function - default: scoring_function - description: >- - The resource type, always scoring_function - description: - type: string - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - 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' - discriminator: - propertyName: type - mapping: - string: '#/components/schemas/StringType' - number: '#/components/schemas/NumberType' - boolean: '#/components/schemas/BooleanType' - array: '#/components/schemas/ArrayType' - object: '#/components/schemas/ObjectType' - json: '#/components/schemas/JsonType' - union: '#/components/schemas/UnionType' - chat_completion_input: '#/components/schemas/ChatCompletionInputType' - completion_input: '#/components/schemas/CompletionInputType' - params: - $ref: '#/components/schemas/ScoringFnParams' - additionalProperties: false - required: - - identifier - - provider_id - - type - - metadata - - return_type - title: ScoringFn - description: >- - A scoring function resource for evaluating model outputs. - ScoringFnParams: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' - - $ref: '#/components/schemas/BasicScoringFnParams' - discriminator: - propertyName: type - mapping: - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - basic: '#/components/schemas/BasicScoringFnParams' - ScoringFnParamsType: - type: string - enum: - - llm_as_judge - - regex_parser - - basic - title: ScoringFnParamsType - description: >- - Types of scoring function parameter configurations. - StringType: - type: object - properties: - type: - type: string - const: string - default: string - description: Discriminator type. Always "string" - additionalProperties: false - required: - - type - title: StringType - description: Parameter type for string values. - UnionType: - type: object - properties: - type: - type: string - const: union - default: union - description: Discriminator type. Always "union" - additionalProperties: false - required: - - type - title: UnionType - description: Parameter type for union values. - ListScoringFunctionsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ScoringFn' - additionalProperties: false - required: - - data - title: ListScoringFunctionsResponse - ScoreRequest: - type: object - properties: - input_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to score. - scoring_functions: - type: object - additionalProperties: - oneOf: - - $ref: '#/components/schemas/ScoringFnParams' - - type: 'null' - description: >- - The scoring functions to use for the scoring. - additionalProperties: false - required: - - input_rows - - scoring_functions - title: ScoreRequest - ScoreResponse: - type: object - properties: - results: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: >- - A map of scoring function name to ScoringResult. - additionalProperties: false - required: - - results - title: ScoreResponse - description: The response from scoring. - ScoringResult: - type: object - properties: - score_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The scoring result for each row. Each row is a map of column name to value. - aggregated_results: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Map of metric name to aggregated value - additionalProperties: false - required: - - score_rows - - aggregated_results - title: ScoringResult - description: A scoring result for a single row. - ScoreBatchRequest: - type: object - properties: - dataset_id: - type: string - description: The ID of the dataset to score. - scoring_functions: - type: object - additionalProperties: - oneOf: - - $ref: '#/components/schemas/ScoringFnParams' - - type: 'null' - description: >- - The scoring functions to use for the scoring. - save_results_dataset: - type: boolean - description: >- - Whether to save the results to a dataset. - additionalProperties: false - required: - - dataset_id - - scoring_functions - - save_results_dataset - title: ScoreBatchRequest - ScoreBatchResponse: - type: object - properties: - dataset_id: - type: string - description: >- - (Optional) The identifier of the dataset that was scored - results: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: >- - A map of scoring function name to ScoringResult - additionalProperties: false - required: - - results - title: ScoreBatchResponse - description: >- - Response from batch scoring operations on datasets. - Shield: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: shield - default: shield - description: The resource type, always shield - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Configuration parameters for the shield - additionalProperties: false - required: - - identifier - - provider_id - - type - title: Shield - description: >- - A safety shield resource that can be used to check content. - ListShieldsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Shield' - additionalProperties: false - required: - - data - title: ListShieldsResponse - InvokeToolRequest: - type: object - properties: - tool_name: - type: string - description: The name of the tool to invoke. - kwargs: - 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. - additionalProperties: false - required: - - tool_name - - kwargs - title: InvokeToolRequest - ImageContentItem: - type: object - properties: - type: - type: string - const: image - default: image - description: >- - Discriminator type of the content item. Always "image" - image: - type: object - properties: - url: - $ref: '#/components/schemas/URL' - description: >- - A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - data: - type: string - contentEncoding: base64 - description: base64 encoded image data as string - additionalProperties: false - description: >- - Image as a base64 encoded string or an URL - additionalProperties: false - required: - - type - - image - title: ImageContentItem - description: A image content item - InterleavedContent: - oneOf: - - type: string - - $ref: '#/components/schemas/InterleavedContentItem' - - type: array - items: - $ref: '#/components/schemas/InterleavedContentItem' - InterleavedContentItem: - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - TextContentItem: - type: object - properties: - type: - type: string - const: text - default: text - description: >- - Discriminator type of the content item. Always "text" - text: - type: string - description: Text content - additionalProperties: false - required: - - type - - text - title: TextContentItem - description: A text content item - ToolInvocationResult: - type: object - properties: - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - (Optional) The output content from the tool execution - error_message: - type: string - description: >- - (Optional) Error message if the tool execution failed - error_code: - type: integer - description: >- - (Optional) Numeric error code if the tool execution failed - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional metadata about the tool execution - additionalProperties: false - title: ToolInvocationResult - description: Result of a tool invocation. - URL: - type: object - properties: - uri: - type: string - description: The URL string pointing to the resource - additionalProperties: false - required: - - uri - title: URL - description: A URL reference to external content. - ToolDef: - type: object - properties: - toolgroup_id: - type: string - description: >- - (Optional) ID of the tool group this tool belongs to - name: - type: string - description: Name of the tool - description: - type: string - description: >- - (Optional) Human-readable description of what the tool does - input_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) JSON Schema for tool inputs (MCP inputSchema) - output_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) JSON Schema for tool outputs (MCP outputSchema) - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional metadata about the tool - additionalProperties: false - required: - - name - title: ToolDef - description: >- - Tool definition used in runtime contexts. - ListToolDefsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ToolDef' - description: List of tool definitions - additionalProperties: false - required: - - data - title: ListToolDefsResponse - description: >- - Response containing a list of tool definitions. - ToolGroup: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: tool_group - default: tool_group - description: Type of resource, always 'tool_group' - mcp_endpoint: - $ref: '#/components/schemas/URL' - description: >- - (Optional) Model Context Protocol endpoint for remote tools - args: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional arguments for the tool group - additionalProperties: false - required: - - identifier - - provider_id - - type - title: ToolGroup - description: >- - A group of related tools managed together. - ListToolGroupsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ToolGroup' - description: List of tool groups - additionalProperties: false - required: - - data - title: ListToolGroupsResponse - description: >- - Response containing a list of tool groups. - 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 - properties: - chunk_id: - type: string - description: >- - The ID of the chunk. If not set, it will be generated based on the document - ID and content. - document_id: - type: string - description: >- - The ID of the document this chunk belongs to. - source: - type: string - description: >- - The source of the content, such as a URL, file path, or other identifier. - created_timestamp: - type: integer - description: >- - An optional timestamp indicating when the chunk was created. - updated_timestamp: - type: integer - description: >- - An optional timestamp indicating when the chunk was last updated. - chunk_window: - type: string - description: >- - The window of the chunk, which can be used to group related chunks together. - chunk_tokenizer: - type: string - description: >- - The tokenizer used to create the chunk. Default is Tiktoken. - chunk_embedding_model: - type: string - description: >- - The embedding model used to create the chunk's embedding. - chunk_embedding_dimension: - type: integer - description: >- - The dimension of the embedding vector for the chunk. - content_token_count: - type: integer - description: >- - The number of tokens in the content of the chunk. - metadata_token_count: - type: integer - description: >- - The number of tokens in the metadata of the chunk. - additionalProperties: false - title: 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. - InsertChunksRequest: - type: object - properties: - vector_store_id: - type: string - description: >- - The identifier of the vector database to insert the chunks into. - chunks: - type: array - items: - $ref: '#/components/schemas/Chunk' - description: >- - The chunks to insert. Each `Chunk` should contain content which can be - interleaved text, images, or other types. `metadata`: `dict[str, Any]` - and `embedding`: `List[float]` are optional. If `metadata` is provided, - you configure how Llama Stack formats the chunk during generation. If - `embedding` is not provided, it will be computed later. - ttl_seconds: - type: integer - description: The time to live of the chunks. - additionalProperties: false - required: - - vector_store_id - - chunks - title: InsertChunksRequest - QueryChunksRequest: - type: object - properties: - vector_store_id: - type: string - description: >- - The identifier of the vector database to query. - query: - $ref: '#/components/schemas/InterleavedContent' - description: The query to search for. - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The parameters of the query. - additionalProperties: false - required: - - vector_store_id - - query - title: QueryChunksRequest - QueryChunksResponse: - type: object - properties: - chunks: - type: array - items: - $ref: '#/components/schemas/Chunk' - description: >- - List of content chunks returned from the query - scores: - type: array - items: - type: number - description: >- - Relevance scores corresponding to each returned chunk - additionalProperties: false - required: - - chunks - - scores - title: QueryChunksResponse - description: >- - Response from querying chunks in a vector database. - VectorStoreFileCounts: - type: object - properties: - completed: - type: integer - description: >- - Number of files that have been successfully processed - cancelled: - type: integer - description: >- - Number of files that had their processing cancelled - failed: - type: integer - description: Number of files that failed to process - in_progress: - type: integer - description: >- - Number of files currently being processed - total: - type: integer - description: >- - Total number of files in the vector store - additionalProperties: false - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - description: >- - File processing status counts for a vector store. - VectorStoreListResponse: - type: object - properties: - object: - type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreObject' - description: List of vector store objects - first_id: - type: string - description: >- - (Optional) ID of the first vector store in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last vector store in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more vector stores available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreListResponse - description: Response from listing vector stores. - VectorStoreObject: - type: object - properties: - id: - type: string - description: Unique identifier for the vector store - object: - type: string - default: vector_store - description: >- - Object type identifier, always "vector_store" - created_at: - type: integer - description: >- - Timestamp when the vector store was created - name: - type: string - description: (Optional) Name of the vector store - usage_bytes: - type: integer - default: 0 - description: >- - Storage space used by the vector store in bytes - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the vector store - status: - type: string - default: completed - description: Current status of the vector store - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Expiration policy for the vector store - expires_at: - type: integer - description: >- - (Optional) Timestamp when the vector store will expire - last_active_at: - type: integer - description: >- - (Optional) Timestamp of last activity on the vector store - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of key-value pairs that can be attached to the vector store - additionalProperties: false - required: - - id - - object - - created_at - - usage_bytes - - file_counts - - status - - metadata - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreChunkingStrategy: - 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' - ScoringFnParams: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - VectorStoreChunkingStrategyAuto: - type: object - properties: - type: - type: string - const: auto - default: auto - description: >- - Strategy type, always "auto" for automatic chunking - additionalProperties: false - required: - - type - title: VectorStoreChunkingStrategyAuto - description: >- - Automatic chunking strategy for vector store files. - VectorStoreChunkingStrategyStatic: - type: object - properties: - type: - type: string - const: static - default: static - description: >- - Strategy type, always "static" for static chunking - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' - description: >- - Configuration parameters for the static chunking strategy - additionalProperties: false - required: - - type - - static - title: VectorStoreChunkingStrategyStatic - description: >- - Static chunking strategy with configurable parameters. - VectorStoreChunkingStrategyStaticConfig: - type: object - properties: - chunk_overlap_tokens: - type: integer - default: 400 - description: >- - Number of tokens to overlap between adjacent chunks - max_chunk_size_tokens: - type: integer - default: 800 - description: >- - Maximum number of tokens per chunk, must be between 100 and 4096 - additionalProperties: false - required: - - chunk_overlap_tokens - - max_chunk_size_tokens - title: VectorStoreChunkingStrategyStaticConfig - description: >- - Configuration for static chunking strategy. - "OpenAICreateVectorStoreRequestWithExtraBody": - type: object - properties: - name: - type: string - description: (Optional) A name for the vector store - file_ids: - type: array - items: - type: string - description: >- - List of file IDs to include in the vector store - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Expiration policy for the vector store - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - (Optional) Strategy for splitting files into chunks - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of key-value pairs that can be attached to the vector store - additionalProperties: false - title: >- - OpenAICreateVectorStoreRequestWithExtraBody - description: >- - Request to create a vector store with extra_body support. - OpenaiUpdateVectorStoreRequest: - type: object - properties: - name: - type: string - description: The name of the vector store. - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The expiration policy for a vector store. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of 16 key-value pairs that can be attached to an object. - additionalProperties: false - title: OpenaiUpdateVectorStoreRequest - VectorStoreDeleteResponse: - type: object - properties: - id: - type: string - description: >- - Unique identifier of the deleted vector store - object: - type: string - default: vector_store.deleted - description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true - description: >- - Whether the deletion operation was successful - additionalProperties: false - required: - - id - - object - - deleted - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - "OpenAICreateVectorStoreFileBatchRequestWithExtraBody": - type: object - properties: - file_ids: - type: array - items: - type: string - description: >- - A list of File IDs that the vector store should use - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Key-value attributes to store with the files - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - (Optional) The chunking strategy used to chunk the file(s). Defaults to - auto - additionalProperties: false - required: - - file_ids - title: >- - OpenAICreateVectorStoreFileBatchRequestWithExtraBody - description: >- - Request to create a vector store file batch with extra_body support. - VectorStoreFileBatchObject: - type: object - properties: - id: - type: string - description: Unique identifier for the file batch - object: - type: string - default: vector_store.file_batch - description: >- - Object type identifier, always "vector_store.file_batch" - created_at: - type: integer - description: >- - Timestamp when the file batch was created - vector_store_id: - type: string - description: >- - ID of the vector store containing the file batch - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: >- - Current processing status of the file batch - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the batch - additionalProperties: false - required: - - id - - object - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject - description: OpenAI Vector Store File Batch object. - VectorStoreFileStatus: - oneOf: - - type: string - const: completed - - type: string - const: in_progress - - type: string - const: cancelled - - type: string - const: failed - VectorStoreFileLastError: - type: object - properties: - code: - oneOf: - - type: string - const: server_error - - type: string - const: rate_limit_exceeded - description: >- - Error code indicating the type of failure - message: - type: string - description: >- - Human-readable error message describing the failure - additionalProperties: false - required: - - code - - message - title: VectorStoreFileLastError - description: >- - Error information for failed vector store file processing. - VectorStoreFileObject: - type: object - properties: - id: - type: string - description: Unique identifier for the file - object: - type: string - default: vector_store.file - description: >- - Object type identifier, always "vector_store.file" - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Key-value attributes associated with the file - chunking_strategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - description: >- - Strategy used for splitting the file into chunks - created_at: - type: integer - description: >- - Timestamp when the file was added to the vector store - last_error: - $ref: '#/components/schemas/VectorStoreFileLastError' - description: >- - (Optional) Error information if file processing failed - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: Current processing status of the file - usage_bytes: - type: integer - default: 0 - description: Storage space used by this file in bytes - vector_store_id: - type: string - description: >- - ID of the vector store containing this file - additionalProperties: false - required: - - id - - object - - attributes - - chunking_strategy - - created_at - - status - - usage_bytes - - vector_store_id - title: VectorStoreFileObject - description: OpenAI Vector Store File object. - VectorStoreFilesListInBatchResponse: - type: object - properties: - object: - type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: >- - List of vector store file objects in the batch - first_id: - type: string - description: >- - (Optional) ID of the first file in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more files available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreFilesListInBatchResponse - description: >- - Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: - type: object - properties: - object: - type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: List of vector store file objects - first_id: - type: string - description: >- - (Optional) ID of the first file in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more files available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreListFilesResponse - description: >- - Response from listing files in a vector store. - OpenaiAttachFileToVectorStoreRequest: - type: object - properties: - file_id: - type: string - description: >- - The ID of the file to attach to the vector store. - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The key-value attributes stored with the file, which can be used for filtering. - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - The chunking strategy to use for the file. - additionalProperties: false - required: - - file_id - title: OpenaiAttachFileToVectorStoreRequest - OpenaiUpdateVectorStoreFileRequest: - type: object - properties: - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The updated key-value attributes to store with the file. - additionalProperties: false - required: - - attributes - title: OpenaiUpdateVectorStoreFileRequest - VectorStoreFileDeleteResponse: - type: object - properties: - id: - type: string - description: Unique identifier of the deleted file - object: - type: string - default: vector_store.file.deleted - description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true - description: >- - Whether the deletion operation was successful - additionalProperties: false - required: - - id - - object - - deleted - title: VectorStoreFileDeleteResponse - description: >- - Response from deleting a vector store file. - bool: - type: boolean - VectorStoreContent: - type: object - properties: - type: - type: string - const: text - description: >- - Content type, currently only "text" is supported - text: - type: string - description: The actual text content - embedding: - type: array - items: - type: number - description: >- - Optional embedding vector for this content chunk - chunk_metadata: - $ref: '#/components/schemas/ChunkMetadata' - description: Optional chunk metadata - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Optional user-defined metadata - additionalProperties: false - required: - - type - - text - title: VectorStoreContent - description: >- - Content item from a vector store file or search result. - VectorStoreFileContentResponse: - type: object - properties: - object: - type: string - const: vector_store.file_content.page - default: vector_store.file_content.page - description: >- - The object type, which is always `vector_store.file_content.page` - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' - description: Parsed content of the file - has_more: - type: boolean - default: false - description: >- - Indicates if there are more content pages to fetch - next_page: - type: string - description: The token for the next page, if any - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreFileContentResponse - description: >- - Represents the parsed content of a vector store file. - OpenaiSearchVectorStoreRequest: - type: object - properties: - query: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - The query string or array for performing the search. - filters: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Filters based on file attributes to narrow the search results. - max_num_results: - type: integer - description: >- - Maximum number of results to return (1 to 50 inclusive, default 10). - 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: >- - Ranking options for fine-tuning the search results. - rewrite_query: - type: boolean - description: >- - Whether to rewrite the natural language query for vector search (default - false) - search_mode: - type: string - description: >- - The search mode to use - "keyword", "vector", or "hybrid" (default "vector") - additionalProperties: false - required: - - query - title: OpenaiSearchVectorStoreRequest - VectorStoreSearchResponse: - type: object - properties: - 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 - attributes: - type: object - additionalProperties: - oneOf: - - type: string - - type: number - - type: boolean - description: >- - (Optional) Key-value attributes associated with the file - content: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' - description: >- - List of content items matching the search query - additionalProperties: false - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - description: Response from searching a vector store. - VectorStoreSearchResponsePage: - type: object - properties: - object: - type: string - default: vector_store.search_results.page - description: >- - Object type identifier for the search results page - search_query: - type: array - items: - type: string - description: >- - The original search query that was executed - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - description: List of search result objects - has_more: - type: boolean - default: false - description: >- - Whether there are more results available beyond this page - next_page: - type: string - description: >- - (Optional) Token for retrieving the next page of results - additionalProperties: false - required: - - object - - search_query - - data - - has_more - title: VectorStoreSearchResponsePage - description: >- - Paginated response from searching a vector store. - VersionInfo: - type: object - properties: - version: - type: string - description: Version number of the service - additionalProperties: false - required: - - version - title: VersionInfo - description: Version information for the service. - AppendRowsRequest: - type: object - properties: - rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to append to the dataset. - additionalProperties: false - required: - - rows - title: AppendRowsRequest - PaginatedResponse: - type: object - properties: - data: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The list of items for the current page - has_more: - type: boolean - description: >- - Whether there are more items available after this set - url: - type: string - description: The URL for accessing this list - additionalProperties: false - required: - - data - - has_more - title: PaginatedResponse - description: >- - A generic paginated response that follows a simple format. - Dataset: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: dataset - default: dataset - description: >- - Type of resource, always 'dataset' for datasets - purpose: - type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - description: >- - Purpose of the dataset indicating its intended use - source: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - description: >- - Data source configuration for the dataset - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Additional metadata for the dataset - additionalProperties: false - required: - - identifier - - provider_id - - type - - purpose - - source - - metadata - title: Dataset - description: >- - Dataset resource for storing and accessing training or evaluation data. - RowsDataSource: - type: object - properties: - type: - type: string - const: rows - default: rows - rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", - "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, - world!"}]} ] - additionalProperties: false - required: - - type - - rows - title: RowsDataSource - description: A dataset stored in rows. - URIDataSource: - type: object - properties: - type: - type: string - const: uri - default: uri - uri: - type: string - description: >- - The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" - - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" - additionalProperties: false - required: - - type - - uri - title: URIDataSource - description: >- - A dataset that can be obtained from a URI. - ListDatasetsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Dataset' - description: List of datasets - additionalProperties: false - required: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - Benchmark: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: benchmark - default: benchmark - description: The resource type, always benchmark - dataset_id: - type: string - description: >- - Identifier of the dataset to use for the benchmark evaluation - scoring_functions: - type: array - items: - type: string - description: >- - List of scoring function identifiers to apply during evaluation - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Metadata for this evaluation task - additionalProperties: false - required: - - identifier - - provider_id - - type - - dataset_id - - scoring_functions - - metadata - title: Benchmark - description: >- - A benchmark resource for evaluating model performance. - ListBenchmarksResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Benchmark' - additionalProperties: false - required: - - data - title: ListBenchmarksResponse - BenchmarkConfig: - type: object - properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - description: The candidate to evaluate. - scoring_params: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringFnParams' - description: >- - Map between scoring function id and parameters for each scoring function - you want to run - num_examples: - type: integer - description: >- - (Optional) The number of examples to evaluate. If not provided, all examples - in the dataset will be evaluated - additionalProperties: false - required: - - eval_candidate - - scoring_params - title: BenchmarkConfig - description: >- - A benchmark configuration for evaluation. - GreedySamplingStrategy: - type: object - properties: - type: - type: string - const: greedy - default: greedy - description: >- - Must be "greedy" to identify this sampling strategy - additionalProperties: false - required: - - type - title: GreedySamplingStrategy - description: >- - Greedy sampling strategy that selects the highest probability token at each - step. - ModelCandidate: - type: object - properties: - type: - type: string - const: model - default: model - model: - type: string - description: The model ID to evaluate. - sampling_params: - $ref: '#/components/schemas/SamplingParams' - description: The sampling parameters for the model. - system_message: - $ref: '#/components/schemas/SystemMessage' - description: >- - (Optional) The system message providing instructions or context to the - model. - additionalProperties: false - required: - - type - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - SamplingParams: - type: object - properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - - $ref: '#/components/schemas/TopPSamplingStrategy' - - $ref: '#/components/schemas/TopKSamplingStrategy' - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - description: The sampling strategy. - max_tokens: - type: integer - description: >- - 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. - repetition_penalty: - type: number - default: 1.0 - description: >- - 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. - stop: - type: array - items: - type: string - description: >- - Up to 4 sequences where the API will stop generating further tokens. The - returned text will not contain the stop sequence. - additionalProperties: false - required: - - strategy - title: SamplingParams - description: Sampling parameters. - SystemMessage: - type: object - properties: - role: - type: string - const: system - default: system - description: >- - Must be "system" to identify this as a system message - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - 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). - additionalProperties: false - required: - - role - - content - title: SystemMessage - description: >- - A system message providing instructions or context to the model. - TopKSamplingStrategy: - type: object - properties: - type: - type: string - const: top_k - default: top_k - description: >- - Must be "top_k" to identify this sampling strategy - top_k: - type: integer - description: >- - Number of top tokens to consider for sampling. Must be at least 1 - additionalProperties: false - required: - - type - - top_k - title: TopKSamplingStrategy - description: >- - Top-k sampling strategy that restricts sampling to the k most likely tokens. - TopPSamplingStrategy: - type: object - properties: - type: - type: string - const: top_p - default: top_p - description: >- - Must be "top_p" to identify this sampling strategy - temperature: - type: number - description: >- - Controls randomness in sampling. Higher values increase randomness - top_p: - type: number - default: 0.95 - description: >- - Cumulative probability threshold for nucleus sampling. Defaults to 0.95 - additionalProperties: false - required: - - type - title: TopPSamplingStrategy - description: >- - Top-p (nucleus) sampling strategy that samples from the smallest set of tokens - with cumulative probability >= p. - EvaluateRowsRequest: - type: object - properties: - input_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to evaluate. - scoring_functions: - type: array - items: - type: string - description: >- - The scoring functions to use for the evaluation. - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. - additionalProperties: false - required: - - input_rows - - scoring_functions - - benchmark_config - title: EvaluateRowsRequest - EvaluateResponse: - type: object - properties: - generations: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The generations from the evaluation. - scores: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: The scores from the evaluation. - additionalProperties: false - required: - - generations - - scores - title: EvaluateResponse - description: The response from an evaluation. - RunEvalRequest: - type: object - properties: - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. - additionalProperties: false - required: - - benchmark_config - title: RunEvalRequest - Job: - type: object - properties: - job_id: - type: string - description: Unique identifier for the job - status: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current execution status of the job - additionalProperties: false - required: - - job_id - - status - title: Job - description: >- - A job execution instance with status tracking. - RerankRequest: - type: object - properties: - model: - type: string - description: >- - The identifier of the reranking model to use. - query: - oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - description: >- - 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. - items: - type: array - items: - oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - description: >- - 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. - max_num_results: - type: integer - description: >- - (Optional) Maximum number of results to return. Default: returns all. - additionalProperties: false - required: - - model - - query - - items - title: RerankRequest - RerankData: - type: object - properties: - index: - type: integer - description: >- - The original index of the document in the input list - relevance_score: - type: number - description: >- - The relevance score from the model output. Values are inverted when applicable - so that higher scores indicate greater relevance. - additionalProperties: false - required: - - index - - relevance_score - title: RerankData - description: >- - A single rerank result from a reranking response. - RerankResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/RerankData' - description: >- - List of rerank result objects, sorted by relevance score (descending) - additionalProperties: false - required: - - data - title: RerankResponse - description: Response from a reranking request. - Checkpoint: - type: object - properties: - identifier: - type: string - description: Unique identifier for the checkpoint - created_at: - type: string - format: date-time - description: >- - Timestamp when the checkpoint was created - epoch: - type: integer - description: >- - Training epoch when the checkpoint was saved - post_training_job_id: - type: string - description: >- - Identifier of the training job that created this checkpoint - path: - type: string - description: >- - File system path where the checkpoint is stored - training_metrics: - $ref: '#/components/schemas/PostTrainingMetric' - description: >- - (Optional) Training metrics associated with this checkpoint - additionalProperties: false - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - PostTrainingJobArtifactsResponse: - type: object - properties: - job_uuid: - type: string - description: Unique identifier for the training job - checkpoints: - type: array - items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false - required: - - job_uuid - - checkpoints - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingMetric: - type: object - properties: - epoch: - type: integer - description: Training epoch number - train_loss: - type: number - description: Loss value on the training dataset - validation_loss: - type: number - description: Loss value on the validation dataset - perplexity: - type: number - description: >- - Perplexity metric indicating model confidence - additionalProperties: false - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: >- - Training metrics captured during post-training jobs. - CancelTrainingJobRequest: - type: object - properties: - job_uuid: - type: string - description: The UUID of the job to cancel. - additionalProperties: false - required: - - job_uuid - title: CancelTrainingJobRequest - PostTrainingJobStatusResponse: - type: object - properties: - job_uuid: - type: string - description: Unique identifier for the training job - status: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current status of the training job - scheduled_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the job was scheduled - started_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the job execution began - completed_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the job finished, if completed - resources_allocated: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Information about computational resources allocated to the - job - checkpoints: - type: array - items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false - required: - - job_uuid - - status - - checkpoints - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - ListPostTrainingJobsResponse: - type: object - properties: - data: - type: array - items: - type: object - properties: - job_uuid: - type: string - additionalProperties: false - required: - - job_uuid - title: PostTrainingJob - additionalProperties: false - required: - - data - title: ListPostTrainingJobsResponse - DPOAlignmentConfig: - type: object - properties: - beta: - type: number - description: Temperature parameter for the DPO loss - loss_type: - $ref: '#/components/schemas/DPOLossType' - default: sigmoid - description: The type of loss function to use for DPO - additionalProperties: false - required: - - beta - - loss_type - title: DPOAlignmentConfig - description: >- - Configuration for Direct Preference Optimization (DPO) alignment. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: - type: object - properties: - dataset_id: - type: string - description: >- - Unique identifier for the training dataset - batch_size: - type: integer - description: Number of samples per training batch - shuffle: - type: boolean - description: >- - Whether to shuffle the dataset during training - data_format: - $ref: '#/components/schemas/DatasetFormat' - description: >- - Format of the dataset (instruct or dialog) - validation_dataset_id: - type: string - description: >- - (Optional) Unique identifier for the validation dataset - packed: - type: boolean - default: false - description: >- - (Optional) Whether to pack multiple samples into a single sequence for - efficiency - train_on_input: - type: boolean - default: false - description: >- - (Optional) Whether to compute loss on input tokens as well as output tokens - additionalProperties: false - required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: >- - Configuration for training data and data loading. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - EfficiencyConfig: - type: object - properties: - enable_activation_checkpointing: - type: boolean - default: false - description: >- - (Optional) Whether to use activation checkpointing to reduce memory usage - enable_activation_offloading: - type: boolean - default: false - description: >- - (Optional) Whether to offload activations to CPU to save GPU memory - memory_efficient_fsdp_wrap: - type: boolean - default: false - description: >- - (Optional) Whether to use memory-efficient FSDP wrapping - fsdp_cpu_offload: - type: boolean - default: false - description: >- - (Optional) Whether to offload FSDP parameters to CPU - additionalProperties: false - title: EfficiencyConfig - description: >- - Configuration for memory and compute efficiency optimizations. - OptimizerConfig: - type: object - properties: - optimizer_type: - $ref: '#/components/schemas/OptimizerType' - description: >- - Type of optimizer to use (adam, adamw, or sgd) - lr: - type: number - description: Learning rate for the optimizer - weight_decay: - type: number - description: >- - Weight decay coefficient for regularization - num_warmup_steps: - type: integer - description: Number of steps for learning rate warmup - additionalProperties: false - required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: >- - Configuration parameters for the optimization algorithm. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: >- - Available optimizer algorithms for training. - TrainingConfig: - type: object - properties: - n_epochs: - type: integer - description: Number of training epochs to run - max_steps_per_epoch: - type: integer - default: 1 - description: Maximum number of steps to run per epoch - gradient_accumulation_steps: - type: integer - default: 1 - description: >- - Number of steps to accumulate gradients before updating - max_validation_steps: - type: integer - default: 1 - description: >- - (Optional) Maximum number of validation steps per epoch - data_config: - $ref: '#/components/schemas/DataConfig' - description: >- - (Optional) Configuration for data loading and formatting - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - description: >- - (Optional) Configuration for the optimization algorithm - efficiency_config: - $ref: '#/components/schemas/EfficiencyConfig' - description: >- - (Optional) Configuration for memory and compute optimizations - dtype: - type: string - default: bf16 - description: >- - (Optional) Data type for model parameters (bf16, fp16, fp32) - additionalProperties: false - required: - - n_epochs - - max_steps_per_epoch - - gradient_accumulation_steps - title: TrainingConfig - description: >- - Comprehensive configuration for the training process. - PreferenceOptimizeRequest: - type: object - properties: - job_uuid: - type: string - description: The UUID of the job to create. - finetuned_model: - type: string - description: The model to fine-tune. - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - description: The algorithm configuration. - training_config: - $ref: '#/components/schemas/TrainingConfig' - description: The training configuration. - hyperparam_search_config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The hyperparam search configuration. - logger_config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The logger configuration. - additionalProperties: false - required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: PreferenceOptimizeRequest - PostTrainingJob: - type: object - properties: - job_uuid: - type: string - additionalProperties: false - required: - - job_uuid - title: PostTrainingJob - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - - $ref: '#/components/schemas/QATFinetuningConfig' - SpanEndPayload: - description: Payload for a span end event. - properties: - type: - const: span_end - default: span_end - title: Type - type: string - status: - $ref: '#/components/schemas/SpanStatus' - required: - - status - title: SpanEndPayload - type: object - SpanStartPayload: - description: Payload for a span start event. - properties: - type: - const: span_start - default: span_start - title: Type - type: string - name: - title: Name - type: string - parent_span_id: - anyOf: - - type: string - - type: 'null' - title: Parent Span Id - nullable: true - required: - - name - title: SpanStartPayload + - name + title: SpanStartPayload type: object SpanStatus: description: The status of a span indicating whether it completed successfully or with an error. @@ -18992,6 +13526,12 @@ components: - type: 'null' title: Instructions nullable: true + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls + nullable: true input: items: anyOf: @@ -19325,284 +13865,6 @@ components: type: string title: Bf16QuantizationConfig type: object - LogProbConfig: - description: '' - properties: - top_k: - anyOf: - - type: integer - - type: 'null' - default: 0 - title: Top K - title: LogProbConfig - type: object - SystemMessageBehavior: - description: Config for how to override the default system prompt. - enum: - - append - - replace - title: SystemMessageBehavior - 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. - enum: - - auto - - required - - none - title: ToolChoice - type: string - ToolConfig: - description: Configuration for tool use. - properties: - tool_choice: - anyOf: - - $ref: '#/components/schemas/ToolChoice' - - type: string - - type: 'null' - default: auto - title: Tool Choice - tool_prompt_format: - anyOf: - - $ref: '#/components/schemas/ToolPromptFormat' - - type: 'null' - nullable: true - system_message_behavior: - anyOf: - - $ref: '#/components/schemas/SystemMessageBehavior' - - type: 'null' - default: append - title: ToolConfig - type: object - ToolPromptFormat: - description: Prompt format for calling custom / zero shot tools. - enum: - - json - - function_tag - - python_list - title: ToolPromptFormat - type: string - ChatCompletionRequest: - properties: - model: - title: Model - type: string - messages: - items: - discriminator: - mapping: - assistant: '#/components/schemas/CompletionMessage' - system: '#/components/schemas/SystemMessage' - tool: '#/components/schemas/ToolResponseMessage' - user: '#/components/schemas/UserMessage' - propertyName: role - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' - title: Messages - type: array - sampling_params: - anyOf: - - $ref: '#/components/schemas/SamplingParams' - - type: 'null' - tools: - anyOf: - - items: - $ref: '#/components/schemas/ToolDefinition' - type: array - - type: 'null' - title: Tools - tool_config: - anyOf: - - $ref: '#/components/schemas/ToolConfig' - - type: 'null' - response_format: - anyOf: - - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - - $ref: '#/components/schemas/GrammarResponseFormat' - - type: 'null' - title: Response Format - nullable: true - stream: - anyOf: - - type: boolean - - type: 'null' - default: false - title: Stream - logprobs: - anyOf: - - $ref: '#/components/schemas/LogProbConfig' - - type: 'null' - nullable: true - required: - - model - - messages - title: ChatCompletionRequest - type: object - TokenLogProbs: - description: Log probabilities for generated tokens. - properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs - type: object - ChatCompletionResponse: - description: Response from a chat completion request. - properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - completion_message: - $ref: '#/components/schemas/CompletionMessage' - logprobs: - anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - - type: 'null' - title: Logprobs - nullable: true - required: - - completion_message - title: ChatCompletionResponse - type: object - ChatCompletionResponseEventType: - description: Types of events that can occur during chat completion. - enum: - - start - - complete - - progress - title: ChatCompletionResponseEventType - type: string - ChatCompletionResponseEvent: - description: An event during chat completion generation. - properties: - event_type: - $ref: '#/components/schemas/ChatCompletionResponseEventType' - delta: - discriminator: - mapping: - image: '#/components/schemas/ImageDelta' - text: '#/components/schemas/TextDelta' - tool_call: '#/components/schemas/ToolCallDelta' - propertyName: type - oneOf: - - $ref: '#/components/schemas/TextDelta' - - $ref: '#/components/schemas/ImageDelta' - - $ref: '#/components/schemas/ToolCallDelta' - title: Delta - logprobs: - anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - - type: 'null' - title: Logprobs - nullable: true - stop_reason: - anyOf: - - $ref: '#/components/schemas/StopReason' - - type: 'null' - nullable: true - required: - - event_type - - delta - title: ChatCompletionResponseEvent - type: object - ChatCompletionResponseStreamChunk: - description: A chunk of a streamed chat completion response. - properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - event: - $ref: '#/components/schemas/ChatCompletionResponseEvent' - required: - - event - title: ChatCompletionResponseStreamChunk - type: object - CompletionResponse: - description: Response from a completion request. - properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - content: - title: Content - type: string - stop_reason: - $ref: '#/components/schemas/StopReason' - logprobs: - anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - - type: 'null' - title: Logprobs - nullable: true - required: - - content - - stop_reason - title: CompletionResponse - type: object - CompletionResponseStreamChunk: - description: A chunk of a streamed completion response. - properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - delta: - title: Delta - type: string - stop_reason: - anyOf: - - $ref: '#/components/schemas/StopReason' - - type: 'null' - nullable: true - logprobs: - anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - - type: 'null' - title: Logprobs - nullable: true - required: - - delta - title: CompletionResponseStreamChunk - type: object EmbeddingsResponse: description: Response containing generated embeddings. properties: @@ -19896,17 +14158,64 @@ components: nullable: true title: OpenAICompletionLogprobs type: object - ToolResponse: - description: Response from a tool invocation. + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object + required: + - logprobs_by_token + title: TokenLogProbs + type: object + ToolResponseMessage: + description: A message representing the result of a tool invocation. + properties: + role: + const: tool + default: tool + title: Role + type: string + call_id: + title: Call Id + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + required: + - call_id + - content + title: ToolResponseMessage + type: object + UserMessage: + description: A message from the user in a chat conversation. properties: - call_id: - title: Call Id + role: + const: user + default: user + title: Role type: string - tool_name: - anyOf: - - $ref: '#/components/schemas/BuiltinTool' - - type: string - title: Tool Name content: anyOf: - type: string @@ -19929,18 +14238,33 @@ components: - $ref: '#/components/schemas/TextContentItem' type: array title: Content - metadata: + context: anyOf: - - additionalProperties: true - type: object + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array - type: 'null' - title: Metadata + title: Context nullable: true required: - - call_id - - tool_name - content - title: ToolResponse + title: UserMessage type: object RouteInfo: description: Information about an API route including its path, method, and implementing providers. @@ -20088,6 +14412,7 @@ components: title: Logger Config type: object required: +<<<<<<< HEAD - job_uuid - training_config - hyperparam_search_config @@ -20175,173 +14500,406 @@ components: be overridden for app eval. additionalProperties: false required: - - scoring_fn_id - - description - - return_type - title: RegisterScoringFunctionRequest - RegisterShieldRequest: + - scoring_fn_id + - description + - return_type + title: RegisterScoringFunctionRequest + RegisterShieldRequest: + type: object + properties: + shield_id: + type: string + description: >- + The identifier of the shield to register. + provider_shield_id: + type: string + description: >- + The identifier of the shield in the provider. + provider_id: + type: string + description: The identifier of the provider. + params: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The parameters of the shield. + additionalProperties: false + required: + - shield_id + title: RegisterShieldRequest + RegisterToolGroupRequest: + type: object + properties: + toolgroup_id: + 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 + DataSource: + oneOf: + - $ref: '#/components/schemas/URIDataSource' + - $ref: '#/components/schemas/RowsDataSource' + discriminator: + propertyName: type + mapping: + uri: '#/components/schemas/URIDataSource' + rows: '#/components/schemas/RowsDataSource' + RegisterDatasetRequest: +======= + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest +>>>>>>> ceca36b91 (chore: regen scehma with main) + type: object + ListToolDefsResponse: + description: Response containing a list of tool definitions. + properties: + data: + items: + $ref: '#/components/schemas/ToolDef' + title: Data + type: array + required: + - data + title: ListToolDefsResponse + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id + type: string + provider_id: + title: Provider Id + type: string + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + nullable: true + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + nullable: true + required: + - toolgroup_id + - provider_id + title: ToolGroupInput + type: object + Chunk: + description: A chunk of content that can be inserted into a vector database. + properties: + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Embedding + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + nullable: true + required: + - content + - chunk_id + title: Chunk + type: object + VectorStoreCreateRequest: + description: Request to create a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + nullable: true + chunking_strategy: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Chunking Strategy + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object + title: VectorStoreCreateRequest + type: object + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + 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. properties: - shield_id: - type: string - description: >- - The identifier of the shield to register. - provider_shield_id: - type: string - description: >- - The identifier of the shield in the provider. - provider_id: + object: + default: list + title: Object type: string - description: The identifier of the provider. - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The parameters of the shield. - additionalProperties: false + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - shield_id - title: RegisterShieldRequest - RegisterToolGroupRequest: + - data + title: VectorStoreListFilesResponse type: object + VectorStoreListResponse: + description: Response from listing vector stores. properties: - toolgroup_id: - type: string - description: The ID of the tool group to register. - provider_id: + object: + default: list + title: Object 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 + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - toolgroup_id - - provider_id - title: RegisterToolGroupRequest - DataSource: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - RegisterDatasetRequest: + - data + title: VectorStoreListResponse type: object + VectorStoreModifyRequest: + description: Request to modify a vector store. properties: - purpose: - type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - description: >- - 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" } - source: - $ref: '#/components/schemas/DataSource' - description: >- - 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!"}, ] - } ] } + name: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + nullable: true metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The metadata for the dataset. - E.g. {"description": "My dataset"}. - dataset_id: - type: string - description: >- - The ID of the dataset. If not provided, an ID will be generated. - additionalProperties: false + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + nullable: true + title: VectorStoreModifyRequest + type: object + VectorStoreSearchRequest: + description: Request to search a vector store. + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: Query + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + nullable: true + max_num_results: + default: 10 + title: Max Num Results + type: integer + ranking_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Ranking Options + nullable: true + rewrite_query: + default: false + title: Rewrite Query + type: boolean required: - - purpose - - source - title: RegisterDatasetRequest - RegisterBenchmarkRequest: + - query + title: VectorStoreSearchRequest type: object + _safety_run_shield_Request: properties: - benchmark_id: - type: string - description: The ID of the benchmark to register. - dataset_id: + shield_id: + title: Shield Id type: string - description: >- - The ID of the dataset to use for the benchmark. - scoring_functions: - type: array + messages: items: - type: string - description: >- - The scoring functions to use for the benchmark. - provider_benchmark_id: - type: string - description: >- - The ID of the provider benchmark to use for the benchmark. - provider_id: - type: string - description: >- - The ID of the provider to use for the benchmark. - metadata: - type: object - additionalProperties: + 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: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The metadata to use for the benchmark. - additionalProperties: false + - $ref: '#/components/schemas/OpenAIUserMessageParam' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Messages + type: array + params: + additionalProperties: true + title: Params + type: object required: - - benchmark_id - - dataset_id - - scoring_functions - title: RegisterBenchmarkRequest + - 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/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index 7692157b26..6dd23762ee 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -11,10 +11,18 @@ info: migration reference only. version: v1 servers: - - url: http://any-hosted-llama-stack.com +- url: http://any-hosted-llama-stack.com paths: - /v1/models: - post: + /v1/models/{model_id}: + get: + tags: + - Models + summary: Get Model + description: |- + Get model. + + Get a model by its identifier. + operationId: get_model_v1_models__model_id__get responses: '200': description: A Model. @@ -23,344 +31,732 @@ paths: 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' + parameters: + - name: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' + delete: + tags: + - Models + summary: Unregister Model + description: |- + Unregister model. + + Unregister a model. + operationId: unregister_model_v1_models__model_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' + /v1/models: + get: + tags: + - Models + summary: Openai List Models + description: List models using the OpenAI API. + operationId: openai_list_models_v1_models_get + responses: + '200': + description: A OpenAIListModelsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIListModelsResponse' + '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' + post: tags: - - Models - summary: Register model. - description: >- + - Models + summary: Register Model + description: |- Register model. Register a model. - parameters: [] + operationId: register_model_v1_models_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/RegisterModelRequest' + $ref: '#/components/schemas/_models_Request' required: true - deprecated: true - /v1/models/{model_id}: - delete: responses: '200': - description: OK + description: A Model. + content: + application/json: + schema: + $ref: '#/components/schemas/Model' '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: - - Models - summary: Unregister model. - description: >- - Unregister model. - - Unregister a model. - parameters: - - name: model_id - in: path - description: >- - The identifier of the model to unregister. - required: true - schema: - type: string deprecated: true - /v1/scoring-functions: - post: + /v1/shields/{identifier}: + get: + tags: + - Shields + summary: Get Shield + description: Get a shield by its identifier. + operationId: get_shield_v1_shields__identifier__get responses: '200': - description: OK + description: A Shield. + content: + application/json: + schema: + $ref: '#/components/schemas/Shield' '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: - - ScoringFunctions - summary: Register a scoring function. - description: Register a scoring function. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterScoringFunctionRequest' + parameters: + - name: identifier + in: path required: true - deprecated: true - /v1/scoring-functions/{scoring_fn_id}: + schema: + type: string + description: 'Path parameter: identifier' delete: + tags: + - Shields + summary: Unregister Shield + description: Unregister a shield. + operationId: unregister_shield_v1_shields__identifier__delete responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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: - - ScoringFunctions - summary: Unregister a scoring function. - description: Unregister a scoring function. - parameters: - - name: scoring_fn_id - in: path - description: >- - The ID of the scoring function to unregister. - required: true - schema: - type: string deprecated: true + parameters: + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' /v1/shields: - post: + get: + tags: + - Shields + summary: List Shields + description: List all shields. + operationId: list_shields_v1_shields_get responses: '200': - description: A Shield. + description: A ListShieldsResponse. content: application/json: schema: - $ref: '#/components/schemas/Shield' + $ref: '#/components/schemas/ListShieldsResponse' '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' + post: tags: - - Shields - summary: Register a shield. + - Shields + summary: Register Shield description: Register a shield. - parameters: [] + operationId: register_shield_v1_shields_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/RegisterShieldRequest' + $ref: '#/components/schemas/_shields_Request' required: true - deprecated: true - /v1/shields/{identifier}: - delete: responses: '200': - description: OK + description: A Shield. + content: + application/json: + schema: + $ref: '#/components/schemas/Shield' '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: - - Shields - summary: Unregister a shield. - description: Unregister a shield. - parameters: - - name: identifier - in: path - description: >- - The identifier of the shield to unregister. - required: true - schema: - type: string deprecated: true - /v1/toolgroups: - post: + /v1beta/datasets/{dataset_id}: + get: + tags: + - Datasets + summary: Get Dataset + description: Get a dataset by its ID. + operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': - description: OK + description: A Dataset. + content: + application/json: + schema: + $ref: '#/components/schemas/Dataset' '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: - - ToolGroups - summary: Register a tool group. - description: Register a tool group. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterToolGroupRequest' + parameters: + - name: dataset_id + in: path required: true - deprecated: true - /v1/toolgroups/{toolgroup_id}: + schema: + type: string + description: 'Path parameter: dataset_id' delete: + tags: + - Datasets + summary: Unregister Dataset + description: Unregister a dataset by its ID. + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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: - - ToolGroups - summary: Unregister a tool group. - description: Unregister a tool group. - parameters: - - name: toolgroup_id - in: path - description: The ID of the tool group to unregister. - required: true - schema: - type: string deprecated: true + parameters: + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' /v1beta/datasets: - post: + get: + tags: + - Datasets + summary: List Datasets + description: List all datasets. + operationId: list_datasets_v1beta_datasets_get responses: '200': - description: A Dataset. + description: A ListDatasetsResponse. content: application/json: schema: - $ref: '#/components/schemas/Dataset' + $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' + post: tags: - - Datasets - summary: Register a new dataset. + - Datasets + summary: Register Dataset description: Register a new dataset. - parameters: [] + operationId: register_dataset_v1beta_datasets_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/RegisterDatasetRequest' + $ref: '#/components/schemas/_datasets_Request' required: true - deprecated: true - /v1beta/datasets/{dataset_id}: - delete: responses: '200': - description: OK + description: A Dataset. + content: + application/json: + schema: + $ref: '#/components/schemas/Dataset' '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' + deprecated: true + /v1/scoring-functions/{scoring_fn_id}: + get: tags: - - Datasets - summary: Unregister a dataset by its ID. - description: Unregister a dataset by its ID. + - Scoring Functions + summary: Get Scoring Function + description: Get a scoring function by its ID. + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get + responses: + '200': + description: A ScoringFn. + content: + application/json: + schema: + $ref: '#/components/schemas/ScoringFn' + '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: dataset_id - in: path - description: The ID of the dataset to unregister. - required: true - schema: - type: string + - name: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' + delete: + tags: + - Scoring Functions + summary: Unregister Scoring Function + description: Unregister a scoring function. + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' deprecated: true - /v1alpha/eval/benchmarks: - post: + parameters: + - name: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' + /v1/scoring-functions: + get: + tags: + - Scoring Functions + summary: List Scoring Functions + description: List all scoring functions. + operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': - description: OK + description: A ListScoringFunctionsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListScoringFunctionsResponse' '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' + description: Default Response + post: tags: - - Benchmarks - summary: Register a benchmark. - description: Register a benchmark. - parameters: [] + - Scoring Functions + summary: Register Scoring Function + description: Register a scoring function. + operationId: register_scoring_function_v1_scoring_functions_post + deprecated: true requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/RegisterBenchmarkRequest' - required: true - deprecated: true + $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' + 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 /v1alpha/eval/benchmarks/{benchmark_id}: - delete: + get: + tags: + - Benchmarks + summary: Get Benchmark + description: Get a benchmark by its ID. + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': - description: OK + description: A Benchmark. + content: + application/json: + schema: + $ref: '#/components/schemas/Benchmark' '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' + delete: tags: - - Benchmarks - summary: Unregister a benchmark. + - Benchmarks + summary: Unregister Benchmark description: Unregister a benchmark. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to unregister. - required: true - schema: - type: string + operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' deprecated: true -jsonSchemaDialect: >- - https://json-schema.org/draft/2020-12/schema -components: + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks: + get: + tags: + - Benchmarks + summary: List Benchmarks + description: List all benchmarks. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get + responses: + '200': + description: A ListBenchmarksResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListBenchmarksResponse' + '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: + - Benchmarks + summary: Register Benchmark + description: Register a benchmark. + operationId: register_benchmark_v1alpha_eval_benchmarks_post + deprecated: true + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_benchmark_v1alpha_eval_benchmarks_post' + 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}: + get: + tags: + - Tool Groups + summary: Get Tool Group + description: Get a tool group by its ID. + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get + responses: + '200': + description: A ToolGroup. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolGroup' + '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: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' + delete: + tags: + - Tool Groups + summary: Unregister Toolgroup + description: Unregister a tool group. + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' + /v1/toolgroups: + get: + tags: + - Tool Groups + summary: List Tool Groups + description: List tool groups with optional provider. + 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: + - Tool Groups + summary: Register Tool Group + description: Register a tool group. + operationId: register_tool_group_v1_toolgroups_post + deprecated: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' + 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 +components: schemas: AggregationFunctionType: type: string @@ -3496,6 +3892,11 @@ components: - type: string - type: 'null' title: Instructions + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls type: object required: - created_at @@ -4884,31 +5285,32 @@ components: - file_counts title: VectorStoreFileBatchObject description: OpenAI Vector Store File Batch object. - VectorStoreFileContentsResponse: + VectorStoreFileContentResponse: properties: - file_id: - type: string - title: File Id - filename: + object: type: string - title: Filename - attributes: - additionalProperties: true - type: object - title: Attributes - content: + const: vector_store.file_content.page + title: Object + default: vector_store.file_content.page + data: items: $ref: '#/components/schemas/VectorStoreContent' type: array - title: Content + title: Data + has_more: + type: boolean + title: Has More + next_page: + anyOf: + - type: string + - type: 'null' + title: Next Page type: object required: - - file_id - - filename - - attributes - - content - title: VectorStoreFileContentsResponse - description: Response from retrieving the contents of a vector store file. + - data + - has_more + title: VectorStoreFileContentResponse + description: Represents the parsed content of a vector store file. VectorStoreFileCounts: properties: completed: @@ -5561,6 +5963,8 @@ components: default: 10 guardrails: title: Guardrails + max_tool_calls: + title: Max Tool Calls type: object required: - input @@ -5824,732 +6228,3324 @@ components: - title - detail title: Error - description: >- - Error response from the API. Roughly follows RFC 7807. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType - description: >- - Enumeration of supported model types in Llama Stack. - RegisterModelRequest: type: object + ImageContentItem: + description: A image content item properties: - model_id: - type: string - description: The identifier of the model to register. - provider_model_id: - type: string - description: >- - The identifier of the model in the provider. - provider_id: + type: + const: image + default: image + title: Type type: string - description: The identifier of the provider. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Any additional metadata for this model. - model_type: - $ref: '#/components/schemas/ModelType' - description: The type of model to register. - additionalProperties: false + image: + $ref: '#/components/schemas/_URLOrData' required: - - model_id - title: RegisterModelRequest - Model: + - image + title: ImageContentItem type: object - properties: - identifier: - type: string - description: >- - Unique identifier for this resource in llama stack - provider_resource_id: - type: string - description: >- - Unique identifier for this resource in the provider - provider_id: - type: string - description: >- - ID of the provider that owns this resource - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: model - default: model - description: >- - The resource type, always 'model' for model resources - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Any additional metadata for this model - model_type: - $ref: '#/components/schemas/ModelType' - default: llm - description: >- - The type of model (LLM or embedding model) - additionalProperties: false - required: - - identifier - - provider_id - - type - - metadata - - model_type - title: Model - description: >- - A model resource representing an AI model registered in Llama Stack. - AggregationFunctionType: - type: string + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + BuiltinTool: enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: >- - Types of aggregation functions for scoring results. - ArrayType: - type: object + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + title: BuiltinTool + type: string + ImageDelta: + description: An image content delta for streaming responses. properties: type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image type: string - const: array - default: array - description: Discriminator type. Always "array" - additionalProperties: false required: - - type - title: ArrayType - description: Parameter type for array values. - BasicScoringFnParams: + - image + title: ImageDelta type: object + TextDelta: + description: A text content delta for streaming responses. properties: type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: basic - default: basic - description: >- - The type of scoring function parameters, always basic - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false + const: text + default: text + title: Type + type: string + text: + title: Text + type: string required: - - type - - aggregation_functions - title: BasicScoringFnParams - description: >- - Parameters for basic scoring function configuration. - BooleanType: + - text + title: TextDelta type: object + ToolCall: properties: - type: + call_id: + title: Call Id + type: string + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + arguments: + title: Arguments type: string - const: boolean - default: boolean - description: Discriminator type. Always "boolean" - additionalProperties: false required: - - type - title: BooleanType - description: Parameter type for boolean values. - ChatCompletionInputType: + - call_id + - tool_name + - arguments + title: ToolCall type: object + ToolCallDelta: + description: A tool call content delta for streaming responses. properties: type: + const: tool_call + default: tool_call + title: Type type: string - const: chat_completion_input - default: chat_completion_input - description: >- - Discriminator type. Always "chat_completion_input" - additionalProperties: false + tool_call: + anyOf: + - type: string + - $ref: '#/components/schemas/ToolCall' + title: Tool Call + parse_status: + $ref: '#/components/schemas/ToolCallParseStatus' required: - - type - title: ChatCompletionInputType - description: >- - Parameter type for chat completion input. - CompletionInputType: + - tool_call + - parse_status + title: ToolCallDelta type: object + ToolCallParseStatus: + description: Status of tool call parsing during streaming. + enum: + - started + - in_progress + - failed + - succeeded + title: ToolCallParseStatus + type: string + ContentDelta: + discriminator: + mapping: + image: '#/components/schemas/ImageDelta' + text: '#/components/schemas/TextDelta' + tool_call: '#/components/schemas/ToolCallDelta' + propertyName: type + oneOf: + - $ref: '#/components/schemas/TextDelta' + - $ref: '#/components/schemas/ImageDelta' + - $ref: '#/components/schemas/ToolCallDelta' + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. properties: type: + const: grammar + default: grammar + title: Type type: string - const: completion_input - default: completion_input - description: >- - Discriminator type. Always "completion_input" - additionalProperties: false + bnf: + additionalProperties: true + title: Bnf + type: object required: - - type - title: CompletionInputType - description: Parameter type for completion input. - JsonType: + - bnf + title: GrammarResponseFormat type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. properties: type: + const: json_schema + default: json_schema + title: Type type: string - const: json - default: json - description: Discriminator type. Always "json" - additionalProperties: false + json_schema: + additionalProperties: true + title: Json Schema + type: object required: - - type - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: + - json_schema + title: JsonSchemaResponseFormat type: object + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + OpenAIChatCompletionContentPartParam: + 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' + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: llm_as_judge - default: llm_as_judge - description: >- - The type of scoring function parameters, always llm_as_judge - judge_model: + role: + const: assistant + default: assistant + title: Role type: string - description: >- - Identifier of the LLM model to use as a judge for scoring - prompt_template: + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + nullable: true + name: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + nullable: true + title: OpenAIAssistantMessageParam + type: object + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. + properties: + role: + const: user + default: user + title: Role type: string - description: >- - (Optional) Custom prompt template for the judge model - judge_score_regexes: - type: array - items: + 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: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object + OpenAIMessageParam: + 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' + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + VectorStoreFileStatus: + anyOf: + - const: completed + type: string + - const: in_progress + type: string + - const: cancelled + type: string + - const: failed + type: string + OpenAIResponseInputMessageContent: + 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' + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + 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 - description: >- - Regexes to extract the answer from generated response - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - judge_model - - judge_score_regexes - - aggregation_functions - title: LLMAsJudgeScoringFnParams - description: >- - Parameters for LLM-as-judge scoring function configuration. - NumberType: + - 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 + nullable: true + status: + anyOf: + - type: string + - type: 'null' + title: Status + nullable: true + required: + - content + - role + title: OpenAIResponseMessage + type: object + OpenAIResponseOutput: + 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' + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Always + nullable: true + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Never + nullable: true + title: ApprovalFilter type: object + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: type: + const: mcp + default: mcp + title: Type type: string - const: number - default: number - description: Discriminator type. Always "number" - additionalProperties: false + server_label: + title: Server Label + type: string + server_url: + title: Server Url + type: string + headers: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Headers + nullable: true + require_approval: + anyOf: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + default: never + title: Require Approval + allowed_tools: + anyOf: + - items: + type: string + type: array + - $ref: '#/components/schemas/AllowedToolsFilter' + - type: 'null' + title: Allowed Tools + nullable: true required: - - type - title: NumberType - description: Parameter type for numeric values. - ObjectType: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + type: object + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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/OpenAIResponseInputToolMCP' + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. + properties: + type: + const: output_text + default: output_text + title: Type + type: string + text: + title: Text + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: Annotations + type: array + logprobs: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + title: Logprobs + nullable: true + required: + - text + title: OpenAIResponseContentPartOutputText + type: object + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. + properties: + type: + const: reasoning_text + default: reasoning_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningText + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. + properties: + type: + const: summary_text + default: summary_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningSummary + type: object + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.completed + default: response.completed + title: Type + type: string + required: + - response + title: OpenAIResponseObjectStreamResponseCompleted + type: object + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. + properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: Part + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.added + default: response.content_part.added + title: Type + type: string + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded + type: object + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. + properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: Part + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.done + default: response.content_part.done + title: Type + type: string + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone + type: object + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.created + default: response.created + title: Type + type: string + required: + - response + title: OpenAIResponseObjectStreamResponseCreated + type: object + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.failed + default: response.failed + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed + type: object + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. + properties: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type + type: string + required: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress + type: object + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.incomplete + default: response.incomplete + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + properties: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type + type: string + required: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.failed + default: response.mcp_call.failed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed + type: object + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + type: object + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + type: object + OpenAIResponseObjectStreamResponseMcpListToolsFailed: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + type: object + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. + properties: + response_id: + title: Response Id + type: string + item: + 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: Item + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.added + default: response.output_item.added + title: Type + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded + type: object + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. + properties: + response_id: + title: Response Id + type: string + item: + 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: Item + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done + title: Type + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone + type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: Annotation + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.annotation.added + default: response.output_text.annotation.added + title: Type + type: string + required: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + type: object + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. + properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.delta + default: response.output_text.delta + title: Type + type: string + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta + type: object + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. + properties: + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done + title: Type + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done + title: Type + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. + properties: + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done + title: Type + type: string + required: + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. + properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.delta + default: response.reasoning_text.delta + title: Type + type: string + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. + properties: + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done + title: Type + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone + type: object + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. + properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.delta + default: response.refusal.delta + title: Type + type: string + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta + type: object + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. + properties: + content_index: + title: Content Index + type: integer + refusal: + title: Refusal + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.done + default: response.refusal.done + title: Type + type: string + required: + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone + type: object + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseWebSearchCallSearching: + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + type: object + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + OpenAIResponseInput: + 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' + ConversationItem: + discriminator: + 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' + 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/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + - $ref: '#/components/schemas/RowsDataSource' + ParamType: + discriminator: + mapping: + 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' + ScoringFnParams: + 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' + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + - $ref: '#/components/schemas/QATFinetuningConfig' + SpanEndPayload: + description: Payload for a span end event. + properties: + type: + const: span_end + default: span_end + title: Type + type: string + status: + $ref: '#/components/schemas/SpanStatus' + required: + - status + title: SpanEndPayload + type: object + SpanStartPayload: + description: Payload for a span start event. + properties: + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + title: Parent Span Id + nullable: true + required: + - name + title: SpanStartPayload + type: object + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: Value + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + title: Payload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: unstructured_log + default: unstructured_log + title: Type + type: string + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' + required: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent + type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + - $ref: '#/components/schemas/MetricEvent' + - $ref: '#/components/schemas/StructuredLogEvent' + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. + 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 + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. + properties: + created_at: + title: Created At + type: integer + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + nullable: true + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + nullable: true + status: + title: Status + type: string + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + nullable: true + tools: + anyOf: + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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 + - type: 'null' + title: Tools + nullable: true + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + nullable: true + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + nullable: true + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + nullable: true + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls + 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 + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. + 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 + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. + properties: + type: + title: Type + type: string + required: + - type + title: ResponseGuardrailSpec + 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: + anyOf: + - type: string + - type: 'null' + description: ID of the first batch in the list + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + description: ID of the last batch in the list + title: Last Id + nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean + required: + - data + title: ListBatchesResponse + type: object + MetricInResponse: + description: A metric value included in API responses. + properties: + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: Value + unit: + anyOf: + - type: string + - type: 'null' + title: Unit + nullable: true + required: + - metric + - value + title: MetricInResponse + type: object + PaginatedResponse: + description: A generic paginated response that follows a simple format. + properties: + data: + items: + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + anyOf: + - type: string + - type: 'null' + title: Url + nullable: true + required: + - data + - has_more + title: PaginatedResponse + type: object + PostTrainingMetric: + description: Training metrics captured during post-training jobs. + 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 + Checkpoint: + description: Checkpoint created during training runs. + 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: '#/components/schemas/PostTrainingMetric' + - type: 'null' + nullable: true + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + type: object + DialogType: + description: Parameter type for dialog data with semantic output labels. + properties: + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: + 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' + 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/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + maxItems: 20 + title: Items + type: array + required: + - items + title: ConversationItemCreateRequest + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true + type: object + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage + type: object + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. + 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 + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). + properties: + type: + const: bf16 + default: bf16 + title: Type + type: string + title: Bf16QuantizationConfig + type: object + EmbeddingsResponse: + description: Response containing generated embeddings. + properties: + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array + required: + - embeddings + title: EmbeddingsResponse + type: object + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. + properties: + type: + const: fp8_mixed + default: fp8_mixed + title: Type + type: string + title: Fp8QuantizationConfig + type: object + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. + properties: + type: + const: int4_mixed + default: int4_mixed + title: Type + type: string + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Scheme + title: Int4QuantizationConfig + type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + 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. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + nullable: true + title: OpenAIChoiceLogprobs + type: object + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. + 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 + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. + properties: + content: + anyOf: + - type: string + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - type: string + - type: 'null' + title: Refusal + nullable: true + role: + anyOf: + - type: string + - type: 'null' + title: Role + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + nullable: true + reasoning_content: + anyOf: + - type: string + - type: 'null' + title: Reasoning Content + nullable: true + title: OpenAIChoiceDelta + type: object + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. + properties: + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true + required: + - delta + - finish_reason + - index + title: OpenAIChunkChoice + type: object + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + properties: + id: + title: Id + type: string + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object + type: string + created: + title: Created + type: integer + model: + title: Model + type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + nullable: true + required: + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk + 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: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true + required: + - finish_reason + - text + - index + title: OpenAICompletionChoice + type: object + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens + properties: + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Text Offset + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Token Logprobs + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Tokens + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + title: Top Logprobs + nullable: true + title: OpenAICompletionLogprobs + type: object + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object + required: + - logprobs_by_token + title: TokenLogProbs + type: object + ToolResponseMessage: + description: A message representing the result of a tool invocation. + properties: + role: + const: tool + default: tool + title: Role + type: string + call_id: + title: Call Id + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + required: + - call_id + - content + title: ToolResponseMessage + type: object + UserMessage: + description: A message from the user in a chat conversation. + properties: + role: + const: user + default: user + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + - type: 'null' + title: Context + nullable: true + required: + - content + title: UserMessage type: object + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - type: + route: + title: Route type: string - const: object - default: object - description: Discriminator type. Always "object" - additionalProperties: false + method: + title: Method + type: string + provider_types: + items: + type: string + title: Provider Types + type: array required: - - type - title: ObjectType - description: Parameter type for object values. - ParamType: - 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' - discriminator: - propertyName: type - mapping: - string: '#/components/schemas/StringType' - number: '#/components/schemas/NumberType' - boolean: '#/components/schemas/BooleanType' - array: '#/components/schemas/ArrayType' - object: '#/components/schemas/ObjectType' - json: '#/components/schemas/JsonType' - union: '#/components/schemas/UnionType' - chat_completion_input: '#/components/schemas/ChatCompletionInputType' - completion_input: '#/components/schemas/CompletionInputType' - RegexParserScoringFnParams: + - route + - method + - provider_types + title: RouteInfo type: object + ListRoutesResponse: + description: Response containing a list of all available API routes. properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: regex_parser - default: regex_parser - description: >- - The type of scoring function parameters, always regex_parser - parsing_regexes: - type: array + data: items: - type: string - description: >- - Regex to extract the answer from generated response - aggregation_functions: + $ref: '#/components/schemas/RouteInfo' + title: Data type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false required: - - type - - parsing_regexes - - aggregation_functions - title: RegexParserScoringFnParams - description: >- - Parameters for regex parser scoring function configuration. - ScoringFnParams: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' - - $ref: '#/components/schemas/BasicScoringFnParams' - discriminator: - propertyName: type - mapping: - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - basic: '#/components/schemas/BasicScoringFnParams' - ScoringFnParamsType: - type: string - enum: - - llm_as_judge - - regex_parser - - basic - title: ScoringFnParamsType - description: >- - Types of scoring function parameter configurations. - StringType: + - data + title: ListRoutesResponse type: object + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. properties: - type: + job_uuid: + title: Job Uuid type: string - const: string - default: string - description: Discriminator type. Always "string" - additionalProperties: false + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - type - title: StringType - description: Parameter type for string values. - UnionType: + - job_uuid + title: PostTrainingJobArtifactsResponse type: object + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: - type: + job_uuid: + title: Job Uuid type: string - const: union - default: union - description: Discriminator type. Always "union" - additionalProperties: false + log_lines: + items: + type: string + title: Log Lines + type: array required: - - type - title: UnionType - description: Parameter type for union values. - RegisterScoringFunctionRequest: + - job_uuid + - log_lines + title: PostTrainingJobLogStream type: object + PostTrainingJobStatusResponse: + description: Status of a finetuning job. properties: - scoring_fn_id: - type: string - description: >- - The ID of the scoring function to register. - description: - type: string - description: The description of the scoring function. - return_type: - $ref: '#/components/schemas/ParamType' - description: The return type of the scoring function. - provider_scoring_fn_id: - type: string - description: >- - The ID of the provider scoring function to use for the scoring function. - provider_id: + job_uuid: + title: Job Uuid type: string - description: >- - The ID of the provider to use for the scoring function. - params: - $ref: '#/components/schemas/ScoringFnParams' - description: >- - The parameters for the scoring function for benchmark eval, these can - be overridden for app eval. - additionalProperties: false + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Scheduled At + nullable: true + started_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Started At + nullable: true + completed_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Completed At + nullable: true + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Resources Allocated + nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - scoring_fn_id - - description - - return_type - title: RegisterScoringFunctionRequest - RegisterShieldRequest: + - job_uuid + - status + title: PostTrainingJobStatusResponse type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. properties: - shield_id: + job_uuid: + title: Job Uuid type: string - description: >- - The identifier of the shield to register. - provider_shield_id: + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id type: string - description: >- - The identifier of the shield in the provider. - provider_id: + validation_dataset_id: + title: Validation Dataset Id type: string - description: The identifier of the provider. - params: + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The parameters of the shield. - additionalProperties: false required: - - shield_id - title: RegisterShieldRequest - Shield: + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest type: object + ListToolDefsResponse: + description: Response containing a list of tool definitions. properties: - identifier: - type: string - provider_resource_id: + data: + items: + $ref: '#/components/schemas/ToolDef' + title: Data + type: array + required: + - data + title: ListToolDefsResponse + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id type: string provider_id: + title: Provider Id type: string - type: + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + nullable: true + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + nullable: true + required: + - toolgroup_id + - provider_id + title: ToolGroupInput + type: object + Chunk: + description: A chunk of content that can be inserted into a vector database. + properties: + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + chunk_id: + title: Chunk Id type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: shield - default: shield - description: The resource type, always shield - params: + metadata: + additionalProperties: true + title: Metadata type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Configuration parameters for the shield - additionalProperties: false - required: - - identifier - - provider_id - - type - title: Shield - description: >- - A safety shield resource that can be used to check content. - URL: + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Embedding + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + nullable: true + required: + - content + - chunk_id + title: Chunk + type: object + VectorStoreCreateRequest: + description: Request to create a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + nullable: true + chunking_strategy: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Chunking Strategy + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object + title: VectorStoreCreateRequest type: object + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. properties: - uri: + object: + default: list + title: Object type: string - description: The URL string pointing to the resource - additionalProperties: false + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - uri - title: URL - description: A URL reference to external content. - RegisterToolGroupRequest: - type: object - properties: - toolgroup_id: - 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 - DataSource: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - RowsDataSource: + - data + title: VectorStoreFilesListInBatchResponse type: object + VectorStoreListFilesResponse: + description: Response from listing files in a vector store. properties: - type: + object: + default: list + title: Object type: string - const: rows - default: rows - rows: - type: array + data: items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", - "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, - world!"}]} ] - additionalProperties: false - required: - - type - - rows - title: RowsDataSource - description: A dataset stored in rows. - URIDataSource: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + nullable: true + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListFilesResponse type: object + VectorStoreListResponse: + description: Response from listing vector stores. properties: - type: - type: string - const: uri - default: uri - uri: + object: + default: list + title: Object type: string - description: >- - The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" - - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" - additionalProperties: false + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - type - - uri - title: URIDataSource - description: >- - A dataset that can be obtained from a URI. - RegisterDatasetRequest: + - data + title: VectorStoreListResponse type: object + VectorStoreModifyRequest: + description: Request to modify a vector store. properties: - purpose: - type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - description: >- - 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" } - source: - $ref: '#/components/schemas/DataSource' - description: >- - 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!"}, ] - } ] } + name: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + nullable: true metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The metadata for the dataset. - E.g. {"description": "My dataset"}. - dataset_id: - type: string - description: >- - The ID of the dataset. If not provided, an ID will be generated. - additionalProperties: false - required: - - purpose - - source - title: RegisterDatasetRequest - Dataset: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + nullable: true + title: VectorStoreModifyRequest type: object + VectorStoreSearchRequest: + description: Request to search a vector store. properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: dataset - default: dataset - description: >- - Type of resource, always 'dataset' for datasets - purpose: - type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - description: >- - Purpose of the dataset indicating its intended use - source: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - description: >- - Data source configuration for the dataset - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Additional metadata for the dataset - additionalProperties: false - required: - - identifier - - provider_id - - type - - purpose - - source - - metadata - title: Dataset - description: >- - Dataset resource for storing and accessing training or evaluation data. - RegisterBenchmarkRequest: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: Query + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + nullable: true + max_num_results: + default: 10 + title: Max Num Results + type: integer + ranking_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Ranking Options + nullable: true + rewrite_query: + default: false + title: Rewrite Query + type: boolean + required: + - query + title: VectorStoreSearchRequest type: object + _safety_run_shield_Request: properties: - benchmark_id: - type: string - description: The ID of the benchmark to register. - dataset_id: + shield_id: + title: Shield Id type: string - description: >- - The ID of the dataset to use for the benchmark. - scoring_functions: - type: array + messages: items: - type: string - description: >- - The scoring functions to use for the benchmark. - provider_benchmark_id: - type: string - description: >- - The ID of the provider benchmark to use for the benchmark. - provider_id: - type: string - description: >- - The ID of the provider to use for the benchmark. - metadata: - type: object - additionalProperties: + 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: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The metadata to use for the benchmark. - additionalProperties: false - required: - - benchmark_id - - dataset_id - - scoring_functions - title: RegisterBenchmarkRequest + - $ref: '#/components/schemas/OpenAIUserMessageParam' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Messages + type: array + params: + additionalProperties: true + title: Params + type: object + required: + - shield_id + - messages + - params + title: _safety_run_shield_Request + type: object responses: BadRequest400: description: The request was invalid or malformed @@ -6587,31 +9583,3 @@ components: application/json: schema: $ref: '#/components/schemas/Error' - example: - status: 0 - title: Error - detail: An unexpected error occurred -security: - - Default: [] -tags: - - name: Benchmarks - description: '' - - name: Datasets - description: '' - - name: Models - description: '' - - name: ScoringFunctions - description: '' - - name: Shields - description: '' - - name: ToolGroups - description: '' -x-tagGroups: - - name: Operations - tags: - - Benchmarks - - Datasets - - Models - - ScoringFunctions - - Shields - - ToolGroups diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index 9d1407830e..c5d531d667 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -145,20 +145,26 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - /v1beta/datasets/{dataset_id}: - get: + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + post: tags: - - Datasets - summary: Get Dataset - description: Get a dataset by its ID. - operationId: get_dataset_v1beta_datasets__dataset_id__get + - Eval + summary: Evaluate Rows + description: Evaluate a list of rows on a benchmark. + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_eval_benchmarks_benchmark_id_evaluations_Request' + required: true responses: '200': - description: A Dataset. + description: EvaluateResponse object containing generations and scores. content: application/json: schema: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/EvaluateResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -172,24 +178,26 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: dataset_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: dataset_id' - delete: + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: + get: tags: - - Datasets - summary: Unregister Dataset - description: Unregister a dataset by its ID. - operationId: unregister_dataset_v1beta_datasets__dataset_id__delete + - Eval + summary: Job Status + description: Get the status of a job. + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': - description: Successful Response + description: The status of the evaluation job. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Job' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -203,26 +211,30 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: dataset_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: dataset_id' - /v1beta/datasets: - get: + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + delete: tags: - - Datasets - summary: List Datasets - description: List all datasets. - operationId: list_datasets_v1beta_datasets_get + - Eval + summary: Job Cancel + description: Cancel a job. + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete responses: '200': - description: A ListDatasetsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListDatasetsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -235,28 +247,33 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: - tags: - - Datasets - summary: Register Dataset - description: Register a new dataset. - operationId: register_dataset_v1beta_datasets_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_datasets_Request' + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + - name: job_id + in: path required: true - deprecated: true - /v1beta/datasets/{dataset_id}: + schema: + type: string + description: 'Path parameter: job_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: get: + tags: + - Eval + summary: Job Result + description: Get the result of a job. + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get responses: '200': - description: A Dataset. + description: The result of the job. content: application/json: schema: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/EvaluateResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -269,26 +286,39 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + parameters: + - 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' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs: post: tags: - Eval - summary: Evaluate Rows - description: Evaluate a list of rows on a benchmark. - operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post + summary: Run Eval + description: Run an evaluation on a benchmark. + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/_eval_benchmarks_benchmark_id_evaluations_Request' + $ref: '#/components/schemas/BenchmarkConfig' required: true responses: '200': - description: EvaluateResponse object containing generations and scores. + description: The job that was created to run the evaluation. content: application/json: schema: - $ref: '#/components/schemas/EvaluateResponse' + $ref: '#/components/schemas/Job' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -302,111 +332,13 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: dataset_id - in: path - description: The ID of the dataset to unregister. - required: true - schema: - type: string - deprecated: true - /v1alpha/eval/benchmarks: - get: - tags: - - Benchmarks - summary: List Benchmarks - description: List all benchmarks. - operationId: list_benchmarks_v1alpha_eval_benchmarks_get - responses: - '200': - description: A ListBenchmarksResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListBenchmarksResponse' - '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: - - Benchmarks - summary: Register Benchmark - description: Register a benchmark. - operationId: register_benchmark_v1alpha_eval_benchmarks_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterBenchmarkRequest' + - name: benchmark_id + in: path required: true - deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}: - get: - 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: - - Benchmarks - summary: Get a benchmark by its ID. - description: Get a benchmark by its ID. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to get. - required: true - schema: - type: string - 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. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to unregister. - required: true - schema: - type: string - deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/post-training/job/cancel: post: tags: - Post Training @@ -596,348 +528,76 @@ paths: $ref: '#/components/responses/DefaultError' components: schemas: - Error: + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: Types of aggregation functions for scoring results. + AllowedToolsFilter: + properties: + tool_names: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Tool Names type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ArrayType: properties: - status: - type: integer - description: HTTP status code - title: - type: string - description: >- - Error title, a short summary of the error which is invariant for an error - type - detail: - type: string - description: >- - Error detail, a longer human-readable description of the error - instance: + type: type: string - description: >- - (Optional) A URL which can be used to retrieve more information about - the specific occurrence of the error - additionalProperties: false - required: - - status - - title - - detail - title: Error - description: >- - Error response from the API. Roughly follows RFC 7807. - AppendRowsRequest: + const: array + title: Type + default: array type: object + title: ArrayType + description: Parameter type for array values. + BasicScoringFnParams: properties: - rows: - type: array + type: + type: string + const: basic + title: Type + default: basic + aggregation_functions: items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to append to the dataset. - additionalProperties: false - required: - - rows - title: AppendRowsRequest - PaginatedResponse: - type: object - properties: - data: + $ref: '#/components/schemas/AggregationFunctionType' type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The list of items for the current page - has_more: - type: boolean - description: >- - Whether there are more items available after this set - url: - type: string - description: The URL for accessing this list - additionalProperties: false - required: - - data - - has_more - title: PaginatedResponse - description: >- - A generic paginated response that follows a simple format. - Dataset: + 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. + Batch: properties: - identifier: + id: type: string - provider_resource_id: + title: Id + completion_window: type: string - provider_id: + title: Completion Window + created_at: + type: integer + title: Created At + endpoint: type: string - type: + title: Endpoint + input_file_id: type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: dataset - default: dataset - description: >- - Type of resource, always 'dataset' for datasets - purpose: + title: Input File Id + object: type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - description: >- - Purpose of the dataset indicating its intended use - source: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - description: >- - Data source configuration for the dataset - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Additional metadata for the dataset - additionalProperties: false - required: - - identifier - - provider_id - - type - - purpose - - source - - metadata - title: Dataset - description: >- - Dataset resource for storing and accessing training or evaluation data. - RowsDataSource: - type: object - properties: - type: - type: string - const: rows - default: rows - rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", - "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, - world!"}]} ] - additionalProperties: false - required: - - type - - rows - title: RowsDataSource - description: A dataset stored in rows. - URIDataSource: - type: object - properties: - type: - type: string - const: uri - default: uri - uri: - type: string - description: >- - The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" - - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" - additionalProperties: false - required: - - type - - uri - title: URIDataSource - description: >- - A dataset that can be obtained from a URI. - ListDatasetsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Dataset' - description: List of datasets - additionalProperties: false - required: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - Benchmark: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: benchmark - default: benchmark - description: The resource type, always benchmark - dataset_id: - type: string - description: >- - Identifier of the dataset to use for the benchmark evaluation - scoring_functions: - type: array - items: - type: string - description: >- - List of scoring function identifiers to apply during evaluation - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Metadata for this evaluation task - additionalProperties: false - required: - - identifier - - provider_id - - type - - dataset_id - - scoring_functions - - metadata - title: Benchmark - description: >- - A benchmark resource for evaluating model performance. - ListBenchmarksResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Benchmark' - additionalProperties: false - required: - - data - title: ListBenchmarksResponse - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: Types of aggregation functions for scoring results. - AllowedToolsFilter: - properties: - tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Tool Names - type: object - title: AllowedToolsFilter - description: Filter configuration for restricting which MCP tools can be used. - ArrayType: - properties: - type: - type: string - const: array - title: Type - default: array - type: object - title: ArrayType - description: Parameter type for array values. - 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. - 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: + const: batch + title: Object + status: type: string enum: - validating @@ -1173,23 +833,6 @@ components: - eval_candidate title: BenchmarkConfig description: A benchmark configuration for evaluation. - Body_register_benchmark_v1alpha_eval_benchmarks_post: - properties: - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata - type: object - required: - - scoring_functions - title: Body_register_benchmark_v1alpha_eval_benchmarks_post BooleanType: properties: type: @@ -1805,29 +1448,6 @@ components: - judge_model title: LLMAsJudgeScoringFnParams description: Parameters for LLM-as-judge scoring function configuration. - 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. ListPostTrainingJobsResponse: properties: data: @@ -3664,6 +3284,11 @@ components: - type: string - type: 'null' title: Instructions + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls type: object required: - created_at @@ -5045,31 +4670,32 @@ components: - file_counts title: VectorStoreFileBatchObject description: OpenAI Vector Store File Batch object. - VectorStoreFileContentsResponse: + VectorStoreFileContentResponse: properties: - file_id: - type: string - title: File Id - filename: + object: type: string - title: Filename - attributes: - additionalProperties: true - type: object - title: Attributes - content: + const: vector_store.file_content.page + title: Object + default: vector_store.file_content.page + data: items: $ref: '#/components/schemas/VectorStoreContent' type: array - title: Content + title: Data + has_more: + type: boolean + title: Has More + next_page: + anyOf: + - type: string + - type: 'null' + title: Next Page type: object required: - - file_id - - filename - - attributes - - content - title: VectorStoreFileContentsResponse - description: Response from retrieving the contents of a vector store file. + - data + - has_more + title: VectorStoreFileContentResponse + description: Represents the parsed content of a vector store file. VectorStoreFileCounts: properties: completed: @@ -5341,21 +4967,6 @@ components: type: object title: _URLOrData description: A URL or a base64 encoded string - _datasets_Request: - properties: - purpose: - title: Purpose - source: - title: Source - metadata: - title: Metadata - dataset_id: - title: Dataset Id - type: object - required: - - purpose - - source - title: _datasets_Request _eval_benchmarks_benchmark_id_evaluations_Request: properties: input_rows: @@ -5429,114 +5040,3366 @@ components: title: Logger Config type: object required: - - job_uuid - - training_config - - hyperparam_search_config - - logger_config - title: SupervisedFineTuneRequest - DataSource: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - RegisterDatasetRequest: - type: object + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: _post_training_preference_optimize_Request + _post_training_supervised_fine_tune_Request: properties: - purpose: + job_uuid: type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - description: >- - 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" } - source: - $ref: '#/components/schemas/DataSource' - description: >- - 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!"}, ] - } ] } - metadata: + title: Job Uuid + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The metadata for the dataset. - E.g. {"description": "My dataset"}. - dataset_id: - type: string - description: >- - The ID of the dataset. If not provided, an ID will be generated. - additionalProperties: false - required: - - purpose - - source - title: RegisterDatasetRequest - RegisterBenchmarkRequest: + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + model: + anyOf: + - type: string + - type: 'null' + title: Model + description: Model descriptor for training if not in provider config` + checkpoint_dir: + anyOf: + - type: string + - type: 'null' + title: Checkpoint Dir + algorithm_config: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + - $ref: '#/components/schemas/QATFinetuningConfig' + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + - type: 'null' + title: Algorithm Config type: object + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: _post_training_supervised_fine_tune_Request + Error: + description: Error response from the API. Roughly follows RFC 7807. properties: - benchmark_id: + status: + title: Status + type: integer + title: + title: Title type: string - description: The ID of the benchmark to register. - dataset_id: + detail: + title: Detail + type: string + instance: + anyOf: + - type: string + - type: 'null' + title: Instance + nullable: true + required: + - status + - title + - detail + title: Error + type: object + ImageContentItem: + description: A image content item + properties: + type: + const: image + default: image + title: Type + type: string + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + BuiltinTool: + enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + title: BuiltinTool + type: string + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string + required: + - image + title: ImageDelta + type: object + TextDelta: + description: A text content delta for streaming responses. + properties: + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: TextDelta + type: object + ToolCall: + properties: + call_id: + title: Call Id + type: string + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + arguments: + title: Arguments + type: string + required: + - call_id + - tool_name + - arguments + title: ToolCall + type: object + ToolCallDelta: + description: A tool call content delta for streaming responses. + properties: + type: + const: tool_call + default: tool_call + title: Type + type: string + tool_call: + anyOf: + - type: string + - $ref: '#/components/schemas/ToolCall' + title: Tool Call + parse_status: + $ref: '#/components/schemas/ToolCallParseStatus' + required: + - tool_call + - parse_status + title: ToolCallDelta + type: object + ToolCallParseStatus: + description: Status of tool call parsing during streaming. + enum: + - started + - in_progress + - failed + - succeeded + title: ToolCallParseStatus + type: string + ContentDelta: + discriminator: + mapping: + image: '#/components/schemas/ImageDelta' + text: '#/components/schemas/TextDelta' + tool_call: '#/components/schemas/ToolCallDelta' + propertyName: type + oneOf: + - $ref: '#/components/schemas/TextDelta' + - $ref: '#/components/schemas/ImageDelta' + - $ref: '#/components/schemas/ToolCallDelta' + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + OpenAIChatCompletionContentPartParam: + 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' + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + nullable: true + name: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + nullable: true + title: OpenAIAssistantMessageParam + type: object + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object + OpenAIMessageParam: + 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' + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + VectorStoreFileStatus: + anyOf: + - const: completed + type: string + - const: in_progress + type: string + - const: cancelled + type: string + - const: failed + type: string + OpenAIResponseInputMessageContent: + 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' + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + 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: + anyOf: + - type: string + - type: 'null' + title: Id + nullable: true + status: + anyOf: + - type: string + - type: 'null' + title: Status + nullable: true + required: + - content + - role + title: OpenAIResponseMessage + type: object + OpenAIResponseOutput: + 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' + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Always + nullable: true + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Never + nullable: true + title: ApprovalFilter + type: object + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + properties: + type: + const: mcp + default: mcp + title: Type + type: string + server_label: + title: Server Label + type: string + server_url: + title: Server Url + type: string + headers: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Headers + nullable: true + require_approval: + anyOf: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + default: never + title: Require Approval + allowed_tools: + anyOf: + - items: + type: string + type: array + - $ref: '#/components/schemas/AllowedToolsFilter' + - type: 'null' + title: Allowed Tools + nullable: true + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + type: object + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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/OpenAIResponseInputToolMCP' + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. + properties: + type: + const: output_text + default: output_text + title: Type + type: string + text: + title: Text + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: Annotations + type: array + logprobs: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + title: Logprobs + nullable: true + required: + - text + title: OpenAIResponseContentPartOutputText + type: object + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. + properties: + type: + const: reasoning_text + default: reasoning_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningText + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. + properties: + type: + const: summary_text + default: summary_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningSummary + type: object + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.completed + default: response.completed + title: Type + type: string + required: + - response + title: OpenAIResponseObjectStreamResponseCompleted + type: object + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. + properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: Part + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.added + default: response.content_part.added + title: Type + type: string + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded + type: object + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. + properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: Part + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.done + default: response.content_part.done + title: Type + type: string + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone + type: object + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.created + default: response.created + title: Type + type: string + required: + - response + title: OpenAIResponseObjectStreamResponseCreated + type: object + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.failed + default: response.failed + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed + type: object + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. + properties: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type + type: string + required: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress + type: object + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.incomplete + default: response.incomplete + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + properties: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type + type: string + required: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.failed + default: response.mcp_call.failed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed + type: object + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + type: object + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + type: object + OpenAIResponseObjectStreamResponseMcpListToolsFailed: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + type: object + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. + properties: + response_id: + title: Response Id + type: string + item: + 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: Item + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.added + default: response.output_item.added + title: Type + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded + type: object + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. + properties: + response_id: + title: Response Id + type: string + item: + 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: Item + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done + title: Type + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone + type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: Annotation + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.annotation.added + default: response.output_text.annotation.added + title: Type + type: string + required: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + type: object + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. + properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.delta + default: response.output_text.delta + title: Type + type: string + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta + type: object + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. + properties: + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done + title: Type + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done + title: Type + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. + properties: + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done + title: Type + type: string + required: + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. + properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.delta + default: response.reasoning_text.delta + title: Type + type: string + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. + properties: + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done + title: Type + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone + type: object + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. + properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.delta + default: response.refusal.delta + title: Type + type: string + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta + type: object + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. + properties: + content_index: + title: Content Index + type: integer + refusal: + title: Refusal + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.done + default: response.refusal.done + title: Type + type: string + required: + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone + type: object + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseWebSearchCallSearching: + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + type: object + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + OpenAIResponseInput: + 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' + ConversationItem: + discriminator: + 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' + 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/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + - $ref: '#/components/schemas/RowsDataSource' + ParamType: + discriminator: + mapping: + 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' + ScoringFnParams: + 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' + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + - $ref: '#/components/schemas/QATFinetuningConfig' + SpanEndPayload: + description: Payload for a span end event. + properties: + type: + const: span_end + default: span_end + title: Type + type: string + status: + $ref: '#/components/schemas/SpanStatus' + required: + - status + title: SpanEndPayload + type: object + SpanStartPayload: + description: Payload for a span start event. + properties: + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + title: Parent Span Id + nullable: true + required: + - name + title: SpanStartPayload + type: object + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: Value + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + title: Payload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: unstructured_log + default: unstructured_log + title: Type + type: string + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' + required: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent + type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + - $ref: '#/components/schemas/MetricEvent' + - $ref: '#/components/schemas/StructuredLogEvent' + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. + 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 + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. + properties: + created_at: + title: Created At + type: integer + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + nullable: true + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + nullable: true + status: + title: Status + type: string + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + nullable: true + tools: + anyOf: + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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 + - type: 'null' + title: Tools + nullable: true + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + nullable: true + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + nullable: true + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + nullable: true + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls + 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 + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. + 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 + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. + properties: + type: + title: Type + type: string + required: + - type + title: ResponseGuardrailSpec + 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: + anyOf: + - type: string + - type: 'null' + description: ID of the first batch in the list + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + description: ID of the last batch in the list + title: Last Id + nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean + required: + - data + title: ListBatchesResponse + type: object + MetricInResponse: + description: A metric value included in API responses. + properties: + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: Value + unit: + anyOf: + - type: string + - type: 'null' + title: Unit + nullable: true + required: + - metric + - value + title: MetricInResponse + type: object + PaginatedResponse: + description: A generic paginated response that follows a simple format. + properties: + data: + items: + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + anyOf: + - type: string + - type: 'null' + title: Url + nullable: true + required: + - data + - has_more + title: PaginatedResponse + type: object + PostTrainingMetric: + description: Training metrics captured during post-training jobs. + 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 + Checkpoint: + description: Checkpoint created during training runs. + 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: '#/components/schemas/PostTrainingMetric' + - type: 'null' + nullable: true + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + type: object + DialogType: + description: Parameter type for dialog data with semantic output labels. + properties: + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: + 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' + 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/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + maxItems: 20 + title: Items + type: array + required: + - items + title: ConversationItemCreateRequest + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true + type: object + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage + type: object + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. + 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 + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). + properties: + type: + const: bf16 + default: bf16 + title: Type + type: string + title: Bf16QuantizationConfig + type: object + EmbeddingsResponse: + description: Response containing generated embeddings. + properties: + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array + required: + - embeddings + title: EmbeddingsResponse + type: object + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. + properties: + type: + const: fp8_mixed + default: fp8_mixed + title: Type + type: string + title: Fp8QuantizationConfig + type: object + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. + properties: + type: + const: int4_mixed + default: int4_mixed + title: Type + type: string + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Scheme + title: Int4QuantizationConfig + type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + 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. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + nullable: true + title: OpenAIChoiceLogprobs + type: object + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. + 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 + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. + properties: + content: + anyOf: + - type: string + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - type: string + - type: 'null' + title: Refusal + nullable: true + role: + anyOf: + - type: string + - type: 'null' + title: Role + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + nullable: true + reasoning_content: + anyOf: + - type: string + - type: 'null' + title: Reasoning Content + nullable: true + title: OpenAIChoiceDelta + type: object + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. + properties: + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true + required: + - delta + - finish_reason + - index + title: OpenAIChunkChoice + type: object + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + properties: + id: + title: Id + type: string + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object + type: string + created: + title: Created + type: integer + model: + title: Model + type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + nullable: true + required: + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk + 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: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true + required: + - finish_reason + - text + - index + title: OpenAICompletionChoice + type: object + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens + properties: + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Text Offset + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Token Logprobs + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Tokens + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + title: Top Logprobs + nullable: true + title: OpenAICompletionLogprobs + type: object + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object + required: + - logprobs_by_token + title: TokenLogProbs + type: object + ToolResponseMessage: + description: A message representing the result of a tool invocation. + properties: + role: + const: tool + default: tool + title: Role + type: string + call_id: + title: Call Id + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + required: + - call_id + - content + title: ToolResponseMessage + type: object + UserMessage: + description: A message from the user in a chat conversation. + properties: + role: + const: user + default: user + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + - type: 'null' + title: Context + nullable: true + required: + - content + title: UserMessage + type: object + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. + 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 + ListRoutesResponse: + description: Response containing a list of all available API routes. + properties: + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array + required: + - data + title: ListRoutesResponse + type: object + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. + 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 + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. + properties: + job_uuid: + title: Job Uuid + type: string + log_lines: + items: + type: string + title: Log Lines + type: array + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream + type: object + PostTrainingJobStatusResponse: + description: Status of a finetuning job. + properties: + job_uuid: + title: Job Uuid + type: string + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Scheduled At + nullable: true + started_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Started At + nullable: true + completed_at: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Completed At + nullable: true + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Resources Allocated + nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. + properties: + job_uuid: + title: Job Uuid type: string - description: >- - The ID of the dataset to use for the benchmark. - scoring_functions: - type: array + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest + type: object + ListToolDefsResponse: + description: Response containing a list of tool definitions. + properties: + data: items: - type: string - description: >- - The scoring functions to use for the benchmark. - provider_benchmark_id: + $ref: '#/components/schemas/ToolDef' + title: Data + type: array + required: + - data + title: ListToolDefsResponse + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id type: string - description: >- - The ID of the provider benchmark to use for the benchmark. provider_id: + title: Provider Id + type: string + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + nullable: true + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + nullable: true + required: + - toolgroup_id + - provider_id + title: ToolGroupInput + type: object + Chunk: + description: A chunk of content that can be inserted into a vector database. + properties: + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + chunk_id: + title: Chunk Id type: string - description: >- - The ID of the provider to use for the benchmark. metadata: + additionalProperties: true + title: Metadata type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The metadata to use for the benchmark. - additionalProperties: false - required: - - benchmark_id - - dataset_id - - scoring_functions - title: RegisterBenchmarkRequest + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + title: Embedding + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + nullable: true + required: + - content + - chunk_id + title: Chunk + type: object + VectorStoreCreateRequest: + description: Request to create a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + nullable: true + chunking_strategy: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Chunking Strategy + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object + title: VectorStoreCreateRequest + type: object + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + 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. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + nullable: true + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListFilesResponse + type: object + VectorStoreListResponse: + description: Response from listing vector stores. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + nullable: true + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListResponse + type: object + VectorStoreModifyRequest: + description: Request to modify a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + nullable: true + title: VectorStoreModifyRequest + type: object + VectorStoreSearchRequest: + description: Request to search a vector store. + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: Query + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + nullable: true + max_num_results: + default: 10 + title: Max Num Results + type: integer + ranking_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Ranking Options + nullable: true + rewrite_query: + default: false + title: Rewrite Query + type: boolean + required: + - query + title: VectorStoreSearchRequest + 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 180215eebc..aa2844e28f 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -12,1349 +12,1237 @@ info: servers: - url: http://any-hosted-llama-stack.com paths: - /v1/batches: + /v1/providers/{provider_id}: get: + tags: + - Providers + summary: Inspect Provider + description: |- + Get provider. + + Get detailed information about a specific provider. + operationId: inspect_provider_v1_providers__provider_id__get responses: '200': - description: A list of batch objects. + description: A ProviderInfo object containing the provider's details. content: application/json: schema: - $ref: '#/components/schemas/ListBatchesResponse' + $ref: '#/components/schemas/ProviderInfo' '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: - - Batches - summary: List all batches for the current user. - description: List all batches for the current user. parameters: - - name: after - in: query - description: >- - A cursor for pagination; returns batches after this batch ID. - required: false - schema: - type: string - - name: limit - in: query - description: >- - Number of batches to return (default 20, max 100). - required: true - schema: - type: integer - deprecated: false - post: + - name: provider_id + in: path + required: true + schema: + type: string + description: 'Path parameter: provider_id' + /v1/providers: + get: + tags: + - Providers + summary: List Providers + description: |- + List providers. + + List all available providers. + operationId: list_providers_v1_providers_get responses: '200': - description: The created batch object. + description: A ListProvidersResponse containing information about all providers. content: application/json: schema: - $ref: '#/components/schemas/Batch' + $ref: '#/components/schemas/ListProvidersResponse' '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/responses: + post: tags: - - Batches - summary: >- - Create a new batch for processing multiple API requests. - description: >- - Create a new batch for processing multiple API requests. - parameters: [] + - Agents + summary: Create Openai Response + description: Create a model response. + operationId: create_openai_response_v1_responses_post requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/CreateBatchRequest' - required: true - deprecated: false - /v1/batches/{batch_id}: - get: + $ref: '#/components/schemas/_responses_Request' responses: '200': - description: The batch object. + description: An OpenAIResponseObject. content: application/json: schema: - $ref: '#/components/schemas/Batch' + $ref: '#/components/schemas/OpenAIResponseObject' '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' + description: Default Response + get: tags: - - Batches - summary: >- - Retrieve information about a specific batch. - description: >- - Retrieve information about a specific batch. + - Agents + summary: List Openai Responses + description: List all responses. + operationId: list_openai_responses_v1_responses_get parameters: - - name: batch_id - in: path - description: The ID of the batch to retrieve. - required: true - schema: - type: string - deprecated: false - /v1/batches/{batch_id}/cancel: - post: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 50 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order responses: '200': - description: The updated batch object. + description: A ListOpenAIResponseObject. content: application/json: schema: - $ref: '#/components/schemas/Batch' + $ref: '#/components/schemas/ListOpenAIResponseObject' '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: - - Batches - summary: Cancel a batch that is in progress. - description: Cancel a batch that is in progress. - parameters: - - name: batch_id - in: path - description: The ID of the batch to cancel. - required: true - schema: - type: string - deprecated: false - /v1/chat/completions: + description: Default Response + /v1/responses/{response_id}: get: + tags: + - Agents + summary: Get Openai Response + description: Get a model response. + operationId: get_openai_response_v1_responses__response_id__get responses: '200': - description: A ListOpenAIChatCompletionResponse. + description: An OpenAIResponseObject. content: application/json: schema: - $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' + $ref: '#/components/schemas/OpenAIResponseObject' '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: List chat completions. - description: List chat completions. parameters: - - name: after - in: query - description: >- - The ID of the last chat completion to return. - required: false - schema: - type: string - - name: limit - in: query - description: >- - The maximum number of chat completions to return. - required: false - schema: - type: integer - - name: model - in: query - description: The model to filter by. - required: false - schema: - type: string - - name: order - in: query - description: >- - The order to sort the chat completions by: "asc" or "desc". Defaults to - "desc". - required: false - schema: - $ref: '#/components/schemas/Order' - deprecated: false - post: + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + delete: + tags: + - Agents + summary: Delete Openai Response + description: Delete a response. + operationId: delete_openai_response_v1_responses__response_id__delete responses: '200': - description: An OpenAIChatCompletion. + description: An OpenAIDeleteResponseObject content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletion' - - $ref: '#/components/schemas/OpenAIChatCompletionChunk' + $ref: '#/components/schemas/OpenAIDeleteResponseObject' '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: Create chat completions. - description: >- - Create chat completions. - - Generate an OpenAI-compatible chat completion for the given messages using - the specified model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody' + parameters: + - name: response_id + in: path required: true - deprecated: false - /v1/chat/completions/{completion_id}: + schema: + type: string + description: 'Path parameter: response_id' + /v1/responses/{response_id}/input_items: get: - responses: - '200': - description: A OpenAICompletionWithInputMessages. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - Inference - summary: Get chat completion. - description: >- - Get chat completion. - - Describe a chat completion by its ID. + - Agents + summary: List Openai Response Input Items + description: List input items. + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get parameters: - - name: completion_id - in: path - description: ID of the chat completion. - required: true - schema: - type: string - deprecated: false - /v1/completions: - post: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + requestBody: + content: + application/json: + schema: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Include responses: '200': - description: An OpenAICompletion. + description: An ListOpenAIResponseInputItem. content: application/json: schema: - $ref: '#/components/schemas/OpenAICompletion' + $ref: '#/components/schemas/ListOpenAIResponseInputItem' '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' + description: Default Response + /v1/chat/completions/{completion_id}: + get: tags: - - Inference - summary: Create completion. - description: >- - Create completion. + - Inference + summary: Get Chat Completion + description: |- + Get chat completion. - Generate an OpenAI-compatible completion for the given prompt using the specified - model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' - required: true - deprecated: false - /v1/conversations: - post: + Describe a chat completion by its ID. + operationId: get_chat_completion_v1_chat_completions__completion_id__get responses: '200': - description: The created conversation object. + description: A OpenAICompletionWithInputMessages. content: application/json: schema: - $ref: '#/components/schemas/Conversation' + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' '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: - - Conversations - summary: Create a conversation. - description: >- - Create a conversation. - - Create a conversation. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateConversationRequest' + parameters: + - name: completion_id + in: path required: true - deprecated: false - /v1/conversations/{conversation_id}: + schema: + type: string + description: 'Path parameter: completion_id' + /v1/chat/completions: get: + tags: + - Inference + summary: List Chat Completions + description: List chat completions. + operationId: list_chat_completions_v1_chat_completions_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order responses: '200': - description: The conversation object. + description: A ListOpenAIChatCompletionResponse. content: application/json: schema: - $ref: '#/components/schemas/Conversation' + $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' '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' + description: Default Response + post: tags: - - Conversations - summary: Retrieve a conversation. - description: >- - Retrieve a conversation. + - Inference + summary: Openai Chat Completion + description: |- + Create chat completions. - Get a conversation with the given ID. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - deprecated: false - post: + Generate an OpenAI-compatible chat completion for the given messages using the specified model. + operationId: openai_chat_completion_v1_chat_completions_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody' responses: '200': - description: The updated conversation object. + description: An OpenAIChatCompletion. content: application/json: schema: - $ref: '#/components/schemas/Conversation' + $ref: '#/components/schemas/OpenAIChatCompletion' '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' + description: Default Response + /v1/completions: + post: tags: - - Conversations - summary: Update a conversation. - description: >- - Update a conversation. + - Inference + summary: Openai Completion + description: |- + Create completion. - Update a conversation's metadata with the given ID. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string + Generate an OpenAI-compatible completion for the given prompt using the specified model. + operationId: openai_completion_v1_completions_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/UpdateConversationRequest' + $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' required: true - deprecated: false - delete: responses: '200': - description: The deleted conversation resource. + description: An OpenAICompletion. content: application/json: schema: - $ref: '#/components/schemas/ConversationDeletedResource' + $ref: '#/components/schemas/OpenAICompletion' '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/embeddings: + post: tags: - - Conversations - summary: Delete a conversation. - description: >- - Delete a conversation. + - Inference + summary: Openai Embeddings + description: |- + Create embeddings. - Delete a conversation with the given ID. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - deprecated: false - /v1/conversations/{conversation_id}/items: - get: + Generate OpenAI-compatible embeddings for the given input using the specified model. + operationId: openai_embeddings_v1_embeddings_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' + required: true responses: '200': - description: List of conversation items. + description: An OpenAIEmbeddingsResponse containing the embeddings. content: application/json: schema: - $ref: '#/components/schemas/ConversationItemList' + $ref: '#/components/schemas/OpenAIEmbeddingsResponse' '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/health: + get: tags: - - Conversations - summary: List items. - description: >- - List items. + - Inspect + summary: Health + description: |- + Get health status. - List items in the conversation. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - - name: after - in: query - description: >- - An item ID to list items after, used in pagination. - required: false - schema: - type: string - - name: include - in: query - description: >- - Specify additional output data to include in the response. - required: false - schema: - type: array - items: - 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. - - name: limit - in: query - description: >- - A limit on the number of objects to be returned (1-100, default 20). - required: false - schema: - type: integer - - name: order - in: query - description: >- - The order to return items in (asc or desc, default desc). - required: false - schema: - type: string - enum: - - asc - - desc - deprecated: false - post: + Get the current health status of the service. + operationId: health_v1_health_get responses: '200': - description: List of created items. + description: Health information indicating if the service is operational. content: application/json: schema: - $ref: '#/components/schemas/ConversationItemList' + $ref: '#/components/schemas/HealthInfo' '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/inspect/routes: + get: tags: - - Conversations - summary: Create items. - description: >- - Create items. + - Inspect + summary: List Routes + description: |- + List routes. - Create items in the conversation. + List all available API routes with their methods and implementing providers. + operationId: list_routes_v1_inspect_routes_get parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: + - name: api_filter + in: query + required: false + schema: + anyOf: + - enum: + - v1 + - v1alpha + - v1beta + - deprecated type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AddItemsRequest' - required: true - deprecated: false - /v1/conversations/{conversation_id}/items/{item_id}: - get: + - type: 'null' + title: Api Filter responses: '200': - description: The conversation item. + description: Response containing information about all available routes. content: application/json: schema: - $ref: '#/components/schemas/ConversationItem' + $ref: '#/components/schemas/ListRoutesResponse' '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' + description: Default Response + /v1/version: + get: tags: - - Conversations - summary: Retrieve an item. - description: >- - Retrieve an item. + - Inspect + summary: Version + description: |- + Get version. - Retrieve a conversation item. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - - name: item_id - in: path - description: The item identifier. - required: true - schema: - type: string - deprecated: false - delete: + Get the version of the service. + operationId: version_v1_version_get responses: '200': - description: The deleted item resource. + description: Version information containing the service version number. content: application/json: schema: - $ref: '#/components/schemas/ConversationItemDeletedResource' + $ref: '#/components/schemas/VersionInfo' '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: - - Conversations - summary: Delete an item. - description: >- - Delete an item. - - Delete a conversation item. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - - name: item_id - in: path - description: The item identifier. - required: true - schema: - type: string - deprecated: false - /v1/embeddings: + /v1/batches/{batch_id}/cancel: post: + tags: + - Batches + summary: Cancel Batch + description: Cancel a batch that is in progress. + operationId: cancel_batch_v1_batches__batch_id__cancel_post responses: '200': - description: >- - An OpenAIEmbeddingsResponse containing the embeddings. + description: The updated batch object. content: application/json: schema: - $ref: '#/components/schemas/OpenAIEmbeddingsResponse' + $ref: '#/components/schemas/Batch' '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: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' + /v1/batches: + post: tags: - - Inference - summary: Create embeddings. - description: >- - Create embeddings. - - Generate OpenAI-compatible embeddings for the given input using the specified - model. - parameters: [] + - Batches + summary: Create Batch + description: Create a new batch for processing multiple API requests. + operationId: create_batch_v1_batches_post requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' - required: true - deprecated: false - /v1/files: - get: + $ref: '#/components/schemas/_batches_Request' responses: '200': - description: >- - An ListOpenAIFileResponse containing the list of files. + description: The created batch object. content: application/json: schema: - $ref: '#/components/schemas/ListOpenAIFileResponse' + $ref: '#/components/schemas/Batch' '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' + description: Default Response + get: tags: - - Files - summary: List files. - description: >- - List files. - - Returns a list of files that belong to the user's organization. + - Batches + summary: List Batches + description: List all batches for the current user. + operationId: list_batches_v1_batches_get parameters: - - name: after - in: query - description: >- - A cursor for use in pagination. `after` is an object ID that defines your - place in the list. For instance, if you make a list request and receive - 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo - in order to fetch the next page of the list. - required: false - schema: - type: string - - name: limit - in: query - description: >- - A limit on the number of objects to be returned. Limit can range between - 1 and 10,000, and the default is 10,000. - required: false - schema: - type: integer - - name: order - in: query - description: >- - Sort order by the `created_at` timestamp of the objects. `asc` for ascending - order and `desc` for descending order. - required: false - schema: - $ref: '#/components/schemas/Order' - - name: purpose - in: query - description: >- - Only return files with the given purpose. - required: false - schema: - $ref: '#/components/schemas/OpenAIFilePurpose' - deprecated: false - post: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit responses: '200': - description: >- - An OpenAIFileObject representing the uploaded file. + description: A list of batch objects. content: application/json: schema: - $ref: '#/components/schemas/OpenAIFileObject' + $ref: '#/components/schemas/ListBatchesResponse' '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: - - Files - summary: Upload file. - description: >- - Upload file. - - Upload a file that can be used across various endpoints. - - - The file upload should be a multipart form request with: - - - file: The File object (not file name) to be uploaded. - - - purpose: The intended purpose of the uploaded file. - - - expires_after: Optional form values describing expiration for the file. - parameters: [] - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - file: - type: string - format: binary - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' - expires_after: - $ref: '#/components/schemas/ExpiresAfter' - required: - - file - - purpose - required: true - deprecated: false - /v1/files/{file_id}: + description: Default Response + /v1/batches/{batch_id}: get: - responses: - '200': - description: >- - An OpenAIFileObject containing file information. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIFileObject' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - Files - summary: Retrieve file. - description: >- - Retrieve file. - - Returns information about a specific file. - parameters: - - name: file_id - in: path - description: >- - The ID of the file to use for this request. - required: true - schema: - type: string - deprecated: false - delete: + - Batches + summary: Retrieve Batch + description: Retrieve information about a specific batch. + operationId: retrieve_batch_v1_batches__batch_id__get responses: '200': - description: >- - An OpenAIFileDeleteResponse indicating successful deletion. + description: The batch object. content: application/json: schema: - $ref: '#/components/schemas/OpenAIFileDeleteResponse' + $ref: '#/components/schemas/Batch' '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: - - Files - summary: Delete file. - description: Delete file. parameters: - - name: file_id - in: path - description: >- - The ID of the file to use for this request. - required: true - schema: - type: string - deprecated: false - /v1/files/{file_id}/content: - get: - responses: - '200': - description: >- - The raw file content as a binary response. - content: - application/json: - schema: - $ref: '#/components/schemas/Response' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' + /v1/vector-io/insert: + post: tags: - - Files - summary: Retrieve file content. - description: >- - Retrieve file content. - - Returns the contents of the specified file. - parameters: - - name: file_id - in: path - description: >- - The ID of the file to use for this request. - required: true - schema: - type: string - deprecated: false - /v1/health: - get: + - Vector Io + summary: Insert Chunks + description: Insert chunks into a vector database. + operationId: insert_chunks_v1_vector_io_insert_post + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Chunk-Input' + title: Chunks responses: '200': - description: >- - Health information indicating if the service is operational. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/HealthInfo' + 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' + description: Default Response + /v1/vector_stores/{vector_store_id}/files: + post: tags: - - Inspect - summary: Get health status. - description: >- - Get health status. - - Get the current health status of the service. - parameters: [] - deprecated: false - /v1/inspect/routes: - get: + - Vector Io + summary: Openai Attach File To Vector Store + description: Attach a file to a vector store. + 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: >- - Response containing information about all available routes. + description: A VectorStoreFileObject representing the attached file. content: application/json: schema: - $ref: '#/components/schemas/ListRoutesResponse' + $ref: '#/components/schemas/VectorStoreFileObject' '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' + description: Default Response + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + get: tags: - - Inspect - summary: List routes. - description: >- - List routes. - - List all available API routes with their methods and implementing providers. + - Vector Io + summary: Openai List Files In Vector Store + description: List files in a vector store. + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get parameters: - - name: api_filter - in: query - description: >- - Optional filter to control which routes are returned. Can be an API level - ('v1', 'v1alpha', 'v1beta') to show non-deprecated routes at that level, - or 'deprecated' to show deprecated routes across all levels. If not specified, - returns all non-deprecated routes. - required: false - schema: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: filter + in: query + required: false + schema: + anyOf: + - const: completed type: string - enum: - - v1 - - v1alpha - - v1beta - - deprecated - deprecated: false - /v1/models: - get: + - const: in_progress + type: string + - const: cancelled + type: string + - const: failed + type: string + - type: 'null' + title: Filter + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' responses: '200': - description: A OpenAIListModelsResponse. + description: A VectorStoreListFilesResponse containing the list of files. content: application/json: schema: - $ref: '#/components/schemas/OpenAIListModelsResponse' + $ref: '#/components/schemas/VectorStoreListFilesResponse' '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' + description: Default Response + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: + post: tags: - - Models - summary: List models using the OpenAI API. - description: List models using the OpenAI API. - parameters: [] - deprecated: false - /v1/models/{model_id}: - get: + - Vector Io + summary: Openai Cancel Vector Store File Batch + description: Cancels a vector store file batch. + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post responses: '200': - description: A Model. + description: A VectorStoreFileBatchObject representing the cancelled file batch. content: application/json: schema: - $ref: '#/components/schemas/Model' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '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: - - Models - summary: Get model. - description: >- - Get model. - - Get a model by its identifier. parameters: - - name: model_id - in: path - description: The identifier of the model to get. - required: true - schema: - type: string - deprecated: false - /v1/moderations: + - 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: post: - responses: - '200': - description: A moderation object. - content: - application/json: - schema: - $ref: '#/components/schemas/ModerationObject' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - Safety - summary: Create moderation. - description: >- - Create moderation. + - Vector Io + summary: Openai Create Vector Store + description: |- + Creates a vector store. - Classifies if text and/or image inputs are potentially harmful. - parameters: [] + Generate an OpenAI-compatible vector store with the given parameters. + operationId: openai_create_vector_store_v1_vector_stores_post requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/RunModerationRequest' - required: true - deprecated: false - /v1/prompts: - get: + $ref: '#/components/schemas/OpenAICreateVectorStoreRequestWithExtraBody' responses: '200': - description: >- - A ListPromptsResponse containing all prompts. + description: A VectorStoreObject representing the created vector store. content: application/json: schema: - $ref: '#/components/schemas/ListPromptsResponse' + $ref: '#/components/schemas/VectorStoreObject' '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' + description: Default Response + get: tags: - - Prompts - summary: List all prompts. - description: List all prompts. - parameters: [] - deprecated: false - post: + - Vector Io + summary: Openai List Vector Stores + description: Returns a list of vector stores. + operationId: openai_list_vector_stores_v1_vector_stores_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order responses: '200': - description: The created Prompt resource. + description: A VectorStoreListResponse containing the list of vector stores. content: application/json: schema: - $ref: '#/components/schemas/Prompt' + $ref: '#/components/schemas/VectorStoreListResponse' '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' + description: Default Response + /v1/vector_stores/{vector_store_id}/file_batches: + post: tags: - - Prompts - summary: Create prompt. - description: >- - Create prompt. + - Vector Io + summary: Openai Create Vector Store File Batch + description: |- + Create a vector store file batch. - Create a new prompt. - parameters: [] + Generate an OpenAI-compatible vector store file batch for the given vector store. + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreatePromptRequest' + $ref: '#/components/schemas/OpenAICreateVectorStoreFileBatchRequestWithExtraBody' required: true - deprecated: false - /v1/prompts/{prompt_id}: - get: responses: '200': - description: A Prompt resource. + description: A VectorStoreFileBatchObject representing the created file batch. content: application/json: schema: - $ref: '#/components/schemas/Prompt' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '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: - - Prompts - summary: Get prompt. - description: >- - Get prompt. - - Get a prompt by its identifier and optional version. parameters: - - name: prompt_id - in: path - description: The identifier of the prompt to get. - required: true - schema: - type: string - - name: version - in: query - description: >- - The version of the prompt to get (defaults to latest). - required: false - schema: - type: integer - deprecated: false - post: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}: + get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store + description: Retrieves a vector store. + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get responses: '200': - description: >- - The updated Prompt resource with incremented version. + description: A VectorStoreObject representing the vector store. content: application/json: schema: - $ref: '#/components/schemas/Prompt' + $ref: '#/components/schemas/VectorStoreObject' '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: - - Prompts - summary: Update prompt. - description: >- - Update prompt. - - Update an existing prompt (increments version). parameters: - - name: prompt_id - in: path - description: The identifier of the prompt to update. - required: true - schema: - type: string + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + post: + tags: + - Vector Io + summary: Openai Update Vector Store + description: Updates a vector store. + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post requestBody: content: application/json: schema: - $ref: '#/components/schemas/UpdatePromptRequest' + $ref: '#/components/schemas/_vector_stores_vector_store_id_Request' required: true - 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: - - Prompts - summary: Delete prompt. - description: >- - Delete prompt. - - Delete a prompt. - parameters: - - name: prompt_id - in: path - description: The identifier of the prompt to delete. - required: true - schema: - type: string - deprecated: false - /v1/prompts/{prompt_id}/set-default-version: - post: responses: '200': - description: >- - The prompt with the specified version now set as default. + description: A VectorStoreObject representing the updated vector store. content: application/json: schema: - $ref: '#/components/schemas/Prompt' + $ref: '#/components/schemas/VectorStoreObject' '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: - - Prompts - summary: Set prompt version. - description: >- - Set prompt version. - - Set which version of a prompt should be the default in get_prompt (latest). parameters: - - name: prompt_id - in: path - description: The identifier of the prompt. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SetDefaultVersionRequest' + - name: vector_store_id + in: path required: true - deprecated: false - /v1/prompts/{prompt_id}/versions: - get: + schema: + type: string + description: 'Path parameter: vector_store_id' + delete: + tags: + - Vector Io + summary: Openai Delete Vector Store + description: Delete a vector store. + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete responses: '200': - description: >- - A ListPromptsResponse containing all versions of the prompt. + description: A VectorStoreDeleteResponse indicating the deletion status. content: application/json: schema: - $ref: '#/components/schemas/ListPromptsResponse' + $ref: '#/components/schemas/VectorStoreDeleteResponse' '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: - - Prompts - summary: List prompt versions. - description: >- - List prompt versions. - - List all versions of a specific prompt. parameters: - - name: prompt_id - in: path - description: >- - The identifier of the prompt to list versions for. - required: true - schema: - type: string - deprecated: false - /v1/providers: + - 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}: get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store File + description: Retrieves a vector store file. + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get responses: '200': - description: >- - A ListProvidersResponse containing information about all providers. + description: A VectorStoreFileObject representing the file. content: application/json: schema: - $ref: '#/components/schemas/ListProvidersResponse' + $ref: '#/components/schemas/VectorStoreFileObject' '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: 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' + post: tags: - - Providers - summary: List providers. - description: >- - List providers. - - List all available providers. - parameters: [] - deprecated: false - /v1/providers/{provider_id}: - get: - tags: - - Providers - summary: Inspect Provider - description: |- - Get provider. - - Get detailed information about a specific provider. - operationId: inspect_provider_v1_providers__provider_id__get + - Vector Io + summary: Openai Update Vector Store File + description: Updates a vector store file. + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_files_file_id_Request' + required: true responses: '200': - description: A ProviderInfo object containing the provider's details. + description: A VectorStoreFileObject representing the updated file. content: application/json: schema: - $ref: '#/components/schemas/ProviderInfo' + $ref: '#/components/schemas/VectorStoreFileObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1368,29 +1256,31 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: provider_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: provider_id' - /v1/providers: - get: + description: 'Path parameter: vector_store_id' + - name: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + delete: tags: - - Providers - summary: List Providers - description: |- - List providers. - - List all available providers. - operationId: list_providers_v1_providers_get + - Vector Io + summary: Openai Delete Vector Store File + description: Delete a vector store file. + operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete responses: '200': - description: A ListProvidersResponse containing information about all providers. + description: A VectorStoreFileDeleteResponse indicating the deletion status. content: application/json: schema: - $ref: '#/components/schemas/ListProvidersResponse' + $ref: '#/components/schemas/VectorStoreFileDeleteResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1403,44 +1293,26 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/responses: - post: - tags: - - Agents - summary: Create Openai Response - description: Create a model response. - operationId: create_openai_response_v1_responses_post - requestBody: + parameters: + - name: vector_store_id + in: path 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 + 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}/file_batches/{batch_id}/files: get: tags: - - Agents - summary: List Openai Responses - description: List all responses. - operationId: list_openai_responses_v1_responses_get + - Vector Io + summary: Openai List Files In Vector Store File Batch + description: Returns a list of vector store files in a batch. + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get parameters: - name: after in: query @@ -1450,39 +1322,59 @@ paths: - type: string - type: 'null' title: After - - name: limit + - name: before in: query required: false schema: anyOf: - - type: integer + - type: string - type: 'null' - default: 50 - title: Limit - - name: model + title: Before + - name: filter in: query required: false schema: anyOf: - type: string - type: 'null' - title: Model + title: Filter + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit - name: order in: query required: false schema: anyOf: - - $ref: '#/components/schemas/Order' + - type: string - type: 'null' default: desc title: Order + - 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' responses: '200': - description: A ListOpenAIResponseObject. + description: A VectorStoreFilesListInBatchResponse containing the list of files in the batch. content: application/json: schema: - $ref: '#/components/schemas/ListOpenAIResponseObject' + $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -1495,20 +1387,20 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - /v1/responses/{response_id}: + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: get: tags: - - Agents - summary: Get Openai Response - description: Get a model response. - operationId: get_openai_response_v1_responses__response_id__get + - Vector Io + summary: Openai Retrieve Vector Store File Batch + description: Retrieve a vector store file batch. + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get responses: '200': - description: An OpenAIResponseObject. + description: A VectorStoreFileBatchObject representing the file batch. content: application/json: schema: - $ref: '#/components/schemas/OpenAIResponseObject' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1522,25 +1414,32 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: response_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: response_id' - delete: + 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}/files/{file_id}/content: + get: tags: - - Agents - summary: Delete Openai Response - description: Delete a response. - operationId: delete_openai_response_v1_responses__response_id__delete + - Vector Io + summary: Openai Retrieve Vector Store File Contents + description: Retrieves the contents of a vector store file. + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get responses: '200': - description: An OpenAIDeleteResponseObject + description: A VectorStoreFileContentResponse representing the file contents. content: application/json: schema: - $ref: '#/components/schemas/OpenAIDeleteResponseObject' + $ref: '#/components/schemas/VectorStoreFileContentResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1554,106 +1453,115 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: response_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: response_id' - /v1/responses/{response_id}/input_items: - get: + 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}/search: + post: tags: - - Agents - summary: List Openai Response Input Items - description: List input items. - operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get + - Vector Io + summary: Openai Search Vector Store + description: |- + Search for chunks in a vector store. + + Searches a vector store for relevant chunks based on a query and optional file attribute filters. + 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: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/Order' - - type: 'null' - default: desc - title: Order - - name: response_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: response_id' + description: 'Path parameter: vector_store_id' + /v1/vector-io/query: + post: + tags: + - Vector Io + summary: Query Chunks + description: Query chunks from a vector database. + operationId: query_chunks_v1_vector_io_query_post requestBody: content: application/json: schema: - anyOf: - - type: array - items: - type: string - - type: 'null' - title: Include + $ref: '#/components/schemas/_vector_io_query_Request' + required: true responses: '200': - description: An ListOpenAIResponseInputItem. + description: A QueryChunksResponse. content: application/json: schema: - $ref: '#/components/schemas/ListOpenAIResponseInputItem' + $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 - /v1/chat/completions/{completion_id}: - get: + $ref: '#/components/responses/DefaultError' + /v1/moderations: + post: tags: - - Inference - summary: Get Chat Completion + - Safety + summary: Run Moderation description: |- - Get chat completion. + Create moderation. - Describe a chat completion by its ID. - operationId: get_chat_completion_v1_chat_completions__completion_id__get + Classifies if text and/or image inputs are potentially harmful. + operationId: run_moderation_v1_moderations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_moderations_Request' + required: true responses: '200': - description: A OpenAICompletionWithInputMessages. + description: A moderation object. content: application/json: schema: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + $ref: '#/components/schemas/ModerationObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1666,131 +1574,61 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: completion_id - in: path - required: true - schema: - type: string - description: 'Path parameter: completion_id' - /v1/chat/completions: - get: - tags: - - Inference - summary: List Chat Completions - description: List chat completions. - operationId: list_chat_completions_v1_chat_completions_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: model - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Model - - name: order - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/Order' - - type: 'null' - default: desc - title: Order - 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 + /v1/safety/run-shield: post: tags: - - Inference - summary: Openai Chat Completion + - Safety + summary: Run Shield description: |- - Create chat completions. + Run shield. - Generate an OpenAI-compatible chat completion for the given messages using the specified model. - operationId: openai_chat_completion_v1_chat_completions_post + Run a shield. + operationId: run_shield_v1_safety_run_shield_post requestBody: - required: true content: application/json: schema: - $ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody' + $ref: '#/components/schemas/_safety_run_shield_Request' + required: true responses: '200': - description: An OpenAIChatCompletion. + description: A RunShieldResponse. content: application/json: schema: - $ref: '#/components/schemas/OpenAIChatCompletion' + $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 - /v1/completions: + $ref: '#/components/responses/DefaultError' + /v1/scoring/score: post: tags: - - Inference - summary: Openai Completion - description: |- - Create completion. - - Generate an OpenAI-compatible completion for the given prompt using the specified model. - operationId: openai_completion_v1_completions_post + - Scoring + summary: Score + description: Score a list of rows. + operationId: score_v1_scoring_score_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' + $ref: '#/components/schemas/_scoring_score_Request' required: true responses: '200': - description: An OpenAICompletion. + description: A ScoreResponse object containing rows and aggregated results. content: application/json: schema: - $ref: '#/components/schemas/OpenAICompletion' + $ref: '#/components/schemas/ScoreResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1803,29 +1641,26 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/embeddings: + /v1/scoring/score-batch: post: tags: - - Inference - summary: Openai Embeddings - description: |- - Create embeddings. - - Generate OpenAI-compatible embeddings for the given input using the specified model. - operationId: openai_embeddings_v1_embeddings_post + - Scoring + summary: Score Batch + description: Score a batch of rows. + operationId: score_batch_v1_scoring_score_batch_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' + $ref: '#/components/schemas/_scoring_score_batch_Request' required: true responses: '200': - description: An OpenAIEmbeddingsResponse containing the embeddings. + description: A ScoreBatchResponse. content: application/json: schema: - $ref: '#/components/schemas/OpenAIEmbeddingsResponse' + $ref: '#/components/schemas/ScoreBatchResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1838,23 +1673,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/health: + /v1/tools/{tool_name}: get: tags: - - Inspect - summary: Health - description: |- - Get health status. - - Get the current health status of the service. - operationId: health_v1_health_get + - Tool Groups + summary: Get Tool + description: Get a tool by its name. + operationId: get_tool_v1_tools__tool_name__get responses: '200': - description: Health information indicating if the service is operational. + description: A ToolDef. content: application/json: schema: - $ref: '#/components/schemas/HealthInfo' + $ref: '#/components/schemas/ToolDef' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1867,37 +1699,36 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/inspect/routes: + parameters: + - name: tool_name + in: path + required: true + schema: + type: string + description: 'Path parameter: tool_name' + /v1/tools: get: tags: - - Inspect - summary: List Routes - description: |- - List routes. - - List all available API routes with their methods and implementing providers. - operationId: list_routes_v1_inspect_routes_get + - Tool Groups + summary: List Tools + description: List tools with optional tool group. + operationId: list_tools_v1_tools_get parameters: - - name: api_filter + - name: toolgroup_id in: query required: false schema: anyOf: - - enum: - - v1 - - v1alpha - - v1beta - - deprecated - type: string + - type: string - type: 'null' - title: Api Filter + title: Toolgroup Id responses: '200': - description: Response containing information about all available routes. + description: A ListToolDefsResponse. content: application/json: schema: - $ref: '#/components/schemas/ListRoutesResponse' + $ref: '#/components/schemas/ListToolDefsResponse' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -1910,23 +1741,26 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - /v1/version: - get: + /v1/tool-runtime/invoke: + post: tags: - - Inspect - summary: Version - description: |- - Get version. - - Get the version of the service. - operationId: version_v1_version_get + - Tool Runtime + summary: Invoke Tool + description: Run a tool with the given arguments. + 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: Version information containing the service version number. + description: A ToolInvocationResult. content: application/json: schema: - $ref: '#/components/schemas/VersionInfo' + $ref: '#/components/schemas/ToolInvocationResult' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1939,77 +1773,127 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/batches/{batch_id}/cancel: - post: + /v1/tool-runtime/list-tools: + get: tags: - - Batches - summary: Cancel Batch - description: Cancel a batch that is in progress. - operationId: cancel_batch_v1_batches__batch_id__cancel_post + - Tool Runtime + summary: List Runtime Tools + description: List all tools in the runtime. + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + parameters: + - name: tool_group_id + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Tool Group Id + requestBody: + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + title: Mcp Endpoint responses: '200': - description: The updated batch object. + description: A ListToolDefsResponse. content: application/json: schema: - $ref: '#/components/schemas/Batch' + $ref: '#/components/schemas/ListToolDefsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error 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/batches: - post: + description: Default Response + /v1/files/{file_id}: + get: tags: - - Batches - summary: Create Batch - description: Create a new batch for processing multiple API requests. - operationId: create_batch_v1_batches_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/_batches_Request' + - Files + summary: Openai Retrieve File + description: |- + Retrieve file. + + Returns information about a specific file. + operationId: openai_retrieve_file_v1_files__file_id__get responses: '200': - description: The created batch object. + description: An OpenAIFileObject containing file information. content: application/json: schema: - $ref: '#/components/schemas/Batch' + $ref: '#/components/schemas/OpenAIFileObject' '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: + description: Default Response $ref: '#/components/responses/DefaultError' + parameters: + - name: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + delete: + tags: + - Files + summary: Openai Delete File + description: Delete file. + operationId: openai_delete_file_v1_files__file_id__delete + responses: + '200': + description: An OpenAIFileDeleteResponse indicating successful deletion. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileDeleteResponse' + '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: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + /v1/files: get: tags: - - Batches - summary: List Batches - description: List all batches for the current user. - operationId: list_batches_v1_batches_get + - Files + summary: Openai List Files + description: |- + List files. + + Returns a list of files that belong to the user's organization. + operationId: openai_list_files_v1_files_get parameters: - name: after in: query @@ -2023,16 +1907,35 @@ paths: in: query required: false schema: - type: integer - default: 20 + anyOf: + - type: integer + - type: 'null' + default: 10000 title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + - name: purpose + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/OpenAIFilePurpose' + - type: 'null' + title: Purpose responses: '200': - description: A list of batch objects. + description: An ListOpenAIFileResponse containing the list of files. content: application/json: schema: - $ref: '#/components/schemas/ListBatchesResponse' + $ref: '#/components/schemas/ListOpenAIFileResponse' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -2045,20 +1948,61 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - /v1/batches/{batch_id}: - get: + post: tags: - - Batches - summary: Retrieve Batch - description: Retrieve information about a specific batch. - operationId: retrieve_batch_v1_batches__batch_id__get + - Files + summary: Openai Upload File + description: |- + Upload file. + + Upload a file that can be used across various endpoints. + + The file upload should be a multipart form request with: + - file: The File object (not file name) to be uploaded. + - purpose: The intended purpose of the uploaded file. + - expires_after: Optional form values describing expiration for the file. + operationId: openai_upload_file_v1_files_post + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_openai_upload_file_v1_files_post' responses: '200': - description: The batch object. + description: An OpenAIFileObject representing the uploaded file. content: application/json: schema: - $ref: '#/components/schemas/Batch' + $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: + - Files + summary: Openai Retrieve File Content + description: |- + Retrieve file content. + + Returns the contents of the specified file. + operationId: openai_retrieve_file_content_v1_files__file_id__content_get + responses: + '200': + description: The raw file content as a binary response. + content: + application/json: + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2072,228 +2016,183 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: batch_id + - name: file_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/vector-io/insert: - post: + description: 'Path parameter: file_id' + /v1/prompts: + get: tags: - - Vector Io - summary: Insert Chunks - description: Insert chunks into a vector database. - operationId: insert_chunks_v1_vector_io_insert_post - requestBody: - required: true - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Chunk-Input' - title: Chunks + - Prompts + summary: List Prompts + description: List all prompts. + operationId: list_prompts_v1_prompts_get responses: '200': - description: Successful Response + description: A ListPromptsResponse containing all prompts. content: application/json: - schema: {} + 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 - /v1/vector_stores/{vector_store_id}/files: + $ref: '#/components/responses/DefaultError' post: tags: - - Vector Io - summary: Openai Attach File To Vector Store - description: Attach a file to a vector store. - operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post + - Prompts + summary: Create Prompt + description: |- + Create prompt. + + Create a new prompt. + operationId: create_prompt_v1_prompts_post requestBody: - required: true content: application/json: schema: - $ref: '#/components/schemas/_vector_stores_vector_store_id_files_Request' + $ref: '#/components/schemas/_prompts_Request' + required: true responses: '200': - description: A VectorStoreFileObject representing the attached file. + description: The created Prompt resource. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $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 - parameters: - - name: vector_store_id - in: path - required: true - schema: - type: string - description: 'Path parameter: vector_store_id' - get: + $ref: '#/components/responses/DefaultError' + /v1/prompts/{prompt_id}: + delete: tags: - - Vector Io - summary: Openai List Files In Vector Store - description: List files in a vector store. - operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get + - VectorIO + summary: Delete a vector store file. + description: Delete a vector store file. parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: filter - in: query - required: false - schema: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled + - name: vector_store_id + in: path + description: >- + The ID of the vector store containing the file to delete. + required: true + schema: type: string - - const: failed + - name: file_id + in: path + description: The ID of the file to delete. + required: true + schema: type: string - - type: 'null' - title: Filter - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - default: desc - title: Order - - name: vector_store_id - in: path - required: true - schema: - type: string - description: 'Path parameter: vector_store_id' + deprecated: false + /v1/vector_stores/{vector_store_id}/files/{file_id}/content: + get: responses: '200': - description: A VectorStoreListFilesResponse containing the list of files. + description: >- + File contents, optionally with embeddings and metadata based on query + parameters. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreListFilesResponse' + $ref: '#/components/schemas/VectorStoreFileContentResponse' '400': $ref: '#/components/responses/BadRequest400' - description: Bad Request '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 - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: - post: tags: - - Vector Io - summary: Openai Cancel Vector Store File Batch - description: Cancels a vector store file batch. - operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post + - VectorIO + summary: >- + Retrieves the contents of a vector store file. + description: >- + Retrieves the contents of a vector store file. + parameters: + - name: vector_store_id + in: path + description: >- + The ID of the vector store containing the file to retrieve. + required: true + schema: + type: string + - name: file_id + in: path + description: The ID of the file to retrieve. + required: true + schema: + type: string + - name: include_embeddings + in: query + description: >- + Whether to include embedding vectors in the response. + required: false + schema: + $ref: '#/components/schemas/bool' + - name: include_metadata + in: query + description: >- + Whether to include chunk metadata in the response. + required: false + schema: + $ref: '#/components/schemas/bool' + deprecated: false + /v1/vector_stores/{vector_store_id}/search: + post: responses: '200': - description: A VectorStoreFileBatchObject representing the cancelled file batch. + description: >- + A VectorStoreSearchResponse containing the search results. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: '#/components/schemas/VectorStoreSearchResponsePage' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - description: Too Many Requests - $ref: '#/components/responses/TooManyRequests429' + $ref: >- + #/components/responses/TooManyRequests429 '500': - description: Internal Server Error - $ref: '#/components/responses/InternalServerError500' + $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: - post: tags: - - Vector Io - summary: Openai Create Vector Store - description: |- - Creates a vector store. + - VectorIO + summary: Search for chunks in a vector store. + description: >- + Search for chunks in a vector store. - Generate an OpenAI-compatible vector store with the given parameters. - operationId: openai_create_vector_store_v1_vector_stores_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAICreateVectorStoreRequestWithExtraBody' + Delete a prompt. + operationId: delete_prompt_v1_prompts__prompt_id__delete responses: '200': - description: A VectorStoreObject representing the created vector store. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreObject' + schema: {} '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -2306,54 +2205,44 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' get: tags: - - Vector Io - summary: Openai List Vector Stores - description: Returns a list of vector stores. - operationId: openai_list_vector_stores_v1_vector_stores_get + - Prompts + summary: Get Prompt + description: |- + Get prompt. + + Get a prompt by its identifier and optional version. + operationId: get_prompt_v1_prompts__prompt_id__get parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: limit + - name: version in: query required: false schema: anyOf: - type: integer - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false + title: Version + - name: prompt_id + in: path + required: true schema: - anyOf: - - type: string - - type: 'null' - default: desc - title: Order + type: string + description: 'Path parameter: prompt_id' responses: '200': - description: A VectorStoreListResponse containing the list of vector stores. + description: A Prompt resource. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreListResponse' + $ref: '#/components/schemas/Prompt' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -2366,62 +2255,64 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - /v1/vector_stores/{vector_store_id}/file_batches: post: tags: - - Vector Io - summary: Openai Create Vector Store File Batch + - Prompts + summary: Update Prompt description: |- - Create a vector store file batch. + Update prompt. - Generate an OpenAI-compatible vector store file batch for the given vector store. - operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post + Update an existing prompt (increments version). + operationId: update_prompt_v1_prompts__prompt_id__post requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/OpenAICreateVectorStoreFileBatchRequestWithExtraBody' - required: true + $ref: '#/components/schemas/_prompts_prompt_id_Request' responses: '200': - description: A VectorStoreFileBatchObject representing the created file batch. + description: The updated Prompt resource with incremented version. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: '#/components/schemas/Prompt' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response parameters: - - name: vector_store_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - /v1/vector_stores/{vector_store_id}: + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/versions: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store - description: Retrieves a vector store. - operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get + - Prompts + summary: List Prompt Versions + description: |- + List prompt versions. + + List all versions of a specific prompt. + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get responses: '200': - description: A VectorStoreObject representing the vector store. + description: A ListPromptsResponse containing all versions of the prompt. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: '#/components/schemas/ListPromptsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2435,31 +2326,35 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/set-default-version: post: tags: - - Vector Io - summary: Openai Update Vector Store - description: Updates a vector store. - operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post + - Prompts + summary: Set Default Version + description: |- + Set prompt version. + + Set which version of a prompt should be the default in get_prompt (latest). + operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/_vector_stores_vector_store_id_Request' + $ref: '#/components/schemas/_prompts_prompt_id_set_default_version_Request' required: true responses: '200': - description: A VectorStoreObject representing the updated vector store. + description: The prompt with the specified version now set as default. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: '#/components/schemas/Prompt' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2473,58 +2368,178 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - delete: + description: 'Path parameter: prompt_id' + /v1/conversations/{conversation_id}/items: + post: tags: - - Vector Io - summary: Openai Delete Vector Store - description: Delete a vector store. - operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete + - Conversations + summary: Add Items + description: |- + Create items. + + Create items in the conversation. + 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: A VectorStoreDeleteResponse indicating the deletion status. + description: List of created items. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreDeleteResponse' + $ref: '#/components/schemas/ConversationItemList' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response parameters: - - name: vector_store_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - /v1/vector_stores/{vector_store_id}/files/{file_id}: + description: 'Path parameter: conversation_id' get: tags: - - Vector Io - summary: Openai Retrieve Vector Store File - description: Retrieves a vector store file. - operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get + - Conversations + summary: List Items + description: |- + List items. + + List items in the conversation. + operationId: list_items_v1_conversations__conversation_id__items_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - enum: + - asc + - desc + type: string + - type: 'null' + title: Order + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + requestBody: + content: + application/json: + schema: + anyOf: + - type: array + items: + $ref: '#/components/schemas/ConversationItemInclude' + - type: 'null' + title: Include responses: '200': - description: A VectorStoreFileObject representing the file. + description: List of conversation items. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $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 + /v1/conversations: + post: + tags: + - Conversations + summary: Create Conversation + description: |- + Create a conversation. + + Create a conversation. + 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}: + get: + tags: + - Conversations + summary: Get Conversation + description: |- + Retrieve a conversation. + + Get a conversation with the given ID. + operationId: get_conversation_v1_conversations__conversation_id__get + responses: + '200': + description: The conversation object. + content: + application/json: + schema: + $ref: '#/components/schemas/Conversation' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2538,37 +2553,34 @@ paths: 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: file_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: file_id' + description: 'Path parameter: conversation_id' post: tags: - - Vector Io - summary: Openai Update Vector Store File - description: Updates a vector store file. - operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post + - Conversations + summary: Update Conversation + description: |- + Update a conversation. + + Update a conversation's metadata with the given ID. + operationId: update_conversation_v1_conversations__conversation_id__post requestBody: content: application/json: schema: - $ref: '#/components/schemas/_vector_stores_vector_store_id_files_file_id_Request' + $ref: '#/components/schemas/_conversations_conversation_id_Request' required: true responses: '200': - description: A VectorStoreFileObject representing the updated file. + description: The updated conversation object. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $ref: '#/components/schemas/Conversation' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2582,31 +2594,28 @@ paths: 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: file_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: file_id' + description: 'Path parameter: conversation_id' delete: tags: - - Vector Io - summary: Openai Delete Vector Store File - description: Delete a vector store file. - operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete + - Conversations + summary: Openai Delete Conversation + description: |- + Delete a conversation. + + Delete a conversation with the given ID. + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete responses: '200': - description: A VectorStoreFileDeleteResponse indicating the deletion status. + description: The deleted conversation resource. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileDeleteResponse' + $ref: '#/components/schemas/ConversationDeletedResource' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2620,152 +2629,29 @@ paths: 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: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: - get: - tags: - - Vector Io - summary: Openai List Files In Vector Store File Batch - description: Returns a list of vector store files in a batch. - operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: filter - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Filter - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - default: desc - title: Order - - 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' - 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}/file_batches/{batch_id}: - get: - tags: - - Vector Io - summary: Openai Retrieve Vector Store File Batch - description: Retrieve a vector store file batch. - operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get - responses: - '200': - description: A VectorStoreFileBatchObject representing the 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 + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/vector_stores/{vector_store_id}/files/{file_id}/content: + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items/{item_id}: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store File Contents - description: Retrieves the contents of a vector store file. - operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get + - Conversations + summary: Retrieve + description: |- + Retrieve an item. + + Retrieve a conversation item. + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get responses: '200': - description: A list of InterleavedContent representing the file contents. + description: The conversation item. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileContentsResponse' + $ref: '#/components/schemas/OpenAIResponseMessage' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2779,41 +2665,34 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - - name: file_id + description: 'Path parameter: conversation_id' + - name: item_id in: path required: true schema: type: string - description: 'Path parameter: file_id' - /v1/vector_stores/{vector_store_id}/search: - post: + description: 'Path parameter: item_id' + delete: tags: - - Vector Io - summary: Openai Search Vector Store + - Conversations + summary: Openai Delete Conversation Item description: |- - Search for chunks in a vector store. + Delete an item. - Searches a vector store for relevant chunks based on a query and optional file attribute filters. - 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 + Delete a conversation item. + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete responses: '200': - description: A VectorStoreSearchResponse containing the search results. + description: The deleted item resource. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreSearchResponsePage' + $ref: '#/components/schemas/ConversationItemDeletedResource' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2827,13095 +2706,6894 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - /v1/vector-io/query: - post: - tags: - - Vector Io - summary: Query Chunks - description: Query chunks from a vector database. - 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/models/{model_id}: - get: - tags: - - Models - summary: Get Model - description: |- - Get model. - - Get a model by its identifier. - operationId: get_model_v1_models__model_id__get - 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' - parameters: - - name: model_id + description: 'Path parameter: conversation_id' + - name: item_id in: path required: true schema: type: string - description: 'Path parameter: model_id' - delete: - tags: - - Models - summary: Unregister Model - description: |- - Unregister model. - - Unregister a model. - operationId: unregister_model_v1_models__model_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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: model_id - in: path - required: true - schema: - type: string - description: 'Path parameter: model_id' - /v1/models: - get: - tags: - - Models - summary: Openai List Models - description: List models using the OpenAI API. - operationId: openai_list_models_v1_models_get - responses: - '200': - description: A OpenAIListModelsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIListModelsResponse' - '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: - - Models - summary: Register Model - description: |- - Register model. - - Register a model. - 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/moderations: - post: - tags: - - Safety - summary: Run Moderation - description: |- - Create moderation. - - Classifies if text and/or image inputs are potentially harmful. - 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/safety/run-shield: - post: - tags: - - Safety - summary: Run Shield - description: |- - Run shield. - - Run a shield. - 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/shields/{identifier}: - get: - tags: - - Shields - summary: Get Shield - description: Get a shield by its identifier. - operationId: get_shield_v1_shields__identifier__get - 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' - parameters: - - name: identifier - in: path - required: true - schema: - type: string - description: 'Path parameter: identifier' - delete: - tags: - - Shields - summary: Unregister Shield - description: Unregister a shield. - operationId: unregister_shield_v1_shields__identifier__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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: identifier - in: path - required: true - schema: - type: string - description: 'Path parameter: identifier' - /v1/shields: - get: - tags: - - Shields - summary: List Shields - description: List all shields. - 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: - - Shields - summary: Register Shield - description: Register a shield. - 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/scoring/score: - post: - tags: - - Scoring - summary: Score - description: Score a list of rows. - 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: - - Scoring - summary: Score Batch - description: Score a batch of rows. - 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/scoring-functions/{scoring_fn_id}: - get: - tags: - - Scoring Functions - summary: Get Scoring Function - description: Get a scoring function by its ID. - operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get - responses: - '200': - description: A ScoringFn. - content: - application/json: - schema: - $ref: '#/components/schemas/ScoringFn' - '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: scoring_fn_id - in: path - required: true - schema: - type: string - description: 'Path parameter: scoring_fn_id' - delete: - tags: - - Scoring Functions - summary: Unregister Scoring Function - description: Unregister a scoring function. - operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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: scoring_fn_id - in: path - required: true - schema: - type: string - description: 'Path parameter: scoring_fn_id' - /v1/scoring-functions: - get: - tags: - - Scoring Functions - summary: List Scoring Functions - description: List all scoring functions. - 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' - tags: - - ScoringFunctions - summary: List all scoring functions. - description: List all scoring functions. - parameters: [] - deprecated: false - /v1/scoring-functions/{scoring_fn_id}: - get: - 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/tools/{tool_name}: - get: - tags: - - Tool Groups - summary: Get Tool - description: Get a tool by its name. - operationId: get_tool_v1_tools__tool_name__get - responses: - '200': - description: A ToolDef. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDef' - '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: scoring_fn_id - in: path - description: The ID of the scoring function to get. - required: true - schema: - type: string - deprecated: false - /v1/scoring/score: - post: - responses: - '200': - description: >- - A ScoreResponse object containing rows and aggregated results. - content: - application/json: - schema: - $ref: '#/components/schemas/ScoreResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Scoring - summary: Score a list of rows. - description: Score a list of rows. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ScoreRequest' - required: true - deprecated: false - /v1/scoring/score-batch: - post: - responses: - '200': - description: A ScoreBatchResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ScoreBatchResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Scoring - summary: Score a batch of rows. - description: Score a batch of rows. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ScoreBatchRequest' - required: true - deprecated: false - /v1/shields: - get: - responses: - '200': - description: A ListShieldsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListShieldsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Shields - summary: List all shields. - description: List all shields. - parameters: [] - deprecated: false - /v1/shields/{identifier}: - get: - responses: - '200': - description: A Shield. - content: - application/json: - schema: - $ref: '#/components/schemas/Shield' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Shields - summary: Get a shield by its identifier. - description: Get a shield by its identifier. - parameters: - - name: identifier - in: path - description: The identifier of the shield to get. - required: true - schema: - type: string - deprecated: false - /v1/tool-runtime/invoke: - post: - responses: - '200': - description: A ToolInvocationResult. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolInvocationResult' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - ToolRuntime - summary: Run a tool with the given arguments. - description: Run a tool with the given arguments. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeToolRequest' - required: true - deprecated: false - /v1/tool-runtime/list-tools: - get: - responses: - '200': - description: A ListToolDefsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListToolDefsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - ToolRuntime - summary: List all tools in the runtime. - description: List all tools in the runtime. - parameters: - - name: tool_group_id - in: query - description: >- - The ID of the tool group to list tools for. - required: false - schema: - type: string - - name: mcp_endpoint - in: query - description: >- - The MCP endpoint to use for the tool group. - required: false - schema: - $ref: '#/components/schemas/URL' - deprecated: false - /v1/toolgroups: - get: - tags: - - Tool Groups - summary: List Tool Groups - description: List tool groups with optional provider. - 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' - tags: - - ToolGroups - summary: List tool groups with optional provider. - description: List tool groups with optional provider. - parameters: [] - deprecated: false - /v1/toolgroups/{toolgroup_id}: - get: - 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: - - ToolGroups - summary: Get a tool group by its ID. - description: Get a tool group by its ID. - parameters: - - name: toolgroup_id - in: path - description: The ID of the tool group to get. - required: true - schema: - type: string - deprecated: false - /v1/tools: - get: - tags: - - Tool Groups - summary: List Tools - description: List tools with optional tool group. - operationId: list_tools_v1_tools_get - parameters: - - name: toolgroup_id - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - 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/tool-runtime/invoke: - post: - tags: - - Tool Runtime - summary: Invoke Tool - description: Run a tool with the given arguments. - 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: - - Tool Runtime - summary: List Runtime Tools - description: List all tools in the runtime. - operationId: list_runtime_tools_v1_tool_runtime_list_tools_get - parameters: - - name: tool_group_id - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Tool Group Id - requestBody: - content: - application/json: - schema: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' - title: Mcp Endpoint - 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/files/{file_id}: - get: - tags: - - Files - summary: Openai Retrieve File - description: |- - Retrieve file. - - Returns information about a specific file. - operationId: openai_retrieve_file_v1_files__file_id__get - responses: - '200': - description: An OpenAIFileObject containing file information. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIFileObject' - '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: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' - delete: - tags: - - Files - summary: Openai Delete File - description: Delete file. - operationId: openai_delete_file_v1_files__file_id__delete - responses: - '200': - description: An OpenAIFileDeleteResponse indicating successful deletion. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIFileDeleteResponse' - '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: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' - /v1/files: - get: - tags: - - Files - summary: Openai List Files - description: |- - List files. - - Returns a list of files that belong to the user's organization. - operationId: openai_list_files_v1_files_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 10000 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/Order' - - type: 'null' - default: desc - title: Order - - name: purpose - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/OpenAIFilePurpose' - - type: 'null' - title: Purpose - 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: - - Files - summary: Openai Upload File - description: |- - Upload file. - - Upload a file that can be used across various endpoints. - - The file upload should be a multipart form request with: - - file: The File object (not file name) to be uploaded. - - purpose: The intended purpose of the uploaded file. - - expires_after: Optional form values describing expiration for the file. - operationId: openai_upload_file_v1_files_post - requestBody: - required: true - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/Body_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}/content: - get: - tags: - - Files - summary: Openai Retrieve File Content - description: |- - Retrieve file content. - - Returns the contents of the specified file. - operationId: openai_retrieve_file_content_v1_files__file_id__content_get - responses: - '200': - description: The raw file content as a binary response. - content: - application/json: - schema: {} - '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: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' - /v1/prompts: - get: - tags: - - Prompts - summary: List Prompts - description: List all prompts. - 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: - - Prompts - summary: Create Prompt - description: |- - Create prompt. - - Create a new prompt. - 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: - - VectorIO - summary: Delete a vector store file. - description: Delete a vector store file. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to delete. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to delete. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/files/{file_id}/content: - get: - responses: - '200': - description: >- - File contents, optionally with embeddings and metadata based on query - parameters. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileContentResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: >- - Retrieves the contents of a vector store file. - description: >- - Retrieves the contents of a vector store file. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to retrieve. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to retrieve. - required: true - schema: - type: string - - name: include_embeddings - in: query - description: >- - Whether to include embedding vectors in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - - name: include_metadata - in: query - description: >- - Whether to include chunk metadata in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - deprecated: false - /v1/vector_stores/{vector_store_id}/search: - post: - responses: - '200': - description: >- - A VectorStoreSearchResponse containing the search results. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreSearchResponsePage' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: Search for chunks in a vector store. - description: >- - Search for chunks in a vector store. - - Delete a prompt. - operationId: delete_prompt_v1_prompts__prompt_id__delete - 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 - parameters: - - name: prompt_id - in: path - required: true - schema: - type: string - description: 'Path parameter: prompt_id' - get: - tags: - - Prompts - summary: Get Prompt - description: |- - Get prompt. - - Get a prompt by its identifier and optional version. - operationId: get_prompt_v1_prompts__prompt_id__get - parameters: - - name: version - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - title: Version - - name: prompt_id - in: path - required: true - schema: - type: string - description: 'Path parameter: prompt_id' - 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: - - Prompts - summary: Update Prompt - description: |- - Update prompt. - - Update an existing prompt (increments version). - 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: - - name: prompt_id - in: path - required: true - schema: - type: string - description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/versions: - get: - tags: - - Prompts - summary: List Prompt Versions - description: |- - List prompt versions. - - List all versions of a specific prompt. - operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get - responses: - '200': - description: A ListPromptsResponse containing all versions of the prompt. - 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' - parameters: - - name: prompt_id - in: path - required: true - schema: - type: string - description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/set-default-version: - post: - tags: - - Prompts - summary: Set Default Version - description: |- - Set prompt version. - - Set which version of a prompt should be the default in get_prompt (latest). - 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/conversations/{conversation_id}/items: - post: - tags: - - Conversations - summary: Add Items - description: |- - Create items. - - Create items in the conversation. - 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' - get: - tags: - - Conversations - summary: List Items - description: |- - List items. - - List items in the conversation. - operationId: list_items_v1_conversations__conversation_id__items_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - enum: - - asc - - desc - type: string - - type: 'null' - title: Order - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - requestBody: - content: - application/json: - schema: - anyOf: - - type: array - items: - $ref: '#/components/schemas/ConversationItemInclude' - - type: 'null' - title: Include - 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 - /v1/conversations: - post: - tags: - - Conversations - summary: Create Conversation - description: |- - Create a conversation. - - Create a conversation. - 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}: - get: - tags: - - Conversations - summary: Get Conversation - description: |- - Retrieve a conversation. - - Get a conversation with the given ID. - operationId: get_conversation_v1_conversations__conversation_id__get - responses: - '200': - description: The 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' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - post: - tags: - - Conversations - summary: Update Conversation - description: |- - Update a conversation. - - Update a conversation's metadata with the given ID. - operationId: update_conversation_v1_conversations__conversation_id__post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_conversations_conversation_id_Request' - required: true - responses: - '200': - description: The updated 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' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - delete: - tags: - - Conversations - summary: Openai Delete Conversation - description: |- - Delete a conversation. - - Delete a conversation with the given ID. - operationId: openai_delete_conversation_v1_conversations__conversation_id__delete - responses: - '200': - description: The deleted conversation resource. - content: - application/json: - schema: - $ref: '#/components/schemas/ConversationDeletedResource' - '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: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - /v1/conversations/{conversation_id}/items/{item_id}: - get: - tags: - - Conversations - summary: Retrieve - description: |- - Retrieve an item. - - Retrieve a conversation item. - operationId: retrieve_v1_conversations__conversation_id__items__item_id__get - responses: - '200': - description: The conversation item. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseMessage' - '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: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: item_id - in: path - required: true - schema: - type: string - description: 'Path parameter: item_id' - delete: - tags: - - Conversations - summary: Openai Delete Conversation Item - description: |- - Delete an item. - - Delete a conversation item. - operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete - responses: - '200': - description: The deleted item resource. - content: - application/json: - schema: - $ref: '#/components/schemas/ConversationItemDeletedResource' - '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: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: item_id - in: path - required: true - schema: - type: string - description: 'Path parameter: item_id' -components: - schemas: - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: Types of aggregation functions for scoring results. - AllowedToolsFilter: - properties: - tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Tool Names - type: object - title: AllowedToolsFilter - description: Filter configuration for restricting which MCP tools can be used. - ArrayType: - properties: - type: - type: string - const: array - title: Type - default: array - type: object - title: ArrayType - description: Parameter type for array values. - 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. - 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: - anyOf: - - type: integer - - type: 'null' - title: Cancelled At - cancelling_at: - anyOf: - - type: integer - - type: 'null' - title: Cancelling At - completed_at: - anyOf: - - type: integer - - type: 'null' - title: Completed At - error_file_id: - anyOf: - - type: string - - type: 'null' - title: Error File Id - errors: - anyOf: - - $ref: '#/components/schemas/Errors' - - type: 'null' - expired_at: - anyOf: - - type: integer - - type: 'null' - title: Expired At - expires_at: - anyOf: - - type: integer - - type: 'null' - title: Expires At - failed_at: - anyOf: - - type: integer - - type: 'null' - title: Failed At - finalizing_at: - anyOf: - - type: integer - - type: 'null' - title: Finalizing At - in_progress_at: - anyOf: - - type: integer - - type: 'null' - title: In Progress At - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - title: Metadata - model: - anyOf: - - type: string - - type: 'null' - title: Model - output_file_id: - anyOf: - - type: string - - type: 'null' - title: Output File Id - request_counts: - anyOf: - - $ref: '#/components/schemas/BatchRequestCounts' - - type: 'null' - usage: - anyOf: - - $ref: '#/components/schemas/BatchUsage' - - type: 'null' - additionalProperties: true - type: object - required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - BatchError: - properties: - code: - anyOf: - - type: string - - type: 'null' - title: Code - line: - anyOf: - - type: integer - - type: 'null' - title: Line - message: - anyOf: - - type: string - - type: 'null' - title: Message - param: - anyOf: - - type: string - - type: 'null' - title: Param - 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: - anyOf: - - type: string - - type: 'null' - title: Provider Resource Id - description: Unique identifier for this resource in the provider - 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. - BenchmarkConfig: - properties: - eval_candidate: - $ref: '#/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: - 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: object - required: - - eval_candidate - title: BenchmarkConfig - description: A benchmark configuration for evaluation. - Body_openai_upload_file_v1_files_post: - properties: - file: - type: string - format: binary - title: File - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' - expires_after: - anyOf: - - $ref: '#/components/schemas/ExpiresAfter' - - type: 'null' - type: object - required: - - file - - purpose - title: Body_openai_upload_file_v1_files_post - Body_register_scoring_function_v1_scoring_functions_post: - properties: - return_type: - anyOf: - - $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' - title: Return Type - 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 - type: object - required: - - return_type - title: Body_register_scoring_function_v1_scoring_functions_post - Body_register_tool_group_v1_toolgroups_post: - properties: - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Args - type: object - title: Body_register_tool_group_v1_toolgroups_post - BooleanType: - properties: - type: - type: string - const: boolean - title: Type - default: boolean - type: object - title: BooleanType - description: Parameter type for boolean values. - 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. - Chunk-Input: - 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 - title: Content - chunk_id: - type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - title: Embedding - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - - type: 'null' - type: object - required: - - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - 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: - anyOf: - - items: - type: number - type: array - - type: 'null' - title: Embedding - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - - type: 'null' - type: object - required: - - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - ChunkMetadata: - 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 - type: object - title: 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. - CompletionInputType: - properties: - type: - type: string - const: completion_input - title: Type - default: completion_input - type: object - title: CompletionInputType - description: Parameter type for 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: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - 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. - items: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - title: Items - description: Initial items to include in the conversation context. You may add up to 20 items at a time. - type: object - required: - - id - - created_at - title: Conversation - description: OpenAI-compatible conversation object. - ConversationDeletedResource: - properties: - id: - type: string - title: Id - description: The deleted conversation identifier - object: - type: string - title: Object - description: Object type - default: conversation.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true - type: object - required: - - id - title: ConversationDeletedResource - description: Response for deleted conversation. - ConversationItemDeletedResource: - properties: - id: - type: string - title: Id - description: The deleted item identifier - object: - type: string - title: Object - description: Object type - default: conversation.item.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true - type: object - required: - - id - title: ConversationItemDeletedResource - description: Response for deleted conversation item. - 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: - anyOf: - - type: string - - type: 'null' - title: First Id - description: The ID of the first item in the list - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - description: The ID of the last item in the list - 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. - 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: - anyOf: - - type: string - - type: 'null' - title: Validation Dataset Id - packed: - anyOf: - - type: boolean - - type: 'null' - title: Packed - default: false - train_on_input: - anyOf: - - type: boolean - - type: 'null' - title: Train On Input - default: false - type: object - required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: Configuration for training data and data loading. - Dataset: - properties: - identifier: - type: string - 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 - 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. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - 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. - EfficiencyConfig: - properties: - enable_activation_checkpointing: - anyOf: - - type: boolean - - type: 'null' - title: Enable Activation Checkpointing - default: false - enable_activation_offloading: - anyOf: - - type: boolean - - type: 'null' - title: Enable Activation Offloading - default: false - memory_efficient_fsdp_wrap: - anyOf: - - type: boolean - - type: 'null' - title: Memory Efficient Fsdp Wrap - default: false - fsdp_cpu_offload: - anyOf: - - type: boolean - - type: 'null' - title: Fsdp Cpu Offload - default: false - type: object - title: EfficiencyConfig - description: Configuration for memory and compute efficiency optimizations. - Errors: - properties: - data: - anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array - - type: 'null' - title: Data - object: - anyOf: - - type: string - - type: 'null' - title: Object - 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. - ExpiresAfter: - properties: - anchor: - type: string - const: created_at - title: Anchor - seconds: - type: integer - maximum: 2592000.0 - minimum: 3600.0 - title: Seconds - type: object - required: - - anchor - - seconds - title: 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) - 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. - HealthInfo: - properties: - status: - $ref: '#/components/schemas/HealthStatus' - type: object - required: - - status - title: HealthInfo - description: Health status information for 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 - 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 - 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. - JobStatus: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - description: Status of a job execution. - JsonType: - properties: - type: - type: string - const: json - title: Type - default: json - type: object - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: - properties: - type: - type: string - const: llm_as_judge - title: Type - default: llm_as_judge - judge_model: - type: string - title: Judge Model - prompt_template: - anyOf: - - type: string - - type: 'null' - title: Prompt Template - 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. - 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. - ListScoringFunctionsResponse: - properties: - data: - items: - $ref: '#/components/schemas/ScoringFn' - 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. - LoraFinetuningConfig: - properties: - type: - type: string - const: LoRA - title: Type - default: LoRA - lora_attn_modules: - items: - type: string - type: array - title: Lora Attn Modules - apply_lora_to_mlp: - type: boolean - title: Apply Lora To Mlp - apply_lora_to_output: - type: boolean - title: Apply Lora To Output - rank: - type: integer - title: Rank - alpha: - type: integer - title: Alpha - use_dora: - anyOf: - - type: boolean - - type: 'null' - title: Use Dora - default: false - quantize_base: - anyOf: - - type: boolean - - type: 'null' - title: Quantize Base - default: false - type: object - required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - MCPListToolsTool: - properties: - input_schema: - additionalProperties: true - type: object - title: Input Schema - name: - type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - title: Description - type: object - required: - - input_schema - - name - title: MCPListToolsTool - description: Tool definition returned by MCP list tools operation. - Model: - properties: - identifier: - type: string - 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 - 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. - ModelCandidate: - properties: - type: - type: string - const: model - title: Type - default: model - model: - type: string - title: Model - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: - anyOf: - - $ref: '#/components/schemas/SystemMessage' - - type: 'null' - type: object - required: - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType - description: Enumeration of supported model types in Llama Stack. - 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. - ModerationObjectResults: - properties: - flagged: - type: boolean - title: Flagged - categories: - anyOf: - - additionalProperties: - type: boolean - type: object - - type: 'null' - title: Categories - category_applied_input_types: - anyOf: - - additionalProperties: - items: - type: string - type: array - type: object - - type: 'null' - title: Category Applied Input Types - category_scores: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - title: Category Scores - user_message: - anyOf: - - type: string - - type: 'null' - title: User Message - metadata: - additionalProperties: true - type: object - title: Metadata - type: object - required: - - flagged - title: ModerationObjectResults - description: A moderation object. - NumberType: - properties: - type: - type: string - const: number - title: Type - default: number - type: object - title: NumberType - description: Parameter type for numeric values. - ObjectType: - properties: - type: - type: string - const: object - title: Type - default: object - type: object - title: ObjectType - description: Parameter type for object values. - OpenAIAssistantMessageParam-Input: - properties: - role: - type: string - const: assistant - title: Role - default: assistant - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - - type: 'null' - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - title: Tool Calls - type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIAssistantMessageParam-Output: - properties: - role: - type: string - const: assistant - title: Role - default: assistant - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - - type: 'null' - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - title: Tool Calls - type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - - type: 'null' - type: object - required: - - id - - choices - - created - - model - title: OpenAIChatCompletion - description: Response from an OpenAI-compatible chat completion request. - 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. - 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. - 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: - anyOf: - - type: number - - type: 'null' - title: Frequency Penalty - 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 - type: object - - type: 'null' - title: Logit Bias - logprobs: - anyOf: - - type: boolean - - type: 'null' - title: Logprobs - max_completion_tokens: - anyOf: - - type: integer - - type: 'null' - title: Max Completion Tokens - max_tokens: - anyOf: - - type: integer - - type: 'null' - title: Max Tokens - n: - anyOf: - - type: integer - - type: 'null' - title: N - parallel_tool_calls: - anyOf: - - type: boolean - - type: 'null' - title: Parallel Tool Calls - presence_penalty: - anyOf: - - type: number - - type: 'null' - title: Presence Penalty - 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 - seed: - anyOf: - - type: integer - - type: 'null' - title: Seed - stop: - anyOf: - - type: string - - items: - type: string - type: array - - type: 'null' - title: Stop - stream: - anyOf: - - type: boolean - - type: 'null' - title: Stream - stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Stream Options - temperature: - anyOf: - - type: number - - type: 'null' - title: Temperature - 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 - top_logprobs: - anyOf: - - type: integer - - type: 'null' - title: Top Logprobs - top_p: - anyOf: - - type: number - - type: 'null' - title: Top P - user: - anyOf: - - type: string - - type: 'null' - title: User - additionalProperties: true - type: object - required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible chat completion endpoint. - OpenAIChatCompletionToolCall: - properties: - index: - anyOf: - - type: integer - - type: 'null' - title: Index - id: - anyOf: - - type: string - - type: 'null' - title: Id - type: - type: string - const: function - title: Type - default: function - function: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - - type: 'null' - type: object - title: OpenAIChatCompletionToolCall - description: Tool call specification for OpenAI-compatible chat completion responses. - OpenAIChatCompletionToolCallFunction: - properties: - name: - anyOf: - - type: string - - type: 'null' - title: Name - arguments: - anyOf: - - type: string - - type: 'null' - title: Arguments - type: object - title: OpenAIChatCompletionToolCallFunction - description: Function call details for OpenAI-compatible tool calls. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' - - type: 'null' - completion_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' - - type: 'null' - type: object - required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - description: Usage information for OpenAI chat completion. - OpenAIChatCompletionUsageCompletionTokensDetails: - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - title: Reasoning Tokens - type: object - title: OpenAIChatCompletionUsageCompletionTokensDetails - description: Token details for output tokens in OpenAI chat completion usage. - OpenAIChatCompletionUsagePromptTokensDetails: - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - title: Cached Tokens - type: object - title: OpenAIChatCompletionUsagePromptTokensDetails - description: Token details for prompt tokens in OpenAI chat completion usage. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - - type: 'null' - type: object - required: - - message - - finish_reason - - index - title: OpenAIChoice - description: A choice from an OpenAI-compatible chat completion response. - OpenAIChoiceLogprobs-Output: - properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - type: object - title: OpenAIChoiceLogprobs - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. - 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. - - :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" - OpenAICompletionChoice-Output: - properties: - finish_reason: - type: string - title: Finish Reason - text: - type: string - title: Text - index: - type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - - type: 'null' - type: object - required: - - finish_reason - - text - - index - title: 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 - 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: - anyOf: - - type: integer - - type: 'null' - title: Best Of - echo: - anyOf: - - type: boolean - - type: 'null' - title: Echo - frequency_penalty: - anyOf: - - type: number - - type: 'null' - title: Frequency Penalty - logit_bias: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - title: Logit Bias - logprobs: - anyOf: - - type: boolean - - type: 'null' - title: Logprobs - max_tokens: - anyOf: - - type: integer - - type: 'null' - title: Max Tokens - n: - anyOf: - - type: integer - - type: 'null' - title: N - presence_penalty: - anyOf: - - type: number - - type: 'null' - title: Presence Penalty - seed: - anyOf: - - type: integer - - type: 'null' - title: Seed - stop: - anyOf: - - type: string - - items: - type: string - type: array - - type: 'null' - title: Stop - stream: - anyOf: - - type: boolean - - type: 'null' - title: Stream - stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Stream Options - temperature: - anyOf: - - type: number - - type: 'null' - title: Temperature - top_p: - anyOf: - - type: number - - type: 'null' - title: Top P - user: - anyOf: - - type: string - - type: 'null' - title: User - suffix: - anyOf: - - type: string - - type: 'null' - title: Suffix - additionalProperties: true - type: object - required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible completion endpoint. - OpenAICompletionWithInputMessages: - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - - type: 'null' - input_messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' - - $ref: '#/components/schemas/OpenAISystemMessageParam' - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' - - $ref: '#/components/schemas/OpenAIToolMessageParam' - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - 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' - type: array - title: Input Messages - type: object - required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - properties: - file_ids: - items: - type: string - type: array - title: File Ids - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Attributes - 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 - additionalProperties: true - type: object - required: - - file_ids - title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - description: Request to create a vector store file batch with extra_body support. - OpenAICreateVectorStoreRequestWithExtraBody: - properties: - name: - anyOf: - - type: string - - type: 'null' - title: Name - file_ids: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: File Ids - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Expires After - 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 - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata - additionalProperties: true - type: object - title: OpenAICreateVectorStoreRequestWithExtraBody - description: Request to create a vector store with extra_body support. - OpenAIDeleteResponseObject: - properties: - id: - type: string - title: Id - object: - type: string - const: response - title: Object - default: response - deleted: - type: boolean - title: Deleted - default: true - type: object - required: - - id - title: OpenAIDeleteResponseObject - description: Response object confirming deletion of an OpenAI response. - 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: - anyOf: - - type: string - - type: 'null' - title: Name - type: object - required: - - content - title: OpenAIDeveloperMessageParam - description: A message from the developer in an OpenAI-compatible chat completion request. - 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. - 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. - OpenAIEmbeddingsRequestWithExtraBody: - properties: - model: - type: string - title: Model - input: - anyOf: - - type: string - - items: - type: string - type: array - title: Input - encoding_format: - anyOf: - - type: string - - type: 'null' - title: Encoding Format - default: float - dimensions: - anyOf: - - type: integer - - type: 'null' - title: Dimensions - user: - anyOf: - - type: string - - type: 'null' - title: User - additionalProperties: true - type: object - required: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody - description: Request parameters for OpenAI-compatible embeddings endpoint. - 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. - OpenAIFile: - properties: - type: - type: string - const: file - title: Type - default: file - file: - $ref: '#/components/schemas/OpenAIFileFile' - type: object - required: - - file - title: OpenAIFile - OpenAIFileDeleteResponse: - properties: - id: - type: string - title: Id - object: - type: string - const: file - title: Object - default: file - deleted: - type: boolean - title: Deleted - type: object - required: - - id - - deleted - title: OpenAIFileDeleteResponse - description: Response for deleting a file in OpenAI Files API. - 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 - 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. - OpenAIFilePurpose: - type: string - enum: - - assistants - - batch - title: OpenAIFilePurpose - description: Valid purpose values for OpenAI Files API. - OpenAIImageURL: - properties: - url: - type: string - title: Url - detail: - anyOf: - - type: string - - type: 'null' - title: Detail - type: object - required: - - url - title: OpenAIImageURL - description: Image URL specification for OpenAI-compatible chat completion messages. - OpenAIJSONSchema: - properties: - name: - type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - title: Description - strict: - anyOf: - - type: boolean - - type: 'null' - title: Strict - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Schema - type: object - title: OpenAIJSONSchema - description: JSON schema specification for OpenAI-compatible structured response format. - OpenAIListModelsResponse: - properties: - data: - items: - $ref: '#/components/schemas/OpenAIModel' - type: array - title: Data - type: object - required: - - data - title: OpenAIListModelsResponse - OpenAIModel: - properties: - id: - type: string - title: Id - object: - type: string - const: model - title: Object - default: model - created: - type: integer - title: Created - owned_by: - type: string - title: Owned By - custom_metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Custom Metadata - type: object - required: - - id - - created - - owned_by - title: OpenAIModel - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata - 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. - 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. - 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. - 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. - 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. - 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. - 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. - 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: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - 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: - anyOf: - - type: string - - type: 'null' - title: File Data - file_id: - anyOf: - - type: string - - type: 'null' - title: File Id - file_url: - anyOf: - - type: string - - type: 'null' - title: File Url - filename: - anyOf: - - type: string - - type: 'null' - title: Filename - type: object - title: OpenAIResponseInputMessageContentFile - description: File content for input messages in OpenAI response format. - 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: - anyOf: - - type: string - - type: 'null' - title: File Id - image_url: - anyOf: - - type: string - - type: 'null' - title: Image Url - type: object - title: OpenAIResponseInputMessageContentImage - description: Image content for input messages in OpenAI response format. - 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. - 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: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Filters - max_num_results: - anyOf: - - type: integer - maximum: 50.0 - minimum: 1.0 - - type: 'null' - title: Max Num Results - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - - type: 'null' - type: object - required: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch - description: File search tool configuration for OpenAI response inputs. - OpenAIResponseInputToolFunction: - properties: - type: - type: string - const: function - title: Type - default: function - name: - type: string - title: Name - 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 - type: object - required: - - name - - parameters - title: OpenAIResponseInputToolFunction - description: Function tool configuration for OpenAI response inputs. - OpenAIResponseInputToolWebSearch: - properties: - type: - anyOf: - - type: string - const: web_search - - type: string - const: web_search_preview - - type: string - const: web_search_preview_2025_03_11 - - type: string - const: web_search_2025_08_26 - title: Type - default: web_search - search_context_size: - anyOf: - - type: string - pattern: ^low|medium|high$ - - type: 'null' - title: Search Context Size - default: medium - type: object - title: OpenAIResponseInputToolWebSearch - description: Web search tool configuration for OpenAI response inputs. - 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: - anyOf: - - type: string - - type: 'null' - title: Id - reason: - anyOf: - - type: string - - type: 'null' - title: Reason - 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: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - 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. - 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: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - - type: 'null' - 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: - anyOf: - - type: string - - type: 'null' - title: Previous Response Id - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - - type: 'null' - status: - type: string - title: Status - temperature: - anyOf: - - type: number - - type: 'null' - title: Temperature - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - title: Top P - tools: - anyOf: - - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - type: array - - type: 'null' - title: Tools - truncation: - anyOf: - - type: string - - type: 'null' - title: Truncation - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - - type: 'null' - instructions: - anyOf: - - type: string - - type: 'null' - title: Instructions - type: object - required: - - created_at - - id - - model - - output - - status - title: OpenAIResponseObject - description: Complete OpenAI response object containing generation results and metadata. - 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: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' - type: array - - type: 'null' - title: Results - type: object - required: - - id - - queries - - status - title: OpenAIResponseOutputMessageFileSearchToolCall - description: File search tool call output message for OpenAI responses. - 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. - 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: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - type: object - required: - - call_id - - name - - arguments - title: OpenAIResponseOutputMessageFunctionToolCall - description: Function tool call output message for OpenAI responses. - 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: - anyOf: - - type: string - - type: 'null' - title: Error - output: - anyOf: - - type: string - - type: 'null' - title: Output - type: object - required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - description: Model Context Protocol (MCP) call output message for OpenAI responses. - 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. - 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. - OpenAIResponsePrompt: - properties: - id: - 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 - version: - anyOf: - - type: string - - type: 'null' - title: Version - type: object - required: - - id - title: OpenAIResponsePrompt - description: OpenAI compatible Prompt object that is used in OpenAI responses. - OpenAIResponseText: - properties: - format: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseTextFormat' - - type: 'null' - type: object - title: OpenAIResponseText - description: Text response configuration for OpenAI responses. - OpenAIResponseTextFormat: - properties: - type: - anyOf: - - type: string - const: text - - type: string - const: json_schema - - type: string - const: json_object - 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 - type: object - title: OpenAIResponseTextFormat - description: Configuration for Responses API text format. - 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' - - type: 'null' - title: Allowed Tools - type: object - required: - - server_label - title: OpenAIResponseToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' - - type: 'null' - output_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' - - type: 'null' - type: object - required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - description: Usage information for OpenAI response. - OpenAIResponseUsageInputTokensDetails: - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - title: Cached Tokens - type: object - title: OpenAIResponseUsageInputTokensDetails - description: Token details for input tokens in OpenAI response usage. - OpenAIResponseUsageOutputTokensDetails: - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - title: Reasoning Tokens - type: object - title: OpenAIResponseUsageOutputTokensDetails - description: Token details for output tokens in OpenAI response usage. - 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: - anyOf: - - type: string - - type: 'null' - title: Name - type: object - required: - - content - title: OpenAISystemMessageParam - description: A system message providing instructions or context to the model. - OpenAITokenLogProb: - properties: - token: - type: string - title: Token - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - 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. - - :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 - 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. - OpenAITopLogProb: - properties: - token: - type: string - title: Token - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - 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. - - :token: The token - :bytes: (Optional) The bytes for the token - :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: - anyOf: - - type: string - - type: 'null' - title: Name - type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - 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: - anyOf: - - type: string - - type: 'null' - title: Name - type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - 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. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: Available optimizer algorithms for training. - Order: - type: string - enum: - - asc - - desc - title: Order - description: Sort order for paginated responses. - 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 - 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. - 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. - QATFinetuningConfig: - properties: - type: - type: string - const: QAT - title: Type - default: QAT - quantizer_name: - type: string - title: Quantizer Name - group_size: - type: integer - title: Group Size - type: object - required: - - quantizer_name - - group_size - title: QATFinetuningConfig - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - 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. - 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. - 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. - RerankResponse: - properties: - data: - items: - $ref: '#/components/schemas/RerankData' - type: array - title: Data - type: object - required: - - data - title: RerankResponse - description: Response from a reranking request. - 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. - RunShieldResponse: - properties: - violation: - anyOf: - - $ref: '#/components/schemas/SafetyViolation' - - type: 'null' - type: object - title: RunShieldResponse - description: Response from running a safety shield. - SafetyViolation: - properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - user_message: - anyOf: - - type: string - - type: 'null' - title: User Message - metadata: - additionalProperties: true - type: object - title: Metadata - type: object - required: - - violation_level - title: SafetyViolation - description: Details of a safety violation detected by content moderation. - 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: - anyOf: - - type: integer - - type: 'null' - title: Max Tokens - repetition_penalty: - anyOf: - - type: number - - type: 'null' - title: Repetition Penalty - default: 1.0 - stop: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Stop - type: object - title: SamplingParams - description: Sampling parameters. - ScoreBatchResponse: - properties: - dataset_id: - anyOf: - - type: string - - type: 'null' - title: Dataset Id - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results - type: object - required: - - results - title: ScoreBatchResponse - description: Response from batch scoring operations on datasets. - ScoreResponse: - properties: - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results - type: object - required: - - results - title: ScoreResponse - description: The response from scoring. - ScoringFn: - properties: - identifier: - type: string - 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 - 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: - anyOf: - - type: string - - type: 'null' - title: Description - 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' - title: Return Type - description: The return type of the deterministic function - discriminator: - propertyName: type - mapping: - 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: - 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 - type: object - required: - - identifier - - provider_id - - return_type - title: ScoringFn - description: A scoring function resource for evaluating model outputs. - 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. - SearchRankingOptions: - properties: - ranker: - anyOf: - - type: string - - type: 'null' - title: Ranker - score_threshold: - anyOf: - - type: number - - type: 'null' - title: Score Threshold - default: 0.0 - type: object - title: SearchRankingOptions - description: Options for ranking and filtering search results. - Shield: - properties: - identifier: - type: string - 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 - 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: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Params - type: object - required: - - identifier - - provider_id - title: Shield - description: A safety shield resource that can be used to check content. - StringType: - properties: - type: - type: string - const: string - title: Type - default: string - type: object - title: StringType - description: Parameter type for string values. - 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. - 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 - ToolDef: - properties: - toolgroup_id: - anyOf: - - type: string - - type: 'null' - title: Toolgroup Id - name: - type: string - title: Name - 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 - type: object - required: - - name - title: ToolDef - description: Tool definition used in runtime contexts. - ToolGroup: - properties: - identifier: - type: string - 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 - 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: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Args - type: object - required: - - identifier - - provider_id - title: ToolGroup - description: A group of related tools managed together. - 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 - - type: 'null' - title: Content - error_message: - anyOf: - - type: string - - type: 'null' - title: Error Message - error_code: - anyOf: - - type: integer - - type: 'null' - title: Error Code - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata - type: object - title: ToolInvocationResult - description: Result of a tool invocation. - 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. - TopPSamplingStrategy: - properties: - type: - type: string - const: top_p - title: Type - default: top_p - temperature: - anyOf: - - type: number - minimum: 0.0 - - type: 'null' - title: Temperature - top_p: - anyOf: - - type: number - - type: 'null' - title: Top P - default: 0.95 - type: object - required: - - temperature - title: TopPSamplingStrategy - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. - 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: - anyOf: - - type: integer - - type: 'null' - title: Max Validation Steps - default: 1 - data_config: - anyOf: - - $ref: '#/components/schemas/DataConfig' - - type: 'null' - optimizer_config: - anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - - type: 'null' - efficiency_config: - anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - - type: 'null' - dtype: - anyOf: - - type: string - - type: 'null' - title: Dtype - default: bf16 - type: object - required: - - n_epochs - title: TrainingConfig - description: Comprehensive configuration for the training process. - 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. - URL: - properties: - uri: - type: string - title: Uri - type: object - required: - - uri - title: URL - description: A URL reference to external content. - UnionType: - properties: - type: - type: string - const: union - title: Type - default: union - type: object - title: UnionType - description: Parameter type for union values. - VectorStoreChunkingStrategyAuto: - properties: - type: - type: string - const: auto - title: Type - default: auto - type: object - title: VectorStoreChunkingStrategyAuto - description: Automatic chunking strategy for vector store files. - 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. - 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. - 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. - VectorStoreDeleteResponse: - properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store.deleted - deleted: - type: boolean - title: Deleted - default: true - type: object - required: - - id - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - 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. - VectorStoreFileContentsResponse: - properties: - file_id: - type: string - title: File Id - filename: - type: string - title: Filename - attributes: - additionalProperties: true - type: object - title: Attributes - content: - items: - $ref: '#/components/schemas/VectorStoreContent' - type: array - title: Content - type: object - required: - - file_id - - filename - - attributes - - content - title: VectorStoreFileContentsResponse - description: Response from retrieving the contents of a vector store file. - 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. - VectorStoreFileDeleteResponse: - properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store.file.deleted - deleted: - type: boolean - title: Deleted - default: true - type: object - required: - - id - title: VectorStoreFileDeleteResponse - description: Response from deleting a vector store file. - 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. - 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: - anyOf: - - $ref: '#/components/schemas/VectorStoreFileLastError' - - type: 'null' - 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. - VectorStoreObject: - properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store - created_at: - type: integer - title: Created At - name: - anyOf: - - type: string - - type: 'null' - title: Name - usage_bytes: - type: integer - title: Usage Bytes - default: 0 - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - status: - type: string - title: Status - default: completed - 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 - type: object - title: Metadata - type: object - required: - - id - - created_at - - file_counts - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreSearchResponse: - properties: - file_id: - type: string - title: File Id - filename: - type: string - title: Filename - score: - type: number - title: Score - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - type: object - - type: 'null' - title: Attributes - 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. - VectorStoreSearchResponsePage: - properties: - object: - type: string - title: Object - default: vector_store.search_results.page - search_query: - items: - type: string - type: array - title: Search Query - data: - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - type: array - title: Data - has_more: - type: boolean - title: Has More - default: false - next_page: - anyOf: - - type: string - - type: 'null' - title: Next Page - type: object - required: - - search_query - - data - title: VectorStoreSearchResponsePage - description: Paginated response from searching a vector store. - VersionInfo: - properties: - version: - type: string - title: Version - type: object - required: - - version - title: VersionInfo - description: Version information for the service. - ViolationLevel: - type: string - enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - _URLOrData: - properties: - url: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - title: Data - type: object - title: _URLOrData - description: A URL or a base64 encoded string - _batches_Request: - properties: - input_file_id: - type: string - title: Input File Id - endpoint: - type: string - title: Endpoint - completion_window: - type: string - const: 24h - title: Completion Window - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - title: Metadata - idempotency_key: - anyOf: - - type: string - - type: 'null' - title: Idempotency Key - type: object - required: - - input_file_id - - endpoint - - completion_window - title: _batches_Request - _conversations_Request: - properties: - items: - anyOf: - - 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' - 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' - type: array - - type: 'null' - title: Items - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - title: Metadata - type: object - title: _conversations_Request - _conversations_conversation_id_Request: - properties: - metadata: - additionalProperties: - type: string - type: object - title: Metadata - type: object - required: - - metadata - title: _conversations_conversation_id_Request - _conversations_conversation_id_items_Request: - properties: - items: - 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' - 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' - type: array - title: Items - type: object - required: - - items - title: _conversations_conversation_id_items_Request - _models_Request: - properties: - model_id: - type: string - title: Model Id - provider_model_id: - anyOf: - - type: string - - type: 'null' - title: Provider Model Id - provider_id: - anyOf: - - type: string - - type: 'null' - title: Provider Id - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata - model_type: - anyOf: - - $ref: '#/components/schemas/ModelType' - - type: 'null' - type: object - required: - - model_id - title: _models_Request - _moderations_Request: - properties: - input: - anyOf: - - type: string - - items: - type: string - type: array - title: Input - model: - anyOf: - - type: string - - type: 'null' - title: Model - type: object - required: - - input - title: _moderations_Request - _prompts_Request: + description: 'Path parameter: item_id' +components: + schemas: + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: Types of aggregation functions for scoring results. + AllowedToolsFilter: properties: - prompt: - type: string - title: Prompt - variables: + tool_names: anyOf: - items: type: string type: array - type: 'null' - title: Variables + title: Tool Names type: object - required: - - prompt - title: _prompts_Request - _prompts_prompt_id_Request: + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ArrayType: properties: - prompt: + type: type: string - title: Prompt - version: - type: integer - title: Version - variables: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Variables - set_as_default: - type: boolean - title: Set As Default - default: true - type: object - required: - - prompt - - version - title: _prompts_prompt_id_Request - _prompts_prompt_id_set_default_version_Request: - properties: - version: - type: integer - title: Version - type: object - required: - - version - title: _prompts_prompt_id_set_default_version_Request - _responses_Request: - properties: - input: - title: Input - model: - title: Model - prompt: - title: Prompt - instructions: - title: Instructions - previous_response_id: - title: Previous Response Id - conversation: - title: Conversation - store: - title: Store - default: true - stream: - title: Stream - default: false - temperature: - title: Temperature - text: - title: Text - tools: - title: Tools - include: - title: Include - max_infer_iters: - title: Max Infer Iters - default: 10 - guardrails: - title: Guardrails - type: object - required: - - input - - model - title: _responses_Request - _scoring_score_Request: - properties: - input_rows: - items: - additionalProperties: true - type: object - type: array - title: Input Rows - scoring_functions: - additionalProperties: - 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' - type: object - title: Scoring Functions + const: array + title: Type + default: array type: object - required: - - input_rows - - scoring_functions - title: _scoring_score_Request - _scoring_score_batch_Request: + title: ArrayType + description: Parameter type for array values. + BasicScoringFnParams: properties: - dataset_id: + type: type: string - title: Dataset Id - scoring_functions: - additionalProperties: - 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' - type: object - title: Scoring Functions - save_results_dataset: - type: boolean - title: Save Results Dataset - default: false + 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 - required: - - dataset_id - - scoring_functions - title: _scoring_score_batch_Request - _shields_Request: + title: BasicScoringFnParams + description: Parameters for basic scoring function configuration. + Batch: properties: - shield_id: + id: type: string - title: Shield Id - provider_shield_id: + 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: anyOf: - - type: string + - type: integer - type: 'null' - title: Provider Shield Id - provider_id: + title: Cancelled At + cancelling_at: anyOf: - - type: string + - type: integer - type: 'null' - title: Provider Id - params: + title: Cancelling At + completed_at: anyOf: - - additionalProperties: true - type: object + - type: integer - type: 'null' - title: Params - type: object - required: - - shield_id - title: _shields_Request - _tool_runtime_invoke_Request: - properties: - tool_name: - type: string - title: Tool Name - kwargs: - additionalProperties: true - type: object - title: Kwargs - type: object - required: - - tool_name - - kwargs - title: _tool_runtime_invoke_Request - _vector_io_query_Request: - properties: - vector_store_id: - type: string - title: Vector Store Id - query: + title: Completed At + error_file_id: 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: Query - params: + - type: 'null' + title: Error File Id + errors: anyOf: - - additionalProperties: true - type: object + - $ref: '#/components/schemas/Errors' - type: 'null' - title: Params - type: object - required: - - vector_store_id - - query - title: _vector_io_query_Request - _vector_stores_vector_store_id_Request: - properties: - name: + expired_at: anyOf: - - type: string + - type: integer - type: 'null' - title: Name - expires_after: + title: Expired At + expires_at: anyOf: - - additionalProperties: true - type: object + - type: integer - type: 'null' - title: Expires After - metadata: + title: Expires At + failed_at: anyOf: - - additionalProperties: true - type: object + - type: integer - type: 'null' - title: Metadata - type: object - title: _vector_stores_vector_store_id_Request - _vector_stores_vector_store_id_files_Request: - properties: - file_id: - type: string - title: File Id - attributes: + title: Failed At + finalizing_at: anyOf: - - additionalProperties: true - type: object + - type: integer - type: 'null' - title: Attributes - chunking_strategy: + title: Finalizing At + in_progress_at: anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + - type: integer - type: 'null' - title: Chunking Strategy - type: object - required: - - file_id - title: _vector_stores_vector_store_id_files_Request - _vector_stores_vector_store_id_files_file_id_Request: - properties: - attributes: - additionalProperties: true - type: object - title: Attributes - type: object - required: - - attributes - title: _vector_stores_vector_store_id_files_file_id_Request - _vector_stores_vector_store_id_search_Request: - properties: - query: + title: In Progress At + metadata: anyOf: - - type: string - - items: + - additionalProperties: type: string - type: array - title: Query - filters: - anyOf: - - additionalProperties: true type: object - type: 'null' - title: Filters - max_num_results: + title: Metadata + model: anyOf: - - type: integer + - type: string - type: 'null' - title: Max Num Results - default: 10 - ranking_options: + title: Model + output_file_id: anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' + - type: string - type: 'null' - rewrite_query: + title: Output File Id + request_counts: anyOf: - - type: boolean + - $ref: '#/components/schemas/BatchRequestCounts' - type: 'null' - title: Rewrite Query - default: false - search_mode: + usage: anyOf: - - type: string + - $ref: '#/components/schemas/BatchUsage' - type: 'null' - title: Search Mode - default: vector + additionalProperties: true type: object required: - - query - title: _vector_stores_vector_store_id_search_Request - Error: - description: Error response from the API. Roughly follows RFC 7807. + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + BatchError: properties: - status: - title: Status - type: integer - title: - title: Title - type: string - detail: - title: Detail - type: string - instance: + code: + anyOf: + - type: string + - type: 'null' + title: Code + line: + anyOf: + - type: integer + - type: 'null' + title: Line + message: + anyOf: + - type: string + - type: 'null' + title: Message + param: anyOf: - type: string - type: 'null' - title: Instance - nullable: true - required: - - status - - title - - detail - title: Error + title: Param + additionalProperties: true type: object - ImageContentItem: - description: A image content item + title: BatchError + BatchRequestCounts: properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/components/schemas/_URLOrData' + completed: + type: integer + title: Completed + failed: + type: integer + title: Failed + total: + type: integer + title: Total + additionalProperties: true + type: object required: - - image - title: ImageContentItem + - 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 - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - BuiltinTool: - enum: - - brave_search - - wolfram_alpha - - photogen - - code_interpreter - title: BuiltinTool - type: string - ImageDelta: - description: An image content delta for streaming responses. + required: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage + Benchmark: properties: - type: - const: image - default: image - title: Type + identifier: type: string - image: - format: binary - title: Image + 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 + provider_id: type: string - required: - - image - title: ImageDelta - type: object - TextDelta: - description: A text content delta for streaming responses. - properties: + title: Provider Id + description: ID of the provider that owns this resource type: - const: text - default: text - title: Type type: string - text: - title: Text + 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: - - text - title: TextDelta + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark + description: A benchmark resource for evaluating model performance. + BenchmarkConfig: + properties: + eval_candidate: + $ref: '#/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: + 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: object - ToolCall: + required: + - eval_candidate + title: BenchmarkConfig + description: A benchmark configuration for evaluation. + Body_openai_upload_file_v1_files_post: properties: - call_id: - title: Call Id + file: type: string - tool_name: + format: binary + title: File + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + expires_after: anyOf: - - $ref: '#/components/schemas/BuiltinTool' - - type: string - title: Tool Name - arguments: - title: Arguments - type: string - required: - - call_id - - tool_name - - arguments - title: ToolCall + - $ref: '#/components/schemas/ExpiresAfter' + - type: 'null' type: object - ToolCallDelta: - description: A tool call content delta for streaming responses. + required: + - file + - purpose + title: Body_openai_upload_file_v1_files_post + BooleanType: properties: type: - const: tool_call - default: tool_call - title: Type type: string - tool_call: - anyOf: - - type: string - - $ref: '#/components/schemas/ToolCall' - title: Tool Call - parse_status: - $ref: '#/components/schemas/ToolCallParseStatus' - required: - - tool_call - - parse_status - title: ToolCallDelta + const: boolean + title: Type + default: boolean type: object - ToolCallParseStatus: - description: Status of tool call parsing during streaming. - enum: - - started - - in_progress - - failed - - succeeded - title: ToolCallParseStatus - type: string - ContentDelta: - discriminator: - mapping: - image: '#/components/schemas/ImageDelta' - text: '#/components/schemas/TextDelta' - tool_call: '#/components/schemas/ToolCallDelta' - propertyName: type - oneOf: - - $ref: '#/components/schemas/TextDelta' - - $ref: '#/components/schemas/ImageDelta' - - $ref: '#/components/schemas/ToolCallDelta' - ToolDefinition: + title: BooleanType + description: Parameter type for boolean values. + ChatCompletionInputType: properties: - tool_name: - anyOf: - - $ref: '#/components/schemas/BuiltinTool' - - type: string - title: Tool Name - description: + type: + type: string + const: chat_completion_input + title: Type + default: chat_completion_input + type: object + title: ChatCompletionInputType + description: Parameter type for chat completion input. + Chunk-Input: + properties: + content: anyOf: - type: string - - type: 'null' - title: Description - nullable: true - input_schema: + - 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 + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: anyOf: - - additionalProperties: true - type: object + - items: + type: number + type: array - type: 'null' - title: Input Schema - nullable: true - output_schema: + title: Embedding + chunk_metadata: anyOf: - - additionalProperties: true - type: object + - $ref: '#/components/schemas/ChunkMetadata' - type: 'null' - title: Output Schema - nullable: true - required: - - tool_name - title: ToolDefinition type: object - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - - $ref: '#/components/schemas/TopPSamplingStrategy' - - $ref: '#/components/schemas/TopKSamplingStrategy' - CompletionMessage: - description: A message containing the model's (assistant) response in a chat conversation. + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + Chunk-Output: properties: - role: - const: assistant - default: assistant - title: Role - type: string content: anyOf: - type: string - - discriminator: + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type mapping: - image: '#/components/schemas/ImageContentItem' + image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' discriminator: + propertyName: type mapping: - image: '#/components/schemas/ImageContentItem' + image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' type: array title: Content - stop_reason: - $ref: '#/components/schemas/StopReason' - tool_calls: + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: anyOf: - items: - $ref: '#/components/schemas/ToolCall' + type: number type: array - type: 'null' - title: Tool Calls + title: Embedding + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + - type: 'null' + type: object required: - content - - stop_reason - title: CompletionMessage + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + ChunkMetadata: + 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 + type: object + title: 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. + CompletionInputType: + properties: + type: + type: string + const: completion_input + title: Type + default: completion_input + type: object + title: CompletionInputType + description: Parameter type for 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: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + 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. + items: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + title: Items + description: Initial items to include in the conversation context. You may add up to 20 items at a time. + type: object + required: + - id + - created_at + title: Conversation + description: OpenAI-compatible conversation object. + ConversationDeletedResource: + properties: + id: + type: string + title: Id + description: The deleted conversation identifier + object: + type: string + title: Object + description: Object type + default: conversation.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true type: object - StopReason: - enum: - - end_of_turn - - end_of_message - - out_of_tokens - title: StopReason - type: string - ToolResponseMessage: - description: A message representing the result of a tool invocation. + required: + - id + title: ConversationDeletedResource + description: Response for deleted conversation. + ConversationItemDeletedResource: properties: - role: - const: tool - default: tool - title: Role + id: type: string - call_id: - title: Call Id + title: Id + description: The deleted item identifier + object: type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - title: Content - required: - - call_id - - content - title: ToolResponseMessage + title: Object + description: Object type + default: conversation.item.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true type: object - UserMessage: - description: A message from the user in a chat conversation. + required: + - id + title: ConversationItemDeletedResource + description: Response for deleted conversation item. + 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: - role: - const: user - default: user - title: Role + object: type: string - content: + 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: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - title: Content - context: + - type: 'null' + title: First Id + description: The ID of the first item in the list + last_id: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - type: 'null' - title: Context - nullable: true - required: - - content - title: UserMessage + title: Last Id + description: The ID of the last item in the list + has_more: + type: boolean + title: Has More + description: Whether there are more items available + default: false type: object - Message: - discriminator: - mapping: - assistant: '#/components/schemas/CompletionMessage' - system: '#/components/schemas/SystemMessage' - tool: '#/components/schemas/ToolResponseMessage' - user: '#/components/schemas/UserMessage' - propertyName: role - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object required: - - bnf - title: GrammarResponseFormat - type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. + - data + title: ConversationItemList + description: List of conversation items with pagination. + DPOAlignmentConfig: 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 + beta: + type: number + title: Beta + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid type: object - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - - $ref: '#/components/schemas/GrammarResponseFormat' - OpenAIChatCompletionContentPartParam: - 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' - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + required: + - beta + title: DPOAlignmentConfig + description: Configuration for Direct Preference Optimization (DPO) alignment. + DPOLossType: + type: string + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + DataConfig: properties: - role: - const: assistant - default: assistant - title: Role + dataset_id: type: string - content: + title: Dataset Id + batch_size: + type: integer + title: Batch Size + shuffle: + type: boolean + title: Shuffle + data_format: + $ref: '#/components/schemas/DatasetFormat' + validation_dataset_id: anyOf: - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - type: 'null' - title: Content - nullable: true - name: + title: Validation Dataset Id + packed: anyOf: - - type: string + - type: boolean - type: 'null' - title: Name - nullable: true - tool_calls: + title: Packed + default: false + train_on_input: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - type: boolean - type: 'null' - title: Tool Calls - nullable: true - title: OpenAIAssistantMessageParam + title: Train On Input + default: false type: object - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: Configuration for training data and data loading. + Dataset: properties: - role: - const: user - default: user - title: Role + identifier: 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: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: anyOf: - type: string - type: 'null' - title: Name - nullable: true - required: - - content - title: OpenAIUserMessageParam + title: Provider Resource Id + description: Unique identifier for this resource in the provider + 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 - OpenAIMessageParam: - 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' - OpenAIResponseFormatParam: - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - VectorStoreFileStatus: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - OpenAIResponseInputMessageContent: - 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' - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - 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. + required: + - identifier + - provider_id + - purpose + - source + title: Dataset + description: Dataset resource for storing and accessing training or evaluation data. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + 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. + EfficiencyConfig: properties: - content: + enable_activation_checkpointing: 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: + - type: boolean + - type: 'null' + title: Enable Activation Checkpointing + default: false + enable_activation_offloading: 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: + - type: boolean + - type: 'null' + title: Enable Activation Offloading + default: false + memory_efficient_fsdp_wrap: anyOf: - - type: string + - type: boolean - type: 'null' - title: Id - nullable: true - status: + title: Memory Efficient Fsdp Wrap + default: false + fsdp_cpu_offload: anyOf: - - type: string + - type: boolean - type: 'null' - title: Status - nullable: true - required: - - content - - role - title: OpenAIResponseMessage + title: Fsdp Cpu Offload + default: false type: object - OpenAIResponseOutput: - 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' - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. + Errors: properties: - always: + data: anyOf: - items: - type: string + $ref: '#/components/schemas/BatchError' type: array - type: 'null' - title: Always - nullable: true - never: + title: Data + object: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' - title: Never - nullable: true - title: ApprovalFilter + title: Object + additionalProperties: true type: object - OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + title: Errors + EvaluateResponse: properties: - type: - const: mcp - default: mcp - title: Type - type: string - server_label: - title: Server Label - type: string - server_url: - title: Server Url - type: string - headers: - anyOf: - - additionalProperties: true + generations: + items: + additionalProperties: true type: object - - type: 'null' - title: Headers - nullable: true - require_approval: - anyOf: - - const: always - type: string - - const: never - type: string - - $ref: '#/components/schemas/ApprovalFilter' - default: never - title: Require Approval - allowed_tools: - anyOf: - - items: - type: string - type: array - - $ref: '#/components/schemas/AllowedToolsFilter' - - type: 'null' - title: Allowed Tools - nullable: true + type: array + title: Generations + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Scores + type: object required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP + - generations + - scores + title: EvaluateResponse + description: The response from an evaluation. + ExpiresAfter: + properties: + anchor: + type: string + const: created_at + title: Anchor + seconds: + type: integer + maximum: 2592000.0 + minimum: 3600.0 + title: Seconds type: object - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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/OpenAIResponseInputToolMCP' - OpenAIResponseTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - OpenAIResponseContentPartOutputText: - description: Text content within a streamed response part. + required: + - anchor + - seconds + title: 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) + GreedySamplingStrategy: properties: type: - const: output_text - default: output_text + 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. + HealthInfo: + properties: + status: + $ref: '#/components/schemas/HealthStatus' + type: object + required: + - status + title: HealthInfo + description: Health status information for the service. + HealthStatus: + type: string + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + ImageContentItem-Input: + properties: + type: type: string - text: - title: Text + const: image + title: Type + default: image + image: + $ref: '#/components/schemas/_URLOrData' + type: object + required: + - image + title: ImageContentItem + description: A image content item + ImageContentItem-Output: + properties: + type: type: string - annotations: - items: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: Annotations - type: array - logprobs: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - title: Logprobs - nullable: true + const: image + title: Type + default: image + image: + $ref: '#/components/schemas/_URLOrData' + type: object required: - - text - title: OpenAIResponseContentPartOutputText + - image + title: ImageContentItem + description: A image content item + InputTokensDetails: + properties: + cached_tokens: + type: integer + title: Cached Tokens + additionalProperties: true type: object - OpenAIResponseContentPartReasoningText: - description: Reasoning text emitted as part of a streamed response. + required: + - cached_tokens + title: InputTokensDetails + Job: properties: - type: - const: reasoning_text - default: reasoning_text - title: Type - type: string - text: - title: Text + job_id: type: string - required: - - text - title: OpenAIResponseContentPartReasoningText + title: Job Id + status: + $ref: '#/components/schemas/JobStatus' type: object - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - OpenAIResponseContentPartReasoningSummary: - description: Reasoning summary part in a streamed response. + required: + - job_id + - status + title: Job + description: A job execution instance with status tracking. + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. + JsonType: properties: type: - const: summary_text - default: summary_text - title: Type - type: string - text: - title: Text type: string - required: - - text - title: OpenAIResponseContentPartReasoningSummary + const: json + title: Type + default: json type: object - OpenAIResponseObjectStreamResponseCompleted: - description: Streaming event indicating a response has been completed. + title: JsonType + description: Parameter type for JSON values. + LLMAsJudgeScoringFnParams: properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' type: - const: response.completed - default: response.completed + type: string + const: llm_as_judge title: Type + default: llm_as_judge + judge_model: type: string + title: Judge Model + prompt_template: + anyOf: + - type: string + - type: 'null' + title: Prompt Template + 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: - - response - title: OpenAIResponseObjectStreamResponseCompleted + - judge_model + title: LLMAsJudgeScoringFnParams + description: Parameters for LLM-as-judge scoring function configuration. + ListPromptsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + type: array + title: Data type: object - OpenAIResponseObjectStreamResponseContentPartAdded: - description: Streaming event for when a new content part is added to a response item. + required: + - data + title: ListPromptsResponse + description: Response model to list prompts. + ListProvidersResponse: properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id + 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. + LoraFinetuningConfig: + properties: + type: type: string - output_index: - title: Output Index + const: LoRA + title: Type + default: LoRA + lora_attn_modules: + items: + type: string + type: array + title: Lora Attn Modules + apply_lora_to_mlp: + type: boolean + title: Apply Lora To Mlp + apply_lora_to_output: + type: boolean + title: Apply Lora To Output + rank: type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: Part - sequence_number: - title: Sequence Number + title: Rank + alpha: type: integer - type: - const: response.content_part.added - default: response.content_part.added - title: Type - type: string - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartAdded + title: Alpha + use_dora: + anyOf: + - type: boolean + - type: 'null' + title: Use Dora + default: false + quantize_base: + anyOf: + - type: boolean + - type: 'null' + title: Quantize Base + default: false type: object - OpenAIResponseObjectStreamResponseContentPartDone: - description: Streaming event for when a content part is completed. + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + MCPListToolsTool: properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: type: string - item_id: - title: Item Id + title: Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + Model: + properties: + identifier: type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: Part - sequence_number: - title: Sequence Number - type: integer + 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 + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource type: - const: response.content_part.done - default: response.content_part.done - title: Type type: string - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartDone + 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 - OpenAIResponseObjectStreamResponseCreated: - description: Streaming event indicating a new response has been created. + required: + - identifier + - provider_id + title: Model + description: A model resource representing an AI model registered in Llama Stack. + ModelCandidate: properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' type: - const: response.created - default: response.created + type: string + const: model title: Type + default: model + model: type: string - required: - - response - title: OpenAIResponseObjectStreamResponseCreated + title: Model + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + - type: 'null' type: object - OpenAIResponseObjectStreamResponseFailed: - description: Streaming event emitted when a response fails. + required: + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + ModelType: + type: string + enum: + - llm + - embedding + - rerank + title: ModelType + description: Enumeration of supported model types in Llama Stack. + ModerationObject: properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.failed - default: response.failed - title: Type + id: type: string + title: Id + model: + type: string + title: Model + results: + items: + $ref: '#/components/schemas/ModerationObjectResults' + type: array + title: Results + type: object required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseFailed + - id + - model + - results + title: ModerationObject + description: A moderation object. + ModerationObjectResults: + properties: + flagged: + type: boolean + title: Flagged + categories: + anyOf: + - additionalProperties: + type: boolean + type: object + - type: 'null' + title: Categories + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + title: Category Applied Input Types + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + title: Category Scores + user_message: + anyOf: + - type: string + - type: 'null' + title: User Message + metadata: + additionalProperties: true + type: object + title: Metadata type: object - OpenAIResponseObjectStreamResponseFileSearchCallCompleted: - description: Streaming event for completed file search calls. + required: + - flagged + title: ModerationObjectResults + description: A moderation object. + NumberType: properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.file_search_call.completed - default: response.file_search_call.completed - title: Type type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + const: number + title: Type + default: number type: object - OpenAIResponseObjectStreamResponseFileSearchCallInProgress: - description: Streaming event for file search calls in progress. + title: NumberType + description: Parameter type for numeric values. + ObjectType: properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - title: Type type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + const: object + title: Type + default: object type: object - OpenAIResponseObjectStreamResponseFileSearchCallSearching: - description: Streaming event for file search currently searching. + title: ObjectType + description: Parameter type for object values. + OpenAIAssistantMessageParam-Input: properties: - item_id: - title: Item Id + role: type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.searching - default: response.file_search_call.searching - title: Type + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: + properties: + role: type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: - description: Streaming event for incremental function call argument updates. + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIChatCompletion: properties: - delta: - title: Delta + id: type: string - item_id: - title: Item Id + title: Id + choices: + items: + $ref: '#/components/schemas/OpenAIChoice-Output' + type: array + title: Choices + object: type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + const: chat.completion + title: Object + default: chat.completion + created: type: integer - type: - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - title: Type + title: Created + model: type: string - required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + title: Model + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: - description: Streaming event for when function call arguments are completed. + required: + - id + - choices + - created + - model + title: OpenAIChatCompletion + description: Response from an OpenAI-compatible chat completion request. + OpenAIChatCompletionContentPartImageParam: properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.function_call_arguments.done - default: response.function_call_arguments.done - title: Type type: string - required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + const: image_url + title: Type + default: image_url + image_url: + $ref: '#/components/schemas/OpenAIImageURL' type: object - OpenAIResponseObjectStreamResponseInProgress: - description: Streaming event indicating the response remains in progress. + required: + - image_url + title: OpenAIChatCompletionContentPartImageParam + description: Image content part for OpenAI-compatible chat completion messages. + OpenAIChatCompletionContentPartTextParam: properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer type: - const: response.in_progress - default: response.in_progress + type: string + const: text title: Type + default: text + text: type: string + title: Text + type: object required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseInProgress + - text + title: OpenAIChatCompletionContentPartTextParam + description: Text content part for OpenAI-compatible chat completion messages. + 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: + anyOf: + - type: number + - type: 'null' + title: Frequency Penalty + 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 + type: object + - type: 'null' + title: Logit Bias + logprobs: + anyOf: + - type: boolean + - type: 'null' + title: Logprobs + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Completion Tokens + max_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + n: + anyOf: + - type: integer + - type: 'null' + title: N + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + title: Parallel Tool Calls + presence_penalty: + anyOf: + - type: number + - type: 'null' + title: Presence Penalty + 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 + seed: + anyOf: + - type: integer + - type: 'null' + title: Seed + stop: + anyOf: + - type: string + - items: + type: string + type: array + - type: 'null' + title: Stop + stream: + anyOf: + - type: boolean + - type: 'null' + title: Stream + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Stream Options + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + 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 + top_logprobs: + anyOf: + - type: integer + - type: 'null' + title: Top Logprobs + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + user: + anyOf: + - type: string + - type: 'null' + title: User + additionalProperties: true type: object - OpenAIResponseObjectStreamResponseIncomplete: - description: Streaming event emitted when a response ends in an incomplete state. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.incomplete - default: response.incomplete - title: Type - type: string required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseIncomplete - type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible chat completion endpoint. + OpenAIChatCompletionToolCall: properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer + index: + anyOf: + - type: integer + - type: 'null' + title: Index + id: + anyOf: + - type: string + - type: 'null' + title: Id type: - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - title: Type type: string - required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + const: function + title: Type + default: function + function: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + - type: 'null' type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + title: OpenAIChatCompletionToolCall + description: Tool call specification for OpenAI-compatible chat completion responses. + OpenAIChatCompletionToolCallFunction: properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name arguments: + anyOf: + - type: string + - type: 'null' title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - title: Type - type: string - required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone type: object - OpenAIResponseObjectStreamResponseMcpCallCompleted: - description: Streaming event for completed MCP calls. + title: OpenAIChatCompletionToolCallFunction + description: Function call details for OpenAI-compatible tool calls. + OpenAIChatCompletionUsage: properties: - sequence_number: - title: Sequence Number + prompt_tokens: type: integer - type: - const: response.mcp_call.completed - default: response.mcp_call.completed - title: Type - type: string + title: Prompt Tokens + completion_tokens: + type: integer + title: Completion Tokens + total_tokens: + type: integer + title: Total Tokens + prompt_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + - type: 'null' + completion_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + - type: 'null' + type: object required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage + description: Usage information for OpenAI chat completion. + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + title: Reasoning Tokens type: object - OpenAIResponseObjectStreamResponseMcpCallFailed: - description: Streaming event for failed MCP calls. + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.failed - default: response.mcp_call.failed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallFailed + cached_tokens: + anyOf: + - type: integer + - type: 'null' + title: Cached Tokens type: object - OpenAIResponseObjectStreamResponseMcpCallInProgress: - description: Streaming event for MCP calls in progress. + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + OpenAIChoice-Output: properties: - item_id: - title: Item Id + 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 - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + title: Finish Reason + index: type: integer - type: - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallInProgress + title: Index + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + - type: 'null' type: object - OpenAIResponseObjectStreamResponseMcpListToolsCompleted: - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - title: Type - type: string required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - type: object - OpenAIResponseObjectStreamResponseMcpListToolsFailed: + - message + - finish_reason + - index + title: OpenAIChoice + description: A choice from an OpenAI-compatible chat completion response. + OpenAIChoiceLogprobs-Output: properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal type: object - OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + title: OpenAIChoiceLogprobs + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + OpenAICompletion: properties: - sequence_number: - title: Sequence Number + id: + type: string + title: Id + choices: + items: + $ref: '#/components/schemas/OpenAICompletionChoice-Output' + type: array + title: Choices + created: type: integer - type: - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - title: Type + title: Created + model: type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + title: Model + object: + type: string + const: text_completion + title: Object + default: text_completion type: object - OpenAIResponseObjectStreamResponseOutputItemAdded: - description: Streaming event for when a new output item is added to the response. + required: + - id + - choices + - created + - model + title: OpenAICompletion + 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" + OpenAICompletionChoice-Output: properties: - response_id: - title: Response Id + finish_reason: type: string - item: - 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: Item - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.added - default: response.output_item.added - title: Type + title: Finish Reason + text: type: string - required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemAdded + title: Text + index: + type: integer + title: Index + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + - type: 'null' type: object - OpenAIResponseObjectStreamResponseOutputItemDone: - description: Streaming event for when an output item is completed. + required: + - finish_reason + - text + - index + title: 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 + OpenAICompletionRequestWithExtraBody: properties: - response_id: - title: Response Id - type: string - item: - 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: Item - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.done - default: response.output_item.done - title: Type + model: type: string - required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemDone + 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: + anyOf: + - type: integer + - type: 'null' + title: Best Of + echo: + anyOf: + - type: boolean + - type: 'null' + title: Echo + frequency_penalty: + anyOf: + - type: number + - type: 'null' + title: Frequency Penalty + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + title: Logit Bias + logprobs: + anyOf: + - type: boolean + - type: 'null' + title: Logprobs + max_tokens: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + n: + anyOf: + - type: integer + - type: 'null' + title: N + presence_penalty: + anyOf: + - type: number + - type: 'null' + title: Presence Penalty + seed: + anyOf: + - type: integer + - type: 'null' + title: Seed + stop: + anyOf: + - type: string + - items: + type: string + type: array + - type: 'null' + title: Stop + stream: + anyOf: + - type: boolean + - type: 'null' + title: Stream + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Stream Options + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + user: + anyOf: + - type: string + - type: 'null' + title: User + suffix: + anyOf: + - type: string + - type: 'null' + title: Suffix + additionalProperties: true type: object - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: - description: Streaming event for when an annotation is added to output text. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - content_index: - title: Content Index - type: integer - annotation_index: - title: Annotation Index - type: integer - annotation: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: Annotation - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.annotation.added - default: response.output_text.annotation.added - title: Type - type: string required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - type: object - OpenAIResponseObjectStreamResponseOutputTextDelta: - description: Streaming event for incremental text content updates. + - model + - prompt + title: OpenAICompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible completion endpoint. + OpenAICompletionWithInputMessages: properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta + id: type: string - item_id: - title: Item Id + title: Id + choices: + items: + $ref: '#/components/schemas/OpenAIChoice-Output' + type: array + title: Choices + object: type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + const: chat.completion + title: Object + default: chat.completion + created: type: integer - type: - const: response.output_text.delta - default: response.output_text.delta - title: Type + title: Created + model: type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDelta + title: Model + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + - type: 'null' + input_messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + 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' + type: array + title: Input Messages type: object - OpenAIResponseObjectStreamResponseOutputTextDone: - description: Streaming event for when text output is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.done - default: response.output_text.done - title: Type - type: string required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDone - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: - description: Streaming event for when a new reasoning summary part is added. + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - title: Type - type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + file_ids: + items: + type: string + type: array + title: File Ids + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Attributes + 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 + additionalProperties: true type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: - description: Streaming event for when a reasoning summary part is completed. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - title: Type - type: string required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + description: Request to create a vector store file batch with extra_body support. + OpenAICreateVectorStoreRequestWithExtraBody: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + file_ids: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: File Ids + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + 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 + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + additionalProperties: true type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: - description: Streaming event for incremental reasoning summary text updates. + title: OpenAICreateVectorStoreRequestWithExtraBody + description: Request to create a vector store with extra_body support. + OpenAIDeleteResponseObject: properties: - delta: - title: Delta - type: string - item_id: - title: Item Id + id: type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - title: Type + title: Id + object: type: string - required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + const: response + title: Object + default: response + deleted: + type: boolean + title: Deleted + default: true type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: - description: Streaming event for when reasoning summary text is completed. - properties: - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - title: Type - type: string required: - - text - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - type: object - OpenAIResponseObjectStreamResponseReasoningTextDelta: - description: Streaming event for incremental reasoning text updates. + - id + title: OpenAIDeleteResponseObject + description: Response object confirming deletion of an OpenAI response. + OpenAIDeveloperMessageParam: properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.delta - default: response.reasoning_text.delta - title: Type + role: type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDelta + const: developer + title: Role + default: developer + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name type: object - OpenAIResponseObjectStreamResponseReasoningTextDone: - description: Streaming event for when reasoning text is completed. + required: + - content + title: OpenAIDeveloperMessageParam + description: A message from the developer in an OpenAI-compatible chat completion request. + OpenAIEmbeddingData: properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id + object: type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + const: embedding + title: Object + default: embedding + embedding: + anyOf: + - items: + type: number + type: array + - type: string + title: Embedding + index: type: integer - type: - const: response.reasoning_text.done - default: response.reasoning_text.done - title: Type - type: string - required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDone + title: Index type: object - OpenAIResponseObjectStreamResponseRefusalDelta: - description: Streaming event for incremental refusal text updates. + required: + - embedding + - index + title: OpenAIEmbeddingData + description: A single embedding data object from an OpenAI-compatible embeddings response. + OpenAIEmbeddingUsage: properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index + prompt_tokens: type: integer - sequence_number: - title: Sequence Number + title: Prompt Tokens + total_tokens: type: integer - type: - const: response.refusal.delta - default: response.refusal.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDelta + title: Total Tokens type: object - OpenAIResponseObjectStreamResponseRefusalDone: - description: Streaming event for when refusal text is completed. + required: + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage + description: Usage information for an OpenAI-compatible embeddings response. + OpenAIEmbeddingsRequestWithExtraBody: properties: - content_index: - title: Content Index - type: integer - refusal: - title: Refusal - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.done - default: response.refusal.done - title: Type + model: type: string - required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDone + title: Model + input: + anyOf: + - type: string + - items: + type: string + type: array + title: Input + encoding_format: + anyOf: + - type: string + - type: 'null' + title: Encoding Format + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' + title: Dimensions + user: + anyOf: + - type: string + - type: 'null' + title: User + additionalProperties: true type: object - OpenAIResponseObjectStreamResponseWebSearchCallCompleted: - description: Streaming event for completed web search calls. + required: + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody + description: Request parameters for OpenAI-compatible embeddings endpoint. + OpenAIEmbeddingsResponse: properties: - item_id: - title: Item Id + object: type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.completed - default: response.web_search_call.completed - title: Type + const: list + title: Object + default: list + data: + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + type: array + title: Data + model: type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + title: Model + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' type: object - OpenAIResponseObjectStreamResponseWebSearchCallInProgress: - description: Streaming event for web search calls in progress. + required: + - data + - model + - usage + title: OpenAIEmbeddingsResponse + description: Response from an OpenAI-compatible embeddings request. + OpenAIFile: properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - title: Type type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + const: file + title: Type + default: file + file: + $ref: '#/components/schemas/OpenAIFileFile' type: object - OpenAIResponseObjectStreamResponseWebSearchCallSearching: + required: + - file + title: OpenAIFile + OpenAIFileDeleteResponse: properties: - item_id: - title: Item Id + id: type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.searching - default: response.web_search_call.searching - title: Type + title: Id + object: type: string + const: file + title: Object + default: file + deleted: + type: boolean + title: Deleted + type: object required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - id + - deleted + title: OpenAIFileDeleteResponse + description: Response for deleting a file in OpenAI Files API. + 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 type: object - OpenAIResponseObjectStream: - discriminator: - mapping: - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - OpenAIResponseInput: - 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' - ConversationItem: - discriminator: - 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' - OpenAIResponseAnnotationCitation: + 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. + OpenAIFilePurpose: + type: string + enum: + - assistants + - batch + title: OpenAIFilePurpose + description: Valid purpose values for OpenAI Files API. + OpenAIImageURL: + properties: + url: + type: string + title: Url + detail: + anyOf: + - type: string + - type: 'null' + title: Detail + type: object + required: + - url + title: OpenAIImageURL + description: Image URL specification for OpenAI-compatible chat completion messages. + OpenAIJSONSchema: + properties: + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + strict: + anyOf: + - type: boolean + - type: 'null' + title: Strict + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Schema + type: object + title: OpenAIJSONSchema + description: JSON schema specification for OpenAI-compatible structured response format. + OpenAIModel: + properties: + id: + type: string + title: Id + object: + type: string + const: model + title: Object + default: model + created: + type: integer + title: Created + owned_by: + type: string + title: Owned By + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Custom Metadata type: object + required: + - id + - created + - owned_by + title: OpenAIModel + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata + OpenAIResponseAnnotationCitation: properties: type: type: string const: url_citation + title: Type default: url_citation - description: >- - Annotation type identifier, always "url_citation" end_index: type: integer - description: >- - End position of the citation span in the content + title: End Index start_index: type: integer - description: >- - Start position of the citation span in the content + title: Start Index title: type: string - description: Title of the referenced web resource + title: Title url: type: string - description: URL of the referenced web resource - additionalProperties: false + title: Url + type: object required: - - type - - end_index - - start_index - - title - - url + - end_index + - start_index + - title + - url title: OpenAIResponseAnnotationCitation - description: >- - URL citation annotation for referencing external web resources. - "OpenAIResponseAnnotationContainerFileCitation": - type: object + description: URL citation annotation for referencing external web resources. + 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 - additionalProperties: false + title: Start Index + type: object required: - - type - - container_id - - end_index - - file_id - - filename - - start_index - title: >- - OpenAIResponseAnnotationContainerFileCitation + - container_id + - end_index + - file_id + - filename + - start_index + title: OpenAIResponseAnnotationContainerFileCitation OpenAIResponseAnnotationFileCitation: - type: object properties: type: type: string const: file_citation + title: Type default: file_citation - description: >- - Annotation type identifier, always "file_citation" file_id: type: string - description: Unique identifier of the referenced file + title: File Id filename: type: string - description: Name of the referenced file + title: Filename index: type: integer - description: >- - Position index of the citation within the content - additionalProperties: false + title: Index + type: object required: - - type - - file_id - - filename - - index + - file_id + - filename + - index title: OpenAIResponseAnnotationFileCitation - description: >- - File citation annotation for referencing specific files in response content. + description: File citation annotation for referencing specific files in response content. OpenAIResponseAnnotationFilePath: - type: object properties: type: type: string const: file_path + title: Type default: file_path file_id: type: string + title: File Id index: type: integer - additionalProperties: false + title: Index + type: object required: - - type - - file_id - - index + - 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 + title: Type default: refusal - description: >- - Content part type identifier, always "refusal" refusal: type: string - description: Refusal text supplied by the model - additionalProperties: false + title: Refusal + type: object required: - - type - - refusal + - refusal title: OpenAIResponseContentPartRefusal - description: >- - Refusal content within a streamed response part. - "OpenAIResponseInputFunctionToolCallOutput": + description: Refusal content within a streamed response part. + 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. + 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. + 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. + 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. + 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: - type: string + anyOf: + - type: string + - type: 'null' + title: Id status: - type: string - additionalProperties: false + anyOf: + - type: string + - type: 'null' + title: Status + type: object 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' + - call_id + - output + title: OpenAIResponseInputFunctionToolCallOutput + description: This represents the output of a function call that gets passed back to the model. OpenAIResponseInputMessageContentFile: - type: object properties: type: type: string const: input_file + title: Type 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. + anyOf: + - type: string + - type: 'null' + title: File Data file_id: - type: string - description: >- - (Optional) The ID of the file to be sent to the model. + anyOf: + - type: string + - type: 'null' + title: File Id file_url: - type: string - description: >- - The URL of the file to be sent to the model. + anyOf: + - type: string + - type: 'null' + title: File Url filename: - type: string - description: >- - The name of the file to be sent to the model. - additionalProperties: false - required: - - type + anyOf: + - type: string + - type: 'null' + title: Filename + type: object title: OpenAIResponseInputMessageContentFile - description: >- - File content for input messages in OpenAI response format. + 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 + anyOf: + - type: string + const: low + - type: string + const: high + - type: string + const: auto + title: Detail default: auto - description: >- - Level of detail for image processing, can be "low", "high", or "auto" type: type: string const: input_image + title: Type 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. + anyOf: + - type: string + - type: 'null' + title: File Id image_url: - type: string - description: (Optional) URL of the image content - additionalProperties: false - required: - - detail - - type + anyOf: + - type: string + - type: 'null' + title: Image Url + type: object title: OpenAIResponseInputMessageContentImage - description: >- - Image content for input messages in OpenAI response format. + 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 + title: Text type: type: string const: input_text + title: Type default: input_text - description: >- - Content type identifier, always "input_text" - additionalProperties: false + type: object required: - - text - - type + - text title: OpenAIResponseInputMessageContentText - description: >- - Text content for input messages in OpenAI response format. - OpenAIResponseMCPApprovalRequest: + description: Text content for input messages in OpenAI response format. + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + max_num_results: + anyOf: + - type: integer + maximum: 50.0 + minimum: 1.0 + - type: 'null' + title: Max Num Results + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + - type: 'null' + type: object + required: + - vector_store_ids + title: OpenAIResponseInputToolFileSearch + description: File search tool configuration for OpenAI response inputs. + OpenAIResponseInputToolFunction: + properties: + type: + type: string + const: function + title: Type + default: function + name: + type: string + title: Name + 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 + type: object + required: + - name + - parameters + title: OpenAIResponseInputToolFunction + description: Function tool configuration for OpenAI response inputs. + OpenAIResponseInputToolWebSearch: + properties: + type: + anyOf: + - type: string + const: web_search + - type: string + const: web_search_preview + - type: string + const: web_search_preview_2025_03_11 + - type: string + const: web_search_2025_08_26 + title: Type + default: web_search + search_context_size: + anyOf: + - type: string + pattern: ^low|medium|high$ + - type: 'null' + title: Search Context Size + default: medium type: object + title: OpenAIResponseInputToolWebSearch + description: Web search tool configuration for OpenAI response inputs. + 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 - additionalProperties: false + type: object required: - - arguments - - id - - name - - server_label - - type + - arguments + - id + - name + - server_label title: OpenAIResponseMCPApprovalRequest - description: >- - A request for human approval of a tool invocation. + description: A request for human approval of a tool invocation. OpenAIResponseMCPApprovalResponse: - type: object 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: - type: string + anyOf: + - type: string + - type: 'null' + title: Id reason: + anyOf: + - type: string + - type: 'null' + title: Reason + 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 - additionalProperties: false - required: - - approval_request_id - - approve - - type - title: OpenAIResponseMCPApprovalResponse - description: A response to an MCP approval request. - OpenAIResponseMessage: + const: message + title: Type + default: message + id: + anyOf: + - type: string + - type: 'null' + title: Id + status: + anyOf: + - type: string + - type: 'null' + title: Status 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. + OpenAIResponseMessage-Output: properties: content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInputMessageContent' - - type: array - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContent' + 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: - oneOf: - - type: string - const: system - - type: string - const: developer - - type: string - const: user - - type: string - const: assistant + 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: - type: string + anyOf: + - type: string + - type: 'null' + title: Id status: - type: string - additionalProperties: false + anyOf: + - type: string + - type: 'null' + title: Status + type: object required: - - content - - role - - type + - 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. - OpenAIResponseOutputMessageContent: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - "OpenAIResponseOutputMessageContentOutputText": + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + tools: + anyOf: + - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' + title: Tools + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls type: object + required: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject + description: Complete OpenAI response object containing generation results and metadata. + OpenAIResponseOutputMessageContentOutputText: properties: text: type: string + title: Text type: type: string const: output_text + title: Type default: output_text annotations: - type: array items: - $ref: '#/components/schemas/OpenAIResponseAnnotations' - additionalProperties: false - required: - - text - - type - - annotations - title: >- - OpenAIResponseOutputMessageContentOutputText - "OpenAIResponseOutputMessageFileSearchToolCall": + 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 - description: Unique identifier for this tool call + title: Id queries: - type: array items: type: string - description: List of search queries executed + type: array + title: Queries status: type: string - description: >- - Current status of the file search operation + title: Status type: type: string const: file_search_call + title: Type default: file_search_call - description: >- - Tool call type identifier, always "file_search_call" results: - type: array - items: - 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 + anyOf: + - items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array + - type: 'null' + title: Results + type: object required: - - id - - queries - - status - - type - title: >- - OpenAIResponseOutputMessageFileSearchToolCall - description: >- - File search tool call output message for OpenAI responses. - "OpenAIResponseOutputMessageFunctionToolCall": + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall + description: File search tool call output message for OpenAI responses. + 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. + OpenAIResponseOutputMessageFunctionToolCall: properties: call_id: type: string - description: Unique identifier for the function call + title: Call Id name: type: string - description: Name of the function being called + title: Name arguments: type: string - description: >- - JSON string containing the function arguments + title: Arguments type: type: string const: function_call + title: Type default: function_call - description: >- - Tool call type identifier, always "function_call" id: - type: string - description: >- - (Optional) Additional identifier for the tool call + anyOf: + - type: string + - type: 'null' + title: Id status: - type: string - description: >- - (Optional) Current status of the function call execution - additionalProperties: false + anyOf: + - type: string + - type: 'null' + title: Status + type: object required: - - call_id - - name - - arguments - - type - title: >- - OpenAIResponseOutputMessageFunctionToolCall - description: >- - Function tool call output message for OpenAI responses. + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + description: Function tool call output message for OpenAI responses. OpenAIResponseOutputMessageMCPCall: - type: object properties: id: type: string - description: Unique identifier for this MCP call + title: Id type: type: string const: mcp_call + title: Type default: mcp_call - description: >- - Tool call type identifier, always "mcp_call" arguments: type: string - description: >- - JSON string containing the MCP call arguments + title: Arguments name: type: string - description: Name of the MCP method being called + title: Name server_label: type: string - description: >- - Label identifying the MCP server handling the call + title: Server Label error: - type: string - description: >- - (Optional) Error message if the MCP call failed + anyOf: + - type: string + - type: 'null' + title: Error output: - type: string - description: >- - (Optional) Output result from the successful MCP call - additionalProperties: false + anyOf: + - type: string + - type: 'null' + title: Output + type: object required: - - id - - type - - arguments - - name - - server_label + - id + - arguments + - name + - server_label title: OpenAIResponseOutputMessageMCPCall - description: >- - Model Context Protocol (MCP) call output message for OpenAI responses. + 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 + title: Id type: type: string const: mcp_list_tools + title: Type 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 + title: Server Label 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 + $ref: '#/components/schemas/MCPListToolsTool' + type: array + title: Tools + type: object required: - - id - - type - - server_label - - tools + - id + - server_label + - tools title: OpenAIResponseOutputMessageMCPListTools - description: >- - MCP list tools output message containing available tools from an MCP server. - "OpenAIResponseOutputMessageWebSearchToolCall": - type: object + description: MCP list tools output message containing available tools from an MCP server. + OpenAIResponseOutputMessageWebSearchToolCall: properties: id: type: string - description: Unique identifier for this tool call + title: Id status: type: string - description: >- - Current status of the web search operation + title: Status type: type: string const: web_search_call + title: Type default: web_search_call - description: >- - Tool call type identifier, always "web_search_call" - additionalProperties: false + type: object required: - - id - - status - - type - title: >- - OpenAIResponseOutputMessageWebSearchToolCall - description: >- - Web search tool call output message for OpenAI responses. - CreateConversationRequest: + - id + - status + title: OpenAIResponseOutputMessageWebSearchToolCall + description: Web search tool call output message for OpenAI responses. + OpenAIResponsePrompt: + properties: + id: + 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 + version: + anyOf: + - type: string + - type: 'null' + title: Version type: object + required: + - id + title: OpenAIResponsePrompt + description: OpenAI compatible Prompt object that is used in OpenAI responses. + OpenAIResponseText: properties: - items: - type: array - items: - $ref: '#/components/schemas/ConversationItem' - description: >- - Initial items to include in the conversation context. - metadata: - type: object - additionalProperties: - type: string - description: >- - Set of key-value pairs that can be attached to an object. - additionalProperties: false - title: CreateConversationRequest - Conversation: + format: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + - type: 'null' + type: object + title: OpenAIResponseText + description: Text response configuration for OpenAI responses. + OpenAIResponseTextFormat: + properties: + type: + anyOf: + - type: string + const: text + - type: string + const: json_schema + - type: string + const: json_object + 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 + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + 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' + - type: 'null' + title: Allowed Tools type: object + required: + - server_label + title: OpenAIResponseToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + OpenAIResponseUsage: properties: - id: - type: string - object: - type: string - const: conversation - default: conversation - created_at: + input_tokens: type: integer - metadata: - type: object - additionalProperties: - type: string - items: - type: array - items: - type: object - title: dict - description: >- - dict() -> new empty dictionary dict(mapping) -> new dictionary initialized - from a mapping object's (key, value) pairs dict(iterable) -> new - dictionary initialized as if via: d = {} for k, v in iterable: d[k] - = v dict(**kwargs) -> new dictionary initialized with the name=value - pairs in the keyword argument list. For example: dict(one=1, two=2) - additionalProperties: false + title: Input Tokens + output_tokens: + type: integer + title: Output Tokens + total_tokens: + type: integer + title: Total Tokens + input_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + - type: 'null' + output_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + - type: 'null' + type: object required: - - id - - object - - created_at - title: Conversation - description: OpenAI-compatible conversation object. - UpdateConversationRequest: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage + description: Usage information for OpenAI response. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + title: Cached Tokens type: object + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: properties: - metadata: - type: object - additionalProperties: - type: string - description: >- - Set of key-value pairs that can be attached to an object. - additionalProperties: false - required: - - metadata - title: UpdateConversationRequest - ConversationDeletedResource: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + title: Reasoning Tokens type: object + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + OpenAISystemMessageParam: properties: - id: - type: string - object: + role: type: string - default: conversation.deleted - deleted: - type: boolean - default: true - additionalProperties: false - required: - - id - - object - - deleted - title: ConversationDeletedResource - description: Response for deleted conversation. - ConversationItemList: + const: system + title: Role + default: system + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + anyOf: + - type: string + - type: 'null' + title: Name type: object + required: + - content + title: OpenAISystemMessageParam + description: A system message providing instructions or context to the model. + OpenAITokenLogProb: properties: - object: + token: type: string - default: list - data: - type: array + title: Token + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Bytes + logprob: + type: number + title: Logprob + top_logprobs: items: - $ref: '#/components/schemas/ConversationItem' - first_id: - type: string - last_id: - type: string - has_more: - type: boolean - default: false - additionalProperties: false - required: - - object - - data - - has_more - title: ConversationItemList - description: >- - List of conversation items with pagination. - AddItemsRequest: - type: object - properties: - items: + $ref: '#/components/schemas/OpenAITopLogProb' type: array - items: - $ref: '#/components/schemas/ConversationItem' - description: >- - Items to include in the conversation context. - additionalProperties: false - required: - - items - title: AddItemsRequest - ConversationItemDeletedResource: + 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. + + :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 + OpenAIToolMessageParam: properties: - id: + role: type: string - object: + const: tool + title: Role + default: tool + tool_call_id: type: string - default: conversation.item.deleted - deleted: - type: boolean - default: true - additionalProperties: false - required: - - id - - object - - deleted - title: ConversationItemDeletedResource - description: Response for deleted conversation item. - OpenAIEmbeddingsRequestWithExtraBody: + 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. + OpenAITopLogProb: properties: - model: - type: string - description: >- - The identifier of the model to use. The model must be an embedding model - registered with Llama Stack and available via the /models endpoint. - input: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - 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. - encoding_format: - type: string - default: float - description: >- - (Optional) The format to return the embeddings in. Can be either "float" - or "base64". Defaults to "float". - dimensions: - type: integer - description: >- - (Optional) The number of dimensions the resulting output embeddings should - have. Only supported in text-embedding-3 and later models. - user: + token: type: string - description: >- - (Optional) A unique identifier representing your end-user, which can help - OpenAI to monitor and detect abuse. - additionalProperties: false + title: Token + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + title: Bytes + logprob: + type: number + title: Logprob + type: object required: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody - description: >- - Request parameters for OpenAI-compatible embeddings endpoint. - OpenAIEmbeddingData: + - token + - logprob + title: 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 + 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: + anyOf: + - type: string + - type: 'null' + title: Name type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OpenAIUserMessageParam-Output: properties: - object: + role: type: string - const: embedding - default: embedding - description: >- - The object type, which will be "embedding" - embedding: - oneOf: - - type: array - items: - type: number - - type: string - description: >- - The embedding vector as a list of floats (when encoding_format="float") - or as a base64-encoded string (when encoding_format="base64") - index: - type: integer - description: >- - The index of the embedding in the input list - additionalProperties: false - required: - - object - - embedding - - index - title: OpenAIEmbeddingData - description: >- - A single embedding data object from an OpenAI-compatible embeddings response. - OpenAIEmbeddingUsage: + 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: + anyOf: + - type: string + - type: 'null' + title: Name type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OptimizerConfig: properties: - prompt_tokens: - type: integer - description: The number of tokens in the input - total_tokens: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + lr: + type: number + title: Lr + weight_decay: + type: number + title: Weight Decay + num_warmup_steps: type: integer - description: The total number of tokens used - additionalProperties: false - required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage - description: >- - Usage information for an OpenAI-compatible embeddings response. - OpenAIEmbeddingsResponse: + title: Num Warmup Steps type: object - properties: - object: - type: string - const: list - default: list - description: The object type, which will be "list" - data: - type: array - items: - $ref: '#/components/schemas/OpenAIEmbeddingData' - description: List of embedding data objects - model: - type: string - description: >- - The model that was used to generate the embeddings - usage: - $ref: '#/components/schemas/OpenAIEmbeddingUsage' - description: Usage information - additionalProperties: false required: - - object - - data - - model - - usage - title: OpenAIEmbeddingsResponse - description: >- - Response from an OpenAI-compatible embeddings request. - OpenAIFilePurpose: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + description: Configuration parameters for the optimization algorithm. + OptimizerType: type: string enum: - - assistants - - batch - title: OpenAIFilePurpose - description: >- - Valid purpose values for OpenAI Files API. - ListOpenAIFileResponse: + - adam + - adamw + - sgd + title: OptimizerType + description: Available optimizer algorithms for training. + Order: + type: string + enum: + - asc + - desc + title: Order + description: Sort order for paginated responses. + OutputTokensDetails: + properties: + reasoning_tokens: + type: integer + title: Reasoning Tokens + additionalProperties: true type: object + required: + - reasoning_tokens + title: OutputTokensDetails + Prompt: properties: - data: - type: array + prompt: + anyOf: + - type: string + - type: 'null' + title: Prompt + description: The system prompt with variable placeholders + 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: - $ref: '#/components/schemas/OpenAIFileObject' - description: List of file objects - has_more: + type: string + type: array + title: Variables + description: List of variable names that can be used in the prompt template + is_default: type: boolean - description: >- - Whether there are more files available beyond this page - first_id: - type: string - description: >- - ID of the first file in the list for pagination - last_id: - type: string - description: >- - ID of the last file in the list for pagination - object: - type: string - const: list - default: list - description: The object type, which is always "list" - additionalProperties: false - required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIFileResponse - description: >- - Response for listing files in OpenAI Files API. - OpenAIFileObject: + 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. + ProviderInfo: properties: - object: - type: string - const: file - default: file - description: The object type, which is always "file" - id: + api: type: string - description: >- - The file identifier, which can be referenced in the API endpoints - bytes: - type: integer - description: The size of the file, in bytes - created_at: - type: integer - description: >- - The Unix timestamp (in seconds) for when the file was created - expires_at: - type: integer - description: >- - The Unix timestamp (in seconds) for when the file expires - filename: + title: Api + provider_id: type: string - description: The name of the file - purpose: + title: Provider Id + provider_type: type: string - enum: - - assistants - - batch - description: The intended purpose of the file - additionalProperties: false - required: - - object - - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject - description: >- - OpenAI File object as defined in the OpenAI Files API. - ExpiresAfter: + title: Provider Type + config: + additionalProperties: true + type: object + title: Config + health: + additionalProperties: true + type: object + title: Health type: object - properties: - anchor: - type: string - const: created_at - seconds: - type: integer - additionalProperties: false required: - - anchor - - seconds - title: 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) - OpenAIFileDeleteResponse: - type: object + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo + description: Information about a registered provider including its configuration and health status. + QATFinetuningConfig: properties: - id: + type: type: string - description: The file identifier that was deleted - object: + const: QAT + title: Type + default: QAT + quantizer_name: type: string - const: file - default: file - description: The object type, which is always "file" - deleted: - type: boolean - description: >- - Whether the file was successfully deleted - additionalProperties: false - required: - - id - - object - - deleted - title: OpenAIFileDeleteResponse - description: >- - Response for deleting a file in OpenAI Files API. - Response: - type: object - title: Response - HealthInfo: + title: Quantizer Name + group_size: + type: integer + title: Group Size type: object - properties: - status: - type: string - enum: - - OK - - Error - - Not Implemented - description: Current health status of the service - additionalProperties: false required: - - status - title: HealthInfo - description: >- - Health status information for the service. - RouteInfo: - type: object + - quantizer_name + - group_size + title: QATFinetuningConfig + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. + QueryChunksResponse: properties: - route: - type: string - description: The API endpoint path - method: - type: string - description: HTTP method for the route - provider_types: + chunks: + items: + $ref: '#/components/schemas/Chunk-Output' type: array + title: Chunks + scores: items: - type: string - description: >- - List of provider types that implement this route - additionalProperties: false - required: - - route - - method - - provider_types - title: RouteInfo - description: >- - Information about an API route including its path, method, and implementing - providers. - ListRoutesResponse: + type: number + type: array + title: Scores type: object + required: + - chunks + - scores + title: QueryChunksResponse + description: Response from querying chunks in a vector database. + RegexParserScoringFnParams: properties: - data: + 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/RouteInfo' - description: >- - List of available route information objects - additionalProperties: false - required: - - data - title: ListRoutesResponse - description: >- - Response containing a list of all available API routes. - OpenAIModel: + $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. + RerankData: properties: - id: - type: string - object: - type: string - const: model - default: model - created: + index: type: integer - owned_by: - type: string - custom_metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - additionalProperties: false - required: - - id - - object - - created - - owned_by - title: OpenAIModel - description: A model from OpenAI. - OpenAIListModelsResponse: + 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. + RerankResponse: properties: data: - type: array items: - $ref: '#/components/schemas/OpenAIModel' - additionalProperties: false - required: - - data - title: OpenAIListModelsResponse - Model: + $ref: '#/components/schemas/RerankData' + type: array + title: Data type: object + required: + - data + title: RerankResponse + description: Response from a reranking request. + RowsDataSource: properties: - identifier: - type: string - description: >- - Unique identifier for this resource in llama stack - provider_resource_id: - type: string - description: >- - Unique identifier for this resource in the provider - provider_id: - type: string - description: >- - ID of the provider that owns this resource type: type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: model - default: model - description: >- - The resource type, always 'model' for model resources + 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. + RunShieldResponse: + properties: + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + - type: 'null' + type: object + title: RunShieldResponse + description: Response from running a safety shield. + SafetyViolation: + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + anyOf: + - type: string + - type: 'null' + title: User Message metadata: + additionalProperties: true type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Any additional metadata for this model - model_type: - $ref: '#/components/schemas/ModelType' - default: llm - description: >- - The type of model (LLM or embedding model) - additionalProperties: false - required: - - identifier - - provider_id - - type - - metadata - - model_type - title: Model - description: >- - A model resource representing an AI model registered in Llama Stack. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType - description: >- - Enumeration of supported model types in Llama Stack. - RunModerationRequest: + title: Metadata type: object + required: + - violation_level + title: SafetyViolation + description: Details of a safety violation detected by content moderation. + SamplingParams: properties: - input: + strategy: oneOf: - - type: string - - type: array - items: - type: string - description: >- - Input (or inputs) to classify. Can be a single string, an array of strings, - or an array of multi-modal input objects similar to other models. - model: - type: string - description: >- - (Optional) The content moderation model you would like to use. - additionalProperties: false - required: - - input - title: RunModerationRequest - ModerationObject: + - $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: + anyOf: + - type: integer + - type: 'null' + title: Max Tokens + repetition_penalty: + anyOf: + - type: number + - type: 'null' + title: Repetition Penalty + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Stop type: object + title: SamplingParams + description: Sampling parameters. + ScoreBatchResponse: properties: - id: - type: string - description: >- - The unique identifier for the moderation request. - model: - type: string - description: >- - The model used to generate the moderation results. + dataset_id: + anyOf: + - type: string + - type: 'null' + title: Dataset Id results: - type: array - items: - $ref: '#/components/schemas/ModerationObjectResults' - description: A list of moderation objects - additionalProperties: false - required: - - id - - model - - results - title: ModerationObject - description: A moderation object. - ModerationObjectResults: - type: object - properties: - flagged: - type: boolean - description: >- - Whether any of the below categories are flagged. - categories: - type: object additionalProperties: - type: boolean - description: >- - A list of the categories, and whether they are flagged or not. - category_applied_input_types: - type: object - additionalProperties: - type: array - items: - type: string - description: >- - A list of the categories along with the input type(s) that the score applies - to. - category_scores: + $ref: '#/components/schemas/ScoringResult' type: object + title: Results + type: object + required: + - results + title: ScoreBatchResponse + description: Response from batch scoring operations on datasets. + ScoreResponse: + properties: + results: additionalProperties: - type: number - description: >- - A list of the categories along with their scores as predicted by model. - user_message: - type: string - metadata: + $ref: '#/components/schemas/ScoringResult' type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - additionalProperties: false - required: - - flagged - - metadata - title: ModerationObjectResults - description: A moderation object. - Prompt: + title: Results type: object + required: + - results + title: ScoreResponse + description: The response from scoring. + ScoringFn: properties: - prompt: + identifier: type: string - description: >- - The system prompt text with variable placeholders. Variables are only - supported when using the Responses API. - version: - type: integer - description: >- - Version (integer starting at 1, incremented on save) - prompt_id: + 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 + provider_id: type: string - description: >- - Unique identifier formatted as 'pmpt_<48-digit-hash>' - variables: - type: array - items: - type: string - description: >- - List of prompt variable names that can be used in the prompt template - is_default: - type: boolean - default: false - description: >- - Boolean indicating whether this version is the default version for this - prompt - additionalProperties: false - required: - - version - - prompt_id - - variables - - is_default - title: Prompt - description: >- - A prompt resource representing a stored OpenAI Compatible prompt template - in Llama Stack. - ListPromptsResponse: + title: Provider Id + description: ID of the provider that owns this resource + type: + type: string + const: scoring_function + title: Type + default: scoring_function + description: + anyOf: + - type: string + - type: 'null' + title: Description + 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' + title: Return Type + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + 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: + 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 type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Prompt' - additionalProperties: false required: - - data - title: ListPromptsResponse - description: Response model to list prompts. - CreatePromptRequest: - type: object + - identifier + - provider_id + - return_type + title: ScoringFn + description: A scoring function resource for evaluating model outputs. + ScoringResult: properties: - prompt: - type: string - description: >- - The prompt text content with variable placeholders. - variables: - type: array + score_rows: items: - type: string - description: >- - List of variable names that can be used in the prompt template. - additionalProperties: false + additionalProperties: true + type: object + type: array + title: Score Rows + aggregated_results: + additionalProperties: true + type: object + title: Aggregated Results + type: object required: - - prompt - title: CreatePromptRequest - UpdatePromptRequest: + - score_rows + - aggregated_results + title: ScoringResult + description: A scoring result for a single row. + SearchRankingOptions: + properties: + ranker: + anyOf: + - type: string + - type: 'null' + title: Ranker + score_threshold: + anyOf: + - type: number + - type: 'null' + title: Score Threshold + default: 0.0 type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + Shield: properties: - prompt: + identifier: type: string - description: The updated prompt text content. - version: - type: integer - description: >- - The current version of the prompt being updated. - variables: - type: array - items: - type: string - description: >- - Updated list of variable names that can be used in the prompt template. - set_as_default: - type: boolean - description: >- - Set the new version as the default (default=True). - additionalProperties: false - required: - - prompt - - version - - set_as_default - title: UpdatePromptRequest - SetDefaultVersionRequest: + 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 + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params type: object - properties: - version: - type: integer - description: The version to set as default. - additionalProperties: false required: - - version - title: SetDefaultVersionRequest - ProviderInfo: - type: object + - identifier + - provider_id + title: Shield + description: A safety shield resource that can be used to check content. + StringType: properties: - api: - type: string - description: The API name this provider implements - provider_id: - type: string - description: Unique identifier for the provider - provider_type: + type: type: string - description: The type of provider implementation - config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Configuration parameters for the provider - health: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Current health status of the provider - additionalProperties: false - required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo - description: >- - Information about a registered provider including its configuration and health - status. - ListProvidersResponse: + const: string + title: Type + default: string type: object + title: StringType + description: Parameter type for string values. + SystemMessage: properties: - data: - type: array - items: - $ref: '#/components/schemas/ProviderInfo' - description: List of provider information objects - additionalProperties: false - required: - - data - title: ListProvidersResponse - description: >- - Response containing a list of all available providers. - ListOpenAIResponseObject: + 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. + TextContentItem: properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - description: >- - List of response objects with their input context - has_more: - type: boolean - description: >- - Whether there are more results available beyond this page - first_id: - type: string - description: >- - Identifier of the first item in this page - last_id: + type: type: string - description: Identifier of the last item in this page - object: + const: text + title: Type + default: text + text: type: string - const: list - default: list - description: Object type identifier, always "list" - additionalProperties: false - required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIResponseObject - description: >- - Paginated list of OpenAI response objects with navigation metadata. - OpenAIResponseError: + title: Text type: object + required: + - text + title: TextContentItem + description: A text content item + ToolDef: properties: - code: - type: string - description: >- - Error code identifying the type of failure - message: + toolgroup_id: + anyOf: + - type: string + - type: 'null' + title: Toolgroup Id + name: 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: + title: Name + 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 type: object + required: + - name + title: ToolDef + description: Tool definition used in runtime contexts. + ToolGroup: properties: + identifier: + type: string + 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 + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource 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 + const: tool_group + title: Type + default: tool_group + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + type: object required: - - type - - vector_store_ids - title: OpenAIResponseInputToolFileSearch - description: >- - File search tool configuration for OpenAI response inputs. - OpenAIResponseInputToolFunction: + - identifier + - provider_id + title: ToolGroup + description: A group of related tools managed together. + 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 + - type: 'null' + title: Content + error_message: + anyOf: + - type: string + - type: 'null' + title: Error Message + error_code: + anyOf: + - type: integer + - type: 'null' + title: Error Code + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata type: object + title: ToolInvocationResult + description: Result of a tool invocation. + TopKSamplingStrategy: 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: + 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. + TopPSamplingStrategy: properties: type: - oneOf: - - type: string - const: web_search - - type: string - const: web_search_preview - - type: string - const: web_search_preview_2025_03_11 - - type: string - const: web_search_2025_08_26 - 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: + const: top_p + title: Type + default: top_p + temperature: + anyOf: + - type: number + minimum: 0.0 + - type: 'null' + title: Temperature + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + default: 0.95 type: object + required: + - temperature + title: TopPSamplingStrategy + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. + TrainingConfig: properties: - created_at: + n_epochs: 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: + 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: + anyOf: + - type: integer + - type: 'null' + title: Max Validation Steps + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + - type: 'null' + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + - type: 'null' + efficiency_config: + anyOf: + - $ref: '#/components/schemas/EfficiencyConfig' + - type: 'null' + dtype: + anyOf: + - type: string + - type: 'null' + title: Dtype + default: bf16 + type: object + required: + - n_epochs + title: TrainingConfig + description: Comprehensive configuration for the training process. + URIDataSource: + properties: + type: type: string - description: >- - (Optional) Truncation strategy applied to the response - usage: - $ref: '#/components/schemas/OpenAIResponseUsage' - description: >- - (Optional) Token usage information for the response - instructions: + const: uri + title: Type + default: uri + uri: type: string - description: >- - (Optional) System message inserted into the model's context - max_tool_calls: - type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response - input: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: >- - List of input items that led to this response - additionalProperties: false + title: Uri + type: object 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' - propertyName: type - 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' - DataSource: - discriminator: - mapping: - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - OpenAIResponseInputToolMCP: + - uri + title: URIDataSource + description: A dataset that can be obtained from a URI. + URL: + properties: + uri: + type: string + title: Uri type: object + required: + - uri + title: URL + description: A URL reference to external content. + UnionType: properties: type: type: string - const: mcp - default: mcp - description: Tool type identifier, always "mcp" - server_label: + const: union + title: Type + default: union + type: object + title: UnionType + description: Parameter type for union values. + VectorStoreChunkingStrategyAuto: + properties: + type: type: string - description: Label to identify this MCP server - server_url: + const: auto + title: Type + default: auto + type: object + title: VectorStoreChunkingStrategyAuto + description: Automatic chunking strategy for vector store files. + VectorStoreChunkingStrategyStatic: + properties: + type: 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 + const: static + title: Type + default: static + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + type: object required: - - type - - server_label - - server_url - - require_approval - title: OpenAIResponseInputToolMCP - description: >- - Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - CreateOpenaiResponseRequest: + - static + title: VectorStoreChunkingStrategyStatic + description: Static chunking strategy with configurable parameters. + 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. + VectorStoreContent: properties: - input: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: Input message(s) to create the response. - model: + type: type: string - description: The underlying LLM used for completions. - prompt: - $ref: '#/components/schemas/OpenAIResponsePrompt' - description: >- - (Optional) Prompt object with ID, version, and variables. - instructions: + const: text + title: Type + text: type: string - previous_response_id: + title: Text + type: object + required: + - type + - text + title: VectorStoreContent + description: Content item from a vector store file or search result. + VectorStoreDeleteResponse: + properties: + 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: + title: Id + object: 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: + title: Object + default: vector_store.deleted + deleted: type: boolean - temperature: - type: number - text: - $ref: '#/components/schemas/OpenAIResponseText' - tools: - type: array + title: Deleted + default: true + type: object + required: + - id + title: VectorStoreDeleteResponse + description: Response from deleting a vector store. + 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. + VectorStoreFileContentResponse: + properties: + object: + type: string + const: vector_store.file_content.page + title: Object + default: vector_store.file_content.page + data: items: - $ref: '#/components/schemas/OpenAIResponseInputTool' - include: + $ref: '#/components/schemas/VectorStoreContent' type: array - items: - type: string - description: >- - (Optional) Additional fields to include in the response. - max_infer_iters: + title: Data + has_more: + type: boolean + title: Has More + next_page: + anyOf: + - type: string + - type: 'null' + title: Next Page + type: object + required: + - data + - has_more + title: VectorStoreFileContentResponse + description: Represents the parsed content of a vector store file. + VectorStoreFileCounts: + properties: + completed: type: integer - max_tool_calls: + title: Completed + cancelled: type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response. - additionalProperties: false + title: Cancelled + failed: + type: integer + title: Failed + in_progress: + type: integer + title: In Progress + total: + type: integer + title: Total + type: object required: - - input - - model - title: CreateOpenaiResponseRequest - OpenAIResponseObject: + - completed + - cancelled + - failed + - in_progress + - total + title: VectorStoreFileCounts + description: File processing status counts for a vector store. + VectorStoreFileDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.file.deleted + deleted: + type: boolean + title: Deleted + default: true type: object + required: + - id + title: VectorStoreFileDeleteResponse + description: Response from deleting a vector store file. + 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. + VectorStoreFileObject: 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 + title: Id 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. + 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: + anyOf: + - $ref: '#/components/schemas/VectorStoreFileLastError' + - type: 'null' 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 - max_tool_calls: + anyOf: + - type: string + const: completed + - type: string + const: in_progress + - type: string + const: cancelled + - type: string + const: failed + title: Status + usage_bytes: type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response - additionalProperties: false - required: - - created_at - - id - - model - - object - - output - - parallel_tool_calls - - status - - text - title: OpenAIResponseObject - description: >- - Complete OpenAI response object containing generation results and metadata. - OpenAIResponseContentPartOutputText: + 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. + VectorStoreObject: properties: - type: + id: type: string - const: output_text - default: output_text - description: >- - Content part type identifier, always "output_text" - text: + title: Id + object: type: string - description: Text emitted for this content part - annotations: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseAnnotations' - description: >- - Structured annotations associated with the text - logprobs: - type: array - items: + title: Object + default: vector_store + created_at: + type: integer + title: Created At + name: + anyOf: + - type: string + - type: 'null' + title: Name + usage_bytes: + type: integer + title: Usage Bytes + default: 0 + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + type: string + title: Status + default: completed + expires_after: + anyOf: + - additionalProperties: true type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) Token log probability details - additionalProperties: false - required: - - type - - text - - annotations - title: OpenAIResponseContentPartOutputText - description: >- - Text content within a streamed response part. - "OpenAIResponseContentPartReasoningSummary": + - 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 + type: object + title: Metadata type: object - properties: - type: - type: string - const: summary_text - default: summary_text - description: >- - Content part type identifier, always "summary_text" - text: - type: string - description: Summary text - additionalProperties: false required: - - type - - text - title: >- - OpenAIResponseContentPartReasoningSummary - description: >- - Reasoning summary part in a streamed response. - OpenAIResponseContentPartReasoningText: - type: object + - id + - created_at + - file_counts + title: VectorStoreObject + description: OpenAI Vector Store object. + VectorStoreSearchResponse: properties: - type: + file_id: type: string - const: reasoning_text - default: reasoning_text - description: >- - Content part type identifier, always "reasoning_text" - text: + title: File Id + filename: type: string - description: Reasoning text supplied by the model - additionalProperties: false - required: - - type - - text - title: OpenAIResponseContentPartReasoningText - description: >- - Reasoning text emitted as part of a streamed response. - OpenAIResponseObjectStream: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - discriminator: - propertyName: type - mapping: - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - "OpenAIResponseObjectStreamResponseCompleted": + title: Filename + score: + type: number + title: Score + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + type: object + - type: 'null' + title: Attributes + 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. + VectorStoreSearchResponsePage: properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Completed response object - type: + object: type: string - const: response.completed - default: response.completed - description: >- - Event type identifier, always "response.completed" - additionalProperties: false - required: - - response - - type - title: >- - OpenAIResponseObjectStreamResponseCompleted - description: >- - Streaming event indicating a response has been completed. - "OpenAIResponseObjectStreamResponseContentPartAdded": + title: Object + default: vector_store.search_results.page + search_query: + items: + type: string + type: array + title: Search Query + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + type: array + title: Data + has_more: + type: boolean + title: Has More + default: false + next_page: + anyOf: + - type: string + - type: 'null' + title: Next Page type: object + required: + - search_query + - data + title: VectorStoreSearchResponsePage + description: Paginated response from searching a vector store. + VersionInfo: properties: - content_index: - type: integer - description: >- - Index position of the part within the content array - response_id: - type: string - description: >- - Unique identifier of the response containing this content - item_id: - type: string - description: >- - Unique identifier of the output item containing this content part - output_index: - type: integer - description: >- - Index position of the output item in the response - part: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - description: The content part that was added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: + version: type: string - const: response.content_part.added - default: response.content_part.added - description: >- - Event type identifier, always "response.content_part.added" - additionalProperties: false + title: Version + type: object required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseContentPartAdded - description: >- - Streaming event for when a new content part is added to a response item. - "OpenAIResponseObjectStreamResponseContentPartDone": + - version + title: VersionInfo + description: Version information for the service. + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: Severity level of a safety violation. + _URLOrData: + properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + data: + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + title: Data type: object + title: _URLOrData + description: A URL or a base64 encoded string + _batches_Request: properties: - content_index: - type: integer - description: >- - Index position of the part within the content array - response_id: + input_file_id: type: string - description: >- - Unique identifier of the response containing this content - item_id: + title: Input File Id + endpoint: type: string - description: >- - Unique identifier of the output item containing this content part - output_index: - type: integer - description: >- - Index position of the output item in the response - part: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - description: The completed content part - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: + title: Endpoint + completion_window: type: string - const: response.content_part.done - default: response.content_part.done - description: >- - Event type identifier, always "response.content_part.done" - additionalProperties: false + const: 24h + title: Completion Window + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + idempotency_key: + anyOf: + - type: string + - type: 'null' + title: Idempotency Key + type: object required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseContentPartDone - description: >- - Streaming event for when a content part is completed. - "OpenAIResponseObjectStreamResponseCreated": + - input_file_id + - endpoint + - completion_window + title: _batches_Request + _conversations_Request: + properties: + items: + anyOf: + - 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' + 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' + type: array + - type: 'null' + title: Items + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Metadata + type: object + title: _conversations_Request + _conversations_conversation_id_Request: + properties: + metadata: + additionalProperties: + type: string + type: object + title: Metadata + type: object + required: + - metadata + title: _conversations_conversation_id_Request + _conversations_conversation_id_items_Request: + properties: + items: + 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' + 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' + type: array + title: Items + type: object + required: + - items + title: _conversations_conversation_id_items_Request + _moderations_Request: + properties: + input: + anyOf: + - type: string + - items: + type: string + type: array + title: Input + model: + anyOf: + - type: string + - type: 'null' + title: Model type: object + required: + - input + title: _moderations_Request + _prompts_Request: properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: The response object that was created - type: + prompt: type: string - const: response.created - default: response.created - description: >- - Event type identifier, always "response.created" - additionalProperties: false + title: Prompt + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Variables + type: object required: - - response - - type - title: >- - OpenAIResponseObjectStreamResponseCreated - description: >- - Streaming event indicating a new response has been created. - OpenAIResponseObjectStreamResponseFailed: + - prompt + title: _prompts_Request + _prompts_prompt_id_Request: + properties: + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Variables + set_as_default: + type: boolean + title: Set As Default + default: true type: object + required: + - prompt + - version + title: _prompts_prompt_id_Request + _prompts_prompt_id_set_default_version_Request: properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Response object describing the failure - sequence_number: + version: type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.failed - default: response.failed - description: >- - Event type identifier, always "response.failed" - additionalProperties: false + title: Version + type: object required: - - response - - sequence_number - - type - title: OpenAIResponseObjectStreamResponseFailed - description: >- - Streaming event emitted when a response fails. - "OpenAIResponseObjectStreamResponseFileSearchCallCompleted": + - version + title: _prompts_prompt_id_set_default_version_Request + _responses_Request: + properties: + input: + title: Input + model: + title: Model + prompt: + title: Prompt + instructions: + title: Instructions + previous_response_id: + title: Previous Response Id + conversation: + title: Conversation + store: + title: Store + default: true + stream: + title: Stream + default: false + temperature: + title: Temperature + text: + title: Text + tools: + title: Tools + include: + title: Include + max_infer_iters: + title: Max Infer Iters + default: 10 + guardrails: + title: Guardrails + max_tool_calls: + title: Max Tool Calls type: object + required: + - input + - model + title: _responses_Request + _scoring_score_Request: properties: - item_id: - type: string - description: >- - Unique identifier of the completed file search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.file_search_call.completed - default: response.file_search_call.completed - description: >- - Event type identifier, always "response.file_search_call.completed" - additionalProperties: false + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + additionalProperties: + 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' + type: object + title: Scoring Functions + type: object required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFileSearchCallCompleted - description: >- - Streaming event for completed file search calls. - "OpenAIResponseObjectStreamResponseFileSearchCallInProgress": + - input_rows + - scoring_functions + title: _scoring_score_Request + _scoring_score_batch_Request: + properties: + dataset_id: + type: string + title: Dataset Id + scoring_functions: + additionalProperties: + 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' + type: object + 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 + _tool_runtime_invoke_Request: properties: - item_id: + tool_name: type: string - description: >- - Unique identifier of the file search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: + title: Tool Name + kwargs: + additionalProperties: true + type: object + title: Kwargs + type: object + required: + - tool_name + - kwargs + title: _tool_runtime_invoke_Request + _vector_io_query_Request: + properties: + vector_store_id: type: string - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - description: >- - Event type identifier, always "response.file_search_call.in_progress" - additionalProperties: false + title: Vector Store Id + query: + 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: Query + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFileSearchCallInProgress - description: >- - Streaming event for file search calls in progress. - "OpenAIResponseObjectStreamResponseFileSearchCallSearching": + - vector_store_id + - query + title: _vector_io_query_Request + _vector_stores_vector_store_id_Request: + properties: + name: + anyOf: + - type: string + - type: 'null' + title: Name + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Expires After + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata type: object + title: _vector_stores_vector_store_id_Request + _vector_stores_vector_store_id_files_Request: properties: - item_id: - type: string - description: >- - Unique identifier of the file search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: + file_id: type: string - const: response.file_search_call.searching - default: response.file_search_call.searching - description: >- - Event type identifier, always "response.file_search_call.searching" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFileSearchCallSearching - description: >- - Streaming event for file search currently searching. - "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta": + title: File Id + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Attributes + 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 type: object + required: + - file_id + title: _vector_stores_vector_store_id_files_Request + _vector_stores_vector_store_id_files_file_id_Request: properties: - delta: - type: string - description: >- - Incremental function call arguments being added - item_id: - type: string - description: >- - Unique identifier of the function call being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - description: >- - Event type identifier, always "response.function_call_arguments.delta" - additionalProperties: false + attributes: + additionalProperties: true + type: object + title: Attributes + type: object required: - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - description: >- - Streaming event for incremental function call argument updates. - "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone": + - attributes + title: _vector_stores_vector_store_id_files_file_id_Request + _vector_stores_vector_store_id_search_Request: + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: Query + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Filters + max_num_results: + anyOf: + - type: integer + - type: 'null' + title: Max Num Results + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + - type: 'null' + rewrite_query: + anyOf: + - type: boolean + - type: 'null' + title: Rewrite Query + default: false + search_mode: + anyOf: + - type: string + - type: 'null' + title: Search Mode + default: vector type: object + required: + - query + title: _vector_stores_vector_store_id_search_Request + Error: + description: Error response from the API. Roughly follows RFC 7807. properties: - arguments: - type: string - description: >- - Final complete arguments JSON string for the function call - item_id: - type: string - description: >- - Unique identifier of the completed function call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: + status: + title: Status type: integer - description: >- - Sequential number for ordering streaming events - type: + title: + title: Title type: string - const: response.function_call_arguments.done - default: response.function_call_arguments.done - description: >- - Event type identifier, always "response.function_call_arguments.done" - additionalProperties: false + detail: + title: Detail + type: string + instance: + anyOf: + - type: string + - type: 'null' + title: Instance + nullable: true required: - - arguments - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - description: >- - Streaming event for when function call arguments are completed. - "OpenAIResponseObjectStreamResponseInProgress": + - status + - title + - detail + title: Error type: object + ImageContentItem: + description: A image content item properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Current response state while in progress - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: + const: image + default: image + title: Type type: string - const: response.in_progress - default: response.in_progress - description: >- - Event type identifier, always "response.in_progress" - additionalProperties: false + image: + $ref: '#/components/schemas/_URLOrData' required: - - response - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseInProgress - description: >- - Streaming event indicating the response remains in progress. - "OpenAIResponseObjectStreamResponseIncomplete": + - image + title: ImageContentItem type: object + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + BuiltinTool: + enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + title: BuiltinTool + type: string + ImageDelta: + description: An image content delta for streaming responses. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: >- - Response object describing the incomplete state - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image type: string - const: response.incomplete - default: response.incomplete - description: >- - Event type identifier, always "response.incomplete" - additionalProperties: false required: - - response - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseIncomplete - description: >- - Streaming event emitted when a response ends in an incomplete state. - "OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta": + - image + title: ImageDelta type: object + TextDelta: + description: A text content delta for streaming responses. properties: - delta: - type: string - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer type: + const: text + default: text + title: Type + type: string + text: + title: Text type: string - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - additionalProperties: false required: - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - "OpenAIResponseObjectStreamResponseMcpCallArgumentsDone": + - text + title: TextDelta type: object + ToolCall: properties: - arguments: - type: string - item_id: + call_id: + title: Call Id type: string - output_index: - type: integer - sequence_number: - type: integer - type: + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + arguments: + title: Arguments type: string - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - additionalProperties: false required: - - arguments - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - "OpenAIResponseObjectStreamResponseMcpCallCompleted": + - call_id + - tool_name + - arguments + title: ToolCall type: object + ToolCallDelta: + description: A tool call content delta for streaming responses. properties: - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: + const: tool_call + default: tool_call + title: Type type: string - const: response.mcp_call.completed - default: response.mcp_call.completed - description: >- - Event type identifier, always "response.mcp_call.completed" - additionalProperties: false + tool_call: + anyOf: + - type: string + - $ref: '#/components/schemas/ToolCall' + title: Tool Call + parse_status: + $ref: '#/components/schemas/ToolCallParseStatus' required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallCompleted - description: Streaming event for completed MCP calls. - "OpenAIResponseObjectStreamResponseMcpCallFailed": + - tool_call + - parse_status + title: ToolCallDelta type: object + ToolCallParseStatus: + description: Status of tool call parsing during streaming. + enum: + - started + - in_progress + - failed + - succeeded + title: ToolCallParseStatus + type: string + ContentDelta: + discriminator: + mapping: + image: '#/components/schemas/ImageDelta' + text: '#/components/schemas/TextDelta' + tool_call: '#/components/schemas/ToolCallDelta' + propertyName: type + oneOf: + - $ref: '#/components/schemas/TextDelta' + - $ref: '#/components/schemas/ImageDelta' + - $ref: '#/components/schemas/ToolCallDelta' + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. properties: - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: + const: grammar + default: grammar + title: Type type: string - const: response.mcp_call.failed - default: response.mcp_call.failed - description: >- - Event type identifier, always "response.mcp_call.failed" - additionalProperties: false + bnf: + additionalProperties: true + title: Bnf + type: object required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallFailed - description: Streaming event for failed MCP calls. - "OpenAIResponseObjectStreamResponseMcpCallInProgress": + - bnf + title: GrammarResponseFormat type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. properties: - item_id: - type: string - description: Unique identifier of the MCP call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: + const: json_schema + default: json_schema + title: Type type: string - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - description: >- - Event type identifier, always "response.mcp_call.in_progress" - additionalProperties: false + json_schema: + additionalProperties: true + title: Json Schema + type: object required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallInProgress - description: >- - Streaming event for MCP calls in progress. - "OpenAIResponseObjectStreamResponseMcpListToolsCompleted": + - json_schema + title: JsonSchemaResponseFormat type: object + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + OpenAIChatCompletionContentPartParam: + 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' + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: - sequence_number: - type: integer - type: + role: + const: assistant + default: assistant + title: Role type: string - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - additionalProperties: false + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + - type: 'null' + title: Content + nullable: true + name: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + title: Tool Calls + nullable: true + title: OpenAIAssistantMessageParam + type: object + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. + 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: + anyOf: + - type: string + - type: 'null' + title: Name + nullable: true required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsCompleted - "OpenAIResponseObjectStreamResponseMcpListToolsFailed": + - content + title: OpenAIUserMessageParam type: object + OpenAIMessageParam: + 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' + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + VectorStoreFileStatus: + anyOf: + - const: completed + type: string + - const: in_progress + type: string + - const: cancelled + type: string + - const: failed + type: string + OpenAIResponseInputMessageContent: + 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' + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + 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: - sequence_number: - type: integer + 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 - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - additionalProperties: false + id: + anyOf: + - type: string + - type: 'null' + title: Id + nullable: true + status: + anyOf: + - type: string + - type: 'null' + title: Status + nullable: true required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsFailed - "OpenAIResponseObjectStreamResponseMcpListToolsInProgress": + - content + - role + title: OpenAIResponseMessage type: object + OpenAIResponseOutput: + 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' + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. properties: - sequence_number: - type: integer - type: - type: string - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsInProgress - "OpenAIResponseObjectStreamResponseOutputItemAdded": + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Always + nullable: true + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Never + nullable: true + title: ApprovalFilter type: object + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: - response_id: - type: string - description: >- - Unique identifier of the response containing this output - item: - 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' - description: >- - The output item that was added (message, tool call, etc.) - output_index: - type: integer - description: >- - Index position of this item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events type: + const: mcp + default: mcp + title: Type type: string - const: response.output_item.added - default: response.output_item.added - description: >- - Event type identifier, always "response.output_item.added" - additionalProperties: false - required: - - response_id - - item - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputItemAdded - description: >- - Streaming event for when a new output item is added to the response. - "OpenAIResponseObjectStreamResponseOutputItemDone": - type: object - properties: - response_id: + server_label: + title: Server Label type: string - description: >- - Unique identifier of the response containing this output - item: - 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' - description: >- - The completed output item (message, tool call, etc.) - output_index: - type: integer - description: >- - Index position of this item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: + server_url: + title: Server Url type: string - const: response.output_item.done - default: response.output_item.done - description: >- - Event type identifier, always "response.output_item.done" - additionalProperties: false + headers: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Headers + nullable: true + require_approval: + anyOf: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + default: never + title: Require Approval + allowed_tools: + anyOf: + - items: + type: string + type: array + - $ref: '#/components/schemas/AllowedToolsFilter' + - type: 'null' + title: Allowed Tools + nullable: true required: - - response_id - - item - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputItemDone - description: >- - Streaming event for when an output item is completed. - "OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded": + - server_label + - server_url + title: OpenAIResponseInputToolMCP type: object + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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/OpenAIResponseInputToolMCP' + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. properties: - item_id: + type: + const: output_text + default: output_text + title: Type type: string - description: >- - Unique identifier of the item to which the annotation is being added - output_index: - type: integer - description: >- - Index position of the output item in the response's output array - content_index: - type: integer - description: >- - Index position of the content part within the output item - annotation_index: - type: integer - description: >- - Index of the annotation within the content part - annotation: - oneOf: + text: + title: Text + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + 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' - description: The annotation object being added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events + title: Annotations + type: array + logprobs: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + title: Logprobs + nullable: true + required: + - text + title: OpenAIResponseContentPartOutputText + type: object + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. + properties: type: + const: reasoning_text + default: reasoning_text + title: Type + type: string + text: + title: Text type: string - const: response.output_text.annotation.added - default: response.output_text.annotation.added - description: >- - Event type identifier, always "response.output_text.annotation.added" - additionalProperties: false required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - description: >- - Streaming event for when an annotation is added to output text. - "OpenAIResponseObjectStreamResponseOutputTextDelta": + - text + title: OpenAIResponseContentPartReasoningText type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. properties: - content_index: - type: integer - description: Index position within the text content - delta: + type: + const: summary_text + default: summary_text + title: Type type: string - description: Incremental text content being added - item_id: + text: + title: Text type: string - description: >- - Unique identifier of the output item being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events + required: + - text + title: OpenAIResponseContentPartReasoningSummary + type: object + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' type: + const: response.completed + default: response.completed + title: Type type: string - const: response.output_text.delta - default: response.output_text.delta - description: >- - Event type identifier, always "response.output_text.delta" - additionalProperties: false required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextDelta - description: >- - Streaming event for incremental text content updates. - "OpenAIResponseObjectStreamResponseOutputTextDone": + - response + title: OpenAIResponseObjectStreamResponseCompleted type: object + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. properties: content_index: + title: Content Index type: integer - description: Index position within the text content - text: + response_id: + title: Response Id type: string - description: >- - Final complete text content of the output item item_id: + title: Item Id type: string - description: >- - Unique identifier of the completed output item output_index: + title: Output Index type: integer - description: >- - Index position of the item in the output list + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: Part sequence_number: + title: Sequence Number type: integer - description: >- - Sequential number for ordering streaming events type: + const: response.content_part.added + default: response.content_part.added + title: Type type: string - const: response.output_text.done - default: response.output_text.done - description: >- - Event type identifier, always "response.output_text.done" - additionalProperties: false required: - - content_index - - text - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextDone - description: >- - Streaming event for when text output is completed. - "OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded": + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded type: object + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. properties: - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - description: The summary part that was added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: + content_index: + title: Content Index type: integer - description: >- - Index of the summary part within the reasoning summary - type: + response_id: + title: Response Id type: string - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - description: >- - Event type identifier, always "response.reasoning_summary_part.added" - additionalProperties: false - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - description: >- - Streaming event for when a new reasoning summary part is added. - "OpenAIResponseObjectStreamResponseReasoningSummaryPartDone": - type: object - properties: item_id: + title: Item Id type: string - description: Unique identifier of the output item output_index: + title: Output Index type: integer - description: Index position of the output item part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - description: The completed summary part + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: Part sequence_number: + title: Sequence Number type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary type: + const: response.content_part.done + default: response.content_part.done + title: Type type: string - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - description: >- - Event type identifier, always "response.reasoning_summary_part.done" - additionalProperties: false required: - - item_id - - output_index - - part - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - description: >- - Streaming event for when a reasoning summary part is completed. - "OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta": + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone type: object + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. properties: - delta: - type: string - description: Incremental summary text being added - item_id: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.created + default: response.created + title: Type type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item + required: + - response + title: OpenAIResponseObjectStreamResponseCreated + type: object + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' sequence_number: + title: Sequence Number type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary type: + const: response.failed + default: response.failed + title: Type type: string - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - description: >- - Event type identifier, always "response.reasoning_summary_text.delta" - additionalProperties: false required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - description: >- - Streaming event for incremental reasoning summary text updates. - "OpenAIResponseObjectStreamResponseReasoningSummaryTextDone": + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed type: object + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. properties: - text: - type: string - description: Final complete summary text item_id: + title: Item Id type: string - description: Unique identifier of the output item output_index: + title: Output Index type: integer - description: Index position of the output item sequence_number: + title: Sequence Number type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type type: string - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - description: >- - Event type identifier, always "response.reasoning_summary_text.done" - additionalProperties: false required: - - text - - item_id - - output_index - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - description: >- - Streaming event for when reasoning summary text is completed. - "OpenAIResponseObjectStreamResponseReasoningTextDelta": + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted type: object + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. properties: - content_index: - type: integer - description: >- - Index position of the reasoning content part - delta: - type: string - description: Incremental reasoning text being added item_id: + title: Item Id type: string - description: >- - Unique identifier of the output item being updated output_index: + title: Output Index type: integer - description: >- - Index position of the item in the output list sequence_number: + title: Sequence Number type: integer - description: >- - Sequential number for ordering streaming events type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type type: string - const: response.reasoning_text.delta - default: response.reasoning_text.delta - description: >- - Event type identifier, always "response.reasoning_text.delta" - additionalProperties: false required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningTextDelta - description: >- - Streaming event for incremental reasoning text updates. - "OpenAIResponseObjectStreamResponseReasoningTextDone": + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress type: object + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. properties: - content_index: - type: integer - description: >- - Index position of the reasoning content part - text: - type: string - description: Final complete reasoning text item_id: + title: Item Id type: string - description: >- - Unique identifier of the completed output item output_index: + title: Output Index type: integer - description: >- - Index position of the item in the output list sequence_number: + title: Sequence Number type: integer - description: >- - Sequential number for ordering streaming events type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type type: string - const: response.reasoning_text.done - default: response.reasoning_text.done - description: >- - Event type identifier, always "response.reasoning_text.done" - additionalProperties: false required: - - content_index - - text - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningTextDone - description: >- - Streaming event for when reasoning text is completed. - "OpenAIResponseObjectStreamResponseRefusalDelta": + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. properties: - content_index: - type: integer - description: Index position of the content part delta: + title: Delta type: string - description: Incremental refusal text being added item_id: + title: Item Id type: string - description: Unique identifier of the output item output_index: + title: Output Index type: integer - description: >- - Index position of the item in the output list sequence_number: + title: Sequence Number type: integer - description: >- - Sequential number for ordering streaming events type: + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + title: Type type: string - const: response.refusal.delta - default: response.refusal.delta - description: >- - Event type identifier, always "response.refusal.delta" - additionalProperties: false required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseRefusalDelta - description: >- - Streaming event for incremental refusal text updates. - "OpenAIResponseObjectStreamResponseRefusalDone": + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. properties: - content_index: - type: integer - description: Index position of the content part - refusal: + arguments: + title: Arguments type: string - description: Final complete refusal text item_id: + title: Item Id type: string - description: Unique identifier of the output item output_index: + title: Output Index type: integer - description: >- - Index position of the item in the output list sequence_number: + title: Sequence Number type: integer - description: >- - Sequential number for ordering streaming events type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type type: string - const: response.refusal.done - default: response.refusal.done - description: >- - Event type identifier, always "response.refusal.done" - additionalProperties: false required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseRefusalDone - description: >- - Streaming event for when refusal text is completed. - "OpenAIResponseObjectStreamResponseWebSearchCallCompleted": + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone type: object + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. properties: - item_id: - type: string - description: >- - Unique identifier of the completed web search call - output_index: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number type: integer - description: >- - Index position of the item in the output list + type: + const: response.in_progress + default: response.in_progress + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress + type: object + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' sequence_number: + title: Sequence Number type: integer - description: >- - Sequential number for ordering streaming events type: + const: response.incomplete + default: response.incomplete + title: Type type: string - const: response.web_search_call.completed - default: response.web_search_call.completed - description: >- - Event type identifier, always "response.web_search_call.completed" - additionalProperties: false required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallCompleted - description: >- - Streaming event for completed web search calls. - "OpenAIResponseObjectStreamResponseWebSearchCallInProgress": + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: properties: + delta: + title: Delta + type: string item_id: + title: Item Id type: string - description: Unique identifier of the web search call output_index: + title: Output Index type: integer - description: >- - Index position of the item in the output list sequence_number: + title: Sequence Number type: integer - description: >- - Sequential number for ordering streaming events type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type type: string - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - description: >- - Event type identifier, always "response.web_search_call.in_progress" - additionalProperties: false required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallInProgress - description: >- - Streaming event for web search calls in progress. - "OpenAIResponseObjectStreamResponseWebSearchCallSearching": + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: properties: + arguments: + title: Arguments + type: string item_id: + title: Item Id type: string output_index: + title: Output Index type: integer sequence_number: + title: Sequence Number type: integer type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type type: string - const: response.web_search_call.searching - default: response.web_search_call.searching - additionalProperties: false required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallSearching - OpenAIDeleteResponseObject: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone type: object + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. properties: - id: - type: string - description: >- - Unique identifier of the deleted response - object: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type type: string - const: response - default: response - description: >- - Object type identifier, always "response" - deleted: - type: boolean - default: true - description: Deletion confirmation flag, always True - additionalProperties: false required: - - id - - object - - deleted - title: OpenAIDeleteResponseObject - description: >- - Response object confirming deletion of an OpenAI response. - ListOpenAIResponseInputItem: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: List of input items - object: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.failed + default: response.mcp_call.failed + title: Type type: string - const: list - default: list - description: Object type identifier, always "list" - additionalProperties: false required: - - data - - object - title: ListOpenAIResponseInputItem - description: >- - List container for OpenAI response input items. - RunShieldRequest: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed type: object + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. properties: - shield_id: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress + title: Type type: string - description: The identifier of the shield to run. - messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - description: The messages to run the shield on. - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The parameters of the shield. - additionalProperties: false required: - - shield_id - - messages - - params - title: RunShieldRequest - RunShieldResponse: - type: object - properties: - violation: - $ref: '#/components/schemas/SafetyViolation' - description: >- - (Optional) Safety violation detected by the shield, if any - additionalProperties: false - title: RunShieldResponse - description: Response from running a safety shield. - SafetyViolation: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress type: object + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - description: Severity level of the violation - user_message: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type type: string - description: >- - (Optional) Message to convey to the user about the violation - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Additional metadata including specific violation codes for debugging and - telemetry - additionalProperties: false required: - - violation_level - - metadata - title: SafetyViolation - description: >- - Details of a safety violation detected by content moderation. - ViolationLevel: - type: string - enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: >- - Types of aggregation functions for scoring results. - ArrayType: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted type: object + OpenAIResponseObjectStreamResponseMcpListToolsFailed: properties: + sequence_number: + title: Sequence Number + type: integer type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type type: string - const: array - default: array - description: Discriminator type. Always "array" - additionalProperties: false required: - - type - title: ArrayType - description: Parameter type for array values. - BasicScoringFnParams: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed type: object + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: properties: + sequence_number: + title: Sequence Number + type: integer type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: basic - default: basic - description: >- - The type of scoring function parameters, always basic - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type + type: string required: - - type - - aggregation_functions - title: BasicScoringFnParams - description: >- - Parameters for basic scoring function configuration. - BooleanType: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. properties: + response_id: + title: Response Id + type: string + item: + 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: Item + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.output_item.added + default: response.output_item.added + title: Type type: string - const: boolean - default: boolean - description: Discriminator type. Always "boolean" - additionalProperties: false required: - - type - title: BooleanType - description: Parameter type for boolean values. - ChatCompletionInputType: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded type: object + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. properties: + response_id: + title: Response Id + type: string + item: + 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: Item + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.output_item.done + default: response.output_item.done + title: Type type: string - const: chat_completion_input - default: chat_completion_input - description: >- - Discriminator type. Always "chat_completion_input" - additionalProperties: false required: - - type - title: ChatCompletionInputType - description: >- - Parameter type for chat completion input. - CompletionInputType: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: Annotation + sequence_number: + title: Sequence Number + type: integer type: + const: response.output_text.annotation.added + default: response.output_text.annotation.added + title: Type type: string - const: completion_input - default: completion_input - description: >- - Discriminator type. Always "completion_input" - additionalProperties: false required: - - type - title: CompletionInputType - description: Parameter type for completion input. - JsonType: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded type: object + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.output_text.delta + default: response.output_text.delta + title: Type type: string - const: json - default: json - description: Discriminator type. Always "json" - additionalProperties: false required: - - type - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta type: object + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: llm_as_judge - default: llm_as_judge - description: >- - The type of scoring function parameters, always llm_as_judge - judge_model: + content_index: + title: Content Index + type: integer + text: + title: Text type: string - description: >- - Identifier of the LLM model to use as a judge for scoring - prompt_template: + item_id: + title: Item Id type: string - description: >- - (Optional) Custom prompt template for the judge model - judge_score_regexes: - type: array - items: - type: string - description: >- - Regexes to extract the answer from generated response - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - judge_model - - judge_score_regexes - - aggregation_functions - title: LLMAsJudgeScoringFnParams - description: >- - Parameters for LLM-as-judge scoring function configuration. - NumberType: - type: object - properties: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.output_text.done + default: response.output_text.done + title: Type type: string - const: number - default: number - description: Discriminator type. Always "number" - additionalProperties: false required: - - type - title: NumberType - description: Parameter type for numeric values. - ObjectType: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type type: string - const: object - default: object - description: Discriminator type. Always "object" - additionalProperties: false required: - - type - title: ObjectType - description: Parameter type for object values. - RegexParserScoringFnParams: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: regex_parser - default: regex_parser - description: >- - The type of scoring function parameters, always regex_parser - parsing_regexes: - type: array - items: - type: string - description: >- - Regex to extract the answer from generated response - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - parsing_regexes - - aggregation_functions - title: RegexParserScoringFnParams - description: >- - Parameters for regex parser scoring function configuration. - ScoringFn: + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done + title: Type + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. properties: - identifier: - type: string - provider_resource_id: + delta: + title: Delta type: string - provider_id: + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta + title: Type type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: scoring_function - default: scoring_function - description: >- - The resource type, always scoring_function - description: - type: string - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - 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' - discriminator: - propertyName: type - mapping: - string: '#/components/schemas/StringType' - number: '#/components/schemas/NumberType' - boolean: '#/components/schemas/BooleanType' - array: '#/components/schemas/ArrayType' - object: '#/components/schemas/ObjectType' - json: '#/components/schemas/JsonType' - union: '#/components/schemas/UnionType' - chat_completion_input: '#/components/schemas/ChatCompletionInputType' - completion_input: '#/components/schemas/CompletionInputType' - params: - $ref: '#/components/schemas/ScoringFnParams' - additionalProperties: false required: - - identifier - - provider_id - - type - - metadata - - return_type - title: ScoringFn - description: >- - A scoring function resource for evaluating model outputs. - ScoringFnParams: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' - - $ref: '#/components/schemas/BasicScoringFnParams' - discriminator: - propertyName: type - mapping: - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - basic: '#/components/schemas/BasicScoringFnParams' - ScoringFnParamsType: - type: string - enum: - - llm_as_judge - - regex_parser - - basic - title: ScoringFnParamsType - description: >- - Types of scoring function parameter configurations. - StringType: + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. properties: + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done + title: Type type: string - const: string - default: string - description: Discriminator type. Always "string" - additionalProperties: false required: - - type - title: StringType - description: Parameter type for string values. - UnionType: + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone type: object + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.reasoning_text.delta + default: response.reasoning_text.delta + title: Type type: string - const: union - default: union - description: Discriminator type. Always "union" - additionalProperties: false - required: - - type - title: UnionType - description: Parameter type for union values. - ListScoringFunctionsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ScoringFn' - additionalProperties: false required: - - data - title: ListScoringFunctionsResponse - ScoreRequest: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta type: object - SpanStartPayload: - description: Payload for a span start event. + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. properties: + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: span_start - default: span_start + const: response.reasoning_text.done + default: response.reasoning_text.done title: Type type: string - name: - title: Name - type: string - parent_span_id: - anyOf: - - type: string - - type: 'null' - title: Parent Span Id - nullable: true required: - - name - title: SpanStartPayload + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - - $ref: '#/components/schemas/SpanEndPayload' - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - timestamp: - format: date-time - title: Timestamp + item_id: + title: Item Id type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - type: object - - type: 'null' - title: Attributes + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: metric - default: metric + const: response.refusal.delta + default: response.refusal.delta title: Type type: string - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: Value - unit: - title: Unit - type: string required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id + content_index: + title: Content Index + type: integer + refusal: + title: Refusal type: string - timestamp: - format: date-time - title: Timestamp + item_id: + title: Item Id type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - type: object - - type: 'null' - title: Attributes + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: structured_log - default: structured_log + const: response.refusal.done + default: response.refusal.done title: Type type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - - $ref: '#/components/schemas/SpanEndPayload' - title: Payload required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. properties: - trace_id: - title: Trace Id + item_id: + title: Item Id type: string - span_id: - title: Span Id + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type type: string - timestamp: - format: date-time - title: Timestamp + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. + properties: + item_id: + title: Item Id type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - type: object - - type: 'null' - title: Attributes + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: unstructured_log - default: unstructured_log + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress title: Type type: string - message: - title: Message + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseWebSearchCallSearching: + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type type: string - severity: - $ref: '#/components/schemas/LogSeverity' required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching type: object - Event: + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + OpenAIResponseInput: + 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' + ConversationItem: discriminator: mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' propertyName: type oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - - $ref: '#/components/schemas/MetricEvent' - - $ref: '#/components/schemas/StructuredLogEvent' - ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. - 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 - OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. - properties: - created_at: - title: Created At - type: integer - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - - type: 'null' - 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: - anyOf: - - type: string - - type: 'null' - title: Previous Response Id - nullable: true - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - - type: 'null' - nullable: true - status: - title: Status - type: string - temperature: - anyOf: - - type: number - - type: 'null' - title: Temperature - nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - title: Top P - nullable: true - tools: - anyOf: - - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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 - - type: 'null' - title: Tools - nullable: true - truncation: - anyOf: - - type: string - - type: 'null' - title: Truncation - nullable: true - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - - type: 'null' - nullable: true - instructions: - anyOf: - - type: string - - type: 'null' - title: Instructions - 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 - ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. + - $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' + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + - $ref: '#/components/schemas/RowsDataSource' + ParamType: + discriminator: + mapping: + 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' + ScoringFnParams: + 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' + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + - $ref: '#/components/schemas/QATFinetuningConfig' + SpanEndPayload: + description: Payload for a span end event. 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: + const: span_end + default: span_end + title: Type type: string + status: + $ref: '#/components/schemas/SpanStatus' required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject + - status + title: SpanEndPayload type: object - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. + SpanStartPayload: + description: Payload for a span start event. properties: type: + const: span_start + default: span_start title: Type type: string - required: - - type - title: ResponseGuardrailSpec - type: object - ListBatchesResponse: - description: Response containing a list of batch objects. - properties: - object: - const: list - default: list - title: Object + name: + title: Name type: string - data: - description: List of batch objects - items: - $ref: '#/components/schemas/Batch' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - title: First Id - nullable: true - last_id: + parent_span_id: anyOf: - type: string - type: 'null' - description: ID of the last batch in the list - title: Last Id + title: Parent Span Id nullable: true - has_more: - default: false - description: Whether there are more batches available - title: Has More - type: boolean required: - - data - title: ListBatchesResponse + - name + title: SpanStartPayload type: object - MetricInResponse: - description: A metric value included in API responses. + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: metric + default: metric + title: Type + type: string metric: title: Metric type: string @@ -15925,116 +9603,185 @@ components: - type: number title: Value unit: - anyOf: - - type: string - - type: 'null' title: Unit - nullable: true + type: string required: + - trace_id + - span_id + - timestamp - metric - value - title: MetricInResponse + - unit + title: MetricEvent type: object - PaginatedResponse: - description: A generic paginated response that follows a simple format. + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + title: Payload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: unstructured_log + default: unstructured_log + title: Type + type: string + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' + required: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent + type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + - $ref: '#/components/schemas/MetricEvent' + - $ref: '#/components/schemas/StructuredLogEvent' + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. properties: data: items: - additionalProperties: true - type: object + 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 - has_more: - title: Has More - type: boolean - url: - anyOf: - - type: string - - type: 'null' - title: Url - nullable: true + object: + const: list + default: list + title: Object + type: string required: - data - - has_more - title: PaginatedResponse - type: object - PostTrainingMetric: - description: Training metrics captured during post-training jobs. - 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 + title: ListOpenAIResponseInputItem type: object - Checkpoint: - description: Checkpoint created during training runs. + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. 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: + error: anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' + - $ref: '#/components/schemas/OpenAIResponseError' - type: 'null' nullable: true - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. - properties: - type: - const: dialog - default: dialog - title: Type + id: + title: Id type: string - title: DialogType - type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. - properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. + 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' - 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' @@ -16045,63 +9792,132 @@ components: - $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' - maxItems: 20 - title: Items - type: array - required: - - items - title: ConversationItemCreateRequest - type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. - properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: Output type: array - role: - description: message role - title: Role - type: string + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + nullable: true + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + nullable: true status: - description: message status title: Status type: string - type: - const: message - default: message - title: Type - type: string - object: - const: message - default: message - title: Object - type: string + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + nullable: true + tools: + anyOf: + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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 + - type: 'null' + title: Tools + nullable: true + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + nullable: true + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + nullable: true + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + nullable: true + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls + 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 - - content - - role + - model + - output - status - title: ConversationMessage + - input + title: OpenAIResponseObjectWithInput type: object - ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. properties: data: items: - $ref: '#/components/schemas/OpenAIFileObject' + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' title: Data type: array has_more: @@ -16119,320 +9935,280 @@ components: title: Object type: string required: - - data - title: ListShieldsResponse - InvokeToolRequest: - type: object - properties: - tool_name: - type: string - description: The name of the tool to invoke. - kwargs: - 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. - additionalProperties: false - required: - - tool_name - - kwargs - title: InvokeToolRequest - ImageContentItem: + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. properties: type: - const: bf16 - default: bf16 title: Type type: string - title: Bf16QuantizationConfig - type: object - LogProbConfig: - description: '' - properties: - top_k: - anyOf: - - type: integer - - type: 'null' - default: 0 - title: Top K - title: LogProbConfig - type: object - SystemMessageBehavior: - description: Config for how to override the default system prompt. - enum: - - append - - replace - title: SystemMessageBehavior - 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. - enum: - - auto - - required - - none - title: ToolChoice - type: string - ToolConfig: - description: Configuration for tool use. - properties: - tool_choice: - anyOf: - - $ref: '#/components/schemas/ToolChoice' - - type: string - - type: 'null' - default: auto - title: Tool Choice - tool_prompt_format: - anyOf: - - $ref: '#/components/schemas/ToolPromptFormat' - - type: 'null' - nullable: true - system_message_behavior: - anyOf: - - $ref: '#/components/schemas/SystemMessageBehavior' - - type: 'null' - default: append - title: ToolConfig + required: + - type + title: ResponseGuardrailSpec type: object - ToolPromptFormat: - description: Prompt format for calling custom / zero shot tools. - enum: - - json - - function_tag - - python_list - title: ToolPromptFormat - type: string - ChatCompletionRequest: + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - model: - title: Model + object: + const: list + default: list + title: Object type: string - messages: + data: + description: List of batch objects items: - discriminator: - mapping: - assistant: '#/components/schemas/CompletionMessage' - system: '#/components/schemas/SystemMessage' - tool: '#/components/schemas/ToolResponseMessage' - user: '#/components/schemas/UserMessage' - propertyName: role - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' - title: Messages + $ref: '#/components/schemas/Batch' + title: Data type: array - sampling_params: - anyOf: - - $ref: '#/components/schemas/SamplingParams' - - type: 'null' - tools: - anyOf: - - items: - $ref: '#/components/schemas/ToolDefinition' - type: array - - type: 'null' - title: Tools - tool_config: - anyOf: - - $ref: '#/components/schemas/ToolConfig' - - type: 'null' - response_format: + first_id: anyOf: - - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - - $ref: '#/components/schemas/GrammarResponseFormat' + - type: string - type: 'null' - title: Response Format + description: ID of the first batch in the list + title: First Id nullable: true - stream: - anyOf: - - type: boolean - - type: 'null' - default: false - title: Stream - logprobs: + last_id: anyOf: - - $ref: '#/components/schemas/LogProbConfig' + - type: string - type: 'null' + description: ID of the last batch in the list + title: Last Id nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean required: - - model - - messages - title: ChatCompletionRequest - type: object - TokenLogProbs: - description: Log probabilities for generated tokens. - properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs + - data + title: ListBatchesResponse type: object - ChatCompletionResponse: - description: Response from a chat completion request. + MetricInResponse: + description: A metric value included in API responses. properties: - metrics: + metric: + title: Metric + type: string + value: anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - completion_message: - $ref: '#/components/schemas/CompletionMessage' - logprobs: + - type: integer + - type: number + title: Value + unit: anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array + - type: string - type: 'null' - title: Logprobs + title: Unit nullable: true required: - - completion_message - title: ChatCompletionResponse + - metric + - value + title: MetricInResponse type: object - ChatCompletionResponseEventType: - description: Types of events that can occur during chat completion. - enum: - - start - - complete - - progress - title: ChatCompletionResponseEventType - type: string - ChatCompletionResponseEvent: - description: An event during chat completion generation. + PaginatedResponse: + description: A generic paginated response that follows a simple format. properties: - event_type: - $ref: '#/components/schemas/ChatCompletionResponseEventType' - delta: - discriminator: - mapping: - image: '#/components/schemas/ImageDelta' - text: '#/components/schemas/TextDelta' - tool_call: '#/components/schemas/ToolCallDelta' - propertyName: type - oneOf: - - $ref: '#/components/schemas/TextDelta' - - $ref: '#/components/schemas/ImageDelta' - - $ref: '#/components/schemas/ToolCallDelta' - title: Delta - logprobs: + data: + items: + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array + - type: string - type: 'null' - title: Logprobs + title: Url nullable: true - stop_reason: + required: + - data + - has_more + title: PaginatedResponse + type: object + PostTrainingMetric: + description: Training metrics captured during post-training jobs. + 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 + Checkpoint: + description: Checkpoint created during training runs. + 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: '#/components/schemas/StopReason' + - $ref: '#/components/schemas/PostTrainingMetric' - type: 'null' nullable: true required: - - event_type - - delta - title: ChatCompletionResponseEvent + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint type: object - ChatCompletionResponseStreamChunk: - description: A chunk of a streamed chat completion response. + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - event: - $ref: '#/components/schemas/ChatCompletionResponseEvent' + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: + 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' + 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/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + maxItems: 20 + title: Items + type: array required: - - event - title: ChatCompletionResponseStreamChunk + - items + title: ConversationItemCreateRequest type: object - CompletionResponse: - description: Response from a completion request. + ConversationMessage: + description: OpenAI-compatible message item for conversations. properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true + id: + description: unique identifier for this message + title: Id + type: string content: + description: message content + items: + additionalProperties: true + type: object title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object type: string - stop_reason: - $ref: '#/components/schemas/StopReason' - logprobs: - anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - - type: 'null' - title: Logprobs - nullable: true required: + - id - content - - stop_reason - title: CompletionResponse + - role + - status + title: ConversationMessage type: object - CompletionResponseStreamChunk: - description: A chunk of a streamed completion response. + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - delta: - title: Delta + 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 - stop_reason: - anyOf: - - $ref: '#/components/schemas/StopReason' - - type: 'null' - nullable: true - logprobs: - anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - - type: 'null' - title: Logprobs - nullable: true required: - - delta - title: CompletionResponseStreamChunk + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse + type: object + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). + properties: + type: + const: bf16 + default: bf16 + title: Type + type: string + title: Bf16QuantizationConfig type: object EmbeddingsResponse: description: Response containing generated embeddings. @@ -16727,17 +10503,64 @@ components: nullable: true title: OpenAICompletionLogprobs type: object - ToolResponse: - description: Response from a tool invocation. + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object + required: + - logprobs_by_token + title: TokenLogProbs + type: object + ToolResponseMessage: + description: A message representing the result of a tool invocation. properties: + role: + const: tool + default: tool + title: Role + type: string call_id: title: Call Id type: string - tool_name: + content: anyOf: - - $ref: '#/components/schemas/BuiltinTool' - type: string - title: Tool Name + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + required: + - call_id + - content + title: ToolResponseMessage + type: object + UserMessage: + description: A message from the user in a chat conversation. + properties: + role: + const: user + default: user + title: Role + type: string content: anyOf: - type: string @@ -16760,18 +10583,33 @@ components: - $ref: '#/components/schemas/TextContentItem' type: array title: Content - metadata: + context: anyOf: - - additionalProperties: true - type: object + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array - type: 'null' - title: Metadata + title: Context nullable: true required: - - call_id - - tool_name - content - title: ToolResponse + title: UserMessage type: object RouteInfo: description: Information about an API route including its path, method, and implementing providers. @@ -16940,11 +10778,34 @@ components: title: Data type: array required: - - data - title: ListToolGroupsResponse - description: >- - Response containing a list of tool groups. - Chunk: + - data + title: ListToolDefsResponse + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id + type: string + provider_id: + title: Provider Id + type: string + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + nullable: true + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + nullable: true + required: + - toolgroup_id + - provider_id + title: ToolGroupInput type: object Chunk: description: A chunk of content that can be inserted into a vector database. diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index 76bb8b08dd..6fbca0d84e 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -3350,7 +3350,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' -<<<<<<< HEAD tags: - VectorIO summary: >- @@ -3387,8 +3386,6 @@ paths: $ref: '#/components/schemas/bool' deprecated: false /v1/vector_stores/{vector_store_id}/search: -======= ->>>>>>> a84647350 (chore: use Pydantic to generate OpenAPI schema) post: tags: - Shields From 66056ddb87a8f6d0a598a068050fb3404f711f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 12 Nov 2025 11:16:10 +0100 Subject: [PATCH 07/46] chore: re-add x-llama-stack-extra-body-params MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 235 +++++++++++++----- docs/static/deprecated-llama-stack-spec.yaml | 211 +++++++++++----- .../static/experimental-llama-stack-spec.yaml | 126 +++++----- docs/static/llama-stack-spec.yaml | 235 +++++++++++++----- docs/static/stainless-llama-stack-spec.yaml | 230 ++++++++++++----- scripts/fastapi_generator.py | 144 +++++++++++ 6 files changed, 842 insertions(+), 339 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index 73186f912e..cb7ff276d3 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -1482,6 +1482,30 @@ paths: application/json: schema: $ref: '#/components/schemas/_responses_Request' + x-llama-stack-extra-body-params: + guardrails: + $defs: + ResponseGuardrailSpec: + description: |- + Specification for a guardrail to apply during response generation. + + :param type: The type/identifier of the guardrail. + properties: + type: + title: Type + type: string + required: + - type + title: ResponseGuardrailSpec + type: object + anyOf: + - items: + anyOf: + - type: string + - $ref: '#/components/schemas/ResponseGuardrailSpec' + type: array + - type: 'null' + description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. responses: '200': description: An OpenAIResponseObject. @@ -4832,6 +4856,25 @@ components: type: object title: AllowedToolsFilter description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Always + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Never + type: object + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. ArrayType: properties: type: @@ -7415,6 +7458,48 @@ components: - parameters title: OpenAIResponseInputToolFunction description: Function tool configuration for OpenAI response inputs. + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Headers + 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' + - type: 'null' + title: Allowed Tools + type: object + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. OpenAIResponseInputToolWebSearch: properties: type: @@ -9728,37 +9813,114 @@ components: _responses_Request: properties: input: + anyOf: + - type: string + - items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + - $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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + type: array title: Input model: + type: string title: Model prompt: - title: Prompt + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' instructions: + anyOf: + - type: string + - type: 'null' title: Instructions previous_response_id: + anyOf: + - type: string + - type: 'null' title: Previous Response Id conversation: + anyOf: + - type: string + - type: 'null' title: Conversation store: + anyOf: + - type: boolean + - type: 'null' title: Store default: true stream: + anyOf: + - type: boolean + - type: 'null' title: Stream default: false temperature: + anyOf: + - type: number + - type: 'null' title: Temperature text: - title: Text + anyOf: + - $ref: '#/components/schemas/OpenAIResponseText' + - type: 'null' tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' title: Tools include: + anyOf: + - items: + type: string + type: array + - type: 'null' title: Include max_infer_iters: + anyOf: + - type: integer + - type: 'null' title: Max Infer Iters default: 10 - guardrails: - title: Guardrails max_tool_calls: + anyOf: + - type: integer + - type: 'null' title: Max Tool Calls type: object required: @@ -10434,71 +10596,6 @@ components: - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. - properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Always - nullable: true - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Never - nullable: true - title: ApprovalFilter - type: object - OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - properties: - type: - const: mcp - default: mcp - title: Type - type: string - server_label: - title: Server Label - type: string - server_url: - title: Server Url - type: string - headers: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Headers - nullable: true - require_approval: - anyOf: - - const: always - type: string - - const: never - type: string - - $ref: '#/components/schemas/ApprovalFilter' - default: never - title: Require Approval - allowed_tools: - anyOf: - - items: - type: string - type: array - - $ref: '#/components/schemas/AllowedToolsFilter' - - type: 'null' - title: Allowed Tools - nullable: true - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - type: object OpenAIResponseInputTool: discriminator: mapping: diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index 6dd23762ee..e1256e922b 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -780,6 +780,25 @@ components: type: object title: AllowedToolsFilter description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Always + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Never + type: object + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. ArrayType: properties: type: @@ -3576,6 +3595,48 @@ components: - parameters title: OpenAIResponseInputToolFunction description: Function tool configuration for OpenAI response inputs. + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Headers + 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' + - type: 'null' + title: Allowed Tools + type: object + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. OpenAIResponseInputToolWebSearch: properties: type: @@ -5933,37 +5994,114 @@ components: _responses_Request: properties: input: + anyOf: + - type: string + - items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + - $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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + type: array title: Input model: + type: string title: Model prompt: - title: Prompt + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' instructions: + anyOf: + - type: string + - type: 'null' title: Instructions previous_response_id: + anyOf: + - type: string + - type: 'null' title: Previous Response Id conversation: + anyOf: + - type: string + - type: 'null' title: Conversation store: + anyOf: + - type: boolean + - type: 'null' title: Store default: true stream: + anyOf: + - type: boolean + - type: 'null' title: Stream default: false temperature: + anyOf: + - type: number + - type: 'null' title: Temperature text: - title: Text + anyOf: + - $ref: '#/components/schemas/OpenAIResponseText' + - type: 'null' tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' title: Tools include: + anyOf: + - items: + type: string + type: array + - type: 'null' title: Include max_infer_iters: + anyOf: + - type: integer + - type: 'null' title: Max Infer Iters default: 10 - guardrails: - title: Guardrails max_tool_calls: + anyOf: + - type: integer + - type: 'null' title: Max Tool Calls type: object required: @@ -6664,71 +6802,6 @@ components: - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. - properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Always - nullable: true - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Never - nullable: true - title: ApprovalFilter - type: object - OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - properties: - type: - const: mcp - default: mcp - title: Type - type: string - server_label: - title: Server Label - type: string - server_url: - title: Server Url - type: string - headers: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Headers - nullable: true - require_approval: - anyOf: - - const: always - type: string - - const: never - type: string - - $ref: '#/components/schemas/ApprovalFilter' - default: never - title: Require Approval - allowed_tools: - anyOf: - - items: - type: string - type: array - - $ref: '#/components/schemas/AllowedToolsFilter' - - type: 'null' - title: Allowed Tools - nullable: true - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - type: object OpenAIResponseInputTool: discriminator: mapping: diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index c5d531d667..0ae55f1352 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -550,6 +550,25 @@ components: type: object title: AllowedToolsFilter description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Always + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Never + type: object + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. ArrayType: properties: type: @@ -3032,6 +3051,48 @@ components: - parameters title: OpenAIResponseInputToolFunction description: Function tool configuration for OpenAI response inputs. + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Headers + 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' + - type: 'null' + title: Allowed Tools + type: object + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. OpenAIResponseInputToolWebSearch: properties: type: @@ -5551,71 +5612,6 @@ components: - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. - properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Always - nullable: true - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Never - nullable: true - title: ApprovalFilter - type: object - OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - properties: - type: - const: mcp - default: mcp - title: Type - type: string - server_label: - title: Server Label - type: string - server_url: - title: Server Url - type: string - headers: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Headers - nullable: true - require_approval: - anyOf: - - const: always - type: string - - const: never - type: string - - $ref: '#/components/schemas/ApprovalFilter' - default: never - title: Require Approval - allowed_tools: - anyOf: - - items: - type: string - type: array - - $ref: '#/components/schemas/AllowedToolsFilter' - - type: 'null' - title: Allowed Tools - nullable: true - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - type: object OpenAIResponseInputTool: discriminator: mapping: diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index aa2844e28f..7370ed9fe6 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -90,6 +90,30 @@ paths: application/json: schema: $ref: '#/components/schemas/_responses_Request' + x-llama-stack-extra-body-params: + guardrails: + $defs: + ResponseGuardrailSpec: + description: |- + Specification for a guardrail to apply during response generation. + + :param type: The type/identifier of the guardrail. + properties: + type: + title: Type + type: string + required: + - type + title: ResponseGuardrailSpec + type: object + anyOf: + - items: + anyOf: + - type: string + - $ref: '#/components/schemas/ResponseGuardrailSpec' + type: array + - type: 'null' + description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. responses: '200': description: An OpenAIResponseObject. @@ -2742,6 +2766,25 @@ components: type: object title: AllowedToolsFilter description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Always + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Never + type: object + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. ArrayType: properties: type: @@ -5314,6 +5357,48 @@ components: - parameters title: OpenAIResponseInputToolFunction description: Function tool configuration for OpenAI response inputs. + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Headers + 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' + - type: 'null' + title: Allowed Tools + type: object + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. OpenAIResponseInputToolWebSearch: properties: type: @@ -7493,37 +7578,114 @@ components: _responses_Request: properties: input: + anyOf: + - type: string + - items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + - $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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + type: array title: Input model: + type: string title: Model prompt: - title: Prompt + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' instructions: + anyOf: + - type: string + - type: 'null' title: Instructions previous_response_id: + anyOf: + - type: string + - type: 'null' title: Previous Response Id conversation: + anyOf: + - type: string + - type: 'null' title: Conversation store: + anyOf: + - type: boolean + - type: 'null' title: Store default: true stream: + anyOf: + - type: boolean + - type: 'null' title: Stream default: false temperature: + anyOf: + - type: number + - type: 'null' title: Temperature text: - title: Text + anyOf: + - $ref: '#/components/schemas/OpenAIResponseText' + - type: 'null' tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' title: Tools include: + anyOf: + - items: + type: string + type: array + - type: 'null' title: Include max_infer_iters: + anyOf: + - type: integer + - type: 'null' title: Max Infer Iters default: 10 - guardrails: - title: Guardrails max_tool_calls: + anyOf: + - type: integer + - type: 'null' title: Max Tool Calls type: object required: @@ -8199,71 +8361,6 @@ components: - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. - properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Always - nullable: true - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Never - nullable: true - title: ApprovalFilter - type: object - OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - properties: - type: - const: mcp - default: mcp - title: Type - type: string - server_label: - title: Server Label - type: string - server_url: - title: Server Url - type: string - headers: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Headers - nullable: true - require_approval: - anyOf: - - const: always - type: string - - const: never - type: string - - $ref: '#/components/schemas/ApprovalFilter' - default: never - title: Require Approval - allowed_tools: - anyOf: - - items: - type: string - type: array - - $ref: '#/components/schemas/AllowedToolsFilter' - - type: 'null' - title: Allowed Tools - nullable: true - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - type: object OpenAIResponseInputTool: discriminator: mapping: diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index 6fbca0d84e..5302945fb4 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -1482,6 +1482,30 @@ paths: application/json: schema: $ref: '#/components/schemas/_responses_Request' + x-llama-stack-extra-body-params: + guardrails: + $defs: + ResponseGuardrailSpec: + description: |- + Specification for a guardrail to apply during response generation. + + :param type: The type/identifier of the guardrail. + properties: + type: + title: Type + type: string + required: + - type + title: ResponseGuardrailSpec + type: object + anyOf: + - items: + anyOf: + - type: string + - $ref: '#/components/schemas/ResponseGuardrailSpec' + type: array + - type: 'null' + description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. responses: '200': description: An OpenAIResponseObject. @@ -5243,6 +5267,25 @@ components: type: object title: AllowedToolsFilter description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Always + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Never + type: object + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. ArrayType: properties: type: @@ -7957,6 +8000,48 @@ components: - parameters title: OpenAIResponseInputToolFunction description: Function tool configuration for OpenAI response inputs. + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Headers + 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' + - type: 'null' + title: Allowed Tools + type: object + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. OpenAIResponseInputToolWebSearch: properties: type: @@ -10308,32 +10393,108 @@ components: _responses_Request: properties: input: + anyOf: + - type: string + - items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + - $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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + type: array title: Input model: + type: string title: Model prompt: - title: Prompt + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' instructions: + anyOf: + - type: string + - type: 'null' title: Instructions previous_response_id: + anyOf: + - type: string + - type: 'null' title: Previous Response Id conversation: + anyOf: + - type: string + - type: 'null' title: Conversation store: + anyOf: + - type: boolean + - type: 'null' title: Store default: true stream: + anyOf: + - type: boolean + - type: 'null' title: Stream default: false temperature: + anyOf: + - type: number + - type: 'null' title: Temperature text: - title: Text + anyOf: + - $ref: '#/components/schemas/OpenAIResponseText' + - type: 'null' tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' title: Tools include: + anyOf: + - items: + type: string + type: array + - type: 'null' title: Include max_infer_iters: + anyOf: + - type: integer + - type: 'null' title: Max Infer Iters default: 10 guardrails: @@ -11228,71 +11389,6 @@ components: - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. - properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Always - nullable: true - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Never - nullable: true - title: ApprovalFilter - type: object - OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - properties: - type: - const: mcp - default: mcp - title: Type - type: string - server_label: - title: Server Label - type: string - server_url: - title: Server Url - type: string - headers: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Headers - nullable: true - require_approval: - anyOf: - - const: always - type: string - - const: never - type: string - - $ref: '#/components/schemas/ApprovalFilter' - default: never - title: Require Approval - allowed_tools: - anyOf: - - items: - type: string - type: array - - $ref: '#/components/schemas/AllowedToolsFilter' - - type: 'null' - title: Allowed Tools - nullable: true - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - type: object OpenAIResponseInputTool: discriminator: mapping: diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index 054db71cf9..396a8cb655 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -36,6 +36,10 @@ # Cache for protocol methods to avoid repeated lookups _protocol_methods_cache: dict[Api, dict[str, Any]] | None = None +# Global dict to store extra body field information by endpoint +# Key: (path, method) tuple, Value: list of (param_name, param_type, description) tuples +_extra_body_fields: dict[tuple[str, str], list[tuple[str, type, str | None]]] = {} + def create_llama_stack_app() -> FastAPI: """ @@ -238,6 +242,15 @@ def _create_fastapi_endpoint(app: FastAPI, route, webmethod, api: Api): response_description = _extract_response_description_from_docstring(webmethod, response_model, api, name) is_post_put = any(method.upper() in ["POST", "PUT", "PATCH"] for method in methods) + # Retrieve and store extra body fields for this endpoint + func = _get_protocol_method(api, name) + extra_body_params = getattr(func, "_extra_body_params", []) if func else [] + if extra_body_params: + global _extra_body_fields + for method in methods: + key = (fastapi_path, method.upper()) + _extra_body_fields[key] = extra_body_params + if file_form_params and is_post_put: signature_params = list(file_form_params) param_annotations = {param.name: param.annotation for param in file_form_params} @@ -402,6 +415,13 @@ def _is_file_or_form_param(param_type: Any) -> bool: return False +def _is_extra_body_field(metadata_item: Any) -> bool: + """Check if a metadata item is an ExtraBodyField instance.""" + from llama_stack.schema_utils import ExtraBodyField + + return isinstance(metadata_item, ExtraBodyField) + + def _find_models_for_endpoint( webmethod, api: Api, method_name: str ) -> tuple[type | None, type | None, list[tuple[str, type, Any]], list[inspect.Parameter]]: @@ -433,6 +453,7 @@ def _find_models_for_endpoint( query_parameters = [] file_form_params = [] path_params = set() + extra_body_params = [] # Extract path parameters from the route if webmethod and hasattr(webmethod, "route"): @@ -462,6 +483,26 @@ def _find_models_for_endpoint( file_form_params.append(param) continue + # Check for ExtraBodyField in Annotated types + is_extra_body = False + extra_body_description = None + if get_origin(param_type) is Annotated: + args = get_args(param_type) + base_type = args[0] if args else param_type + metadata = args[1:] if len(args) > 1 else [] + + # Check if any metadata item is an ExtraBodyField + for metadata_item in metadata: + if _is_extra_body_field(metadata_item): + is_extra_body = True + extra_body_description = metadata_item.description + break + + if is_extra_body: + # Store as extra body parameter - exclude from request model + extra_body_params.append((param_name, base_type, extra_body_description)) + continue + # Check if it's a Pydantic model (for POST/PUT requests) if hasattr(param_type, "model_json_schema"): # Collect all body parameters including Pydantic models @@ -486,6 +527,12 @@ def _find_models_for_endpoint( # Also make it safe for FastAPI to avoid forward reference issues query_parameters.append((param_name, param_type, default_value)) + # Store extra body fields for later use in post-processing + # We'll store them when the endpoint is created, as we need the full path + # For now, attach to the function for later retrieval + if extra_body_params: + func._extra_body_params = extra_body_params # type: ignore + # If there's exactly one body parameter and it's a Pydantic model, use it directly # Otherwise, we'll create a combined request model from all parameters if len(query_parameters) == 1: @@ -965,6 +1012,100 @@ def _clean_schema_descriptions(openapi_schema: dict[str, Any]) -> dict[str, Any] return openapi_schema +def _add_extra_body_params_extension(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Add x-llama-stack-extra-body-params extension to requestBody for endpoints with ExtraBodyField parameters. + """ + if "paths" not in openapi_schema: + return openapi_schema + + global _extra_body_fields + + from pydantic import TypeAdapter + + for path, path_item in openapi_schema["paths"].items(): + if not isinstance(path_item, dict): + continue + + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + if method not in path_item: + continue + + operation = path_item[method] + if not isinstance(operation, dict): + continue + + # Check if we have extra body fields for this path/method + key = (path, method.upper()) + if key not in _extra_body_fields: + continue + + extra_body_params = _extra_body_fields[key] + + # Ensure requestBody exists + if "requestBody" not in operation: + continue + + request_body = operation["requestBody"] + if not isinstance(request_body, dict): + continue + + # Get the schema from requestBody + content = request_body.get("content", {}) + json_content = content.get("application/json", {}) + schema_ref = json_content.get("schema", {}) + + # Remove extra body fields from the schema if they exist as properties + # Handle both $ref schemas and inline schemas + if isinstance(schema_ref, dict): + if "$ref" in schema_ref: + # Schema is a reference - remove from the referenced schema + ref_path = schema_ref["$ref"] + if ref_path.startswith("#/components/schemas/"): + schema_name = ref_path.split("/")[-1] + if "components" in openapi_schema and "schemas" in openapi_schema["components"]: + schema_def = openapi_schema["components"]["schemas"].get(schema_name) + if isinstance(schema_def, dict) and "properties" in schema_def: + for param_name, _, _ in extra_body_params: + if param_name in schema_def["properties"]: + del schema_def["properties"][param_name] + # Also remove from required if present + if "required" in schema_def and param_name in schema_def["required"]: + schema_def["required"].remove(param_name) + elif "properties" in schema_ref: + # Schema is inline - remove directly from it + for param_name, _, _ in extra_body_params: + if param_name in schema_ref["properties"]: + del schema_ref["properties"][param_name] + # Also remove from required if present + if "required" in schema_ref and param_name in schema_ref["required"]: + schema_ref["required"].remove(param_name) + + # Build the extra body params schema + extra_params_schema = {} + for param_name, param_type, description in extra_body_params: + try: + # Generate JSON schema for the parameter type + adapter = TypeAdapter(param_type) + param_schema = adapter.json_schema(ref_template="#/components/schemas/{model}") + + # Add description if provided + if description: + param_schema["description"] = description + + extra_params_schema[param_name] = param_schema + except Exception: + # If we can't generate schema, skip this parameter + continue + + if extra_params_schema: + # Add the extension to requestBody + if "x-llama-stack-extra-body-params" not in request_body: + request_body["x-llama-stack-extra-body-params"] = extra_params_schema + + return openapi_schema + + def _remove_query_params_from_body_endpoints(openapi_schema: dict[str, Any]) -> dict[str, Any]: """ Remove query parameters from POST/PUT/PATCH endpoints that have a request body. @@ -1399,6 +1540,9 @@ def generate_openapi_spec(output_dir: str) -> dict[str, Any]: # FastAPI sometimes infers parameters as query params even when they should be in the request body openapi_schema = _remove_query_params_from_body_endpoints(openapi_schema) + # Add x-llama-stack-extra-body-params extension for ExtraBodyField parameters + openapi_schema = _add_extra_body_params_extension(openapi_schema) + # 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 From e3d831f5042497512498fa18ff2be5528be98212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 12 Nov 2025 11:30:37 +0100 Subject: [PATCH 08/46] chore: re-add text/event-stream media type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 6 + docs/static/llama-stack-spec.yaml | 6 + docs/static/stainless-llama-stack-spec.yaml | 6 + scripts/fastapi_generator.py | 130 ++++++++++++++++---- 4 files changed, 121 insertions(+), 27 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index cb7ff276d3..a5900c18ec 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -1513,6 +1513,9 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIResponseObject' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIResponseObjectStream' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -1866,6 +1869,9 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIChatCompletion' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionChunk' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index 7370ed9fe6..076fa42ae1 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -121,6 +121,9 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIResponseObject' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIResponseObjectStream' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -454,6 +457,9 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIChatCompletion' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionChunk' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index 5302945fb4..3436a10dc7 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -1513,6 +1513,9 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIResponseObject' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIResponseObjectStream' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -1864,6 +1867,9 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIChatCompletion' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionChunk' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index 396a8cb655..7c36416615 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -12,6 +12,8 @@ import importlib import inspect import pkgutil +import types +import typing from pathlib import Path from typing import Annotated, Any, get_args, get_origin @@ -237,7 +239,9 @@ def _create_fastapi_endpoint(app: FastAPI, route, webmethod, api: Api): name = route.name fastapi_path = path.replace("{", "{").replace("}", "}") - request_model, response_model, query_parameters, file_form_params = _find_models_for_endpoint(webmethod, api, name) + request_model, response_model, query_parameters, file_form_params, streaming_response_model = ( + _find_models_for_endpoint(webmethod, api, name) + ) operation_description = _extract_operation_description_from_docstring(api, name) response_description = _extract_response_description_from_docstring(webmethod, response_model, api, name) is_post_put = any(method.upper() in ["POST", "PUT", "PATCH"] for method in methods) @@ -336,6 +340,32 @@ async def no_params_endpoint(): no_params_endpoint.__doc__ = operation_description endpoint_func = no_params_endpoint + # Build response content with both application/json and text/event-stream if streaming + response_content = {} + if response_model: + response_content["application/json"] = {"schema": {"$ref": f"#/components/schemas/{response_model.__name__}"}} + if streaming_response_model: + # Get the schema name for the streaming model + # It might be a registered schema or a Pydantic model + streaming_schema_name = None + # Check if it's a registered schema first (before checking __name__) + # because registered schemas might be Annotated types + from llama_stack.schema_utils import _registered_schemas + + if streaming_response_model in _registered_schemas: + streaming_schema_name = _registered_schemas[streaming_response_model]["name"] + elif hasattr(streaming_response_model, "__name__"): + streaming_schema_name = streaming_response_model.__name__ + + if streaming_schema_name: + response_content["text/event-stream"] = { + "schema": {"$ref": f"#/components/schemas/{streaming_schema_name}"} + } + + # If no content types, use empty schema + if not response_content: + response_content["application/json"] = {"schema": {}} + # Add the endpoint to the FastAPI app is_deprecated = webmethod.deprecated or False route_kwargs = { @@ -345,11 +375,7 @@ async def no_params_endpoint(): "responses": { 200: { "description": response_description, - "content": { - "application/json": { - "schema": {"$ref": f"#/components/schemas/{response_model.__name__}"} if response_model else {} - } - }, + "content": response_content, }, 400: {"$ref": "#/components/responses/BadRequest400"}, 429: {"$ref": "#/components/responses/TooManyRequests429"}, @@ -422,9 +448,59 @@ def _is_extra_body_field(metadata_item: Any) -> bool: return isinstance(metadata_item, ExtraBodyField) +def _is_async_iterator_type(type_obj: Any) -> bool: + """Check if a type is AsyncIterator or AsyncIterable.""" + from collections.abc import AsyncIterable, AsyncIterator + + origin = get_origin(type_obj) + if origin is None: + # Check if it's the class itself + return type_obj in (AsyncIterator, AsyncIterable) or ( + hasattr(type_obj, "__origin__") and type_obj.__origin__ in (AsyncIterator, AsyncIterable) + ) + return origin in (AsyncIterator, AsyncIterable) + + +def _extract_response_models_from_union(union_type: Any) -> tuple[type | None, type | None]: + """ + Extract non-streaming and streaming response models from a union type. + + Returns: + tuple: (non_streaming_model, streaming_model) + """ + non_streaming_model = None + streaming_model = None + + args = get_args(union_type) + for arg in args: + # Check if it's an AsyncIterator + if _is_async_iterator_type(arg): + # Extract the type argument from AsyncIterator[T] + iterator_args = get_args(arg) + if iterator_args: + inner_type = iterator_args[0] + # Check if the inner type is a registered schema (union type) + # or a Pydantic model + if hasattr(inner_type, "model_json_schema"): + streaming_model = inner_type + else: + # Might be a registered schema - check if it's registered + from llama_stack.schema_utils import _registered_schemas + + if inner_type in _registered_schemas: + # We'll need to look this up later, but for now store the type + streaming_model = inner_type + elif hasattr(arg, "model_json_schema"): + # Non-streaming Pydantic model + if non_streaming_model is None: + non_streaming_model = arg + + return non_streaming_model, streaming_model + + def _find_models_for_endpoint( webmethod, api: Api, method_name: str -) -> tuple[type | None, type | None, list[tuple[str, type, Any]], list[inspect.Parameter]]: +) -> tuple[type | None, type | None, list[tuple[str, type, Any]], list[inspect.Parameter], type | None]: """ Find appropriate request and response models for an endpoint by analyzing the actual function signature. This uses the protocol function to determine the correct models dynamically. @@ -435,15 +511,16 @@ def _find_models_for_endpoint( method_name: The method name (function name) Returns: - tuple: (request_model, response_model, query_parameters, file_form_params) + tuple: (request_model, response_model, query_parameters, file_form_params, streaming_response_model) where query_parameters is a list of (name, type, default_value) tuples and file_form_params is a list of inspect.Parameter objects for File()/Form() params + and streaming_response_model is the model for streaming responses (AsyncIterator content) """ try: # Get the function from the protocol func = _get_protocol_method(api, method_name) if not func: - return None, None, [], [] + return None, None, [], [], None # Analyze the function signature sig = inspect.signature(func) @@ -542,38 +619,37 @@ def _find_models_for_endpoint( query_parameters = [] # Clear query_parameters so we use the single model # Find response model from return annotation + # Also detect streaming response models (AsyncIterator) response_model = None + streaming_response_model = None return_annotation = sig.return_annotation if return_annotation != inspect.Signature.empty: + origin = get_origin(return_annotation) if hasattr(return_annotation, "model_json_schema"): response_model = return_annotation - elif get_origin(return_annotation) is Annotated: + elif origin is Annotated: # Handle Annotated return types args = get_args(return_annotation) 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) - for arg in args: - if hasattr(arg, "model_json_schema"): - response_model = arg - break - - return request_model, response_model, query_parameters, file_form_params + else: + # Check if the first argument is a union type + inner_origin = get_origin(args[0]) + if inner_origin is not None and ( + inner_origin is types.UnionType or inner_origin is typing.Union + ): + response_model, streaming_response_model = _extract_response_models_from_union(args[0]) + elif origin is not None and (origin is types.UnionType or origin is typing.Union): + # Handle union types - extract both non-streaming and streaming models + response_model, streaming_response_model = _extract_response_models_from_union(return_annotation) + + return request_model, response_model, query_parameters, file_form_params, streaming_response_model except Exception: # If we can't analyze the function signature, return None - return None, None, [], [] + return None, None, [], [], None def _ensure_components_schemas(openapi_schema: dict[str, Any]) -> None: From de4ed29310446b994b2eb33be534a3b595ddad67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 12 Nov 2025 12:03:57 +0100 Subject: [PATCH 09/46] chore: replace JSON requestBody block with query params MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 56 +++++------ docs/static/llama-stack-spec.yaml | 56 +++++------ docs/static/stainless-llama-stack-spec.yaml | 56 +++++------ scripts/fastapi_generator.py | 105 +++++++++++++++++++- 4 files changed, 185 insertions(+), 88 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index a5900c18ec..db194dc2e2 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -1701,16 +1701,16 @@ paths: schema: type: string description: 'Path parameter: response_id' - requestBody: - content: - application/json: - schema: - anyOf: - - type: array - items: - type: string - - type: 'null' - title: Include + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Include responses: '200': description: An ListOpenAIResponseInputItem. @@ -4004,14 +4004,14 @@ paths: - type: string - type: 'null' title: Tool Group Id - requestBody: - content: - application/json: - schema: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' - title: Mcp Endpoint + - name: mcp_endpoint + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + title: Mcp Endpoint responses: '200': description: A ListToolDefsResponse. @@ -4579,16 +4579,16 @@ paths: schema: type: string description: 'Path parameter: conversation_id' - requestBody: - content: - application/json: - schema: - anyOf: - - type: array - items: - $ref: '#/components/schemas/ConversationItemInclude' - - type: 'null' - title: Include + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + $ref: '#/components/schemas/ConversationItemInclude' + - type: 'null' + title: Include responses: '200': description: List of conversation items. diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index 076fa42ae1..df61decd99 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -309,16 +309,16 @@ paths: schema: type: string description: 'Path parameter: response_id' - requestBody: - content: - application/json: - schema: - anyOf: - - type: array - items: - type: string - - type: 'null' - title: Include + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Include responses: '200': description: An ListOpenAIResponseInputItem. @@ -1819,14 +1819,14 @@ paths: - type: string - type: 'null' title: Tool Group Id - requestBody: - content: - application/json: - schema: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' - title: Mcp Endpoint + - name: mcp_endpoint + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + title: Mcp Endpoint responses: '200': description: A ListToolDefsResponse. @@ -2489,16 +2489,16 @@ paths: schema: type: string description: 'Path parameter: conversation_id' - requestBody: - content: - application/json: - schema: - anyOf: - - type: array - items: - $ref: '#/components/schemas/ConversationItemInclude' - - type: 'null' - title: Include + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + $ref: '#/components/schemas/ConversationItemInclude' + - type: 'null' + title: Include responses: '200': description: List of conversation items. diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index 3436a10dc7..ed9f1fe78c 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -1701,16 +1701,16 @@ paths: schema: type: string description: 'Path parameter: response_id' - requestBody: - content: - application/json: - schema: - anyOf: - - type: array - items: - type: string - - type: 'null' - title: Include + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Include responses: '200': description: An ListOpenAIResponseInputItem. @@ -4415,14 +4415,14 @@ paths: - type: string - type: 'null' title: Tool Group Id - requestBody: - content: - application/json: - schema: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' - title: Mcp Endpoint + - name: mcp_endpoint + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + title: Mcp Endpoint responses: '200': description: A ListToolDefsResponse. @@ -4990,16 +4990,16 @@ paths: schema: type: string description: 'Path parameter: conversation_id' - requestBody: - content: - application/json: - schema: - anyOf: - - type: array - items: - $ref: '#/components/schemas/ConversationItemInclude' - - type: 'null' - title: Include + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + $ref: '#/components/schemas/ConversationItemInclude' + - type: 'null' + title: Include responses: '200': description: List of conversation items. diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index 7c36416615..d3b3e590f8 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -201,6 +201,8 @@ def _create_dynamic_request_model( try: field_definitions = _build_field_definitions(query_parameters, use_any) + if not field_definitions: + return None clean_route = webmethod.route.replace("/", "_").replace("{", "").replace("}", "").replace("-", "_") model_name = f"{clean_route}_Request" if add_uuid: @@ -238,13 +240,13 @@ def _create_fastapi_endpoint(app: FastAPI, route, webmethod, api: Api): methods = route.methods name = route.name fastapi_path = path.replace("{", "{").replace("}", "}") + is_post_put = any(method.upper() in ["POST", "PUT", "PATCH"] for method in methods) request_model, response_model, query_parameters, file_form_params, streaming_response_model = ( - _find_models_for_endpoint(webmethod, api, name) + _find_models_for_endpoint(webmethod, api, name, is_post_put) ) operation_description = _extract_operation_description_from_docstring(api, name) response_description = _extract_response_description_from_docstring(webmethod, response_model, api, name) - is_post_put = any(method.upper() in ["POST", "PUT", "PATCH"] for method in methods) # Retrieve and store extra body fields for this endpoint func = _get_protocol_method(api, name) @@ -499,7 +501,7 @@ def _extract_response_models_from_union(union_type: Any) -> tuple[type | None, t def _find_models_for_endpoint( - webmethod, api: Api, method_name: str + webmethod, api: Api, method_name: str, is_post_put: bool = False ) -> tuple[type | None, type | None, list[tuple[str, type, Any]], list[inspect.Parameter], type | None]: """ Find appropriate request and response models for an endpoint by analyzing the actual function signature. @@ -509,6 +511,7 @@ def _find_models_for_endpoint( webmethod: The webmethod metadata api: The API enum for looking up the function method_name: The method name (function name) + is_post_put: Whether this is a POST, PUT, or PATCH request (GET requests should never have request bodies) Returns: tuple: (request_model, response_model, query_parameters, file_form_params, streaming_response_model) @@ -612,7 +615,8 @@ def _find_models_for_endpoint( # If there's exactly one body parameter and it's a Pydantic model, use it directly # Otherwise, we'll create a combined request model from all parameters - if len(query_parameters) == 1: + # BUT: For GET requests, never create a request body - all parameters should be query parameters + if is_post_put and len(query_parameters) == 1: param_name, param_type, default_value = query_parameters[0] if hasattr(param_type, "model_json_schema"): request_model = param_type @@ -1223,6 +1227,94 @@ def _remove_query_params_from_body_endpoints(openapi_schema: dict[str, Any]) -> return openapi_schema +def _remove_request_bodies_from_get_endpoints(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Remove request bodies from GET endpoints and convert their parameters to query parameters. + + GET requests should never have request bodies - all parameters should be query parameters. + This function removes any requestBody that FastAPI may have incorrectly added to GET endpoints + and converts any parameters in the requestBody to query parameters. + """ + if "paths" not in openapi_schema: + return openapi_schema + + for _path, path_item in openapi_schema["paths"].items(): + if not isinstance(path_item, dict): + continue + + # Check GET method specifically + if "get" in path_item: + operation = path_item["get"] + if not isinstance(operation, dict): + continue + + if "requestBody" in operation: + request_body = operation["requestBody"] + # Extract parameters from requestBody and convert to query parameters + if isinstance(request_body, dict) and "content" in request_body: + content = request_body.get("content", {}) + json_content = content.get("application/json", {}) + schema = json_content.get("schema", {}) + + if "parameters" not in operation: + operation["parameters"] = [] + elif not isinstance(operation["parameters"], list): + operation["parameters"] = [] + + # If the schema has properties, convert each to a query parameter + if isinstance(schema, dict) and "properties" in schema: + for param_name, param_schema in schema["properties"].items(): + # Check if this parameter is already in the parameters list + existing_param = None + for existing in operation["parameters"]: + if isinstance(existing, dict) and existing.get("name") == param_name: + existing_param = existing + break + + if not existing_param: + # Create a new query parameter from the requestBody property + required = param_name in schema.get("required", []) + query_param = { + "name": param_name, + "in": "query", + "required": required, + "schema": param_schema, + } + # Add description if present + if "description" in param_schema: + query_param["description"] = param_schema["description"] + operation["parameters"].append(query_param) + elif isinstance(schema, dict): + # Handle direct schema (not a model with properties) + # Try to infer parameter name from schema title + param_name = schema.get("title", "").lower().replace(" ", "_") + if param_name: + # Check if this parameter is already in the parameters list + existing_param = None + for existing in operation["parameters"]: + if isinstance(existing, dict) and existing.get("name") == param_name: + existing_param = existing + break + + if not existing_param: + # Create a new query parameter from the requestBody schema + query_param = { + "name": param_name, + "in": "query", + "required": False, # Default to optional for GET requests + "schema": schema, + } + # Add description if present + if "description" in schema: + query_param["description"] = schema["description"] + operation["parameters"].append(query_param) + + # Remove request body from GET endpoint + del operation["requestBody"] + + return openapi_schema + + def _convert_multiline_strings_to_literal(obj: Any) -> Any: """Recursively convert multi-line strings to LiteralScalarString for YAML block scalar formatting.""" try: @@ -1619,6 +1711,11 @@ def generate_openapi_spec(output_dir: str) -> dict[str, Any]: # Add x-llama-stack-extra-body-params extension for ExtraBodyField parameters openapi_schema = _add_extra_body_params_extension(openapi_schema) + # Remove request bodies from GET endpoints (GET requests should never have request bodies) + # This must run AFTER _add_extra_body_params_extension to ensure any request bodies + # that FastAPI incorrectly added to GET endpoints are removed + openapi_schema = _remove_request_bodies_from_get_endpoints(openapi_schema) + # 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 From 3d33291f2359fa27ba4331eb863832395f2768f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 12 Nov 2025 12:12:23 +0100 Subject: [PATCH 10/46] chore: refactor code to reduce generator script length MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 1 - docs/static/stainless-llama-stack-spec.yaml | 1 - scripts/fastapi_generator.py | 281 ++++++++------------ 3 files changed, 109 insertions(+), 174 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index db194dc2e2..4ffe1de173 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -7,7 +7,6 @@ info: 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. diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index ed9f1fe78c..f45ea0e82a 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -7,7 +7,6 @@ info: 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. diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index d3b3e590f8..4bc38b9f1d 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -1350,6 +1350,69 @@ def _write_yaml_file(file_path: Path, schema: dict[str, Any]) -> None: yaml.dump(schema, f, default_flow_style=False, sort_keys=False) +def _get_explicit_schema_names(openapi_schema: dict[str, Any]) -> set[str]: + """Get all registered schema names and @json_schema_type decorated model names.""" + from llama_stack.schema_utils import _registered_schemas + + registered_schema_names = {info["name"] for info in _registered_schemas.values()} + json_schema_type_names = _get_all_json_schema_type_names() + return registered_schema_names | json_schema_type_names + + +def _add_transitive_references( + referenced_schemas: set[str], all_schemas: dict[str, Any], initial_schemas: set[str] | None = None +) -> set[str]: + """Add transitive references for given schemas.""" + if initial_schemas: + referenced_schemas.update(initial_schemas) + additional_schemas = set() + for schema_name in initial_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + else: + additional_schemas = set() + for schema_name in referenced_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + + while additional_schemas: + new_schemas = additional_schemas - referenced_schemas + if not new_schemas: + break + referenced_schemas.update(new_schemas) + additional_schemas = set() + for schema_name in new_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + + return referenced_schemas + + +def _filter_schemas_by_references( + filtered_schema: dict[str, Any], filtered_paths: dict[str, Any], openapi_schema: dict[str, Any] +) -> dict[str, Any]: + """Filter schemas to only include ones referenced by filtered paths and explicit schemas.""" + if "components" not in filtered_schema or "schemas" not in filtered_schema["components"]: + return filtered_schema + + referenced_schemas = _find_schemas_referenced_by_paths(filtered_paths, openapi_schema) + all_schemas = openapi_schema.get("components", {}).get("schemas", {}) + explicit_schema_names = _get_explicit_schema_names(openapi_schema) + referenced_schemas = _add_transitive_references(referenced_schemas, all_schemas, explicit_schema_names) + + filtered_schemas = { + name: schema for name, schema in filtered_schema["components"]["schemas"].items() if name in referenced_schemas + } + filtered_schema["components"]["schemas"] = filtered_schemas + + 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"] + + return filtered_schema + + def _filter_schema_by_version( openapi_schema: dict[str, Any], stable_only: bool = True, exclude_deprecated: bool = True ) -> dict[str, Any]: @@ -1369,80 +1432,15 @@ def _filter_schema_by_version( if "paths" not in filtered_schema: return filtered_schema - # Filter paths based on version prefix and deprecated status 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 exclude_deprecated is True - if exclude_deprecated and is_deprecated: + if exclude_deprecated and _is_path_deprecated(path_item): continue - - if stable_only: - # Only include stable v1 paths, exclude v1alpha and v1beta - if _is_stable_path(path): - filtered_paths[path] = path_item - else: - # Only include experimental paths (v1alpha or v1beta), exclude v1 - if _is_experimental_path(path): - filtered_paths[path] = path_item + if (stable_only and _is_stable_path(path)) or (not stable_only and _is_experimental_path(path)): + 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"]: - # Find all schemas that are actually referenced by the filtered paths - # Use the original schema to find all references, not the filtered one - referenced_schemas = _find_schemas_referenced_by_paths(filtered_paths, openapi_schema) - - # Also include all registered schemas and @json_schema_type decorated models - # (they should always be included) and all schemas they reference (transitive references) - from llama_stack.schema_utils import _registered_schemas - - # Use the original schema to find registered schema definitions - all_schemas = openapi_schema.get("components", {}).get("schemas", {}) - registered_schema_names = set() - for registration_info in _registered_schemas.values(): - registered_schema_names.add(registration_info["name"]) - - # Also include all @json_schema_type decorated models - json_schema_type_names = _get_all_json_schema_type_names() - all_explicit_schema_names = registered_schema_names | json_schema_type_names - - # Find all schemas referenced by registered schemas and @json_schema_type models (transitive) - additional_schemas = set() - for schema_name in all_explicit_schema_names: - referenced_schemas.add(schema_name) - if schema_name in all_schemas: - additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) - - # Keep adding transitive references until no new ones are found - while additional_schemas: - new_schemas = additional_schemas - referenced_schemas - if not new_schemas: - break - referenced_schemas.update(new_schemas) - additional_schemas = set() - for schema_name in new_schemas: - if schema_name in all_schemas: - additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) - - # Only keep schemas that are referenced by the filtered paths or are registered/@json_schema_type - 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 - - # 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"] - - return filtered_schema + return _filter_schemas_by_references(filtered_schema, filtered_paths, openapi_schema) def _find_schemas_referenced_by_paths(filtered_paths: dict[str, Any], openapi_schema: dict[str, Any]) -> set[str]: @@ -1615,50 +1613,7 @@ def _filter_combined_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: 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) - - # Also include all registered schemas and @json_schema_type decorated models - # (they should always be included) and all schemas they reference (transitive references) - from llama_stack.schema_utils import _registered_schemas - - # Use the original schema to find registered schema definitions - all_schemas = openapi_schema.get("components", {}).get("schemas", {}) - registered_schema_names = set() - for registration_info in _registered_schemas.values(): - registered_schema_names.add(registration_info["name"]) - - # Also include all @json_schema_type decorated models - json_schema_type_names = _get_all_json_schema_type_names() - all_explicit_schema_names = registered_schema_names | json_schema_type_names - - # Find all schemas referenced by registered schemas and @json_schema_type models (transitive) - additional_schemas = set() - for schema_name in all_explicit_schema_names: - referenced_schemas.add(schema_name) - if schema_name in all_schemas: - additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) - - # Keep adding transitive references until no new ones are found - while additional_schemas: - new_schemas = additional_schemas - referenced_schemas - if not new_schemas: - break - referenced_schemas.update(new_schemas) - additional_schemas = set() - for schema_name in new_schemas: - if schema_name in all_schemas: - additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) - - 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 + return _filter_schemas_by_references(filtered_schema, filtered_paths, openapi_schema) def generate_openapi_spec(output_dir: str) -> dict[str, Any]: @@ -1727,7 +1682,6 @@ def generate_openapi_spec(output_dir: str) -> dict[str, Any]: deprecated_schema = _filter_deprecated_schema(copy.deepcopy(openapi_schema)) combined_schema = _filter_combined_schema(copy.deepcopy(openapi_schema)) - # Base description for all specs base_description = ( "This is the specification of the Llama Stack that provides\n" " a set of endpoints and their corresponding interfaces that are\n" @@ -1735,69 +1689,52 @@ def generate_openapi_spec(output_dir: str) -> dict[str, Any]: " best leverage Llama Models." ) - # Update info section for stable schema - if "info" not in stable_schema: - stable_schema["info"] = {} - stable_schema["info"]["title"] = "Llama Stack Specification" - stable_schema["info"]["version"] = "v1" - stable_schema["info"]["description"] = ( - base_description + "\n\n **✅ STABLE**: Production-ready APIs with backward compatibility guarantees." - ) - - # Update info section for experimental schema - if "info" not in experimental_schema: - experimental_schema["info"] = {} - experimental_schema["info"]["title"] = "Llama Stack Specification - Experimental APIs" - experimental_schema["info"]["version"] = "v1" - experimental_schema["info"]["description"] = ( - base_description + "\n\n **🧪 EXPERIMENTAL**: Pre-release APIs (v1alpha, v1beta) that may change before\n" - " becoming stable." - ) + schema_configs = [ + ( + stable_schema, + "Llama Stack Specification", + "**✅ STABLE**: Production-ready APIs with backward compatibility guarantees.", + ), + ( + experimental_schema, + "Llama Stack Specification - Experimental APIs", + "**🧪 EXPERIMENTAL**: Pre-release APIs (v1alpha, v1beta) that may change before\n becoming stable.", + ), + ( + deprecated_schema, + "Llama Stack Specification - Deprecated APIs", + "**⚠️ DEPRECATED**: Legacy APIs that may be removed in future versions. Use for\n migration reference only.", + ), + ( + combined_schema, + "Llama Stack Specification - Stable & Experimental APIs", + "**🔗 COMBINED**: This specification includes both stable production-ready APIs\n and experimental pre-release APIs. Use stable APIs for production deployments\n and experimental APIs for testing new features.", + ), + ] - # Update info section for deprecated schema - if "info" not in deprecated_schema: - deprecated_schema["info"] = {} - deprecated_schema["info"]["title"] = "Llama Stack Specification - Deprecated APIs" - deprecated_schema["info"]["version"] = "v1" - deprecated_schema["info"]["description"] = ( - base_description + "\n\n **⚠️ DEPRECATED**: Legacy APIs that may be removed in future versions. Use for\n" - " migration reference only." - ) + for schema, title, description_suffix in schema_configs: + if "info" not in schema: + schema["info"] = {} + schema["info"].update( + { + "title": title, + "version": "v1", + "description": f"{base_description}\n\n {description_suffix}", + } + ) - # Update info section for combined schema - if "info" not in combined_schema: - combined_schema["info"] = {} - combined_schema["info"]["title"] = "Llama Stack Specification - Stable & Experimental APIs" - combined_schema["info"]["version"] = "v1" - combined_schema["info"]["description"] = ( - base_description + "\n\n\n" - " **🔗 COMBINED**: This specification includes both stable production-ready APIs\n" - " and experimental pre-release APIs. Use stable APIs for production deployments\n" - " and experimental APIs for testing new features." - ) + schemas_to_validate = [ + (stable_schema, "Stable schema"), + (experimental_schema, "Experimental schema"), + (deprecated_schema, "Deprecated schema"), + (combined_schema, "Combined (stainless) 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) + for schema, _ in schemas_to_validate: + _fix_schema_issues(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") - - failed_schemas = [] - if not stable_valid: - failed_schemas.append("Stable schema") - if not experimental_valid: - failed_schemas.append("Experimental schema") - if not deprecated_valid: - failed_schemas.append("Deprecated schema") - if not combined_valid: - failed_schemas.append("Combined (stainless) schema") + failed_schemas = [name for schema, name in schemas_to_validate if not validate_openapi_schema(schema, name)] if failed_schemas: raise ValueError(f"Invalid schemas: {', '.join(failed_schemas)}") From 2cb0c31edd828fa08c4987f955eb1f0436022d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 12 Nov 2025 13:57:39 +0100 Subject: [PATCH 11/46] chore: re-add missing endpoints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 1213 +++++----- docs/static/deprecated-llama-stack-spec.yaml | 1444 +++++++----- .../static/experimental-llama-stack-spec.yaml | 1524 +++++++----- docs/static/llama-stack-spec.yaml | 2059 ++++++++++------- docs/static/stainless-llama-stack-spec.yaml | 943 ++++---- scripts/fastapi_generator.py | 60 +- 6 files changed, 4250 insertions(+), 2993 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index 4ffe1de173..e3d8c9fd1d 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -5200,6 +5200,37 @@ components: type: object title: ChatCompletionInputType description: Parameter type for chat completion input. + Checkpoint: + properties: + identifier: + type: string + title: Identifier + created_at: + type: string + format: date-time + title: Created At + epoch: + type: integer + title: Epoch + post_training_job_id: + type: string + title: Post Training Job Id + path: + type: string + title: Path + training_metrics: + anyOf: + - $ref: '#/components/schemas/PostTrainingMetric' + - type: 'null' + type: object + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. Chunk-Input: properties: content: @@ -5855,6 +5886,166 @@ components: - judge_model title: LLMAsJudgeScoringFnParams description: Parameters for LLM-as-judge scoring function configuration. + ListBatchesResponse: + properties: + object: + type: string + const: list + title: Object + default: list + data: + items: + $ref: '#/components/schemas/Batch' + type: array + title: Data + description: List of batch objects + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + description: ID of the first batch in the list + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + description: ID of the last batch in the list + has_more: + type: boolean + title: Has More + description: Whether there are more batches available + default: false + type: object + required: + - data + title: ListBatchesResponse + description: Response containing a list of batch objects. + ListOpenAIChatCompletionResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse + description: Response from listing OpenAI-compatible chat completions. + ListOpenAIFileResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse + description: Response for listing files in OpenAI Files API. + ListOpenAIResponseInputItem: + properties: + data: + items: + anyOf: + - 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' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + type: array + title: Data + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + title: ListOpenAIResponseInputItem + description: List container for OpenAI response input items. + ListOpenAIResponseObject: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput-Output' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject + description: Paginated list of OpenAI response objects with navigation metadata. ListPostTrainingJobsResponse: properties: data: @@ -5890,6 +6081,30 @@ components: - data title: ListProvidersResponse description: Response containing a list of all available providers. + 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. + ListToolDefsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ToolDef' + type: array + title: Data + type: object + required: + - data + title: ListToolDefsResponse + description: Response containing a list of tool definitions. LoraFinetuningConfig: properties: type: @@ -7835,34 +8050,183 @@ components: - status title: OpenAIResponseObject description: Complete OpenAI response object containing generation results and metadata. - OpenAIResponseOutputMessageContentOutputText: + OpenAIResponseObjectWithInput-Output: properties: - text: + created_at: + type: integer + title: Created At + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + id: type: string - title: Text - type: + title: Id + model: type: string - const: output_text - title: Type - default: output_text - annotations: + title: Model + object: + type: string + const: response + title: Object + default: response + output: items: oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + - $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: - 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: + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + tools: + anyOf: + - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' + title: Tools + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls + input: + items: + anyOf: + - 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' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + type: array + title: Input + type: object + required: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput + description: OpenAI response object extended with input context information. + 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: @@ -8400,6 +8764,28 @@ components: required: - reasoning_tokens title: OutputTokensDetails + PaginatedResponse: + properties: + data: + items: + additionalProperties: true + type: object + type: array + title: Data + has_more: + type: boolean + title: Has More + url: + anyOf: + - type: string + - type: 'null' + title: Url + type: object + required: + - data + - has_more + title: PaginatedResponse + description: A generic paginated response that follows a simple format. PostTrainingJob: properties: job_uuid: @@ -8409,6 +8795,85 @@ components: required: - job_uuid title: PostTrainingJob + PostTrainingJobArtifactsResponse: + properties: + job_uuid: + type: string + title: Job Uuid + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints + type: object + required: + - job_uuid + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingJobStatusResponse: + properties: + job_uuid: + type: string + title: Job Uuid + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Scheduled At + started_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Started At + completed_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Completed At + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Resources Allocated + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints + type: object + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + PostTrainingMetric: + properties: + epoch: + type: integer + title: Epoch + train_loss: + type: number + title: Train Loss + validation_loss: + type: number + title: Validation Loss + perplexity: + type: number + title: Perplexity + type: object + required: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: Training metrics captured during post-training jobs. Prompt: properties: prompt: @@ -8556,17 +9021,37 @@ components: - data title: RerankResponse description: Response from a reranking request. - RowsDataSource: + RouteInfo: properties: - type: + route: type: string - const: rows - title: Type - default: rows - rows: + title: Route + method: + type: string + title: Method + provider_types: items: - additionalProperties: true - type: object + 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. + RowsDataSource: + properties: + type: + type: string + const: rows + title: Type + default: rows + rows: + items: + additionalProperties: true + type: object type: array title: Rows type: object @@ -9359,6 +9844,96 @@ components: - vector_store_id title: VectorStoreFileObject description: OpenAI Vector Store File object. + VectorStoreFilesListInBatchResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreFilesListInBatchResponse + description: Response from listing files in a vector store file batch. + VectorStoreListFilesResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreListFilesResponse + description: Response from listing files in a vector store. + VectorStoreListResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreListResponse + description: Response from listing vector stores. VectorStoreObject: properties: id: @@ -13472,43 +14047,15 @@ components: - $ref: '#/components/schemas/UnstructuredLogEvent' - $ref: '#/components/schemas/MetricEvent' - $ref: '#/components/schemas/StructuredLogEvent' - ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. 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: + title: Type type: string required: - - data - title: ListOpenAIResponseInputItem + - type + title: ResponseGuardrailSpec type: object OpenAIResponseObjectWithInput: description: OpenAI response object extended with input context information. @@ -13669,82 +14216,6 @@ components: - input title: OpenAIResponseObjectWithInput type: object - ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. - 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 - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - 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: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: ID of the last batch in the list - title: Last Id - nullable: true - has_more: - default: false - description: Whether there are more batches available - title: Has More - type: boolean - required: - - data - title: ListBatchesResponse - type: object MetricInResponse: description: A metric value included in API responses. properties: @@ -13767,92 +14238,15 @@ components: - value title: MetricInResponse type: object - PaginatedResponse: - description: A generic paginated response that follows a simple format. + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: - data: - items: - additionalProperties: true - type: object - title: Data - type: array - has_more: - title: Has More - type: boolean - url: - anyOf: - - type: string - - type: 'null' - title: Url - nullable: true - required: - - data - - has_more - title: PaginatedResponse - type: object - PostTrainingMetric: - description: Training metrics captured during post-training jobs. - 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 - Checkpoint: - description: Checkpoint created during training runs. - 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: '#/components/schemas/PostTrainingMetric' - - type: 'null' - nullable: true - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. - properties: - type: - const: dialog - default: dialog - title: Type - type: string - title: DialogType + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType type: object ConversationItemCreateRequest: description: Request body for creating conversation items. @@ -13928,35 +14322,6 @@ components: - status title: ConversationMessage type: object - ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. - 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 Bf16QuantizationConfig: description: Configuration for BFloat16 precision (typically no quantization). properties: @@ -14007,92 +14372,6 @@ components: title: Scheme title: Int4QuantizationConfig type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - - type: 'null' - 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. - properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - nullable: true - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - nullable: true - title: OpenAIChoiceLogprobs - type: object - ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. - 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 OpenAIChoiceDelta: description: A delta from an OpenAI-compatible chat completion streaming response. properties: @@ -14130,6 +14409,27 @@ components: nullable: true title: OpenAIChoiceDelta type: object + OpenAIChoiceLogprobs: + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + nullable: true + title: OpenAIChoiceLogprobs + type: object OpenAIChunkChoice: description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: @@ -14186,6 +14486,42 @@ components: - model title: OpenAIChatCompletionChunk type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true + required: + - message + - finish_reason + - index + title: OpenAIChoice + type: object OpenAICompletionChoice: description: |- A choice from an OpenAI-compatible completion response. @@ -14368,53 +14704,6 @@ components: - content title: UserMessage type: object - RouteInfo: - description: Information about an API route including its path, method, and implementing providers. - 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 - ListRoutesResponse: - description: Response containing a list of all available API routes. - properties: - data: - items: - $ref: '#/components/schemas/RouteInfo' - title: Data - type: array - required: - - data - title: ListRoutesResponse - type: object - PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. - 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 PostTrainingJobLogStream: description: Stream of logs from a finetuning job. properties: @@ -14431,52 +14720,6 @@ components: - log_lines title: PostTrainingJobLogStream type: object - PostTrainingJobStatusResponse: - description: Status of a finetuning job. - properties: - job_uuid: - title: Job Uuid - type: string - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Scheduled At - nullable: true - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - nullable: true - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - nullable: true - resources_allocated: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Resources Allocated - nullable: true - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - type: object RLHFAlgorithm: description: Available reinforcement learning from human feedback algorithms. enum: @@ -14690,18 +14933,6 @@ components: title: PostTrainingRLHFRequest >>>>>>> ceca36b91 (chore: regen scehma with main) type: object - ListToolDefsResponse: - description: Response containing a list of tool definitions. - properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - title: Data - type: array - required: - - data - title: ListToolDefsResponse - type: object ToolGroupInput: description: Input data for registering a tool group. properties: @@ -14812,102 +15043,6 @@ components: type: object title: VectorStoreCreateRequest type: object - VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - 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. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - nullable: true - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListFilesResponse - type: object - VectorStoreListResponse: - description: Response from listing vector stores. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - nullable: true - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListResponse - type: object VectorStoreModifyRequest: description: Request to modify a vector store. properties: diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index e1256e922b..eb041b243d 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -1182,6 +1182,37 @@ components: type: object title: ChatCompletionInputType description: Parameter type for chat completion input. + Checkpoint: + properties: + identifier: + type: string + title: Identifier + created_at: + type: string + format: date-time + title: Created At + epoch: + type: integer + title: Epoch + post_training_job_id: + type: string + title: Post Training Job Id + path: + type: string + title: Path + training_metrics: + anyOf: + - $ref: '#/components/schemas/PostTrainingMetric' + - type: 'null' + type: object + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. Chunk-Input: properties: content: @@ -1837,6 +1868,41 @@ components: - judge_model title: LLMAsJudgeScoringFnParams description: Parameters for LLM-as-judge scoring function configuration. + ListBatchesResponse: + properties: + object: + type: string + const: list + title: Object + default: list + data: + items: + $ref: '#/components/schemas/Batch' + type: array + title: Data + description: List of batch objects + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + description: ID of the first batch in the list + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + description: ID of the last batch in the list + has_more: + type: boolean + title: Has More + description: Whether there are more batches available + default: false + type: object + required: + - data + title: ListBatchesResponse + description: Response containing a list of batch objects. ListBenchmarksResponse: properties: data: @@ -1860,6 +1926,131 @@ components: - data title: ListDatasetsResponse description: Response from listing datasets. + ListOpenAIChatCompletionResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse + description: Response from listing OpenAI-compatible chat completions. + ListOpenAIFileResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse + description: Response for listing files in OpenAI Files API. + ListOpenAIResponseInputItem: + properties: + data: + items: + anyOf: + - 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' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + type: array + title: Data + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + title: ListOpenAIResponseInputItem + description: List container for OpenAI response input items. + ListOpenAIResponseObject: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput-Output' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject + description: Paginated list of OpenAI response objects with navigation metadata. ListPostTrainingJobsResponse: properties: data: @@ -1895,6 +2086,18 @@ components: - data title: ListProvidersResponse description: Response containing a list of all available providers. + 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. ListScoringFunctionsResponse: properties: data: @@ -1917,6 +2120,18 @@ components: required: - data title: ListShieldsResponse + ListToolDefsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ToolDef' + type: array + title: Data + type: object + required: + - data + title: ListToolDefsResponse + description: Response containing a list of tool definitions. ListToolGroupsResponse: properties: data: @@ -3967,34 +4182,332 @@ components: - status title: OpenAIResponseObject description: Complete OpenAI response object containing generation results and metadata. - OpenAIResponseOutputMessageContentOutputText: + OpenAIResponseObjectWithInput-Input: properties: - text: + created_at: + type: integer + title: Created At + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + id: type: string - title: Text - type: + title: Id + model: type: string - const: output_text - title: Type - default: output_text - annotations: + title: Model + object: + type: string + const: response + title: Object + default: response + output: items: oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + - $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: - 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: + 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + type: array + title: Output + parallel_tool_calls: + type: boolean + title: Parallel Tool Calls + default: false + previous_response_id: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + tools: + anyOf: + - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' + title: Tools + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls + input: + items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + - $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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + type: array + title: Input + type: object + required: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput + description: OpenAI response object extended with input context information. + OpenAIResponseObjectWithInput-Output: + properties: + created_at: + type: integer + title: Created At + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + tools: + anyOf: + - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' + title: Tools + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls + input: + items: + anyOf: + - 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' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + type: array + title: Input + type: object + required: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput + description: OpenAI response object extended with input context information. + 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: @@ -4532,6 +5045,28 @@ components: required: - reasoning_tokens title: OutputTokensDetails + PaginatedResponse: + properties: + data: + items: + additionalProperties: true + type: object + type: array + title: Data + has_more: + type: boolean + title: Has More + url: + anyOf: + - type: string + - type: 'null' + title: Url + type: object + required: + - data + - has_more + title: PaginatedResponse + description: A generic paginated response that follows a simple format. PostTrainingJob: properties: job_uuid: @@ -4541,6 +5076,85 @@ components: required: - job_uuid title: PostTrainingJob + PostTrainingJobArtifactsResponse: + properties: + job_uuid: + type: string + title: Job Uuid + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints + type: object + required: + - job_uuid + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingJobStatusResponse: + properties: + job_uuid: + type: string + title: Job Uuid + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Scheduled At + started_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Started At + completed_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Completed At + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Resources Allocated + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints + type: object + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + PostTrainingMetric: + properties: + epoch: + type: integer + title: Epoch + train_loss: + type: number + title: Train Loss + validation_loss: + type: number + title: Validation Loss + perplexity: + type: number + title: Perplexity + type: object + required: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: Training metrics captured during post-training jobs. Prompt: properties: prompt: @@ -4680,14 +5294,34 @@ components: properties: data: items: - $ref: '#/components/schemas/RerankData' + $ref: '#/components/schemas/RerankData' + type: array + title: Data + type: object + required: + - data + title: RerankResponse + description: Response from a reranking request. + RouteInfo: + properties: + route: + type: string + title: Route + method: + type: string + title: Method + provider_types: + items: + type: string type: array - title: Data + title: Provider Types type: object required: - - data - title: RerankResponse - description: Response from a reranking request. + - route + - method + - provider_types + title: RouteInfo + description: Information about an API route including its path, method, and implementing providers. RowsDataSource: properties: type: @@ -5491,6 +6125,96 @@ components: - vector_store_id title: VectorStoreFileObject description: OpenAI Vector Store File object. + VectorStoreFilesListInBatchResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreFilesListInBatchResponse + description: Response from listing files in a vector store file batch. + VectorStoreListFilesResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreListFilesResponse + description: Response from listing files in a vector store. + VectorStoreListResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreListResponse + description: Response from listing vector stores. VectorStoreObject: properties: id: @@ -8253,43 +8977,15 @@ components: - $ref: '#/components/schemas/UnstructuredLogEvent' - $ref: '#/components/schemas/MetricEvent' - $ref: '#/components/schemas/StructuredLogEvent' - ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. 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: + title: Type type: string required: - - data - title: ListOpenAIResponseInputItem + - type + title: ResponseGuardrailSpec type: object OpenAIResponseObjectWithInput: description: OpenAI response object extended with input context information. @@ -8389,142 +9085,66 @@ components: - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - $ref: '#/components/schemas/OpenAIResponseToolMCP' type: array - - type: 'null' - title: Tools - nullable: true - truncation: - anyOf: - - type: string - - type: 'null' - title: Truncation - nullable: true - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - - type: 'null' - nullable: true - instructions: - anyOf: - - type: string - - type: 'null' - title: Instructions - nullable: true - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - title: Max Tool Calls - 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 - ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. - 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 - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - 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: + - type: 'null' + title: Tools + nullable: true + truncation: anyOf: - type: string - type: 'null' - description: ID of the first batch in the list - title: First Id + title: Truncation nullable: true - last_id: + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + nullable: true + instructions: anyOf: - type: string - type: 'null' - description: ID of the last batch in the list - title: Last Id + title: Instructions nullable: true - has_more: - default: false - description: Whether there are more batches available - title: Has More - type: boolean + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls + 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: - - data - title: ListBatchesResponse + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput type: object MetricInResponse: description: A metric value included in API responses. @@ -8548,83 +9168,6 @@ components: - value title: MetricInResponse type: object - PaginatedResponse: - description: A generic paginated response that follows a simple format. - properties: - data: - items: - additionalProperties: true - type: object - title: Data - type: array - has_more: - title: Has More - type: boolean - url: - anyOf: - - type: string - - type: 'null' - title: Url - nullable: true - required: - - data - - has_more - title: PaginatedResponse - type: object - PostTrainingMetric: - description: Training metrics captured during post-training jobs. - 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 - Checkpoint: - description: Checkpoint created during training runs. - 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: '#/components/schemas/PostTrainingMetric' - - type: 'null' - nullable: true - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - type: object DialogType: description: Parameter type for dialog data with semantic output labels. properties: @@ -8709,35 +9252,6 @@ components: - status title: ConversationMessage type: object - ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. - 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 Bf16QuantizationConfig: description: Configuration for BFloat16 precision (typically no quantization). properties: @@ -8786,93 +9300,7 @@ components: - type: 'null' default: int4_weight_int8_dynamic_activation title: Scheme - title: Int4QuantizationConfig - type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - - type: 'null' - 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. - properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - nullable: true - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - nullable: true - title: OpenAIChoiceLogprobs - type: object - ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. - 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 + title: Int4QuantizationConfig type: object OpenAIChoiceDelta: description: A delta from an OpenAI-compatible chat completion streaming response. @@ -8911,6 +9339,27 @@ components: nullable: true title: OpenAIChoiceDelta type: object + OpenAIChoiceLogprobs: + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + nullable: true + title: OpenAIChoiceLogprobs + type: object OpenAIChunkChoice: description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: @@ -8967,6 +9416,42 @@ components: - model title: OpenAIChatCompletionChunk type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true + required: + - message + - finish_reason + - index + title: OpenAIChoice + type: object OpenAICompletionChoice: description: |- A choice from an OpenAI-compatible completion response. @@ -9149,53 +9634,6 @@ components: - content title: UserMessage type: object - RouteInfo: - description: Information about an API route including its path, method, and implementing providers. - 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 - ListRoutesResponse: - description: Response containing a list of all available API routes. - properties: - data: - items: - $ref: '#/components/schemas/RouteInfo' - title: Data - type: array - required: - - data - title: ListRoutesResponse - type: object - PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. - 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 PostTrainingJobLogStream: description: Stream of logs from a finetuning job. properties: @@ -9212,52 +9650,6 @@ components: - log_lines title: PostTrainingJobLogStream type: object - PostTrainingJobStatusResponse: - description: Status of a finetuning job. - properties: - job_uuid: - title: Job Uuid - type: string - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Scheduled At - nullable: true - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - nullable: true - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - nullable: true - resources_allocated: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Resources Allocated - nullable: true - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - type: object RLHFAlgorithm: description: Available reinforcement learning from human feedback algorithms. enum: @@ -9307,18 +9699,6 @@ components: - logger_config title: PostTrainingRLHFRequest type: object - ListToolDefsResponse: - description: Response containing a list of tool definitions. - properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - title: Data - type: array - required: - - data - title: ListToolDefsResponse - type: object ToolGroupInput: description: Input data for registering a tool group. properties: @@ -9429,102 +9809,6 @@ components: type: object title: VectorStoreCreateRequest type: object - VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - 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. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - nullable: true - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListFilesResponse - type: object - VectorStoreListResponse: - description: Response from listing vector stores. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - nullable: true - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListResponse - type: object VectorStoreModifyRequest: description: Request to modify a vector store. properties: diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index 0ae55f1352..30bd2a5ad9 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -145,6 +145,65 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + /v1beta/datasets/{dataset_id}: + get: + tags: + - Datasets + summary: Get Dataset + description: Get a dataset by its ID. + operationId: get_dataset_v1beta_datasets__dataset_id__get + 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' + parameters: + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasets: + get: + tags: + - Datasets + summary: List Datasets + description: List all datasets. + operationId: list_datasets_v1beta_datasets_get + responses: + '200': + description: A ListDatasetsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListDatasetsResponse' + '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' /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: tags: @@ -338,6 +397,65 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}: + get: + tags: + - Benchmarks + summary: Get Benchmark + description: Get a benchmark by its ID. + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get + responses: + '200': + description: A Benchmark. + content: + application/json: + schema: + $ref: '#/components/schemas/Benchmark' + '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: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks: + get: + tags: + - Benchmarks + summary: List Benchmarks + description: List all benchmarks. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get + responses: + '200': + description: A ListBenchmarksResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListBenchmarksResponse' + '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 /v1alpha/post-training/job/cancel: post: tags: @@ -872,6 +990,37 @@ components: type: object title: ChatCompletionInputType description: Parameter type for chat completion input. + Checkpoint: + properties: + identifier: + type: string + title: Identifier + created_at: + type: string + format: date-time + title: Created At + epoch: + type: integer + title: Epoch + post_training_job_id: + type: string + title: Post Training Job Id + path: + type: string + title: Path + training_metrics: + anyOf: + - $ref: '#/components/schemas/PostTrainingMetric' + - type: 'null' + type: object + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. Chunk-Output: properties: content: @@ -1467,112 +1616,319 @@ components: - judge_model title: LLMAsJudgeScoringFnParams description: Parameters for LLM-as-judge scoring function configuration. - ListPostTrainingJobsResponse: + ListBatchesResponse: properties: + object: + type: string + const: list + title: Object + default: list data: items: - $ref: '#/components/schemas/PostTrainingJob' + $ref: '#/components/schemas/Batch' type: array title: Data + description: List of batch objects + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + description: ID of the first batch in the list + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + description: ID of the last batch in the list + has_more: + type: boolean + title: Has More + description: Whether there are more batches available + default: false type: object required: - data - title: ListPostTrainingJobsResponse - LoraFinetuningConfig: + title: ListBatchesResponse + description: Response containing a list of batch objects. + ListBenchmarksResponse: properties: - type: - type: string - const: LoRA - title: Type - default: LoRA - lora_attn_modules: + data: items: - type: string + $ref: '#/components/schemas/Benchmark' type: array - title: Lora Attn Modules - apply_lora_to_mlp: - type: boolean - title: Apply Lora To Mlp - apply_lora_to_output: - type: boolean - title: Apply Lora To Output - rank: - type: integer - title: Rank - alpha: - type: integer - title: Alpha - use_dora: - anyOf: - - type: boolean - - type: 'null' - title: Use Dora - default: false - quantize_base: - anyOf: - - type: boolean - - type: 'null' - title: Quantize Base - default: false + title: Data type: object required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - MCPListToolsTool: + - data + title: ListBenchmarksResponse + ListDatasetsResponse: properties: - input_schema: - additionalProperties: true - type: object - title: Input Schema - name: - type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - title: Description + data: + items: + $ref: '#/components/schemas/Dataset' + type: array + title: Data type: object required: - - input_schema - - name - title: MCPListToolsTool - description: Tool definition returned by MCP list tools operation. - Model: + - data + title: ListDatasetsResponse + description: Response from listing datasets. + ListOpenAIChatCompletionResponse: properties: - identifier: + data: + items: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: type: string - 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 - provider_id: + title: First Id + last_id: type: string - title: Provider Id - description: ID of the provider that owns this resource - type: + title: Last Id + object: 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 + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse + description: Response from listing OpenAI-compatible chat completions. + ListOpenAIFileResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse + description: Response for listing files in OpenAI Files API. + ListOpenAIResponseInputItem: + properties: + data: + items: + anyOf: + - 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' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + type: array + title: Data + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + title: ListOpenAIResponseInputItem + description: List container for OpenAI response input items. + ListOpenAIResponseObject: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput-Output' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject + description: Paginated list of OpenAI response objects with navigation metadata. + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + type: array + title: Data + type: object + required: + - data + title: ListPostTrainingJobsResponse + 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. + ListToolDefsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ToolDef' + type: array + title: Data + type: object + required: + - data + title: ListToolDefsResponse + description: Response containing a list of tool definitions. + LoraFinetuningConfig: + properties: + type: + type: string + const: LoRA + title: Type + default: LoRA + lora_attn_modules: + items: + type: string + type: array + title: Lora Attn Modules + apply_lora_to_mlp: + type: boolean + title: Apply Lora To Mlp + apply_lora_to_output: + type: boolean + title: Apply Lora To Output + rank: + type: integer + title: Rank + alpha: + type: integer + title: Alpha + use_dora: + anyOf: + - type: boolean + - type: 'null' + title: Use Dora + default: false + quantize_base: + anyOf: + - type: boolean + - type: 'null' + title: Quantize Base + default: false + type: object + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + Model: + properties: + identifier: + type: string + 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 + 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 @@ -3359,22 +3715,171 @@ components: - status title: OpenAIResponseObject description: Complete OpenAI response object containing generation results and metadata. - OpenAIResponseOutputMessageContentOutputText: + OpenAIResponseObjectWithInput-Output: properties: - text: + created_at: + type: integer + title: Created At + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + id: type: string - title: Text - type: + title: Id + model: 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' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + tools: + anyOf: + - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' + title: Tools + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls + input: + items: + anyOf: + - 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' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + type: array + title: Input + type: object + required: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput + description: OpenAI response object extended with input context information. + 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 @@ -3917,6 +4422,28 @@ components: required: - reasoning_tokens title: OutputTokensDetails + PaginatedResponse: + properties: + data: + items: + additionalProperties: true + type: object + type: array + title: Data + has_more: + type: boolean + title: Has More + url: + anyOf: + - type: string + - type: 'null' + title: Url + type: object + required: + - data + - has_more + title: PaginatedResponse + description: A generic paginated response that follows a simple format. PostTrainingJob: properties: job_uuid: @@ -3926,6 +4453,85 @@ components: required: - job_uuid title: PostTrainingJob + PostTrainingJobArtifactsResponse: + properties: + job_uuid: + type: string + title: Job Uuid + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints + type: object + required: + - job_uuid + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingJobStatusResponse: + properties: + job_uuid: + type: string + title: Job Uuid + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Scheduled At + started_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Started At + completed_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Completed At + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Resources Allocated + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints + type: object + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + PostTrainingMetric: + properties: + epoch: + type: integer + title: Epoch + train_loss: + type: number + title: Train Loss + validation_loss: + type: number + title: Validation Loss + perplexity: + type: number + title: Perplexity + type: object + required: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: Training metrics captured during post-training jobs. Prompt: properties: prompt: @@ -4073,16 +4679,36 @@ components: - data title: RerankResponse description: Response from a reranking request. - RowsDataSource: + RouteInfo: properties: - type: + route: type: string - const: rows - title: Type - default: rows - rows: - items: - additionalProperties: true + 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. + RowsDataSource: + properties: + type: + type: string + const: rows + title: Type + default: rows + rows: + items: + additionalProperties: true type: object type: array title: Rows @@ -4876,6 +5502,96 @@ components: - vector_store_id title: VectorStoreFileObject description: OpenAI Vector Store File object. + VectorStoreFilesListInBatchResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreFilesListInBatchResponse + description: Response from listing files in a vector store file batch. + VectorStoreListFilesResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreListFilesResponse + description: Response from listing files in a vector store. + VectorStoreListResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreListResponse + description: Response from listing vector stores. VectorStoreObject: properties: id: @@ -7063,43 +7779,15 @@ components: - $ref: '#/components/schemas/UnstructuredLogEvent' - $ref: '#/components/schemas/MetricEvent' - $ref: '#/components/schemas/StructuredLogEvent' - ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. 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: + title: Type type: string required: - - data - title: ListOpenAIResponseInputItem + - type + title: ResponseGuardrailSpec type: object OpenAIResponseObjectWithInput: description: OpenAI response object extended with input context information. @@ -7260,82 +7948,6 @@ components: - input title: OpenAIResponseObjectWithInput type: object - ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. - 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 - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - 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: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: ID of the last batch in the list - title: Last Id - nullable: true - has_more: - default: false - description: Whether there are more batches available - title: Has More - type: boolean - required: - - data - title: ListBatchesResponse - type: object MetricInResponse: description: A metric value included in API responses. properties: @@ -7358,98 +7970,21 @@ components: - value title: MetricInResponse type: object - PaginatedResponse: - description: A generic paginated response that follows a simple format. + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: - data: - items: - additionalProperties: true - type: object - title: Data - type: array - has_more: - title: Has More - type: boolean - url: - anyOf: - - type: string - - type: 'null' - title: Url - nullable: true - required: - - data - - has_more - title: PaginatedResponse - type: object - PostTrainingMetric: - description: Training metrics captured during post-training jobs. - 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 - Checkpoint: - description: Checkpoint created during training runs. - 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: '#/components/schemas/PostTrainingMetric' - - type: 'null' - nullable: true - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. - properties: - type: - const: dialog - default: dialog - title: Type - type: string - title: DialogType - type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. - properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. items: discriminator: mapping: @@ -7519,35 +8054,6 @@ components: - status title: ConversationMessage type: object - ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. - 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 Bf16QuantizationConfig: description: Configuration for BFloat16 precision (typically no quantization). properties: @@ -7598,92 +8104,6 @@ components: title: Scheme title: Int4QuantizationConfig type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - - type: 'null' - 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. - properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - nullable: true - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - nullable: true - title: OpenAIChoiceLogprobs - type: object - ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. - 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 OpenAIChoiceDelta: description: A delta from an OpenAI-compatible chat completion streaming response. properties: @@ -7721,6 +8141,27 @@ components: nullable: true title: OpenAIChoiceDelta type: object + OpenAIChoiceLogprobs: + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + nullable: true + title: OpenAIChoiceLogprobs + type: object OpenAIChunkChoice: description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: @@ -7777,6 +8218,42 @@ components: - model title: OpenAIChatCompletionChunk type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true + required: + - message + - finish_reason + - index + title: OpenAIChoice + type: object OpenAICompletionChoice: description: |- A choice from an OpenAI-compatible completion response. @@ -7959,53 +8436,6 @@ components: - content title: UserMessage type: object - RouteInfo: - description: Information about an API route including its path, method, and implementing providers. - 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 - ListRoutesResponse: - description: Response containing a list of all available API routes. - properties: - data: - items: - $ref: '#/components/schemas/RouteInfo' - title: Data - type: array - required: - - data - title: ListRoutesResponse - type: object - PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. - 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 PostTrainingJobLogStream: description: Stream of logs from a finetuning job. properties: @@ -8022,52 +8452,6 @@ components: - log_lines title: PostTrainingJobLogStream type: object - PostTrainingJobStatusResponse: - description: Status of a finetuning job. - properties: - job_uuid: - title: Job Uuid - type: string - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Scheduled At - nullable: true - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - nullable: true - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - nullable: true - resources_allocated: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Resources Allocated - nullable: true - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - type: object RLHFAlgorithm: description: Available reinforcement learning from human feedback algorithms. enum: @@ -8117,18 +8501,6 @@ components: - logger_config title: PostTrainingRLHFRequest type: object - ListToolDefsResponse: - description: Response containing a list of tool definitions. - properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - title: Data - type: array - required: - - data - title: ListToolDefsResponse - type: object ToolGroupInput: description: Input data for registering a tool group. properties: @@ -8239,102 +8611,6 @@ components: type: object title: VectorStoreCreateRequest type: object - VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - 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. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - nullable: true - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListFilesResponse - type: object - VectorStoreListResponse: - description: Response from listing vector stores. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - nullable: true - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListResponse - type: object VectorStoreModifyRequest: description: Request to modify a vector store. properties: diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index df61decd99..172e426d2b 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -78,64 +78,6 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' /v1/responses: - post: - tags: - - Agents - summary: Create Openai Response - description: Create a model response. - operationId: create_openai_response_v1_responses_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/_responses_Request' - x-llama-stack-extra-body-params: - guardrails: - $defs: - ResponseGuardrailSpec: - description: |- - Specification for a guardrail to apply during response generation. - - :param type: The type/identifier of the guardrail. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - type: object - anyOf: - - items: - anyOf: - - type: string - - $ref: '#/components/schemas/ResponseGuardrailSpec' - type: array - - type: 'null' - description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. - responses: - '200': - description: An OpenAIResponseObject. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseObject' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIResponseObjectStream' - '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: - Agents @@ -196,6 +138,64 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + post: + tags: + - Agents + summary: Create Openai Response + description: Create a model response. + operationId: create_openai_response_v1_responses_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_responses_Request' + x-llama-stack-extra-body-params: + guardrails: + $defs: + ResponseGuardrailSpec: + description: |- + Specification for a guardrail to apply during response generation. + + :param type: The type/identifier of the guardrail. + properties: + type: + title: Type + type: string + required: + - type + title: ResponseGuardrailSpec + type: object + anyOf: + - items: + anyOf: + - type: string + - $ref: '#/components/schemas/ResponseGuardrailSpec' + type: array + - type: 'null' + description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. + responses: + '200': + description: An OpenAIResponseObject. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseObject' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIResponseObjectStream' + '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}: get: tags: @@ -677,37 +677,6 @@ paths: type: string description: 'Path parameter: batch_id' /v1/batches: - post: - tags: - - Batches - summary: Create Batch - description: Create a new batch for processing multiple API requests. - 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 get: tags: - Batches @@ -749,6 +718,37 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + post: + tags: + - Batches + summary: Create Batch + description: Create a new batch for processing multiple API requests. + 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: @@ -817,44 +817,6 @@ paths: $ref: '#/components/responses/DefaultError' description: Default Response /v1/vector_stores/{vector_store_id}/files: - post: - tags: - - Vector Io - summary: Openai Attach File To Vector Store - description: Attach a file to a vector store. - 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' get: tags: - Vector Io @@ -936,6 +898,44 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + post: + tags: + - Vector Io + summary: Openai Attach File To Vector Store + description: Attach a file to a vector store. + 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}/file_batches/{batch_id}/cancel: post: tags: @@ -976,41 +976,7 @@ paths: type: string description: 'Path parameter: batch_id' /v1/vector_stores: - post: - tags: - - Vector Io - summary: Openai Create Vector Store - description: |- - Creates a vector store. - - Generate an OpenAI-compatible vector store with the given parameters. - 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 - get: + get: tags: - Vector Io summary: Openai List Vector Stores @@ -1070,6 +1036,40 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + post: + tags: + - Vector Io + summary: Openai Create Vector Store + description: |- + Creates a vector store. + + Generate an OpenAI-compatible vector store with the given parameters. + 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}/file_batches: post: tags: @@ -1569,6 +1569,68 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + /v1/models/{model_id}: + get: + tags: + - Models + summary: Get Model + description: |- + Get model. + + Get a model by its identifier. + operationId: get_model_v1_models__model_id__get + 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' + parameters: + - name: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' + /v1/models: + get: + tags: + - Models + summary: Openai List Models + description: List models using the OpenAI API. + operationId: openai_list_models_v1_models_get + responses: + '200': + description: A OpenAIListModelsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIListModelsResponse' + '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/moderations: post: tags: @@ -1639,6 +1701,65 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + /v1/shields/{identifier}: + get: + tags: + - Shields + summary: Get Shield + description: Get a shield by its identifier. + operationId: get_shield_v1_shields__identifier__get + 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' + parameters: + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + /v1/shields: + get: + tags: + - Shields + summary: List Shields + description: List all shields. + 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' /v1/scoring/score: post: tags: @@ -1703,6 +1824,65 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + /v1/scoring-functions/{scoring_fn_id}: + get: + tags: + - Scoring Functions + summary: Get Scoring Function + description: Get a scoring function by its ID. + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get + responses: + '200': + description: A ScoringFn. + content: + application/json: + schema: + $ref: '#/components/schemas/ScoringFn' + '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: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' + /v1/scoring-functions: + get: + tags: + - Scoring Functions + summary: List Scoring Functions + description: List all scoring functions. + 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 /v1/tools/{tool_name}: get: tags: @@ -1736,6 +1916,65 @@ paths: schema: type: string description: 'Path parameter: tool_name' + /v1/toolgroups/{toolgroup_id}: + get: + tags: + - Tool Groups + summary: Get Tool Group + description: Get a tool group by its ID. + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get + responses: + '200': + description: A ToolGroup. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolGroup' + '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: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' + /v1/toolgroups: + get: + tags: + - Tool Groups + summary: List Tool Groups + description: List tool groups with optional provider. + 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 /v1/tools: get: tags: @@ -2326,35 +2565,33 @@ paths: schema: type: string description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/versions: - get: + delete: tags: - Prompts - summary: List Prompt Versions + summary: Delete Prompt description: |- - List prompt versions. + Delete prompt. - List all versions of a specific prompt. - operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get + Delete a prompt. + operationId: delete_prompt_v1_prompts__prompt_id__delete responses: '200': - description: A ListPromptsResponse containing all versions of the prompt. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListPromptsResponse' + schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response parameters: - name: prompt_id in: path @@ -2362,29 +2599,23 @@ paths: schema: type: string description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/set-default-version: - post: + /v1/prompts/{prompt_id}/versions: + get: tags: - Prompts - summary: Set Default Version + summary: List Prompt Versions description: |- - Set prompt version. + List prompt versions. - Set which version of a prompt should be the default in get_prompt (latest). - 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 + List all versions of a specific prompt. + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get responses: '200': - description: The prompt with the specified version now set as default. + description: A ListPromptsResponse containing all versions of the prompt. content: application/json: schema: - $ref: '#/components/schemas/Prompt' + $ref: '#/components/schemas/ListPromptsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2404,48 +2635,49 @@ paths: schema: type: string description: 'Path parameter: prompt_id' - /v1/conversations/{conversation_id}/items: + /v1/prompts/{prompt_id}/set-default-version: post: tags: - - Conversations - summary: Add Items + - Prompts + summary: Set Default Version description: |- - Create items. + Set prompt version. - Create items in the conversation. - operationId: add_items_v1_conversations__conversation_id__items_post + Set which version of a prompt should be the default in get_prompt (latest). + operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post requestBody: - required: true content: application/json: schema: - $ref: '#/components/schemas/_conversations_conversation_id_items_Request' + $ref: '#/components/schemas/_prompts_prompt_id_set_default_version_Request' + required: true responses: '200': - description: List of created items. + description: The prompt with the specified version now set as default. content: application/json: schema: - $ref: '#/components/schemas/ConversationItemList' + $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: conversation_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: conversation_id' + description: 'Path parameter: prompt_id' + /v1/conversations/{conversation_id}/items: get: tags: - Conversations @@ -2518,6 +2750,47 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + post: + tags: + - Conversations + summary: Add Items + description: |- + Create items. + + Create items in the conversation. + 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: post: tags: @@ -3111,6 +3384,37 @@ components: type: object title: ChatCompletionInputType description: Parameter type for chat completion input. + Checkpoint: + properties: + identifier: + type: string + title: Identifier + created_at: + type: string + format: date-time + title: Created At + epoch: + type: integer + title: Epoch + post_training_job_id: + type: string + title: Post Training Job Id + path: + type: string + title: Path + training_metrics: + anyOf: + - $ref: '#/components/schemas/PostTrainingMetric' + - type: 'null' + type: object + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. Chunk-Input: properties: content: @@ -3766,81 +4070,299 @@ components: - judge_model title: LLMAsJudgeScoringFnParams description: Parameters for LLM-as-judge scoring function configuration. - ListPromptsResponse: + ListBatchesResponse: properties: + object: + type: string + const: list + title: Object + default: list data: items: - $ref: '#/components/schemas/Prompt' + $ref: '#/components/schemas/Batch' type: array title: Data + description: List of batch objects + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + description: ID of the first batch in the list + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + description: ID of the last batch in the list + has_more: + type: boolean + title: Has More + description: Whether there are more batches available + default: false type: object required: - data - title: ListPromptsResponse - description: Response model to list prompts. - ListProvidersResponse: + title: ListBatchesResponse + description: Response containing a list of batch objects. + ListOpenAIChatCompletionResponse: properties: data: items: - $ref: '#/components/schemas/ProviderInfo' + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' type: array title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list type: object required: - data - title: ListProvidersResponse - description: Response containing a list of all available providers. - LoraFinetuningConfig: + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse + description: Response from listing OpenAI-compatible chat completions. + ListOpenAIFileResponse: properties: - type: - type: string - const: LoRA - title: Type - default: LoRA - lora_attn_modules: + data: items: - type: string + $ref: '#/components/schemas/OpenAIFileObject' type: array - title: Lora Attn Modules - apply_lora_to_mlp: - type: boolean - title: Apply Lora To Mlp - apply_lora_to_output: + title: Data + has_more: type: boolean - title: Apply Lora To Output - rank: - type: integer - title: Rank - alpha: - type: integer - title: Alpha - use_dora: - anyOf: - - type: boolean - - type: 'null' - title: Use Dora - default: false - quantize_base: - anyOf: - - type: boolean - - type: 'null' - title: Quantize Base - default: false + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list type: object required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - MCPListToolsTool: - properties: - input_schema: - additionalProperties: true - type: object - title: Input Schema + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse + description: Response for listing files in OpenAI Files API. + ListOpenAIResponseInputItem: + properties: + data: + items: + anyOf: + - 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' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + type: array + title: Data + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + title: ListOpenAIResponseInputItem + description: List container for OpenAI response input items. + ListOpenAIResponseObject: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput-Output' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject + description: Paginated list of OpenAI response objects with navigation metadata. + 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. + 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. + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + 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 + ListToolDefsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ToolDef' + type: array + title: Data + type: object + required: + - data + title: ListToolDefsResponse + description: Response containing a list of tool definitions. + 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. + LoraFinetuningConfig: + properties: + type: + type: string + const: LoRA + title: Type + default: LoRA + lora_attn_modules: + items: + type: string + type: array + title: Lora Attn Modules + apply_lora_to_mlp: + type: boolean + title: Apply Lora To Mlp + apply_lora_to_output: + type: boolean + title: Apply Lora To Output + rank: + type: integer + title: Rank + alpha: + type: integer + title: Alpha + use_dora: + anyOf: + - type: boolean + - type: 'null' + title: Use Dora + default: false + quantize_base: + anyOf: + - type: boolean + - type: 'null' + title: Quantize Base + default: false + type: object + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema name: type: string title: Name @@ -4995,6 +5517,17 @@ components: type: object title: OpenAIJSONSchema description: JSON schema specification for OpenAI-compatible structured response format. + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + type: array + title: Data + type: object + required: + - data + title: OpenAIListModelsResponse OpenAIModel: properties: id: @@ -5735,39 +6268,188 @@ components: - status title: OpenAIResponseObject description: Complete OpenAI response object containing generation results and metadata. - OpenAIResponseOutputMessageContentOutputText: + OpenAIResponseObjectWithInput-Output: properties: - text: + created_at: + type: integer + title: Created At + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + id: type: string - title: Text - type: + title: Id + model: type: string - const: output_text - title: Type - default: output_text - annotations: + title: Model + object: + type: string + const: response + title: Object + default: response + output: items: oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + - $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: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + 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: Annotations - type: object - required: - - text - title: OpenAIResponseOutputMessageContentOutputText - OpenAIResponseOutputMessageFileSearchToolCall: - properties: - id: + title: Output + parallel_tool_calls: + type: boolean + title: Parallel Tool Calls + default: false + previous_response_id: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + tools: + anyOf: + - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' + title: Tools + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls + input: + items: + anyOf: + - 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' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + type: array + title: Input + type: object + required: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput + description: OpenAI response object extended with input context information. + 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: @@ -6300,6 +6982,107 @@ components: required: - reasoning_tokens title: OutputTokensDetails + PaginatedResponse: + properties: + data: + items: + additionalProperties: true + type: object + type: array + title: Data + has_more: + type: boolean + title: Has More + url: + anyOf: + - type: string + - type: 'null' + title: Url + type: object + required: + - data + - has_more + title: PaginatedResponse + description: A generic paginated response that follows a simple format. + PostTrainingJobArtifactsResponse: + properties: + job_uuid: + type: string + title: Job Uuid + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints + type: object + required: + - job_uuid + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingJobStatusResponse: + properties: + job_uuid: + type: string + title: Job Uuid + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Scheduled At + started_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Started At + completed_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Completed At + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Resources Allocated + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints + type: object + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + PostTrainingMetric: + properties: + epoch: + type: integer + title: Epoch + train_loss: + type: number + title: Train Loss + validation_loss: + type: number + title: Validation Loss + perplexity: + type: number + title: Perplexity + type: object + required: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: Training metrics captured during post-training jobs. Prompt: properties: prompt: @@ -6447,22 +7230,42 @@ components: - data title: RerankResponse description: Response from a reranking request. - RowsDataSource: + RouteInfo: properties: - type: + route: type: string - const: rows - title: Type - default: rows - rows: + title: Route + method: + type: string + title: Method + provider_types: items: - additionalProperties: true - type: object + type: string type: array - title: Rows + title: Provider Types type: object required: - - rows + - route + - method + - provider_types + title: RouteInfo + description: Information about an API route including its path, method, and implementing providers. + 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. RunShieldResponse: @@ -7250,6 +8053,96 @@ components: - vector_store_id title: VectorStoreFileObject description: OpenAI Vector Store File object. + VectorStoreFilesListInBatchResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreFilesListInBatchResponse + description: Response from listing files in a vector store file batch. + VectorStoreListFilesResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreListFilesResponse + description: Response from listing files in a vector store. + VectorStoreListResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreListResponse + description: Response from listing vector stores. VectorStoreObject: properties: id: @@ -9818,43 +10711,15 @@ components: - $ref: '#/components/schemas/UnstructuredLogEvent' - $ref: '#/components/schemas/MetricEvent' - $ref: '#/components/schemas/StructuredLogEvent' - ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. 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: + title: Type type: string required: - - data - title: ListOpenAIResponseInputItem + - type + title: ResponseGuardrailSpec type: object OpenAIResponseObjectWithInput: description: OpenAI response object extended with input context information. @@ -10015,82 +10880,6 @@ components: - input title: OpenAIResponseObjectWithInput type: object - ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. - 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 - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - 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: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: ID of the last batch in the list - title: Last Id - nullable: true - has_more: - default: false - description: Whether there are more batches available - title: Has More - type: boolean - required: - - data - title: ListBatchesResponse - type: object MetricInResponse: description: A metric value included in API responses. properties: @@ -10113,92 +10902,15 @@ components: - value title: MetricInResponse type: object - PaginatedResponse: - description: A generic paginated response that follows a simple format. + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: - data: - items: - additionalProperties: true - type: object - title: Data - type: array - has_more: - title: Has More - type: boolean - url: - anyOf: - - type: string - - type: 'null' - title: Url - nullable: true - required: - - data - - has_more - title: PaginatedResponse - type: object - PostTrainingMetric: - description: Training metrics captured during post-training jobs. - 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 - Checkpoint: - description: Checkpoint created during training runs. - 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: '#/components/schemas/PostTrainingMetric' - - type: 'null' - nullable: true - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. - properties: - type: - const: dialog - default: dialog - title: Type - type: string - title: DialogType + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType type: object ConversationItemCreateRequest: description: Request body for creating conversation items. @@ -10274,35 +10986,6 @@ components: - status title: ConversationMessage type: object - ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. - 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 Bf16QuantizationConfig: description: Configuration for BFloat16 precision (typically no quantization). properties: @@ -10353,92 +11036,6 @@ components: title: Scheme title: Int4QuantizationConfig type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - - type: 'null' - 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. - properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - nullable: true - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - nullable: true - title: OpenAIChoiceLogprobs - type: object - ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. - 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 OpenAIChoiceDelta: description: A delta from an OpenAI-compatible chat completion streaming response. properties: @@ -10476,6 +11073,27 @@ components: nullable: true title: OpenAIChoiceDelta type: object + OpenAIChoiceLogprobs: + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + nullable: true + title: OpenAIChoiceLogprobs + type: object OpenAIChunkChoice: description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: @@ -10532,6 +11150,42 @@ components: - model title: OpenAIChatCompletionChunk type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true + required: + - message + - finish_reason + - index + title: OpenAIChoice + type: object OpenAICompletionChoice: description: |- A choice from an OpenAI-compatible completion response. @@ -10714,53 +11368,6 @@ components: - content title: UserMessage type: object - RouteInfo: - description: Information about an API route including its path, method, and implementing providers. - 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 - ListRoutesResponse: - description: Response containing a list of all available API routes. - properties: - data: - items: - $ref: '#/components/schemas/RouteInfo' - title: Data - type: array - required: - - data - title: ListRoutesResponse - type: object - PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. - 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 PostTrainingJobLogStream: description: Stream of logs from a finetuning job. properties: @@ -10777,52 +11384,6 @@ components: - log_lines title: PostTrainingJobLogStream type: object - PostTrainingJobStatusResponse: - description: Status of a finetuning job. - properties: - job_uuid: - title: Job Uuid - type: string - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Scheduled At - nullable: true - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - nullable: true - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - nullable: true - resources_allocated: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Resources Allocated - nullable: true - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - type: object RLHFAlgorithm: description: Available reinforcement learning from human feedback algorithms. enum: @@ -10872,18 +11433,6 @@ components: - logger_config title: PostTrainingRLHFRequest type: object - ListToolDefsResponse: - description: Response containing a list of tool definitions. - properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - title: Data - type: array - required: - - data - title: ListToolDefsResponse - type: object ToolGroupInput: description: Input data for registering a tool group. properties: @@ -10994,102 +11543,6 @@ components: type: object title: VectorStoreCreateRequest type: object - VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - 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. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - nullable: true - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListFilesResponse - type: object - VectorStoreListResponse: - description: Response from listing vector stores. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - nullable: true - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListResponse - type: object VectorStoreModifyRequest: description: Request to modify a vector store. properties: diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index f45ea0e82a..72475b8bd5 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -5674,6 +5674,37 @@ components: type: object title: ChatCompletionInputType description: Parameter type for chat completion input. + Checkpoint: + properties: + identifier: + type: string + title: Identifier + created_at: + type: string + format: date-time + title: Created At + epoch: + type: integer + title: Epoch + post_training_job_id: + type: string + title: Post Training Job Id + path: + type: string + title: Path + training_metrics: + anyOf: + - $ref: '#/components/schemas/PostTrainingMetric' + - type: 'null' + type: object + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. Chunk-Input: properties: content: @@ -8372,6 +8403,155 @@ components: - status title: OpenAIResponseObject description: Complete OpenAI response object containing generation results and metadata. + OpenAIResponseObjectWithInput-Output: + properties: + created_at: + type: integer + title: Created At + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + tools: + anyOf: + - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + - type: 'null' + title: Tools + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + title: Max Tool Calls + input: + items: + anyOf: + - 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' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + type: array + title: Input + type: object + required: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput + description: OpenAI response object extended with input context information. OpenAIResponseOutputMessageContentOutputText: properties: text: @@ -8937,6 +9117,28 @@ components: required: - reasoning_tokens title: OutputTokensDetails + PaginatedResponse: + properties: + data: + items: + additionalProperties: true + type: object + type: array + title: Data + has_more: + type: boolean + title: Has More + url: + anyOf: + - type: string + - type: 'null' + title: Url + type: object + required: + - data + - has_more + title: PaginatedResponse + description: A generic paginated response that follows a simple format. PostTrainingJob: properties: job_uuid: @@ -8946,61 +9148,140 @@ components: required: - job_uuid title: PostTrainingJob - Prompt: + PostTrainingJobArtifactsResponse: properties: - prompt: - anyOf: - - type: string - - type: 'null' - title: Prompt - description: The system prompt with variable placeholders - version: - type: integer - minimum: 1.0 - title: Version - description: Version (integer starting at 1, incremented on save) - prompt_id: + job_uuid: type: string - title: Prompt Id - description: Unique identifier in format 'pmpt_<48-digit-hash>' - variables: + title: Job Uuid + checkpoints: items: - type: string + $ref: '#/components/schemas/Checkpoint' 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 + title: Checkpoints type: object required: - - version - - prompt_id - title: Prompt - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. - ProviderInfo: + - job_uuid + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingJobStatusResponse: properties: - api: - type: string - title: Api - provider_id: - type: string - title: Provider Id - provider_type: + job_uuid: type: string - title: Provider Type - config: - additionalProperties: true - type: object - title: Config - health: - additionalProperties: true - type: object - title: Health - type: object - required: + title: Job Uuid + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Scheduled At + started_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Started At + completed_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Completed At + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Resources Allocated + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints + type: object + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + PostTrainingMetric: + properties: + epoch: + type: integer + title: Epoch + train_loss: + type: number + title: Train Loss + validation_loss: + type: number + title: Validation Loss + perplexity: + type: number + title: Perplexity + type: object + required: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: Training metrics captured during post-training jobs. + Prompt: + properties: + prompt: + anyOf: + - type: string + - type: 'null' + title: Prompt + description: The system prompt with variable placeholders + 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. + 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 @@ -9093,6 +9374,26 @@ components: - data title: RerankResponse description: Response from a reranking request. + 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. RowsDataSource: properties: type: @@ -9895,6 +10196,96 @@ components: - vector_store_id title: VectorStoreFileObject description: OpenAI Vector Store File object. + VectorStoreFilesListInBatchResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreFilesListInBatchResponse + description: Response from listing files in a vector store file batch. + VectorStoreListFilesResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreListFilesResponse + description: Response from listing files in a vector store. + VectorStoreListResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + title: First Id + last_id: + anyOf: + - type: string + - type: 'null' + title: Last Id + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreListResponse + description: Response from listing vector stores. VectorStoreObject: properties: id: @@ -18934,43 +19325,15 @@ components: - $ref: '#/components/schemas/UnstructuredLogEvent' - $ref: '#/components/schemas/MetricEvent' - $ref: '#/components/schemas/StructuredLogEvent' - ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. 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: + title: Type type: string required: - - data - title: ListOpenAIResponseInputItem + - type + title: ResponseGuardrailSpec type: object OpenAIResponseObjectWithInput: description: OpenAI response object extended with input context information. @@ -19125,82 +19488,6 @@ components: - input title: OpenAIResponseObjectWithInput type: object - ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. - 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 - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - 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: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - title: First Id - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: ID of the last batch in the list - title: Last Id - nullable: true - has_more: - default: false - description: Whether there are more batches available - title: Has More - type: boolean - required: - - data - title: ListBatchesResponse - type: object MetricInResponse: description: A metric value included in API responses. properties: @@ -19223,83 +19510,6 @@ components: - value title: MetricInResponse type: object - PaginatedResponse: - description: A generic paginated response that follows a simple format. - properties: - data: - items: - additionalProperties: true - type: object - title: Data - type: array - has_more: - title: Has More - type: boolean - url: - anyOf: - - type: string - - type: 'null' - title: Url - nullable: true - required: - - data - - has_more - title: PaginatedResponse - type: object - PostTrainingMetric: - description: Training metrics captured during post-training jobs. - 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 - Checkpoint: - description: Checkpoint created during training runs. - 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: '#/components/schemas/PostTrainingMetric' - - type: 'null' - nullable: true - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - type: object DialogType: description: Parameter type for dialog data with semantic output labels. properties: @@ -19384,35 +19594,6 @@ components: - status title: ConversationMessage type: object - ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. - 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 Bf16QuantizationConfig: description: Configuration for BFloat16 precision (typically no quantization). properties: @@ -19741,92 +19922,6 @@ components: title: Scheme title: Int4QuantizationConfig type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - - type: 'null' - 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. - properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - nullable: true - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - nullable: true - title: OpenAIChoiceLogprobs - type: object - ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. - 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 OpenAIChoiceDelta: description: A delta from an OpenAI-compatible chat completion streaming response. properties: @@ -19864,6 +19959,27 @@ components: nullable: true title: OpenAIChoiceDelta type: object + OpenAIChoiceLogprobs: + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + nullable: true + title: OpenAIChoiceLogprobs + type: object OpenAIChunkChoice: description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: @@ -19920,6 +20036,42 @@ components: - model title: OpenAIChatCompletionChunk type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + nullable: true + required: + - message + - finish_reason + - index + title: OpenAIChoice + type: object OpenAICompletionChoice: description: |- A choice from an OpenAI-compatible completion response. @@ -20040,53 +20192,6 @@ components: - content title: ToolResponse type: object - RouteInfo: - description: Information about an API route including its path, method, and implementing providers. - 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 - ListRoutesResponse: - description: Response containing a list of all available API routes. - properties: - data: - items: - $ref: '#/components/schemas/RouteInfo' - title: Data - type: array - required: - - data - title: ListRoutesResponse - type: object - PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. - 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 PostTrainingJobLogStream: description: Stream of logs from a finetuning job. properties: @@ -20103,52 +20208,6 @@ components: - log_lines title: PostTrainingJobLogStream type: object - PostTrainingJobStatusResponse: - description: Status of a finetuning job. - properties: - job_uuid: - title: Job Uuid - type: string - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Scheduled At - nullable: true - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - nullable: true - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - nullable: true - resources_allocated: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Resources Allocated - nullable: true - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - type: object RLHFAlgorithm: description: Available reinforcement learning from human feedback algorithms. enum: diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index 4bc38b9f1d..688360a0a9 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -334,9 +334,34 @@ async def params_only_endpoint(): params_only_endpoint.__annotations__ = param_annotations endpoint_func = params_only_endpoint else: + # Endpoint with no parameters and no response model + # If we have a response_model from the function signature, use it even if _find_models_for_endpoint didn't find it + # This can happen if there was an exception during model finding + if response_model is None: + # Try to get response model directly from the function signature as a fallback + func = _get_protocol_method(api, name) + if func: + try: + sig = inspect.signature(func) + return_annotation = sig.return_annotation + if return_annotation != inspect.Signature.empty: + if hasattr(return_annotation, "model_json_schema"): + response_model = return_annotation + elif get_origin(return_annotation) is Annotated: + args = get_args(return_annotation) + if args and hasattr(args[0], "model_json_schema"): + response_model = args[0] + except Exception: + pass - async def no_params_endpoint(): - return {} + if response_model: + + async def no_params_endpoint() -> response_model: + return response_model() if response_model else {} + else: + + async def no_params_endpoint(): + return {} if operation_description: no_params_endpoint.__doc__ = operation_description @@ -386,6 +411,11 @@ async def no_params_endpoint(): }, } + # FastAPI needs response_model parameter to properly generate OpenAPI spec + # Use the non-streaming response model if available + if response_model: + route_kwargs["response_model"] = response_model + method_map = {"GET": app.get, "POST": app.post, "PUT": app.put, "DELETE": app.delete, "PATCH": app.patch} for method in methods: if handler := method_map.get(method.upper()): @@ -1434,10 +1464,30 @@ def _filter_schema_by_version( filtered_paths = {} for path, path_item in filtered_schema["paths"].items(): - if exclude_deprecated and _is_path_deprecated(path_item): + if not isinstance(path_item, dict): continue - if (stable_only and _is_stable_path(path)) or (not stable_only and _is_experimental_path(path)): - filtered_paths[path] = path_item + + # Filter at operation level, not path level + # This allows paths with both deprecated and non-deprecated operations + filtered_path_item = {} + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + if method not in path_item: + continue + operation = path_item[method] + if not isinstance(operation, dict): + continue + + # Skip deprecated operations if exclude_deprecated is True + if exclude_deprecated and operation.get("deprecated", False): + continue + + filtered_path_item[method] = operation + + # Only include path if it has at least one operation after filtering + if filtered_path_item: + # Check if path matches version filter + if (stable_only and _is_stable_path(path)) or (not stable_only and _is_experimental_path(path)): + filtered_paths[path] = filtered_path_item filtered_schema["paths"] = filtered_paths return _filter_schemas_by_references(filtered_schema, filtered_paths, openapi_schema) From 73861b504db0a36a5a363aa59d95b7c445e7cc10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 12 Nov 2025 14:30:27 +0100 Subject: [PATCH 12/46] chore: re-add missing endpoints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _filter_combined_schema was using path-level filtering with _is_path_deprecated, which excluded entire paths if any operation was deprecated. Since /v1/toolgroups has both GET (not deprecated) and POST (deprecated), the entire path was excluded, removing the GET operation and its response schema. Updated _filter_combined_schema to use operation-level filtering, matching _filter_schema_by_version Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 11172 +++++++++++++----- docs/static/stainless-llama-stack-spec.yaml | 410 +- scripts/fastapi_generator.py | 33 +- 3 files changed, 8447 insertions(+), 3168 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index e3d8c9fd1d..55b5a2b8f0 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -7,6 +7,7 @@ info: 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. @@ -1481,30 +1482,6 @@ paths: application/json: schema: $ref: '#/components/schemas/_responses_Request' - x-llama-stack-extra-body-params: - guardrails: - $defs: - ResponseGuardrailSpec: - description: |- - Specification for a guardrail to apply during response generation. - - :param type: The type/identifier of the guardrail. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - type: object - anyOf: - - items: - anyOf: - - type: string - - $ref: '#/components/schemas/ResponseGuardrailSpec' - type: array - - type: 'null' - description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. responses: '200': description: An OpenAIResponseObject. @@ -1512,9 +1489,6 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIResponseObject' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIResponseObjectStream' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -1700,16 +1674,16 @@ paths: schema: type: string description: 'Path parameter: response_id' - - name: include - in: query - required: false - schema: - anyOf: - - type: array - items: - type: string - - type: 'null' - title: Include + requestBody: + content: + application/json: + schema: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Include responses: '200': description: An ListOpenAIResponseInputItem. @@ -1825,8 +1799,6 @@ paths: description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - description: Default Response - post: tags: - ScoringFunctions summary: List all scoring functions. @@ -1868,9 +1840,6 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIChatCompletion' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIChatCompletionChunk' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -1991,8 +1960,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/inference/rerank: - post: tags: - Shields summary: List all shields. @@ -2053,53 +2020,15 @@ paths: /v1/health: get: tags: - - Inspect - summary: Health - description: |- - Get health status. - - Get the current health status of the service. - 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: - - Inspect - summary: List Routes - description: |- - List routes. - - List all available API routes with their methods and implementing providers. - operationId: list_routes_v1_inspect_routes_get + - Shields + summary: Get a shield by its identifier. + description: Get a shield by its identifier. parameters: - - name: api_filter - in: query - required: false - schema: - anyOf: - - enum: - - v1 - - v1alpha - - v1beta - - deprecated + - name: identifier + in: path + description: The identifier of the shield to get. + required: true + schema: type: string deprecated: false delete: @@ -2270,56 +2199,121 @@ paths: get: responses: '200': - description: A list of batch objects. + description: A ListToolGroupsResponse. content: application/json: schema: - $ref: '#/components/schemas/ListBatchesResponse' + $ref: '#/components/schemas/ListToolGroupsResponse' '400': $ref: '#/components/responses/BadRequest400' - description: Bad Request '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 - /v1/batches/{batch_id}: + tags: + - ToolGroups + summary: List tool groups with optional provider. + description: List tool groups with optional provider. + parameters: [] + deprecated: false + /v1/toolgroups/{toolgroup_id}: get: + responses: + '200': + description: A ToolGroup. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolGroup' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' tags: - - Batches - summary: Retrieve Batch - description: Retrieve information about a specific batch. - operationId: retrieve_batch_v1_batches__batch_id__get + - ToolGroups + summary: Get a tool group by its ID. + description: Get a tool group by its ID. + parameters: + - name: toolgroup_id + in: path + description: The ID of the tool group to get. + required: true + schema: + type: string + deprecated: false + /v1/tools: + get: responses: '200': - description: The batch object. + description: A ListToolDefsResponse. content: application/json: schema: - $ref: '#/components/schemas/Batch' + $ref: '#/components/schemas/ListToolDefsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - description: Too Many Requests - $ref: '#/components/responses/TooManyRequests429' + $ref: >- + #/components/responses/TooManyRequests429 '500': - description: Internal Server Error - $ref: '#/components/responses/InternalServerError500' + $ref: >- + #/components/responses/InternalServerError500 default: - description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - ToolGroups + summary: List tools with optional tool group. + description: List tools with optional tool group. parameters: - - name: batch_id - in: path - required: true - schema: - type: string - description: 'Path parameter: batch_id' + - name: toolgroup_id + in: query + description: >- + The ID of the tool group to list tools for. + required: false + schema: + type: string + deprecated: false + /v1/tools/{tool_name}: + get: + responses: + '200': + description: A ToolDef. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDef' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - ToolGroups + summary: Get a tool by its name. + description: Get a tool by its name. + parameters: + - name: tool_name + in: path + description: The name of the tool to get. + required: true + schema: + type: string + deprecated: false /v1/vector-io/insert: post: tags: @@ -3003,11 +2997,11 @@ paths: operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get responses: '200': - description: A VectorStoreFileContentResponse representing the file contents. + description: A list of InterleavedContent representing the file contents. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileContentResponse' + $ref: '#/components/schemas/VectorStoreFileContentsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3107,29 +3101,23 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/moderations: - post: + /v1/models/{model_id}: + get: tags: - - Safety - summary: Run Moderation + - Models + summary: Get Model description: |- - Create moderation. + Get model. - Classifies if text and/or image inputs are potentially harmful. - operationId: run_moderation_v1_moderations_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_moderations_Request' - required: true + Get a model by its identifier. + operationId: get_model_v1_models__model_id__get responses: '200': - description: A moderation object. + description: A Model. content: application/json: schema: - $ref: '#/components/schemas/ModerationObject' + $ref: '#/components/schemas/Model' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3142,29 +3130,28 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/safety/run-shield: - post: + parameters: + - name: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' + delete: tags: - - Safety - summary: Run Shield + - Models + summary: Unregister Model description: |- - Run shield. + Unregister model. - Run a shield. - operationId: run_shield_v1_safety_run_shield_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_safety_run_shield_Request' - required: true + Unregister a model. + operationId: unregister_model_v1_models__model_id__delete responses: '200': - description: A RunShieldResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/RunShieldResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3177,21 +3164,27 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' -<<<<<<< HEAD - /v1/shields/{identifier}: + parameters: + - name: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' + /v1/models: get: tags: - - Shields - summary: Get Shield - description: Get a shield by its identifier. - operationId: get_shield_v1_shields__identifier__get + - Models + summary: Openai List Models + description: List models using the OpenAI API. + operationId: openai_list_models_v1_models_get responses: '200': - description: A Shield. + description: A OpenAIListModelsResponse. content: application/json: schema: - $ref: '#/components/schemas/Shield' + $ref: '#/components/schemas/OpenAIListModelsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3204,23 +3197,153 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: identifier - in: path - required: true - schema: - type: string - description: 'Path parameter: identifier' - delete: + post: tags: - - Shields - summary: Unregister Shield - description: Unregister a shield. - operationId: unregister_shield_v1_shields__identifier__delete - responses: - '200': - description: Successful Response - content: + - Models + summary: Register Model + description: |- + Register model. + + Register a model. + 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/moderations: + post: + tags: + - Safety + summary: Run Moderation + description: |- + Create moderation. + + Classifies if text and/or image inputs are potentially harmful. + 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/safety/run-shield: + post: + tags: + - Safety + summary: Run Shield + description: |- + Run shield. + + Run a shield. + 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/shields/{identifier}: + get: + tags: + - Shields + summary: Get Shield + description: Get a shield by its identifier. + operationId: get_shield_v1_shields__identifier__get + 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' + parameters: + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + delete: + tags: + - Shields + summary: Unregister Shield + description: Unregister a shield. + operationId: unregister_shield_v1_shields__identifier__delete + responses: + '200': + description: Successful Response + content: application/json: schema: {} '400': @@ -3270,7 +3393,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' -<<<<<<< HEAD tags: - VectorIO summary: >- @@ -3307,8 +3429,6 @@ paths: $ref: '#/components/schemas/bool' deprecated: false /v1/vector_stores/{vector_store_id}/search: -======= ->>>>>>> a84647350 (chore: use Pydantic to generate OpenAPI schema) post: tags: - Shields @@ -3340,8 +3460,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' -======= ->>>>>>> 4cc87bbe1 (chore: regen scehma with main) /v1beta/datasetio/append-rows/{dataset_id}: post: tags: @@ -3442,26 +3560,20 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - /v1/scoring/score: - post: + /v1beta/datasets/{dataset_id}: + get: tags: - - Scoring - summary: Score - description: Score a list of rows. - operationId: score_v1_scoring_score_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_scoring_score_Request' - required: true + - Datasets + summary: Get Dataset + description: Get a dataset by its ID. + operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': - description: A ScoreResponse object containing rows and aggregated results. + description: A Dataset. content: application/json: schema: - $ref: '#/components/schemas/ScoreResponse' + $ref: '#/components/schemas/Dataset' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3474,26 +3586,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring/score-batch: - post: - tags: - - Scoring - summary: Score Batch - description: Score a batch of rows. - operationId: score_batch_v1_scoring_score_batch_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_scoring_score_batch_Request' + parameters: + - name: dataset_id + in: path required: true + schema: + type: string + description: 'Path parameter: dataset_id' + delete: + tags: + - Datasets + summary: Unregister Dataset + description: Unregister a dataset by its ID. + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete responses: '200': - description: A ScoreBatchResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ScoreBatchResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3506,26 +3617,27 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: - post: - tags: - - Eval - summary: Evaluate Rows - description: Evaluate a list of rows on a benchmark. - operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_eval_benchmarks_benchmark_id_evaluations_Request' + parameters: + - name: dataset_id + in: path required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasets: + get: + tags: + - Datasets + summary: List Datasets + description: List all datasets. + operationId: list_datasets_v1beta_datasets_get responses: '200': - description: EvaluateResponse object containing generations and scores. + description: A ListDatasetsResponse. content: application/json: schema: - $ref: '#/components/schemas/EvaluateResponse' + $ref: '#/components/schemas/ListDatasetsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3538,27 +3650,28 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: benchmark_id - in: path + post: + tags: + - Datasets + summary: Register Dataset + description: Register a new dataset. + operationId: register_dataset_v1beta_datasets_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_datasets_Request' required: true - schema: - type: string - description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: + deprecated: true + /v1beta/datasets/{dataset_id}: get: - tags: - - Eval - summary: Job Status - description: Get the status of a job. - operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': - description: The status of the evaluation job. + description: A Dataset. content: application/json: schema: - $ref: '#/components/schemas/Job' + $ref: '#/components/schemas/Dataset' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3571,31 +3684,26 @@ 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' - - name: job_id - in: path - required: true - schema: - type: string - description: 'Path parameter: job_id' - delete: + /v1/scoring/score: + post: tags: - - Eval - summary: Job Cancel - description: Cancel a job. - operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete + - Scoring + summary: Score + description: Score a list of rows. + operationId: score_v1_scoring_score_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_scoring_score_Request' + required: true responses: '200': - description: Successful Response + description: A ScoreResponse object containing rows and aggregated results. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ScoreResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3608,33 +3716,52 @@ 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' - - name: job_id - in: path - required: true - schema: - type: string - description: 'Path parameter: job_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: + /v1/scoring/score-batch: + post: + tags: + - Scoring + summary: Score Batch + description: Score a batch of rows. + 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/scoring-functions/{scoring_fn_id}: get: tags: - - Eval - summary: Job Result - description: Get the result of a job. - operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get + - Scoring Functions + summary: Get Scoring Function + description: Get a scoring function by its ID. + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': - description: The result of the job. + description: A ScoringFn. content: application/json: schema: - $ref: '#/components/schemas/EvaluateResponse' + $ref: '#/components/schemas/ScoringFn' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3648,38 +3775,119 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id + - name: scoring_fn_id in: path required: true schema: type: string - description: 'Path parameter: benchmark_id' - - name: job_id + description: 'Path parameter: scoring_fn_id' + delete: + tags: + - Scoring Functions + summary: Unregister Scoring Function + description: Unregister a scoring function. + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: scoring_fn_id in: path required: true schema: type: string - description: 'Path parameter: job_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs: + description: 'Path parameter: scoring_fn_id' + /v1/scoring-functions: + get: + tags: + - Scoring Functions + summary: List Scoring Functions + description: List all scoring functions. + 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: + - Scoring Functions + summary: Register Scoring Function + description: Register a scoring function. + operationId: register_scoring_function_v1_scoring_functions_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' + 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 + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: tags: - Eval - summary: Run Eval - description: Run an evaluation on a benchmark. - operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post + summary: Evaluate Rows + description: Evaluate a list of rows on a benchmark. + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/BenchmarkConfig' + $ref: '#/components/schemas/_eval_benchmarks_benchmark_id_evaluations_Request' required: true responses: '200': - description: The job that was created to run the evaluation. + description: EvaluateResponse object containing generations and scores. content: application/json: schema: - $ref: '#/components/schemas/Job' + $ref: '#/components/schemas/EvaluateResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3693,13 +3901,111 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id - in: path + - name: dataset_id + in: path + description: The ID of the dataset to unregister. + required: true + schema: + type: string + deprecated: true + /v1alpha/eval/benchmarks: + get: + tags: + - Benchmarks + summary: List Benchmarks + description: List all benchmarks. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get + responses: + '200': + description: A ListBenchmarksResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListBenchmarksResponse' + '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: + - Benchmarks + summary: Register Benchmark + description: Register a benchmark. + operationId: register_benchmark_v1alpha_eval_benchmarks_post + requestBody: required: true - schema: - type: string - description: 'Path parameter: benchmark_id' - /v1alpha/post-training/job/cancel: + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterBenchmarkRequest' + required: true + deprecated: true + /v1alpha/eval/benchmarks/{benchmark_id}: + get: + 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: + - Benchmarks + summary: Get a benchmark by its ID. + description: Get a benchmark by its ID. + parameters: + - name: benchmark_id + in: path + description: The ID of the benchmark to get. + required: true + schema: + type: string + 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. + parameters: + - name: benchmark_id + in: path + description: The ID of the benchmark to unregister. + required: true + schema: + type: string + deprecated: true + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: tags: - Post Training @@ -3920,61 +4226,51 @@ paths: schema: type: string description: 'Path parameter: tool_name' - /v1/tools: + /v1/toolgroups/{toolgroup_id}: get: tags: - Tool Groups - summary: List Tools - description: List tools with optional tool group. - operationId: list_tools_v1_tools_get - parameters: - - name: toolgroup_id - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Toolgroup Id + summary: Get Tool Group + description: Get a tool group by its ID. + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get responses: '200': - description: A ListToolDefsResponse. + description: A ToolGroup. content: application/json: schema: - $ref: '#/components/schemas/ListToolDefsResponse' + $ref: '#/components/schemas/ToolGroup' '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 - /v1/tool-runtime/invoke: - post: - tags: - - Tool Runtime - summary: Invoke Tool - description: Run a tool with the given arguments. - operationId: invoke_tool_v1_tool_runtime_invoke_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_tool_runtime_invoke_Request' + $ref: '#/components/responses/DefaultError' + parameters: + - name: toolgroup_id + in: path required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' + delete: + tags: + - Tool Groups + summary: Unregister Toolgroup + description: Unregister a tool group. + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete responses: '200': - description: A ToolInvocationResult. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ToolInvocationResult' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3987,30 +4283,159 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tool-runtime/list-tools: - get: - tags: - - Tool Runtime - summary: List Runtime Tools - description: List all tools in the runtime. - operationId: list_runtime_tools_v1_tool_runtime_list_tools_get parameters: - - name: tool_group_id - in: query - required: false + - name: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' + /v1/toolgroups: + get: + tags: + - Tool Groups + summary: List Tool Groups + description: List tool groups with optional provider. + 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: + - Tool Groups + summary: Register Tool Group + description: Register a tool group. + operationId: register_tool_group_v1_toolgroups_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' + 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/tools: + get: + tags: + - Tool Groups + summary: List Tools + description: List tools with optional tool group. + operationId: list_tools_v1_tools_get + parameters: + - name: toolgroup_id + in: query + required: false schema: anyOf: - type: string - type: 'null' - title: Tool Group Id - - name: mcp_endpoint + 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/tool-runtime/invoke: + post: + tags: + - Tool Runtime + summary: Invoke Tool + description: Run a tool with the given arguments. + 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: + - Tool Runtime + summary: List Runtime Tools + description: List all tools in the runtime. + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + parameters: + - name: tool_group_id in: query required: false schema: anyOf: - - $ref: '#/components/schemas/URL' + - type: string - type: 'null' - title: Mcp Endpoint + title: Tool Group Id + requestBody: + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + title: Mcp Endpoint responses: '200': description: A ListToolDefsResponse. @@ -4578,16 +5003,16 @@ paths: schema: type: string description: 'Path parameter: conversation_id' - - name: include - in: query - required: false - schema: - anyOf: - - type: array - items: - $ref: '#/components/schemas/ConversationItemInclude' - - type: 'null' - title: Include + requestBody: + content: + application/json: + schema: + anyOf: + - type: array + items: + $ref: '#/components/schemas/ConversationItemInclude' + - type: 'null' + title: Include responses: '200': description: List of conversation items. @@ -4861,25 +5286,6 @@ components: type: object title: AllowedToolsFilter description: Filter configuration for restricting which MCP tools can be used. - ApprovalFilter: - properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Always - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Never - type: object - title: ApprovalFilter - description: Filter configuration for MCP tool approval requirements. ArrayType: properties: type: @@ -5180,6 +5586,69 @@ components: - file - purpose title: Body_openai_upload_file_v1_files_post + Body_register_benchmark_v1alpha_eval_benchmarks_post: + properties: + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + type: object + required: + - scoring_functions + title: Body_register_benchmark_v1alpha_eval_benchmarks_post + Body_register_scoring_function_v1_scoring_functions_post: + properties: + return_type: + anyOf: + - $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' + title: Return Type + 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 + type: object + required: + - return_type + title: Body_register_scoring_function_v1_scoring_functions_post + Body_register_tool_group_v1_toolgroups_post: + properties: + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Args + type: object + title: Body_register_tool_group_v1_toolgroups_post BooleanType: properties: type: @@ -5200,37 +5669,6 @@ components: type: object title: ChatCompletionInputType description: Parameter type for chat completion input. - Checkpoint: - properties: - identifier: - type: string - title: Identifier - created_at: - type: string - format: date-time - title: Created At - epoch: - type: integer - title: Epoch - post_training_job_id: - type: string - title: Post Training Job Id - path: - type: string - title: Path - training_metrics: - anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' - - type: 'null' - type: object - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. Chunk-Input: properties: content: @@ -5886,166 +6324,29 @@ components: - judge_model title: LLMAsJudgeScoringFnParams description: Parameters for LLM-as-judge scoring function configuration. - ListBatchesResponse: - properties: - object: - type: string - const: list - title: Object - default: list - data: - items: - $ref: '#/components/schemas/Batch' - type: array - title: Data - description: List of batch objects - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - description: ID of the first batch in the list - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - description: ID of the last batch in the list - has_more: - type: boolean - title: Has More - description: Whether there are more batches available - default: false - type: object - required: - - data - title: ListBatchesResponse - description: Response containing a list of batch objects. - ListOpenAIChatCompletionResponse: - properties: - data: - items: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: - type: string - title: First Id - last_id: - type: string - title: Last Id - object: - type: string - const: list - title: Object - default: list - type: object - required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIChatCompletionResponse - description: Response from listing OpenAI-compatible chat completions. - ListOpenAIFileResponse: - properties: - data: - items: - $ref: '#/components/schemas/OpenAIFileObject' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: - type: string - title: First Id - last_id: - type: string - title: Last Id - object: - type: string - const: list - title: Object - default: list - type: object - required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIFileResponse - description: Response for listing files in OpenAI Files API. - ListOpenAIResponseInputItem: + ListBenchmarksResponse: properties: data: items: - anyOf: - - 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' - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + $ref: '#/components/schemas/Benchmark' type: array title: Data - object: - type: string - const: list - title: Object - default: list type: object required: - data - title: ListOpenAIResponseInputItem - description: List container for OpenAI response input items. - ListOpenAIResponseObject: + title: ListBenchmarksResponse + ListDatasetsResponse: properties: data: items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput-Output' + $ref: '#/components/schemas/Dataset' type: array title: Data - has_more: - type: boolean - title: Has More - first_id: - type: string - title: First Id - last_id: - type: string - title: Last Id - object: - type: string - const: list - title: Object - default: list type: object required: - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject - description: Paginated list of OpenAI response objects with navigation metadata. + title: ListDatasetsResponse + description: Response from listing datasets. ListPostTrainingJobsResponse: properties: data: @@ -6081,30 +6382,40 @@ components: - data title: ListProvidersResponse description: Response containing a list of all available providers. - ListRoutesResponse: + ListScoringFunctionsResponse: properties: data: items: - $ref: '#/components/schemas/RouteInfo' + $ref: '#/components/schemas/ScoringFn' type: array title: Data type: object required: - data - title: ListRoutesResponse - description: Response containing a list of all available API routes. - ListToolDefsResponse: + title: ListScoringFunctionsResponse + ListShieldsResponse: properties: data: items: - $ref: '#/components/schemas/ToolDef' + $ref: '#/components/schemas/Shield' type: array title: Data type: object required: - data - title: ListToolDefsResponse - description: Response containing a list of tool definitions. + 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. LoraFinetuningConfig: properties: type: @@ -7310,6 +7621,17 @@ components: type: object title: OpenAIJSONSchema description: JSON schema specification for OpenAI-compatible structured response format. + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + type: array + title: Data + type: object + required: + - data + title: OpenAIListModelsResponse OpenAIModel: properties: id: @@ -7678,48 +8000,6 @@ components: - parameters title: OpenAIResponseInputToolFunction description: Function tool configuration for OpenAI response inputs. - 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: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Headers - 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' - - type: 'null' - title: Allowed Tools - type: object - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. OpenAIResponseInputToolWebSearch: properties: type: @@ -8036,11 +8316,6 @@ components: - type: string - type: 'null' title: Instructions - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - title: Max Tool Calls type: object required: - created_at @@ -8050,172 +8325,23 @@ components: - status title: OpenAIResponseObject description: Complete OpenAI response object containing generation results and metadata. - OpenAIResponseObjectWithInput-Output: + OpenAIResponseOutputMessageContentOutputText: properties: - created_at: - type: integer - title: Created At - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - - type: 'null' - id: - type: string - title: Id - model: + text: type: string - title: Model - object: + title: Text + type: type: string - const: response - title: Object - default: response - output: + const: output_text + title: Type + default: output_text + annotations: 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: - anyOf: - - type: string - - type: 'null' - title: Previous Response Id - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - - type: 'null' - status: - type: string - title: Status - temperature: - anyOf: - - type: number - - type: 'null' - title: Temperature - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - title: Top P - tools: - anyOf: - - 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - type: array - - type: 'null' - title: Tools - truncation: - anyOf: - - type: string - - type: 'null' - title: Truncation - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - - type: 'null' - instructions: - anyOf: - - type: string - - type: 'null' - title: Instructions - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - title: Max Tool Calls - input: - items: - anyOf: - - 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' - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - type: array - title: Input - type: object - required: - - created_at - - id - - model - - output - - status - - input - title: OpenAIResponseObjectWithInput - description: OpenAI response object extended with input context information. - 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' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' discriminator: propertyName: type mapping: @@ -8764,28 +8890,6 @@ components: required: - reasoning_tokens title: OutputTokensDetails - PaginatedResponse: - properties: - data: - items: - additionalProperties: true - type: object - type: array - title: Data - has_more: - type: boolean - title: Has More - url: - anyOf: - - type: string - - type: 'null' - title: Url - type: object - required: - - data - - has_more - title: PaginatedResponse - description: A generic paginated response that follows a simple format. PostTrainingJob: properties: job_uuid: @@ -8795,85 +8899,6 @@ components: required: - job_uuid title: PostTrainingJob - PostTrainingJobArtifactsResponse: - properties: - job_uuid: - type: string - title: Job Uuid - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints - type: object - required: - - job_uuid - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingJobStatusResponse: - properties: - job_uuid: - type: string - title: Job Uuid - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - type: string - format: date-time - - type: 'null' - title: Scheduled At - started_at: - anyOf: - - type: string - format: date-time - - type: 'null' - title: Started At - completed_at: - anyOf: - - type: string - format: date-time - - type: 'null' - title: Completed At - resources_allocated: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Resources Allocated - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints - type: object - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - PostTrainingMetric: - properties: - epoch: - type: integer - title: Epoch - train_loss: - type: number - title: Train Loss - validation_loss: - type: number - title: Validation Loss - perplexity: - type: number - title: Perplexity - type: object - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: Training metrics captured during post-training jobs. Prompt: properties: prompt: @@ -9021,26 +9046,6 @@ components: - data title: RerankResponse description: Response from a reranking request. - 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. RowsDataSource: properties: type: @@ -9699,32 +9704,31 @@ components: - file_counts title: VectorStoreFileBatchObject description: OpenAI Vector Store File Batch object. - VectorStoreFileContentResponse: + VectorStoreFileContentsResponse: properties: - object: + file_id: type: string - const: vector_store.file_content.page - title: Object - default: vector_store.file_content.page - data: - items: - $ref: '#/components/schemas/VectorStoreContent' - type: array - title: Data - has_more: - type: boolean - title: Has More - next_page: - anyOf: - - type: string - - type: 'null' - title: Next Page + title: File Id + filename: + type: string + title: Filename + attributes: + additionalProperties: true + type: object + title: Attributes + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + type: array + title: Content type: object required: - - data - - has_more - title: VectorStoreFileContentResponse - description: Represents the parsed content of a vector store file. + - file_id + - filename + - attributes + - content + title: VectorStoreFileContentsResponse + description: Response from retrieving the contents of a vector store file. VectorStoreFileCounts: properties: completed: @@ -9844,96 +9848,6 @@ components: - vector_store_id title: VectorStoreFileObject description: OpenAI Vector Store File object. - VectorStoreFilesListInBatchResponse: - properties: - object: - type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - type: array - title: Data - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - has_more: - type: boolean - title: Has More - default: false - type: object - required: - - data - title: VectorStoreFilesListInBatchResponse - description: Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: - properties: - object: - type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - type: array - title: Data - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - has_more: - type: boolean - title: Has More - default: false - type: object - required: - - data - title: VectorStoreListFilesResponse - description: Response from listing files in a vector store. - VectorStoreListResponse: - properties: - object: - type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - type: array - title: Data - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - has_more: - type: boolean - title: Has More - default: false - type: object - required: - - data - title: VectorStoreListResponse - description: Response from listing vector stores. VectorStoreObject: properties: id: @@ -10198,6 +10112,21 @@ components: required: - items title: _conversations_conversation_id_items_Request + _datasets_Request: + properties: + purpose: + title: Purpose + source: + title: Source + metadata: + title: Metadata + dataset_id: + title: Dataset Id + type: object + required: + - purpose + - source + title: _datasets_Request _eval_benchmarks_benchmark_id_evaluations_Request: properties: input_rows: @@ -10249,6 +10178,35 @@ components: - query - items title: _inference_rerank_Request + _models_Request: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + anyOf: + - type: string + - type: 'null' + title: Provider Model Id + provider_id: + anyOf: + - type: string + - type: 'null' + title: Provider Id + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + model_type: + anyOf: + - $ref: '#/components/schemas/ModelType' + - type: 'null' + type: object + required: + - model_id + title: _models_Request _moderations_Request: properties: input: @@ -10393,115 +10351,36 @@ components: _responses_Request: properties: input: - anyOf: - - type: string - - items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - - $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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - type: array title: Input model: - type: string title: Model prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - - type: 'null' + title: Prompt instructions: - anyOf: - - type: string - - type: 'null' title: Instructions previous_response_id: - anyOf: - - type: string - - type: 'null' title: Previous Response Id conversation: - anyOf: - - type: string - - type: 'null' title: Conversation store: - anyOf: - - type: boolean - - type: 'null' title: Store default: true stream: - anyOf: - - type: boolean - - type: 'null' title: Stream default: false temperature: - anyOf: - - type: number - - type: 'null' title: Temperature text: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseText' - - type: 'null' + title: Text tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - discriminator: - propertyName: type - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - type: array - - type: 'null' title: Tools include: - anyOf: - - items: - type: string - type: array - - type: 'null' title: Include max_infer_iters: - anyOf: - - type: integer - - type: 'null' title: Max Infer Iters default: 10 - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - title: Max Tool Calls + guardrails: + title: Guardrails type: object required: - input @@ -10566,6 +10445,31 @@ components: - dataset_id - scoring_functions title: _scoring_score_batch_Request + _shields_Request: + properties: + shield_id: + type: string + title: Shield Id + provider_shield_id: + anyOf: + - type: string + - type: 'null' + title: Provider Shield Id + provider_id: + anyOf: + - type: string + - type: 'null' + title: Provider Id + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Params + type: object + required: + - shield_id + title: _shields_Request _tool_runtime_invoke_Request: properties: tool_name: @@ -10883,29 +10787,220 @@ components: - $ref: '#/components/schemas/TextDelta' - $ref: '#/components/schemas/ImageDelta' - $ref: '#/components/schemas/ToolCallDelta' - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - - $ref: '#/components/schemas/TopPSamplingStrategy' - - $ref: '#/components/schemas/TopKSamplingStrategy' - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. + ToolDefinition: properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + description: + anyOf: + - type: string + - type: 'null' + title: Description + nullable: true + input_schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Input Schema + nullable: true + output_schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Output Schema + nullable: true + required: + - tool_name + title: ToolDefinition + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + CompletionMessage: + description: A message containing the model's (assistant) response in a chat conversation. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + stop_reason: + $ref: '#/components/schemas/StopReason' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/ToolCall' + type: array + - type: 'null' + title: Tool Calls + required: + - content + - stop_reason + title: CompletionMessage + type: object + StopReason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + title: StopReason + type: string + ToolResponseMessage: + description: A message representing the result of a tool invocation. + properties: + role: + const: tool + default: tool + title: Role + type: string + call_id: + title: Call Id + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + required: + - call_id + - content + title: ToolResponseMessage + type: object + UserMessage: + description: A message from the user in a chat conversation. + properties: + role: + const: user + default: user + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + - type: 'null' + title: Context + nullable: true + required: + - content + title: UserMessage + type: object + Message: + discriminator: + mapping: + assistant: '#/components/schemas/CompletionMessage' + system: '#/components/schemas/SystemMessage' + tool: '#/components/schemas/ToolResponseMessage' + user: '#/components/schemas/UserMessage' + propertyName: role + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/SystemMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + - $ref: '#/components/schemas/CompletionMessage' + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object required: - bnf title: GrammarResponseFormat @@ -11176,6 +11271,71 @@ components: - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Always + nullable: true + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Never + nullable: true + title: ApprovalFilter + type: object + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + properties: + type: + const: mcp + default: mcp + title: Type + type: string + server_label: + title: Server Label + type: string + server_url: + title: Server Url + type: string + headers: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Headers + nullable: true + require_approval: + anyOf: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + default: never + title: Require Approval + allowed_tools: + anyOf: + - items: + type: string + type: array + - $ref: '#/components/schemas/AllowedToolsFilter' + - type: 'null' + title: Allowed Tools + nullable: true + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + type: object OpenAIResponseInputTool: discriminator: mapping: @@ -12349,1198 +12509,1129 @@ components: mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse' 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/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - ParamType: - discriminator: - mapping: - 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' - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: -<<<<<<< HEAD - - type: string - const: completed - - type: string - const: in_progress - - type: string - const: cancelled - - type: string - const: failed - VectorStoreFileLastError: + OpenAIResponseAnnotationCitation: type: object properties: - code: - oneOf: - - type: string - const: server_error - - type: string - const: rate_limit_exceeded - description: >- - Error code indicating the type of failure - message: + type: type: string + const: url_citation + default: url_citation description: >- - Human-readable error message describing the failure + 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: - - code - - message - title: VectorStoreFileLastError + - type + - end_index + - start_index + - title + - url + title: OpenAIResponseAnnotationCitation description: >- - Error information for failed vector store file processing. - VectorStoreFileObject: + URL citation annotation for referencing external web resources. + "OpenAIResponseAnnotationContainerFileCitation": type: object properties: - id: + type: type: string - description: Unique identifier for the file - object: + const: container_file_citation + default: container_file_citation + container_id: type: string - default: vector_store.file - description: >- - Object type identifier, always "vector_store.file" - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Key-value attributes associated with the file - chunking_strategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - description: >- - Strategy used for splitting the file into chunks - created_at: - type: integer - description: >- - Timestamp when the file was added to the vector store - last_error: - $ref: '#/components/schemas/VectorStoreFileLastError' - description: >- - (Optional) Error information if file processing failed - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: Current processing status of the file - usage_bytes: + end_index: type: integer - default: 0 - description: Storage space used by this file in bytes - vector_store_id: + file_id: type: string - description: >- - ID of the vector store containing this file + filename: + type: string + start_index: + type: integer additionalProperties: false required: - - id - - object - - attributes - - chunking_strategy - - created_at - - status - - usage_bytes - - vector_store_id - title: VectorStoreFileObject - description: OpenAI Vector Store File object. - VectorStoreFilesListInBatchResponse: + - type + - container_id + - end_index + - file_id + - filename + - start_index + title: >- + OpenAIResponseAnnotationContainerFileCitation + OpenAIResponseAnnotationFileCitation: type: object properties: - object: + type: type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' + const: file_citation + default: file_citation description: >- - List of vector store file objects in the batch - first_id: + Annotation type identifier, always "file_citation" + file_id: type: string - description: >- - (Optional) ID of the first file in the list for pagination - last_id: + description: Unique identifier of the referenced file + filename: type: string + description: Name of the referenced file + index: + type: integer description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more files available beyond this page + Position index of the citation within the content additionalProperties: false required: - - object - - data - - has_more - title: VectorStoreFilesListInBatchResponse + - type + - file_id + - filename + - index + title: OpenAIResponseAnnotationFileCitation description: >- - Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: + File citation annotation for referencing specific files in response content. + OpenAIResponseAnnotationFilePath: type: object properties: - object: + type: type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: List of vector store file objects - first_id: + const: file_path + default: file_path + file_id: type: string - description: >- - (Optional) ID of the first file in the list for pagination - last_id: + 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: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more files available beyond this page + Content part type identifier, always "refusal" + refusal: + type: string + description: Refusal text supplied by the model additionalProperties: false required: - - object - - data - - has_more - title: VectorStoreListFilesResponse + - type + - refusal + title: OpenAIResponseContentPartRefusal description: >- - Response from listing files in a vector store. - OpenaiAttachFileToVectorStoreRequest: + Refusal content within a streamed response part. + "OpenAIResponseInputFunctionToolCallOutput": type: object properties: - file_id: + call_id: type: string - description: >- - The ID of the file to attach to the vector store. - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The key-value attributes stored with the file, which can be used for filtering. - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - The chunking strategy to use for the file. - additionalProperties: false - required: - - file_id - title: OpenaiAttachFileToVectorStoreRequest - OpenaiUpdateVectorStoreFileRequest: - type: object - properties: - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The updated key-value attributes to store with the file. - additionalProperties: false - required: - - attributes - title: OpenaiUpdateVectorStoreFileRequest - VectorStoreFileDeleteResponse: - type: object - properties: + output: + type: string + type: + type: string + const: function_call_output + default: function_call_output id: type: string - description: Unique identifier of the deleted file - object: + status: type: string - default: vector_store.file.deleted - description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true - description: >- - Whether the deletion operation was successful additionalProperties: false required: - - id - - object - - deleted - title: VectorStoreFileDeleteResponse + - call_id + - output + - type + title: >- + OpenAIResponseInputFunctionToolCallOutput description: >- - Response from deleting a vector store file. - bool: - type: boolean - VectorStoreContent: + 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: text + const: input_file + default: input_file description: >- - Content type, currently only "text" is supported - text: + The type of the input item. Always `input_file`. + file_data: type: string - description: The actual text content - embedding: - type: array - items: - type: number description: >- - Optional embedding vector for this content chunk - chunk_metadata: - $ref: '#/components/schemas/ChunkMetadata' - description: Optional chunk metadata - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Optional user-defined metadata - additionalProperties: false - required: - - type - - text - title: VectorStoreContent - description: >- - Content item from a vector store file or search result. - VectorStoreFileContentResponse: - type: object - properties: - object: + The data of the file to be sent to the model. + file_id: type: string - const: vector_store.file_content.page - default: vector_store.file_content.page description: >- - The object type, which is always `vector_store.file_content.page` - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' - description: Parsed content of the file - has_more: - type: boolean - default: false + (Optional) The ID of the file to be sent to the model. + file_url: + type: string description: >- - Indicates if there are more content pages to fetch - next_page: + The URL of the file to be sent to the model. + filename: type: string - description: The token for the next page, if any + description: >- + The name of the file to be sent to the model. additionalProperties: false required: - - object - - data - - has_more - title: VectorStoreFileContentResponse + - type + title: OpenAIResponseInputMessageContentFile description: >- - Represents the parsed content of a vector store file. - OpenaiSearchVectorStoreRequest: + File content for input messages in OpenAI response format. + OpenAIResponseInputMessageContentImage: type: object properties: - query: + detail: oneOf: - type: string - - type: array - items: - type: string - description: >- - The query string or array for performing the search. - filters: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Filters based on file attributes to narrow the search results. - max_num_results: - type: integer - description: >- - Maximum number of results to return (1 to 50 inclusive, default 10). - 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 + const: low + - type: string + const: high + - type: string + const: auto + default: auto description: >- - Ranking options for fine-tuning the search results. - rewrite_query: - type: boolean + Level of detail for image processing, can be "low", "high", or "auto" + type: + type: string + const: input_image + default: input_image description: >- - Whether to rewrite the natural language query for vector search (default - false) - search_mode: + Content type identifier, always "input_image" + file_id: type: string description: >- - The search mode to use - "keyword", "vector", or "hybrid" (default "vector") + (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: - - query - title: OpenaiSearchVectorStoreRequest - VectorStoreSearchResponse: + - detail + - type + title: OpenAIResponseInputMessageContentImage + description: >- + Image content for input messages in OpenAI response format. + OpenAIResponseInputMessageContentText: type: object properties: - file_id: + text: type: string - description: >- - Unique identifier of the file containing the result - filename: + description: The text content of the input message + type: type: string - description: Name of the file containing the result - score: - type: number - description: Relevance score for this search result - attributes: - type: object - additionalProperties: - oneOf: - - type: string - - type: number - - type: boolean - description: >- - (Optional) Key-value attributes associated with the file - content: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' + const: input_text + default: input_text description: >- - List of content items matching the search query + Content type identifier, always "input_text" additionalProperties: false required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - description: Response from searching a vector store. - VectorStoreSearchResponsePage: + - text + - type + title: OpenAIResponseInputMessageContentText + description: >- + Text content for input messages in OpenAI response format. + OpenAIResponseMCPApprovalRequest: type: object properties: - object: + arguments: type: string - default: vector_store.search_results.page - description: >- - Object type identifier for the search results page - search_query: - type: array - items: - type: string - description: >- - The original search query that was executed - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - description: List of search result objects - has_more: - type: boolean - default: false - description: >- - Whether there are more results available beyond this page - next_page: + id: type: string - description: >- - (Optional) Token for retrieving the next page of results + name: + type: string + server_label: + type: string + type: + type: string + const: mcp_approval_request + default: mcp_approval_request additionalProperties: false required: - - object - - search_query - - data - - has_more - title: VectorStoreSearchResponsePage + - arguments + - id + - name + - server_label + - type + title: OpenAIResponseMCPApprovalRequest description: >- - Paginated response from searching a vector store. - VersionInfo: + A request for human approval of a tool invocation. + OpenAIResponseMCPApprovalResponse: type: object properties: - version: + approval_request_id: + type: string + approve: + type: boolean + type: + type: string + const: mcp_approval_response + default: mcp_approval_response + id: + type: string + reason: type: string - description: Version number of the service additionalProperties: false required: - - version - title: VersionInfo - description: Version information for the service. - AppendRowsRequest: + - approval_request_id + - approve + - type + title: OpenAIResponseMCPApprovalResponse + description: A response to an MCP approval request. + OpenAIResponseMessage: type: object properties: - rows: + 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: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to append to the dataset. + $ref: '#/components/schemas/OpenAIResponseAnnotations' additionalProperties: false required: - - rows - title: AppendRowsRequest - PaginatedResponse: + - text + - type + - annotations + title: >- + OpenAIResponseOutputMessageContentOutputText + "OpenAIResponseOutputMessageFileSearchToolCall": type: object properties: - data: + id: + type: string + description: Unique identifier for this tool call + queries: type: array items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The list of items for the current page - has_more: - type: boolean + type: string + description: List of search queries executed + status: + type: string description: >- - Whether there are more items available after this set - url: + Current status of the file search operation + type: type: string - description: The URL for accessing this list + const: file_search_call + default: file_search_call + description: >- + Tool call type identifier, always "file_search_call" + results: + type: array + items: + 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 required: - - data - - has_more - title: PaginatedResponse + - id + - queries + - status + - type + title: >- + OpenAIResponseOutputMessageFileSearchToolCall description: >- - A generic paginated response that follows a simple format. - Dataset: + File search tool call output message for OpenAI responses. + "OpenAIResponseOutputMessageFunctionToolCall": type: object properties: - identifier: + call_id: type: string - provider_resource_id: + description: Unique identifier for the function call + name: type: string - provider_id: + description: Name of the function being called + arguments: type: string + description: >- + JSON string containing the function arguments type: type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: dataset - default: dataset + const: function_call + default: function_call description: >- - Type of resource, always 'dataset' for datasets - purpose: + Tool call type identifier, always "function_call" + id: type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer description: >- - Purpose of the dataset indicating its intended use - source: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' + (Optional) Additional identifier for the tool call + status: + type: string description: >- - Data source configuration for the dataset - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Additional metadata for the dataset + (Optional) Current status of the function call execution additionalProperties: false required: - - identifier - - provider_id + - call_id + - name + - arguments - type - - purpose - - source - - metadata - title: Dataset + title: >- + OpenAIResponseOutputMessageFunctionToolCall description: >- - Dataset resource for storing and accessing training or evaluation data. - RowsDataSource: + Function tool call output message for OpenAI responses. + OpenAIResponseOutputMessageMCPCall: type: object properties: + id: + type: string + description: Unique identifier for this MCP call type: type: string - const: rows - default: rows - rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + const: mcp_call + default: mcp_call description: >- - The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", - "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, - world!"}]} ] + 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 - - rows - title: RowsDataSource - description: A dataset stored in rows. - URIDataSource: + - 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: uri - default: uri - uri: + const: mcp_list_tools + default: mcp_list_tools + description: >- + Tool call type identifier, always "mcp_list_tools" + server_label: type: string description: >- - The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" - - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" - additionalProperties: false - required: - - type - - uri - title: URIDataSource - description: >- - A dataset that can be obtained from a URI. - ListDatasetsResponse: - type: object - properties: - data: + Label identifying the MCP server providing the tools + tools: type: array items: - $ref: '#/components/schemas/Dataset' - description: List of datasets + 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: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - Benchmark: + - id + - type + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools + description: >- + MCP list tools output message containing available tools from an MCP server. + "OpenAIResponseOutputMessageWebSearchToolCall": type: object properties: - identifier: - type: string - provider_resource_id: + id: type: string - provider_id: + description: Unique identifier for this tool call + status: type: string + description: >- + Current status of the web search operation type: type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: benchmark - default: benchmark - description: The resource type, always benchmark - dataset_id: - type: string + const: web_search_call + default: web_search_call description: >- - Identifier of the dataset to use for the benchmark evaluation - scoring_functions: + 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 + properties: + items: type: array items: - type: string + $ref: '#/components/schemas/ConversationItem' description: >- - List of scoring function identifiers to apply during evaluation + Initial items to include in the conversation context. metadata: type: object additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Metadata for this evaluation task + type: string + description: >- + Set of key-value pairs that can be attached to an object. additionalProperties: false - required: - - identifier - - provider_id - - type - - dataset_id - - scoring_functions - - metadata - title: Benchmark - description: >- - A benchmark resource for evaluating model performance. - ListBenchmarksResponse: + title: CreateConversationRequest + Conversation: type: object properties: - data: + id: + type: string + object: + type: string + const: conversation + default: conversation + created_at: + type: integer + metadata: + type: object + additionalProperties: + type: string + items: type: array items: - $ref: '#/components/schemas/Benchmark' + type: object + title: dict + description: >- + dict() -> new empty dictionary dict(mapping) -> new dictionary initialized + from a mapping object's (key, value) pairs dict(iterable) -> new + dictionary initialized as if via: d = {} for k, v in iterable: d[k] + = v dict(**kwargs) -> new dictionary initialized with the name=value + pairs in the keyword argument list. For example: dict(one=1, two=2) additionalProperties: false required: - - data - title: ListBenchmarksResponse - BenchmarkConfig: + - id + - object + - created_at + title: Conversation + description: OpenAI-compatible conversation object. + UpdateConversationRequest: type: object properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - description: The candidate to evaluate. - scoring_params: + metadata: type: object additionalProperties: - $ref: '#/components/schemas/ScoringFnParams' - description: >- - Map between scoring function id and parameters for each scoring function - you want to run - num_examples: - type: integer + type: string description: >- - (Optional) The number of examples to evaluate. If not provided, all examples - in the dataset will be evaluated + Set of key-value pairs that can be attached to an object. additionalProperties: false required: - - eval_candidate - - scoring_params - title: BenchmarkConfig - description: >- - A benchmark configuration for evaluation. - GreedySamplingStrategy: + - metadata + title: UpdateConversationRequest + ConversationDeletedResource: type: object properties: - type: + id: type: string - const: greedy - default: greedy - description: >- - Must be "greedy" to identify this sampling strategy + object: + type: string + default: conversation.deleted + deleted: + type: boolean + default: true additionalProperties: false required: - - type - title: GreedySamplingStrategy - description: >- - Greedy sampling strategy that selects the highest probability token at each - step. - ModelCandidate: + - id + - object + - deleted + title: ConversationDeletedResource + description: Response for deleted conversation. + ConversationItemList: type: object properties: - type: + object: type: string - const: model - default: model - model: + default: list + data: + type: array + items: + $ref: '#/components/schemas/ConversationItem' + first_id: type: string - description: The model ID to evaluate. - sampling_params: - $ref: '#/components/schemas/SamplingParams' - description: The sampling parameters for the model. - system_message: - $ref: '#/components/schemas/SystemMessage' - description: >- - (Optional) The system message providing instructions or context to the - model. + last_id: + type: string + has_more: + type: boolean + default: false additionalProperties: false required: - - type - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - SamplingParams: + - object + - data + - has_more + title: ConversationItemList + description: >- + List of conversation items with pagination. + AddItemsRequest: type: object properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - - $ref: '#/components/schemas/TopPSamplingStrategy' - - $ref: '#/components/schemas/TopKSamplingStrategy' - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - description: The sampling strategy. - max_tokens: - type: integer - description: >- - 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. - repetition_penalty: - type: number - default: 1.0 - description: >- - 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. - stop: + items: type: array items: - type: string + $ref: '#/components/schemas/ConversationItem' description: >- - Up to 4 sequences where the API will stop generating further tokens. The - returned text will not contain the stop sequence. + Items to include in the conversation context. additionalProperties: false required: - - strategy - title: SamplingParams - description: Sampling parameters. - SystemMessage: + - items + title: AddItemsRequest + ConversationItemDeletedResource: type: object properties: - role: + id: type: string - const: system - default: system - description: >- - Must be "system" to identify this as a system message - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - 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). + object: + type: string + default: conversation.item.deleted + deleted: + type: boolean + default: true additionalProperties: false required: - - role - - content - title: SystemMessage - description: >- - A system message providing instructions or context to the model. - TopKSamplingStrategy: + - id + - object + - deleted + title: ConversationItemDeletedResource + description: Response for deleted conversation item. + OpenAIEmbeddingsRequestWithExtraBody: type: object properties: - type: + model: type: string - const: top_k - default: top_k description: >- - Must be "top_k" to identify this sampling strategy - top_k: + The identifier of the model to use. The model must be an embedding model + registered with Llama Stack and available via the /models endpoint. + input: + oneOf: + - type: string + - type: array + items: + type: string + description: >- + 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. + encoding_format: + type: string + default: float + description: >- + (Optional) The format to return the embeddings in. Can be either "float" + or "base64". Defaults to "float". + dimensions: type: integer description: >- - Number of top tokens to consider for sampling. Must be at least 1 + (Optional) The number of dimensions the resulting output embeddings should + have. Only supported in text-embedding-3 and later models. + user: + type: string + description: >- + (Optional) A unique identifier representing your end-user, which can help + OpenAI to monitor and detect abuse. additionalProperties: false required: - - type - - top_k - title: TopKSamplingStrategy + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody description: >- - Top-k sampling strategy that restricts sampling to the k most likely tokens. - TopPSamplingStrategy: + Request parameters for OpenAI-compatible embeddings endpoint. + OpenAIEmbeddingData: type: object properties: - type: + object: type: string - const: top_p - default: top_p + const: embedding + default: embedding description: >- - Must be "top_p" to identify this sampling strategy - temperature: - type: number + The object type, which will be "embedding" + embedding: + oneOf: + - type: array + items: + type: number + - type: string description: >- - Controls randomness in sampling. Higher values increase randomness - top_p: - type: number - default: 0.95 + The embedding vector as a list of floats (when encoding_format="float") + or as a base64-encoded string (when encoding_format="base64") + index: + type: integer description: >- - Cumulative probability threshold for nucleus sampling. Defaults to 0.95 + The index of the embedding in the input list additionalProperties: false required: - - type - title: TopPSamplingStrategy + - object + - embedding + - index + title: OpenAIEmbeddingData description: >- - Top-p (nucleus) sampling strategy that samples from the smallest set of tokens - with cumulative probability >= p. - EvaluateRowsRequest: + A single embedding data object from an OpenAI-compatible embeddings response. + OpenAIEmbeddingUsage: type: object properties: - input_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to evaluate. - scoring_functions: - type: array - items: - type: string - description: >- - The scoring functions to use for the evaluation. - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. + prompt_tokens: + type: integer + description: The number of tokens in the input + total_tokens: + type: integer + description: The total number of tokens used additionalProperties: false required: - - input_rows - - scoring_functions - - benchmark_config - title: EvaluateRowsRequest - EvaluateResponse: + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage + description: >- + Usage information for an OpenAI-compatible embeddings response. + OpenAIEmbeddingsResponse: type: object properties: - generations: + object: + type: string + const: list + default: list + description: The object type, which will be "list" + data: type: array items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The generations from the evaluation. - scores: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: The scores from the evaluation. - additionalProperties: false - required: - - generations - - scores - title: EvaluateResponse - description: The response from an evaluation. - RunEvalRequest: - type: object - properties: - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. + $ref: '#/components/schemas/OpenAIEmbeddingData' + description: List of embedding data objects + model: + type: string + description: >- + The model that was used to generate the embeddings + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' + description: Usage information additionalProperties: false required: - - benchmark_config - title: RunEvalRequest - Job: + - object + - data + - model + - usage + title: OpenAIEmbeddingsResponse + description: >- + Response from an OpenAI-compatible embeddings request. + OpenAIFilePurpose: + type: string + enum: + - assistants + - batch + title: OpenAIFilePurpose + description: >- + Valid purpose values for OpenAI Files API. + ListOpenAIFileResponse: type: object properties: - job_id: + data: + type: array + items: + $ref: '#/components/schemas/OpenAIFileObject' + description: List of file objects + has_more: + type: boolean + description: >- + Whether there are more files available beyond this page + first_id: type: string - description: Unique identifier for the job - status: + description: >- + ID of the first file in the list for pagination + last_id: type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current execution status of the job + description: >- + ID of the last file in the list for pagination + object: + type: string + const: list + default: list + description: The object type, which is always "list" additionalProperties: false required: - - job_id - - status - title: Job + - data + - has_more + - first_id + - last_id + - object + title: ListOpenAIFileResponse description: >- - A job execution instance with status tracking. - RerankRequest: + Response for listing files in OpenAI Files API. + OpenAIFileObject: type: object properties: - model: + object: + type: string + const: file + default: file + description: The object type, which is always "file" + id: type: string description: >- - The identifier of the reranking model to use. - query: - oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - description: >- - 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. - items: - type: array - items: - oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + The file identifier, which can be referenced in the API endpoints + bytes: + type: integer + description: The size of the file, in bytes + created_at: + type: integer description: >- - 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. - max_num_results: + The Unix timestamp (in seconds) for when the file was created + expires_at: type: integer description: >- - (Optional) Maximum number of results to return. Default: returns all. + The Unix timestamp (in seconds) for when the file expires + filename: + type: string + description: The name of the file + purpose: + type: string + enum: + - assistants + - batch + description: The intended purpose of the file additionalProperties: false required: - - model - - query - - items - title: RerankRequest - RerankData: + - object + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject + description: >- + OpenAI File object as defined in the OpenAI Files API. + ExpiresAfter: type: object properties: - index: + anchor: + type: string + const: created_at + seconds: type: integer - description: >- - The original index of the document in the input list - relevance_score: - type: number - description: >- - The relevance score from the model output. Values are inverted when applicable - so that higher scores indicate greater relevance. additionalProperties: false required: - - index - - relevance_score - title: RerankData + - anchor + - seconds + title: ExpiresAfter description: >- - A single rerank result from a reranking response. - RerankResponse: + Control expiration of uploaded files. + + Params: + - anchor, must be "created_at" + - seconds, must be int between 3600 and 2592000 (1 hour to 30 days) + OpenAIFileDeleteResponse: type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/RerankData' + id: + type: string + description: The file identifier that was deleted + object: + type: string + const: file + default: file + description: The object type, which is always "file" + deleted: + type: boolean description: >- - List of rerank result objects, sorted by relevance score (descending) + Whether the file was successfully deleted additionalProperties: false required: - - data - title: RerankResponse - description: Response from a reranking request. - Checkpoint: + - id + - object + - deleted + title: OpenAIFileDeleteResponse + description: >- + Response for deleting a file in OpenAI Files API. + Response: + type: object + title: Response + HealthInfo: type: object properties: - identifier: - type: string - description: Unique identifier for the checkpoint - created_at: - type: string - format: date-time - description: >- - Timestamp when the checkpoint was created - epoch: - type: integer - description: >- - Training epoch when the checkpoint was saved - post_training_job_id: - type: string - description: >- - Identifier of the training job that created this checkpoint - path: + status: type: string - description: >- - File system path where the checkpoint is stored - training_metrics: - $ref: '#/components/schemas/PostTrainingMetric' - description: >- - (Optional) Training metrics associated with this checkpoint + enum: + - OK + - Error + - Not Implemented + description: Current health status of the service additionalProperties: false required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - PostTrainingJobArtifactsResponse: + - status + title: HealthInfo + description: >- + Health status information for the service. + RouteInfo: type: object properties: - job_uuid: + route: type: string - description: Unique identifier for the training job - checkpoints: + description: The API endpoint path + method: + type: string + description: HTTP method for the route + provider_types: type: array items: - $ref: '#/components/schemas/Checkpoint' + type: string description: >- - List of model checkpoints created during training + List of provider types that implement this route additionalProperties: false required: - - job_uuid - - checkpoints - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingMetric: + - route + - method + - provider_types + title: RouteInfo + description: >- + Information about an API route including its path, method, and implementing + providers. + ListRoutesResponse: type: object properties: - epoch: - type: integer - description: Training epoch number - train_loss: - type: number - description: Loss value on the training dataset - validation_loss: - type: number - description: Loss value on the validation dataset - perplexity: - type: number + data: + type: array + items: + $ref: '#/components/schemas/RouteInfo' description: >- - Perplexity metric indicating model confidence + List of available route information objects additionalProperties: false required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric + - data + title: ListRoutesResponse description: >- - Training metrics captured during post-training jobs. - CancelTrainingJobRequest: + Response containing a list of all available API routes. + OpenAIModel: type: object properties: - job_uuid: + id: type: string - description: The UUID of the job to cancel. + object: + type: string + const: model + default: model + created: + type: integer + owned_by: + type: string + custom_metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object additionalProperties: false required: - - job_uuid - title: CancelTrainingJobRequest - PostTrainingJobStatusResponse: + - id + - object + - created + - owned_by + title: OpenAIModel + description: A model from OpenAI. + OpenAIListModelsResponse: type: object properties: - job_uuid: - type: string - description: Unique identifier for the training job - status: + data: + type: array + items: + $ref: '#/components/schemas/OpenAIModel' + additionalProperties: false + required: + - data + title: OpenAIListModelsResponse + Model: + type: object + properties: + identifier: type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current status of the training job - scheduled_at: + description: >- + Unique identifier for this resource in llama stack + provider_resource_id: type: string - format: date-time description: >- - (Optional) Timestamp when the job was scheduled - started_at: + Unique identifier for this resource in the provider + provider_id: type: string - format: date-time description: >- - (Optional) Timestamp when the job execution began - completed_at: + ID of the provider that owns this resource + type: type: string - format: date-time + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: model + default: model description: >- - (Optional) Timestamp when the job finished, if completed - resources_allocated: + The resource type, always 'model' for model resources + metadata: type: object additionalProperties: oneOf: @@ -13550,237 +13641,236 @@ components: - type: string - type: array - type: object + description: Any additional metadata for this model + model_type: + $ref: '#/components/schemas/ModelType' + default: llm description: >- - (Optional) Information about computational resources allocated to the - job - checkpoints: - type: array - items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training + The type of model (LLM or embedding model) additionalProperties: false required: - - job_uuid - - status - - checkpoints - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - ListPostTrainingJobsResponse: + - identifier + - provider_id + - type + - metadata + - model_type + title: Model + description: >- + A model resource representing an AI model registered in Llama Stack. + ModelType: + type: string + enum: + - llm + - embedding + - rerank + title: ModelType + description: >- + Enumeration of supported model types in Llama Stack. + RunModerationRequest: type: object properties: - data: - type: array - items: - type: object - properties: - job_uuid: + input: + oneOf: + - type: string + - type: array + items: type: string - additionalProperties: false - required: - - job_uuid - title: PostTrainingJob + description: >- + Input (or inputs) to classify. Can be a single string, an array of strings, + or an array of multi-modal input objects similar to other models. + model: + type: string + description: >- + (Optional) The content moderation model you would like to use. additionalProperties: false required: - - data - title: ListPostTrainingJobsResponse - DPOAlignmentConfig: + - input + title: RunModerationRequest + ModerationObject: type: object properties: - beta: - type: number - description: Temperature parameter for the DPO loss - loss_type: - $ref: '#/components/schemas/DPOLossType' - default: sigmoid - description: The type of loss function to use for DPO + id: + type: string + description: >- + The unique identifier for the moderation request. + model: + type: string + description: >- + The model used to generate the moderation results. + results: + type: array + items: + $ref: '#/components/schemas/ModerationObjectResults' + description: A list of moderation objects additionalProperties: false required: - - beta - - loss_type - title: DPOAlignmentConfig - description: >- - Configuration for Direct Preference Optimization (DPO) alignment. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: + - id + - model + - results + title: ModerationObject + description: A moderation object. + ModerationObjectResults: type: object properties: - dataset_id: - type: string - description: >- - Unique identifier for the training dataset - batch_size: - type: integer - description: Number of samples per training batch - shuffle: + flagged: type: boolean description: >- - Whether to shuffle the dataset during training - data_format: - $ref: '#/components/schemas/DatasetFormat' - description: >- - Format of the dataset (instruct or dialog) - validation_dataset_id: - type: string + Whether any of the below categories are flagged. + categories: + type: object + additionalProperties: + type: boolean description: >- - (Optional) Unique identifier for the validation dataset - packed: - type: boolean - default: false + A list of the categories, and whether they are flagged or not. + category_applied_input_types: + type: object + additionalProperties: + type: array + items: + type: string description: >- - (Optional) Whether to pack multiple samples into a single sequence for - efficiency - train_on_input: - type: boolean - default: false + A list of the categories along with the input type(s) that the score applies + to. + category_scores: + type: object + additionalProperties: + type: number description: >- - (Optional) Whether to compute loss on input tokens as well as output tokens + A list of the categories along with their scores as predicted by model. + user_message: + type: string + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object additionalProperties: false required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: >- - Configuration for training data and data loading. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - EfficiencyConfig: + - flagged + - metadata + title: ModerationObjectResults + description: A moderation object. + Prompt: type: object properties: - enable_activation_checkpointing: - type: boolean - default: false + prompt: + type: string description: >- - (Optional) Whether to use activation checkpointing to reduce memory usage - enable_activation_offloading: - type: boolean - default: false + The system prompt text with variable placeholders. Variables are only + supported when using the Responses API. + version: + type: integer description: >- - (Optional) Whether to offload activations to CPU to save GPU memory - memory_efficient_fsdp_wrap: - type: boolean - default: false + Version (integer starting at 1, incremented on save) + prompt_id: + type: string description: >- - (Optional) Whether to use memory-efficient FSDP wrapping - fsdp_cpu_offload: + Unique identifier formatted as 'pmpt_<48-digit-hash>' + variables: + type: array + items: + type: string + description: >- + List of prompt variable names that can be used in the prompt template + is_default: type: boolean default: false description: >- - (Optional) Whether to offload FSDP parameters to CPU + Boolean indicating whether this version is the default version for this + prompt additionalProperties: false - title: EfficiencyConfig + required: + - version + - prompt_id + - variables + - is_default + title: Prompt description: >- - Configuration for memory and compute efficiency optimizations. - OptimizerConfig: + A prompt resource representing a stored OpenAI Compatible prompt template + in Llama Stack. + ListPromptsResponse: type: object properties: - optimizer_type: - $ref: '#/components/schemas/OptimizerType' + data: + type: array + items: + $ref: '#/components/schemas/Prompt' + additionalProperties: false + required: + - data + title: ListPromptsResponse + description: Response model to list prompts. + CreatePromptRequest: + type: object + properties: + prompt: + type: string description: >- - Type of optimizer to use (adam, adamw, or sgd) - lr: - type: number - description: Learning rate for the optimizer - weight_decay: - type: number + The prompt text content with variable placeholders. + variables: + type: array + items: + type: string description: >- - Weight decay coefficient for regularization - num_warmup_steps: - type: integer - description: Number of steps for learning rate warmup + List of variable names that can be used in the prompt template. additionalProperties: false required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: >- - Configuration parameters for the optimization algorithm. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: >- - Available optimizer algorithms for training. - TrainingConfig: + - prompt + title: CreatePromptRequest + UpdatePromptRequest: type: object properties: - n_epochs: - type: integer - description: Number of training epochs to run - max_steps_per_epoch: - type: integer - default: 1 - description: Maximum number of steps to run per epoch - gradient_accumulation_steps: - type: integer - default: 1 - description: >- - Number of steps to accumulate gradients before updating - max_validation_steps: + prompt: + type: string + description: The updated prompt text content. + version: type: integer - default: 1 - description: >- - (Optional) Maximum number of validation steps per epoch - data_config: - $ref: '#/components/schemas/DataConfig' - description: >- - (Optional) Configuration for data loading and formatting - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' description: >- - (Optional) Configuration for the optimization algorithm - efficiency_config: - $ref: '#/components/schemas/EfficiencyConfig' + The current version of the prompt being updated. + variables: + type: array + items: + type: string description: >- - (Optional) Configuration for memory and compute optimizations - dtype: - type: string - default: bf16 + Updated list of variable names that can be used in the prompt template. + set_as_default: + type: boolean description: >- - (Optional) Data type for model parameters (bf16, fp16, fp32) + Set the new version as the default (default=True). additionalProperties: false required: - - n_epochs - - max_steps_per_epoch - - gradient_accumulation_steps - title: TrainingConfig - description: >- - Comprehensive configuration for the training process. - PreferenceOptimizeRequest: + - prompt + - version + - set_as_default + title: UpdatePromptRequest + SetDefaultVersionRequest: type: object properties: - job_uuid: + version: + type: integer + description: The version to set as default. + additionalProperties: false + required: + - version + title: SetDefaultVersionRequest + ProviderInfo: + type: object + properties: + api: type: string - description: The UUID of the job to create. - finetuned_model: + description: The API name this provider implements + provider_id: type: string - description: The model to fine-tune. - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - description: The algorithm configuration. - training_config: - $ref: '#/components/schemas/TrainingConfig' - description: The training configuration. - hyperparam_search_config: + description: Unique identifier for the provider + provider_type: + type: string + description: The type of provider implementation + config: type: object additionalProperties: oneOf: @@ -13790,8 +13880,9 @@ components: - type: string - type: array - type: object - description: The hyperparam search configuration. - logger_config: + description: >- + Configuration parameters for the provider + health: type: object additionalProperties: oneOf: @@ -13801,131 +13892,5260 @@ components: - type: string - type: array - type: object - description: The logger configuration. + description: Current health status of the provider additionalProperties: false required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: PreferenceOptimizeRequest - PostTrainingJob: + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo + description: >- + Information about a registered provider including its configuration and health + status. + ListProvidersResponse: type: object properties: - job_uuid: + data: + type: array + items: + $ref: '#/components/schemas/ProviderInfo' + description: List of provider information objects + additionalProperties: false + required: + - data + title: ListProvidersResponse + description: >- + Response containing a list of all available providers. + ListOpenAIResponseObject: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' + description: >- + List of response objects with their input context + has_more: + type: boolean + description: >- + Whether there are more results available beyond this page + first_id: + type: string + description: >- + Identifier of the first item in this page + last_id: + type: string + description: Identifier of the last item in this page + object: type: string + const: list + default: list + description: Object type identifier, always "list" additionalProperties: false required: - - job_uuid - title: PostTrainingJob -======= - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' - - $ref: '#/components/schemas/BasicScoringFnParams' ->>>>>>> 4cc87bbe1 (chore: regen scehma with main) - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type + - data + - has_more + - first_id + - last_id + - object + title: ListOpenAIResponseObject + description: >- + Paginated list of OpenAI response objects with navigation metadata. + OpenAIResponseError: + type: object + properties: + code: + 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/LoraFinetuningConfig' - - $ref: '#/components/schemas/QATFinetuningConfig' - SpanEndPayload: - description: Payload for a span end event. + - $ref: '#/components/schemas/OpenAIResponseOutput' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage' + OpenAIResponseInputToolFileSearch: + type: object properties: type: - const: span_end - default: span_end - title: 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 + - type: string + const: web_search_2025_08_26 + 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: - $ref: '#/components/schemas/SpanStatus' + 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 + max_tool_calls: + type: integer + description: >- + (Optional) Max number of total calls to built-in tools that can be processed + in a response + input: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseInput' + description: >- + List of input items that led to this response + additionalProperties: false required: - - status - title: SpanEndPayload + - 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' + propertyName: type + 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' + DataSource: + discriminator: + 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 + max_tool_calls: + type: integer + description: >- + (Optional) Max number of total calls to built-in tools that can be processed + in a response. + additionalProperties: false + required: + - input + - model + title: CreateOpenaiResponseRequest + OpenAIResponseObject: + 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 + max_tool_calls: + type: integer + description: >- + (Optional) Max number of total calls to built-in tools that can be processed + in a response + additionalProperties: false + required: + - created_at + - id + - model + - object + - output + - parallel_tool_calls + - status + - text + title: OpenAIResponseObject + description: >- + Complete OpenAI response object containing generation results and metadata. + OpenAIResponseContentPartOutputText: + type: object + properties: + type: + type: string + const: output_text + default: output_text + description: >- + Content part type identifier, always "output_text" + text: + type: string + description: Text emitted for this content part + annotations: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseAnnotations' + description: >- + Structured annotations associated with the text + logprobs: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: (Optional) Token log probability details + additionalProperties: false + required: + - type + - text + - annotations + title: OpenAIResponseContentPartOutputText + description: >- + Text content within a streamed response part. + "OpenAIResponseContentPartReasoningSummary": + type: object + properties: + type: + type: string + const: summary_text + default: summary_text + description: >- + Content part type identifier, always "summary_text" + text: + type: string + description: Summary text + additionalProperties: false + required: + - type + - text + title: >- + OpenAIResponseContentPartReasoningSummary + description: >- + Reasoning summary part in a streamed response. + OpenAIResponseContentPartReasoningText: + type: object + properties: + type: + type: string + const: reasoning_text + default: reasoning_text + description: >- + Content part type identifier, always "reasoning_text" + text: + type: string + description: Reasoning text supplied by the model + additionalProperties: false + required: + - type + - text + title: OpenAIResponseContentPartReasoningText + description: >- + Reasoning text emitted as part of a streamed response. + OpenAIResponseObjectStream: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + discriminator: + propertyName: type + mapping: + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + "OpenAIResponseObjectStreamResponseCompleted": + type: object + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + description: Completed response object + type: + type: string + const: response.completed + default: response.completed + description: >- + Event type identifier, always "response.completed" + additionalProperties: false + required: + - response + - type + title: >- + OpenAIResponseObjectStreamResponseCompleted + description: >- + Streaming event indicating a response has been completed. + "OpenAIResponseObjectStreamResponseContentPartAdded": + type: object + properties: + content_index: + type: integer + description: >- + Index position of the part within the content array + response_id: + type: string + description: >- + Unique identifier of the response containing this content + item_id: + type: string + description: >- + Unique identifier of the output item containing this content part + output_index: + type: integer + description: >- + Index position of the output item in the response + part: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + description: The content part that was added + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.content_part.added + default: response.content_part.added + description: >- + Event type identifier, always "response.content_part.added" + additionalProperties: false + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseContentPartAdded + description: >- + Streaming event for when a new content part is added to a response item. + "OpenAIResponseObjectStreamResponseContentPartDone": + type: object + properties: + content_index: + type: integer + description: >- + Index position of the part within the content array + response_id: + type: string + description: >- + Unique identifier of the response containing this content + item_id: + type: string + description: >- + Unique identifier of the output item containing this content part + output_index: + type: integer + description: >- + Index position of the output item in the response + part: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + description: The completed content part + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.content_part.done + default: response.content_part.done + description: >- + Event type identifier, always "response.content_part.done" + additionalProperties: false + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseContentPartDone + description: >- + Streaming event for when a content part is completed. + "OpenAIResponseObjectStreamResponseCreated": + type: object + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + description: The response object that was created + type: + type: string + const: response.created + default: response.created + description: >- + Event type identifier, always "response.created" + additionalProperties: false + required: + - response + - type + title: >- + OpenAIResponseObjectStreamResponseCreated + description: >- + Streaming event indicating a new response has been created. + OpenAIResponseObjectStreamResponseFailed: + type: object + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + description: Response object describing the failure + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.failed + default: response.failed + description: >- + Event type identifier, always "response.failed" + additionalProperties: false + required: + - response + - sequence_number + - type + title: OpenAIResponseObjectStreamResponseFailed + description: >- + Streaming event emitted when a response fails. + "OpenAIResponseObjectStreamResponseFileSearchCallCompleted": + type: object + properties: + item_id: + type: string + description: >- + Unique identifier of the completed file search call + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.file_search_call.completed + default: response.file_search_call.completed + description: >- + Event type identifier, always "response.file_search_call.completed" + additionalProperties: false + required: + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseFileSearchCallCompleted + description: >- + Streaming event for completed file search calls. + "OpenAIResponseObjectStreamResponseFileSearchCallInProgress": + type: object + properties: + item_id: + type: string + description: >- + Unique identifier of the file search call + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + description: >- + Event type identifier, always "response.file_search_call.in_progress" + additionalProperties: false + required: + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseFileSearchCallInProgress + description: >- + Streaming event for file search calls in progress. + "OpenAIResponseObjectStreamResponseFileSearchCallSearching": + type: object + properties: + item_id: + type: string + description: >- + Unique identifier of the file search call + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.file_search_call.searching + default: response.file_search_call.searching + description: >- + Event type identifier, always "response.file_search_call.searching" + additionalProperties: false + required: + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseFileSearchCallSearching + description: >- + Streaming event for file search currently searching. + "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta": + type: object + properties: + delta: + type: string + description: >- + Incremental function call arguments being added + item_id: + type: string + description: >- + Unique identifier of the function call being updated + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + description: >- + Event type identifier, always "response.function_call_arguments.delta" + additionalProperties: false + required: + - delta + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + description: >- + Streaming event for incremental function call argument updates. + "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone": + type: object + properties: + arguments: + type: string + description: >- + Final complete arguments JSON string for the function call + item_id: + type: string + description: >- + Unique identifier of the completed function call + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.function_call_arguments.done + default: response.function_call_arguments.done + description: >- + Event type identifier, always "response.function_call_arguments.done" + additionalProperties: false + required: + - arguments + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + description: >- + Streaming event for when function call arguments are completed. + "OpenAIResponseObjectStreamResponseInProgress": + type: object + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + description: Current response state while in progress + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.in_progress + default: response.in_progress + description: >- + Event type identifier, always "response.in_progress" + additionalProperties: false + required: + - response + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseInProgress + description: >- + Streaming event indicating the response remains in progress. + "OpenAIResponseObjectStreamResponseIncomplete": + type: object + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + description: >- + Response object describing the incomplete state + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.incomplete + default: response.incomplete + description: >- + Event type identifier, always "response.incomplete" + additionalProperties: false + required: + - response + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseIncomplete + description: >- + Streaming event emitted when a response ends in an incomplete state. + "OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta": + type: object + properties: + delta: + type: string + item_id: + type: string + output_index: + type: integer + sequence_number: + type: integer + type: + type: string + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + additionalProperties: false + required: + - delta + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + "OpenAIResponseObjectStreamResponseMcpCallArgumentsDone": + type: object + properties: + arguments: + type: string + item_id: + type: string + output_index: + type: integer + sequence_number: + type: integer + type: + type: string + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + additionalProperties: false + required: + - arguments + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + "OpenAIResponseObjectStreamResponseMcpCallCompleted": + type: object + properties: + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.mcp_call.completed + default: response.mcp_call.completed + description: >- + Event type identifier, always "response.mcp_call.completed" + additionalProperties: false + required: + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpCallCompleted + description: Streaming event for completed MCP calls. + "OpenAIResponseObjectStreamResponseMcpCallFailed": + type: object + properties: + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.mcp_call.failed + default: response.mcp_call.failed + description: >- + Event type identifier, always "response.mcp_call.failed" + additionalProperties: false + required: + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpCallFailed + description: Streaming event for failed MCP calls. + "OpenAIResponseObjectStreamResponseMcpCallInProgress": + type: object + properties: + item_id: + type: string + description: Unique identifier of the MCP call + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress + description: >- + Event type identifier, always "response.mcp_call.in_progress" + additionalProperties: false + required: + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpCallInProgress + description: >- + Streaming event for MCP calls in progress. + "OpenAIResponseObjectStreamResponseMcpListToolsCompleted": + type: object + properties: + sequence_number: + type: integer + type: + type: string + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + additionalProperties: false + required: + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpListToolsCompleted + "OpenAIResponseObjectStreamResponseMcpListToolsFailed": + type: object + properties: + sequence_number: + type: integer + type: + type: string + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + additionalProperties: false + required: + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpListToolsFailed + "OpenAIResponseObjectStreamResponseMcpListToolsInProgress": + type: object + properties: + sequence_number: + type: integer + type: + type: string + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + additionalProperties: false + required: + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseMcpListToolsInProgress + "OpenAIResponseObjectStreamResponseOutputItemAdded": + type: object + properties: + response_id: + type: string + description: >- + Unique identifier of the response containing this output + item: + 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' + description: >- + The output item that was added (message, tool call, etc.) + output_index: + type: integer + description: >- + Index position of this item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.output_item.added + default: response.output_item.added + description: >- + Event type identifier, always "response.output_item.added" + additionalProperties: false + required: + - response_id + - item + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseOutputItemAdded + description: >- + Streaming event for when a new output item is added to the response. + "OpenAIResponseObjectStreamResponseOutputItemDone": + type: object + properties: + response_id: + type: string + description: >- + Unique identifier of the response containing this output + item: + 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' + description: >- + The completed output item (message, tool call, etc.) + output_index: + type: integer + description: >- + Index position of this item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.output_item.done + default: response.output_item.done + description: >- + Event type identifier, always "response.output_item.done" + additionalProperties: false + required: + - response_id + - item + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseOutputItemDone + description: >- + Streaming event for when an output item is completed. + "OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded": + type: object + properties: + item_id: + type: string + description: >- + Unique identifier of the item to which the annotation is being added + output_index: + type: integer + description: >- + Index position of the output item in the response's output array + content_index: + type: integer + description: >- + Index position of the content part within the output item + annotation_index: + type: integer + description: >- + Index of the annotation within the content part + annotation: + 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' + description: The annotation object being added + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.output_text.annotation.added + default: response.output_text.annotation.added + description: >- + Event type identifier, always "response.output_text.annotation.added" + additionalProperties: false + required: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + description: >- + Streaming event for when an annotation is added to output text. + "OpenAIResponseObjectStreamResponseOutputTextDelta": + type: object + properties: + content_index: + type: integer + description: Index position within the text content + delta: + type: string + description: Incremental text content being added + item_id: + type: string + description: >- + Unique identifier of the output item being updated + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.output_text.delta + default: response.output_text.delta + description: >- + Event type identifier, always "response.output_text.delta" + additionalProperties: false + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseOutputTextDelta + description: >- + Streaming event for incremental text content updates. + "OpenAIResponseObjectStreamResponseOutputTextDone": + type: object + properties: + content_index: + type: integer + description: Index position within the text content + text: + type: string + description: >- + Final complete text content of the output item + item_id: + type: string + description: >- + Unique identifier of the completed output item + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.output_text.done + default: response.output_text.done + description: >- + Event type identifier, always "response.output_text.done" + additionalProperties: false + required: + - content_index + - text + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseOutputTextDone + description: >- + Streaming event for when text output is completed. + "OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded": + type: object + properties: + item_id: + type: string + description: Unique identifier of the output item + output_index: + type: integer + description: Index position of the output item + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + description: The summary part that was added + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + summary_index: + type: integer + description: >- + Index of the summary part within the reasoning summary + type: + type: string + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + description: >- + Event type identifier, always "response.reasoning_summary_part.added" + additionalProperties: false + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + - type + title: >- + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + description: >- + Streaming event for when a new reasoning summary part is added. + "OpenAIResponseObjectStreamResponseReasoningSummaryPartDone": + type: object + properties: + item_id: + type: string + description: Unique identifier of the output item + output_index: + type: integer + description: Index position of the output item + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + description: The completed summary part + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + summary_index: + type: integer + description: >- + Index of the summary part within the reasoning summary + type: + type: string + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done + description: >- + Event type identifier, always "response.reasoning_summary_part.done" + additionalProperties: false + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + - type + title: >- + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + description: >- + Streaming event for when a reasoning summary part is completed. + "OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta": + type: object + properties: + delta: + type: string + description: Incremental summary text being added + item_id: + type: string + description: Unique identifier of the output item + output_index: + type: integer + description: Index position of the output item + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + summary_index: + type: integer + description: >- + Index of the summary part within the reasoning summary + type: + type: string + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta + description: >- + Event type identifier, always "response.reasoning_summary_text.delta" + additionalProperties: false + required: + - delta + - item_id + - output_index + - sequence_number + - summary_index + - type + title: >- + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + description: >- + Streaming event for incremental reasoning summary text updates. + "OpenAIResponseObjectStreamResponseReasoningSummaryTextDone": + type: object + properties: + text: + type: string + description: Final complete summary text + item_id: + type: string + description: Unique identifier of the output item + output_index: + type: integer + description: Index position of the output item + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + summary_index: + type: integer + description: >- + Index of the summary part within the reasoning summary + type: + type: string + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done + description: >- + Event type identifier, always "response.reasoning_summary_text.done" + additionalProperties: false + required: + - text + - item_id + - output_index + - sequence_number + - summary_index + - type + title: >- + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + description: >- + Streaming event for when reasoning summary text is completed. + "OpenAIResponseObjectStreamResponseReasoningTextDelta": + type: object + properties: + content_index: + type: integer + description: >- + Index position of the reasoning content part + delta: + type: string + description: Incremental reasoning text being added + item_id: + type: string + description: >- + Unique identifier of the output item being updated + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.reasoning_text.delta + default: response.reasoning_text.delta + description: >- + Event type identifier, always "response.reasoning_text.delta" + additionalProperties: false + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseReasoningTextDelta + description: >- + Streaming event for incremental reasoning text updates. + "OpenAIResponseObjectStreamResponseReasoningTextDone": + type: object + properties: + content_index: + type: integer + description: >- + Index position of the reasoning content part + text: + type: string + description: Final complete reasoning text + item_id: + type: string + description: >- + Unique identifier of the completed output item + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.reasoning_text.done + default: response.reasoning_text.done + description: >- + Event type identifier, always "response.reasoning_text.done" + additionalProperties: false + required: + - content_index + - text + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseReasoningTextDone + description: >- + Streaming event for when reasoning text is completed. + "OpenAIResponseObjectStreamResponseRefusalDelta": + type: object + properties: + content_index: + type: integer + description: Index position of the content part + delta: + type: string + description: Incremental refusal text being added + item_id: + type: string + description: Unique identifier of the output item + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.refusal.delta + default: response.refusal.delta + description: >- + Event type identifier, always "response.refusal.delta" + additionalProperties: false + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseRefusalDelta + description: >- + Streaming event for incremental refusal text updates. + "OpenAIResponseObjectStreamResponseRefusalDone": + type: object + properties: + content_index: + type: integer + description: Index position of the content part + refusal: + type: string + description: Final complete refusal text + item_id: + type: string + description: Unique identifier of the output item + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.refusal.done + default: response.refusal.done + description: >- + Event type identifier, always "response.refusal.done" + additionalProperties: false + required: + - content_index + - refusal + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseRefusalDone + description: >- + Streaming event for when refusal text is completed. + "OpenAIResponseObjectStreamResponseWebSearchCallCompleted": + type: object + properties: + item_id: + type: string + description: >- + Unique identifier of the completed web search call + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.web_search_call.completed + default: response.web_search_call.completed + description: >- + Event type identifier, always "response.web_search_call.completed" + additionalProperties: false + required: + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseWebSearchCallCompleted + description: >- + Streaming event for completed web search calls. + "OpenAIResponseObjectStreamResponseWebSearchCallInProgress": + type: object + properties: + item_id: + type: string + description: Unique identifier of the web search call + output_index: + type: integer + description: >- + Index position of the item in the output list + sequence_number: + type: integer + description: >- + Sequential number for ordering streaming events + type: + type: string + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress + description: >- + Event type identifier, always "response.web_search_call.in_progress" + additionalProperties: false + required: + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseWebSearchCallInProgress + description: >- + Streaming event for web search calls in progress. + "OpenAIResponseObjectStreamResponseWebSearchCallSearching": + type: object + properties: + item_id: + type: string + output_index: + type: integer + sequence_number: + type: integer + type: + type: string + const: response.web_search_call.searching + default: response.web_search_call.searching + additionalProperties: false + required: + - item_id + - output_index + - sequence_number + - type + title: >- + OpenAIResponseObjectStreamResponseWebSearchCallSearching + OpenAIDeleteResponseObject: + type: object + properties: + id: + type: string + description: >- + Unique identifier of the deleted response + object: + type: string + const: response + default: response + description: >- + Object type identifier, always "response" + deleted: + type: boolean + default: true + description: Deletion confirmation flag, always True + additionalProperties: false + required: + - id + - object + - deleted + title: OpenAIDeleteResponseObject + description: >- + Response object confirming deletion of an OpenAI response. + ListOpenAIResponseInputItem: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseInput' + description: List of input items + object: + type: string + const: list + default: list + description: Object type identifier, always "list" + additionalProperties: false + required: + - data + - object + title: ListOpenAIResponseInputItem + description: >- + List container for OpenAI response input items. + RunShieldRequest: + type: object + properties: + shield_id: + type: string + description: The identifier of the shield to run. + messages: + type: array + items: + $ref: '#/components/schemas/OpenAIMessageParam' + description: The messages to run the shield on. + params: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The parameters of the shield. + additionalProperties: false + required: + - shield_id + - messages + - params + title: RunShieldRequest + RunShieldResponse: + type: object + properties: + violation: + $ref: '#/components/schemas/SafetyViolation' + description: >- + (Optional) Safety violation detected by the shield, if any + additionalProperties: false + title: RunShieldResponse + description: Response from running a safety shield. + SafetyViolation: + type: object + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + description: Severity level of the violation + user_message: + type: string + description: >- + (Optional) Message to convey to the user about the violation + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Additional metadata including specific violation codes for debugging and + telemetry + additionalProperties: false + required: + - violation_level + - metadata + title: SafetyViolation + description: >- + Details of a safety violation detected by content moderation. + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: Severity level of a safety violation. + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: >- + Types of aggregation functions for scoring results. + ArrayType: + type: object + properties: + type: + type: string + const: array + default: array + description: Discriminator type. Always "array" + additionalProperties: false + required: + - type + title: ArrayType + description: Parameter type for array values. + BasicScoringFnParams: + type: object + properties: + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: basic + default: basic + description: >- + The type of scoring function parameters, always basic + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row + additionalProperties: false + required: + - type + - aggregation_functions + title: BasicScoringFnParams + description: >- + Parameters for basic scoring function configuration. + BooleanType: + type: object + properties: + type: + type: string + const: boolean + default: boolean + description: Discriminator type. Always "boolean" + additionalProperties: false + required: + - type + title: BooleanType + description: Parameter type for boolean values. + ChatCompletionInputType: + type: object + properties: + type: + type: string + const: chat_completion_input + default: chat_completion_input + description: >- + Discriminator type. Always "chat_completion_input" + additionalProperties: false + required: + - type + title: ChatCompletionInputType + description: >- + Parameter type for chat completion input. + CompletionInputType: + type: object + properties: + type: + type: string + const: completion_input + default: completion_input + description: >- + Discriminator type. Always "completion_input" + additionalProperties: false + required: + - type + title: CompletionInputType + description: Parameter type for completion input. + JsonType: + type: object + properties: + type: + type: string + const: json + default: json + description: Discriminator type. Always "json" + additionalProperties: false + required: + - type + title: JsonType + description: Parameter type for JSON values. + LLMAsJudgeScoringFnParams: + type: object + properties: + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: llm_as_judge + default: llm_as_judge + description: >- + The type of scoring function parameters, always llm_as_judge + judge_model: + type: string + description: >- + Identifier of the LLM model to use as a judge for scoring + prompt_template: + type: string + description: >- + (Optional) Custom prompt template for the judge model + judge_score_regexes: + type: array + items: + type: string + description: >- + Regexes to extract the answer from generated response + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row + additionalProperties: false + required: + - type + - judge_model + - judge_score_regexes + - aggregation_functions + title: LLMAsJudgeScoringFnParams + description: >- + Parameters for LLM-as-judge scoring function configuration. + NumberType: + type: object + properties: + type: + type: string + const: number + default: number + description: Discriminator type. Always "number" + additionalProperties: false + required: + - type + title: NumberType + description: Parameter type for numeric values. + ObjectType: + type: object + properties: + type: + type: string + const: object + default: object + description: Discriminator type. Always "object" + additionalProperties: false + required: + - type + title: ObjectType + description: Parameter type for object values. + RegexParserScoringFnParams: + type: object + properties: + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: regex_parser + default: regex_parser + description: >- + The type of scoring function parameters, always regex_parser + parsing_regexes: + type: array + items: + type: string + description: >- + Regex to extract the answer from generated response + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row + additionalProperties: false + required: + - type + - parsing_regexes + - aggregation_functions + title: RegexParserScoringFnParams + description: >- + Parameters for regex parser scoring function configuration. + ScoringFn: + type: object + properties: + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: scoring_function + default: scoring_function + description: >- + The resource type, always scoring_function + description: + type: string + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + 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' + discriminator: + propertyName: type + mapping: + string: '#/components/schemas/StringType' + number: '#/components/schemas/NumberType' + boolean: '#/components/schemas/BooleanType' + array: '#/components/schemas/ArrayType' + object: '#/components/schemas/ObjectType' + json: '#/components/schemas/JsonType' + union: '#/components/schemas/UnionType' + chat_completion_input: '#/components/schemas/ChatCompletionInputType' + completion_input: '#/components/schemas/CompletionInputType' + params: + $ref: '#/components/schemas/ScoringFnParams' + additionalProperties: false + required: + - identifier + - provider_id + - type + - metadata + - return_type + title: ScoringFn + description: >- + A scoring function resource for evaluating model outputs. + ScoringFnParams: + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + basic: '#/components/schemas/BasicScoringFnParams' + ScoringFnParamsType: + type: string + enum: + - llm_as_judge + - regex_parser + - basic + title: ScoringFnParamsType + description: >- + Types of scoring function parameter configurations. + StringType: + type: object + properties: + type: + type: string + const: string + default: string + description: Discriminator type. Always "string" + additionalProperties: false + required: + - type + title: StringType + description: Parameter type for string values. + UnionType: + type: object + properties: + type: + type: string + const: union + default: union + description: Discriminator type. Always "union" + additionalProperties: false + required: + - type + title: UnionType + description: Parameter type for union values. + ListScoringFunctionsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ScoringFn' + additionalProperties: false + required: + - data + title: ListScoringFunctionsResponse + ScoreRequest: + type: object + properties: + input_rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to score. + scoring_functions: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/ScoringFnParams' + - type: 'null' + description: >- + The scoring functions to use for the scoring. + additionalProperties: false + required: + - input_rows + - scoring_functions + title: ScoreRequest + ScoreResponse: + type: object + properties: + results: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + description: >- + A map of scoring function name to ScoringResult. + additionalProperties: false + required: + - results + title: ScoreResponse + description: The response from scoring. + ScoringResult: + type: object + properties: + score_rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The scoring result for each row. Each row is a map of column name to value. + aggregated_results: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Map of metric name to aggregated value + additionalProperties: false + required: + - score_rows + - aggregated_results + title: ScoringResult + description: A scoring result for a single row. + ScoreBatchRequest: + type: object + properties: + dataset_id: + type: string + description: The ID of the dataset to score. + scoring_functions: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/ScoringFnParams' + - type: 'null' + description: >- + The scoring functions to use for the scoring. + save_results_dataset: + type: boolean + description: >- + Whether to save the results to a dataset. + additionalProperties: false + required: + - dataset_id + - scoring_functions + - save_results_dataset + title: ScoreBatchRequest + ScoreBatchResponse: + type: object + properties: + dataset_id: + type: string + description: >- + (Optional) The identifier of the dataset that was scored + results: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + description: >- + A map of scoring function name to ScoringResult + additionalProperties: false + required: + - results + title: ScoreBatchResponse + description: >- + Response from batch scoring operations on datasets. + Shield: + type: object + properties: + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: shield + default: shield + description: The resource type, always shield + params: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Configuration parameters for the shield + additionalProperties: false + required: + - identifier + - provider_id + - type + title: Shield + description: >- + A safety shield resource that can be used to check content. + ListShieldsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Shield' + additionalProperties: false + required: + - data + title: ListShieldsResponse + InvokeToolRequest: + type: object + properties: + tool_name: + type: string + description: The name of the tool to invoke. + kwargs: + 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. + additionalProperties: false + required: + - tool_name + - kwargs + title: InvokeToolRequest + ImageContentItem: + type: object + properties: + type: + type: string + const: image + default: image + description: >- + Discriminator type of the content item. Always "image" + image: + type: object + properties: + url: + $ref: '#/components/schemas/URL' + description: >- + A URL of the image or data URL in the format of data:image/{type};base64,{data}. + Note that URL could have length limits. + data: + type: string + contentEncoding: base64 + description: base64 encoded image data as string + additionalProperties: false + description: >- + Image as a base64 encoded string or an URL + additionalProperties: false + required: + - type + - image + title: ImageContentItem + description: A image content item + InterleavedContent: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - type: array + items: + $ref: '#/components/schemas/InterleavedContentItem' + InterleavedContentItem: + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + TextContentItem: + type: object + properties: + type: + type: string + const: text + default: text + description: >- + Discriminator type of the content item. Always "text" + text: + type: string + description: Text content + additionalProperties: false + required: + - type + - text + title: TextContentItem + description: A text content item + ToolInvocationResult: + type: object + properties: + content: + $ref: '#/components/schemas/InterleavedContent' + description: >- + (Optional) The output content from the tool execution + error_message: + type: string + description: >- + (Optional) Error message if the tool execution failed + error_code: + type: integer + description: >- + (Optional) Numeric error code if the tool execution failed + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata about the tool execution + additionalProperties: false + title: ToolInvocationResult + description: Result of a tool invocation. + URL: + type: object + properties: + uri: + type: string + description: The URL string pointing to the resource + additionalProperties: false + required: + - uri + title: URL + description: A URL reference to external content. + ToolDef: + type: object + properties: + toolgroup_id: + type: string + description: >- + (Optional) ID of the tool group this tool belongs to + name: + type: string + description: Name of the tool + description: + type: string + description: >- + (Optional) Human-readable description of what the tool does + input_schema: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) JSON Schema for tool inputs (MCP inputSchema) + output_schema: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) JSON Schema for tool outputs (MCP outputSchema) + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata about the tool + additionalProperties: false + required: + - name + title: ToolDef + description: >- + Tool definition used in runtime contexts. + ListToolDefsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ToolDef' + description: List of tool definitions + additionalProperties: false + required: + - data + title: ListToolDefsResponse + description: >- + Response containing a list of tool definitions. + ToolGroup: + type: object + properties: + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: tool_group + default: tool_group + description: Type of resource, always 'tool_group' + mcp_endpoint: + $ref: '#/components/schemas/URL' + description: >- + (Optional) Model Context Protocol endpoint for remote tools + args: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional arguments for the tool group + additionalProperties: false + required: + - identifier + - provider_id + - type + title: ToolGroup + description: >- + A group of related tools managed together. + ListToolGroupsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ToolGroup' + description: List of tool groups + additionalProperties: false + required: + - data + title: ListToolGroupsResponse + description: >- + Response containing a list of tool groups. + 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 + properties: + chunk_id: + type: string + description: >- + The ID of the chunk. If not set, it will be generated based on the document + ID and content. + document_id: + type: string + description: >- + The ID of the document this chunk belongs to. + source: + type: string + description: >- + The source of the content, such as a URL, file path, or other identifier. + created_timestamp: + type: integer + description: >- + An optional timestamp indicating when the chunk was created. + updated_timestamp: + type: integer + description: >- + An optional timestamp indicating when the chunk was last updated. + chunk_window: + type: string + description: >- + The window of the chunk, which can be used to group related chunks together. + chunk_tokenizer: + type: string + description: >- + The tokenizer used to create the chunk. Default is Tiktoken. + chunk_embedding_model: + type: string + description: >- + The embedding model used to create the chunk's embedding. + chunk_embedding_dimension: + type: integer + description: >- + The dimension of the embedding vector for the chunk. + content_token_count: + type: integer + description: >- + The number of tokens in the content of the chunk. + metadata_token_count: + type: integer + description: >- + The number of tokens in the metadata of the chunk. + additionalProperties: false + title: 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. + InsertChunksRequest: + type: object + properties: + vector_store_id: + type: string + description: >- + The identifier of the vector database to insert the chunks into. + chunks: + type: array + items: + $ref: '#/components/schemas/Chunk' + description: >- + The chunks to insert. Each `Chunk` should contain content which can be + interleaved text, images, or other types. `metadata`: `dict[str, Any]` + and `embedding`: `List[float]` are optional. If `metadata` is provided, + you configure how Llama Stack formats the chunk during generation. If + `embedding` is not provided, it will be computed later. + ttl_seconds: + type: integer + description: The time to live of the chunks. + additionalProperties: false + required: + - vector_store_id + - chunks + title: InsertChunksRequest + QueryChunksRequest: + type: object + properties: + vector_store_id: + type: string + description: >- + The identifier of the vector database to query. + query: + $ref: '#/components/schemas/InterleavedContent' + description: The query to search for. + params: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The parameters of the query. + additionalProperties: false + required: + - vector_store_id + - query + title: QueryChunksRequest + QueryChunksResponse: + type: object + properties: + chunks: + type: array + items: + $ref: '#/components/schemas/Chunk' + description: >- + List of content chunks returned from the query + scores: + type: array + items: + type: number + description: >- + Relevance scores corresponding to each returned chunk + additionalProperties: false + required: + - chunks + - scores + title: QueryChunksResponse + description: >- + Response from querying chunks in a vector database. + VectorStoreFileCounts: + type: object + properties: + completed: + type: integer + description: >- + Number of files that have been successfully processed + cancelled: + type: integer + description: >- + Number of files that had their processing cancelled + failed: + type: integer + description: Number of files that failed to process + in_progress: + type: integer + description: >- + Number of files currently being processed + total: + type: integer + description: >- + Total number of files in the vector store + additionalProperties: false + required: + - completed + - cancelled + - failed + - in_progress + - total + title: VectorStoreFileCounts + description: >- + File processing status counts for a vector store. + VectorStoreListResponse: + type: object + properties: + object: + type: string + default: list + description: Object type identifier, always "list" + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreObject' + description: List of vector store objects + first_id: + type: string + description: >- + (Optional) ID of the first vector store in the list for pagination + last_id: + type: string + description: >- + (Optional) ID of the last vector store in the list for pagination + has_more: + type: boolean + default: false + description: >- + Whether there are more vector stores available beyond this page + additionalProperties: false + required: + - object + - data + - has_more + title: VectorStoreListResponse + description: Response from listing vector stores. + VectorStoreObject: + type: object + properties: + id: + type: string + description: Unique identifier for the vector store + object: + type: string + default: vector_store + description: >- + Object type identifier, always "vector_store" + created_at: + type: integer + description: >- + Timestamp when the vector store was created + name: + type: string + description: (Optional) Name of the vector store + usage_bytes: + type: integer + default: 0 + description: >- + Storage space used by the vector store in bytes + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + description: >- + File processing status counts for the vector store + status: + type: string + default: completed + description: Current status of the vector store + expires_after: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Expiration policy for the vector store + expires_at: + type: integer + description: >- + (Optional) Timestamp when the vector store will expire + last_active_at: + type: integer + description: >- + (Optional) Timestamp of last activity on the vector store + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Set of key-value pairs that can be attached to the vector store + additionalProperties: false + required: + - id + - object + - created_at + - usage_bytes + - file_counts + - status + - metadata + title: VectorStoreObject + description: OpenAI Vector Store object. + VectorStoreChunkingStrategy: + 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' + ScoringFnParams: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + VectorStoreChunkingStrategyAuto: + type: object + properties: + type: + type: string + const: auto + default: auto + description: >- + Strategy type, always "auto" for automatic chunking + additionalProperties: false + required: + - type + title: VectorStoreChunkingStrategyAuto + description: >- + Automatic chunking strategy for vector store files. + VectorStoreChunkingStrategyStatic: + type: object + properties: + type: + type: string + const: static + default: static + description: >- + Strategy type, always "static" for static chunking + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + description: >- + Configuration parameters for the static chunking strategy + additionalProperties: false + required: + - type + - static + title: VectorStoreChunkingStrategyStatic + description: >- + Static chunking strategy with configurable parameters. + VectorStoreChunkingStrategyStaticConfig: + type: object + properties: + chunk_overlap_tokens: + type: integer + default: 400 + description: >- + Number of tokens to overlap between adjacent chunks + max_chunk_size_tokens: + type: integer + default: 800 + description: >- + Maximum number of tokens per chunk, must be between 100 and 4096 + additionalProperties: false + required: + - chunk_overlap_tokens + - max_chunk_size_tokens + title: VectorStoreChunkingStrategyStaticConfig + description: >- + Configuration for static chunking strategy. + "OpenAICreateVectorStoreRequestWithExtraBody": + type: object + properties: + name: + type: string + description: (Optional) A name for the vector store + file_ids: + type: array + items: + type: string + description: >- + List of file IDs to include in the vector store + expires_after: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Expiration policy for the vector store + chunking_strategy: + $ref: '#/components/schemas/VectorStoreChunkingStrategy' + description: >- + (Optional) Strategy for splitting files into chunks + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Set of key-value pairs that can be attached to the vector store + additionalProperties: false + title: >- + OpenAICreateVectorStoreRequestWithExtraBody + description: >- + Request to create a vector store with extra_body support. + OpenaiUpdateVectorStoreRequest: + type: object + properties: + name: + type: string + description: The name of the vector store. + expires_after: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The expiration policy for a vector store. + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Set of 16 key-value pairs that can be attached to an object. + additionalProperties: false + title: OpenaiUpdateVectorStoreRequest + VectorStoreDeleteResponse: + type: object + properties: + id: + type: string + description: >- + Unique identifier of the deleted vector store + object: + type: string + default: vector_store.deleted + description: >- + Object type identifier for the deletion response + deleted: + type: boolean + default: true + description: >- + Whether the deletion operation was successful + additionalProperties: false + required: + - id + - object + - deleted + title: VectorStoreDeleteResponse + description: Response from deleting a vector store. + "OpenAICreateVectorStoreFileBatchRequestWithExtraBody": + type: object + properties: + file_ids: + type: array + items: + type: string + description: >- + A list of File IDs that the vector store should use + attributes: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Key-value attributes to store with the files + chunking_strategy: + $ref: '#/components/schemas/VectorStoreChunkingStrategy' + description: >- + (Optional) The chunking strategy used to chunk the file(s). Defaults to + auto + additionalProperties: false + required: + - file_ids + title: >- + OpenAICreateVectorStoreFileBatchRequestWithExtraBody + description: >- + Request to create a vector store file batch with extra_body support. + VectorStoreFileBatchObject: + type: object + properties: + id: + type: string + description: Unique identifier for the file batch + object: + type: string + default: vector_store.file_batch + description: >- + Object type identifier, always "vector_store.file_batch" + created_at: + type: integer + description: >- + Timestamp when the file batch was created + vector_store_id: + type: string + description: >- + ID of the vector store containing the file batch + status: + $ref: '#/components/schemas/VectorStoreFileStatus' + description: >- + Current processing status of the file batch + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + description: >- + File processing status counts for the batch + additionalProperties: false + required: + - id + - object + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + description: OpenAI Vector Store File Batch object. + VectorStoreFileStatus: + oneOf: + - type: string + const: completed + - type: string + const: in_progress + - type: string + const: cancelled + - type: string + const: failed + VectorStoreFileLastError: + type: object + properties: + code: + oneOf: + - type: string + const: server_error + - type: string + const: rate_limit_exceeded + description: >- + Error code indicating the type of failure + message: + type: string + description: >- + Human-readable error message describing the failure + additionalProperties: false + required: + - code + - message + title: VectorStoreFileLastError + description: >- + Error information for failed vector store file processing. + VectorStoreFileObject: + type: object + properties: + id: + type: string + description: Unique identifier for the file + object: + type: string + default: vector_store.file + description: >- + Object type identifier, always "vector_store.file" + attributes: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Key-value attributes associated with the file + chunking_strategy: + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + description: >- + Strategy used for splitting the file into chunks + created_at: + type: integer + description: >- + Timestamp when the file was added to the vector store + last_error: + $ref: '#/components/schemas/VectorStoreFileLastError' + description: >- + (Optional) Error information if file processing failed + status: + $ref: '#/components/schemas/VectorStoreFileStatus' + description: Current processing status of the file + usage_bytes: + type: integer + default: 0 + description: Storage space used by this file in bytes + vector_store_id: + type: string + description: >- + ID of the vector store containing this file + additionalProperties: false + required: + - id + - object + - attributes + - chunking_strategy + - created_at + - status + - usage_bytes + - vector_store_id + title: VectorStoreFileObject + description: OpenAI Vector Store File object. + VectorStoreFilesListInBatchResponse: + type: object + properties: + object: + type: string + default: list + description: Object type identifier, always "list" + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreFileObject' + description: >- + List of vector store file objects in the batch + first_id: + type: string + description: >- + (Optional) ID of the first file in the list for pagination + last_id: + type: string + description: >- + (Optional) ID of the last file in the list for pagination + has_more: + type: boolean + default: false + description: >- + Whether there are more files available beyond this page + additionalProperties: false + required: + - object + - data + - has_more + title: VectorStoreFilesListInBatchResponse + description: >- + Response from listing files in a vector store file batch. + VectorStoreListFilesResponse: + type: object + properties: + object: + type: string + default: list + description: Object type identifier, always "list" + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreFileObject' + description: List of vector store file objects + first_id: + type: string + description: >- + (Optional) ID of the first file in the list for pagination + last_id: + type: string + description: >- + (Optional) ID of the last file in the list for pagination + has_more: + type: boolean + default: false + description: >- + Whether there are more files available beyond this page + additionalProperties: false + required: + - object + - data + - has_more + title: VectorStoreListFilesResponse + description: >- + Response from listing files in a vector store. + OpenaiAttachFileToVectorStoreRequest: + type: object + properties: + file_id: + type: string + description: >- + The ID of the file to attach to the vector store. + attributes: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The key-value attributes stored with the file, which can be used for filtering. + chunking_strategy: + $ref: '#/components/schemas/VectorStoreChunkingStrategy' + description: >- + The chunking strategy to use for the file. + additionalProperties: false + required: + - file_id + title: OpenaiAttachFileToVectorStoreRequest + OpenaiUpdateVectorStoreFileRequest: + type: object + properties: + attributes: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The updated key-value attributes to store with the file. + additionalProperties: false + required: + - attributes + title: OpenaiUpdateVectorStoreFileRequest + VectorStoreFileDeleteResponse: + type: object + properties: + id: + type: string + description: Unique identifier of the deleted file + object: + type: string + default: vector_store.file.deleted + description: >- + Object type identifier for the deletion response + deleted: + type: boolean + default: true + description: >- + Whether the deletion operation was successful + additionalProperties: false + required: + - id + - object + - deleted + title: VectorStoreFileDeleteResponse + description: >- + Response from deleting a vector store file. + bool: + type: boolean + VectorStoreContent: + type: object + properties: + type: + type: string + const: text + description: >- + Content type, currently only "text" is supported + text: + type: string + description: The actual text content + embedding: + type: array + items: + type: number + description: >- + Optional embedding vector for this content chunk + chunk_metadata: + $ref: '#/components/schemas/ChunkMetadata' + description: Optional chunk metadata + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Optional user-defined metadata + additionalProperties: false + required: + - type + - text + title: VectorStoreContent + description: >- + Content item from a vector store file or search result. + VectorStoreFileContentResponse: + type: object + properties: + object: + type: string + const: vector_store.file_content.page + default: vector_store.file_content.page + description: >- + The object type, which is always `vector_store.file_content.page` + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreContent' + description: Parsed content of the file + has_more: + type: boolean + default: false + description: >- + Indicates if there are more content pages to fetch + next_page: + type: string + description: The token for the next page, if any + additionalProperties: false + required: + - object + - data + - has_more + title: VectorStoreFileContentResponse + description: >- + Represents the parsed content of a vector store file. + OpenaiSearchVectorStoreRequest: + type: object + properties: + query: + oneOf: + - type: string + - type: array + items: + type: string + description: >- + The query string or array for performing the search. + filters: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Filters based on file attributes to narrow the search results. + max_num_results: + type: integer + description: >- + Maximum number of results to return (1 to 50 inclusive, default 10). + 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: >- + Ranking options for fine-tuning the search results. + rewrite_query: + type: boolean + description: >- + Whether to rewrite the natural language query for vector search (default + false) + search_mode: + type: string + description: >- + The search mode to use - "keyword", "vector", or "hybrid" (default "vector") + additionalProperties: false + required: + - query + title: OpenaiSearchVectorStoreRequest + VectorStoreSearchResponse: + type: object + properties: + 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 + attributes: + type: object + additionalProperties: + oneOf: + - type: string + - type: number + - type: boolean + description: >- + (Optional) Key-value attributes associated with the file + content: + type: array + items: + $ref: '#/components/schemas/VectorStoreContent' + description: >- + List of content items matching the search query + additionalProperties: false + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + description: Response from searching a vector store. + VectorStoreSearchResponsePage: + type: object + properties: + object: + type: string + default: vector_store.search_results.page + description: >- + Object type identifier for the search results page + search_query: + type: array + items: + type: string + description: >- + The original search query that was executed + data: + type: array + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + description: List of search result objects + has_more: + type: boolean + default: false + description: >- + Whether there are more results available beyond this page + next_page: + type: string + description: >- + (Optional) Token for retrieving the next page of results + additionalProperties: false + required: + - object + - search_query + - data + - has_more + title: VectorStoreSearchResponsePage + description: >- + Paginated response from searching a vector store. + VersionInfo: + type: object + properties: + version: + type: string + description: Version number of the service + additionalProperties: false + required: + - version + title: VersionInfo + description: Version information for the service. + AppendRowsRequest: + type: object + properties: + rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to append to the dataset. + additionalProperties: false + required: + - rows + title: AppendRowsRequest + PaginatedResponse: + type: object + properties: + data: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The list of items for the current page + has_more: + type: boolean + description: >- + Whether there are more items available after this set + url: + type: string + description: The URL for accessing this list + additionalProperties: false + required: + - data + - has_more + title: PaginatedResponse + description: >- + A generic paginated response that follows a simple format. + Dataset: + type: object + properties: + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: dataset + default: dataset + description: >- + Type of resource, always 'dataset' for datasets + purpose: + type: string + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + description: >- + Purpose of the dataset indicating its intended use + source: + oneOf: + - $ref: '#/components/schemas/URIDataSource' + - $ref: '#/components/schemas/RowsDataSource' + discriminator: + propertyName: type + mapping: + uri: '#/components/schemas/URIDataSource' + rows: '#/components/schemas/RowsDataSource' + description: >- + Data source configuration for the dataset + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Additional metadata for the dataset + additionalProperties: false + required: + - identifier + - provider_id + - type + - purpose + - source + - metadata + title: Dataset + description: >- + Dataset resource for storing and accessing training or evaluation data. + RowsDataSource: + type: object + properties: + type: + type: string + const: rows + default: rows + rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", + "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, + world!"}]} ] + additionalProperties: false + required: + - type + - rows + title: RowsDataSource + description: A dataset stored in rows. + URIDataSource: + type: object + properties: + type: + type: string + const: uri + default: uri + uri: + type: string + description: >- + The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" + - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" + additionalProperties: false + required: + - type + - uri + title: URIDataSource + description: >- + A dataset that can be obtained from a URI. + ListDatasetsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Dataset' + description: List of datasets + additionalProperties: false + required: + - data + title: ListDatasetsResponse + description: Response from listing datasets. + Benchmark: + type: object + properties: + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_store + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: benchmark + default: benchmark + description: The resource type, always benchmark + dataset_id: + type: string + description: >- + Identifier of the dataset to use for the benchmark evaluation + scoring_functions: + type: array + items: + type: string + description: >- + List of scoring function identifiers to apply during evaluation + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Metadata for this evaluation task + additionalProperties: false + required: + - identifier + - provider_id + - type + - dataset_id + - scoring_functions + - metadata + title: Benchmark + description: >- + A benchmark resource for evaluating model performance. + ListBenchmarksResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Benchmark' + additionalProperties: false + required: + - data + title: ListBenchmarksResponse + BenchmarkConfig: + type: object + properties: + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + description: The candidate to evaluate. + scoring_params: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringFnParams' + description: >- + Map between scoring function id and parameters for each scoring function + you want to run + num_examples: + type: integer + description: >- + (Optional) The number of examples to evaluate. If not provided, all examples + in the dataset will be evaluated + additionalProperties: false + required: + - eval_candidate + - scoring_params + title: BenchmarkConfig + description: >- + A benchmark configuration for evaluation. + GreedySamplingStrategy: + type: object + properties: + type: + type: string + const: greedy + default: greedy + description: >- + Must be "greedy" to identify this sampling strategy + additionalProperties: false + required: + - type + title: GreedySamplingStrategy + description: >- + Greedy sampling strategy that selects the highest probability token at each + step. + ModelCandidate: + type: object + properties: + type: + type: string + const: model + default: model + model: + type: string + description: The model ID to evaluate. + sampling_params: + $ref: '#/components/schemas/SamplingParams' + description: The sampling parameters for the model. + system_message: + $ref: '#/components/schemas/SystemMessage' + description: >- + (Optional) The system message providing instructions or context to the + model. + additionalProperties: false + required: + - type + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + SamplingParams: + type: object + properties: + strategy: + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + description: The sampling strategy. + max_tokens: + type: integer + description: >- + 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. + repetition_penalty: + type: number + default: 1.0 + description: >- + 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. + stop: + type: array + items: + type: string + description: >- + Up to 4 sequences where the API will stop generating further tokens. The + returned text will not contain the stop sequence. + additionalProperties: false + required: + - strategy + title: SamplingParams + description: Sampling parameters. + SystemMessage: + type: object + properties: + role: + type: string + const: system + default: system + description: >- + Must be "system" to identify this as a system message + content: + $ref: '#/components/schemas/InterleavedContent' + description: >- + 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). + additionalProperties: false + required: + - role + - content + title: SystemMessage + description: >- + A system message providing instructions or context to the model. + TopKSamplingStrategy: + type: object + properties: + type: + type: string + const: top_k + default: top_k + description: >- + Must be "top_k" to identify this sampling strategy + top_k: + type: integer + description: >- + Number of top tokens to consider for sampling. Must be at least 1 + additionalProperties: false + required: + - type + - top_k + title: TopKSamplingStrategy + description: >- + Top-k sampling strategy that restricts sampling to the k most likely tokens. + TopPSamplingStrategy: + type: object + properties: + type: + type: string + const: top_p + default: top_p + description: >- + Must be "top_p" to identify this sampling strategy + temperature: + type: number + description: >- + Controls randomness in sampling. Higher values increase randomness + top_p: + type: number + default: 0.95 + description: >- + Cumulative probability threshold for nucleus sampling. Defaults to 0.95 + additionalProperties: false + required: + - type + title: TopPSamplingStrategy + description: >- + Top-p (nucleus) sampling strategy that samples from the smallest set of tokens + with cumulative probability >= p. + EvaluateRowsRequest: + type: object + properties: + input_rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to evaluate. + scoring_functions: + type: array + items: + type: string + description: >- + The scoring functions to use for the evaluation. + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + description: The configuration for the benchmark. + additionalProperties: false + required: + - input_rows + - scoring_functions + - benchmark_config + title: EvaluateRowsRequest + EvaluateResponse: + type: object + properties: + generations: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The generations from the evaluation. + scores: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + description: The scores from the evaluation. + additionalProperties: false + required: + - generations + - scores + title: EvaluateResponse + description: The response from an evaluation. + RunEvalRequest: + type: object + properties: + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + description: The configuration for the benchmark. + additionalProperties: false + required: + - benchmark_config + title: RunEvalRequest + Job: + type: object + properties: + job_id: + type: string + description: Unique identifier for the job + status: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + description: Current execution status of the job + additionalProperties: false + required: + - job_id + - status + title: Job + description: >- + A job execution instance with status tracking. + RerankRequest: + type: object + properties: + model: + type: string + description: >- + The identifier of the reranking model to use. + query: + oneOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + description: >- + 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. + items: + type: array + items: + oneOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + description: >- + 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. + max_num_results: + type: integer + description: >- + (Optional) Maximum number of results to return. Default: returns all. + additionalProperties: false + required: + - model + - query + - items + title: RerankRequest + RerankData: + type: object + properties: + index: + type: integer + description: >- + The original index of the document in the input list + relevance_score: + type: number + description: >- + The relevance score from the model output. Values are inverted when applicable + so that higher scores indicate greater relevance. + additionalProperties: false + required: + - index + - relevance_score + title: RerankData + description: >- + A single rerank result from a reranking response. + RerankResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/RerankData' + description: >- + List of rerank result objects, sorted by relevance score (descending) + additionalProperties: false + required: + - data + title: RerankResponse + description: Response from a reranking request. + Checkpoint: + type: object + properties: + identifier: + type: string + description: Unique identifier for the checkpoint + created_at: + type: string + format: date-time + description: >- + Timestamp when the checkpoint was created + epoch: + type: integer + description: >- + Training epoch when the checkpoint was saved + post_training_job_id: + type: string + description: >- + Identifier of the training job that created this checkpoint + path: + type: string + description: >- + File system path where the checkpoint is stored + training_metrics: + $ref: '#/components/schemas/PostTrainingMetric' + description: >- + (Optional) Training metrics associated with this checkpoint + additionalProperties: false + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. + PostTrainingJobArtifactsResponse: + type: object + properties: + job_uuid: + type: string + description: Unique identifier for the training job + checkpoints: + type: array + items: + $ref: '#/components/schemas/Checkpoint' + description: >- + List of model checkpoints created during training + additionalProperties: false + required: + - job_uuid + - checkpoints + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingMetric: + type: object + properties: + epoch: + type: integer + description: Training epoch number + train_loss: + type: number + description: Loss value on the training dataset + validation_loss: + type: number + description: Loss value on the validation dataset + perplexity: + type: number + description: >- + Perplexity metric indicating model confidence + additionalProperties: false + required: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: >- + Training metrics captured during post-training jobs. + CancelTrainingJobRequest: + type: object + properties: + job_uuid: + type: string + description: The UUID of the job to cancel. + additionalProperties: false + required: + - job_uuid + title: CancelTrainingJobRequest + PostTrainingJobStatusResponse: + type: object + properties: + job_uuid: + type: string + description: Unique identifier for the training job + status: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + description: Current status of the training job + scheduled_at: + type: string + format: date-time + description: >- + (Optional) Timestamp when the job was scheduled + started_at: + type: string + format: date-time + description: >- + (Optional) Timestamp when the job execution began + completed_at: + type: string + format: date-time + description: >- + (Optional) Timestamp when the job finished, if completed + resources_allocated: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Information about computational resources allocated to the + job + checkpoints: + type: array + items: + $ref: '#/components/schemas/Checkpoint' + description: >- + List of model checkpoints created during training + additionalProperties: false + required: + - job_uuid + - status + - checkpoints + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + ListPostTrainingJobsResponse: + type: object + properties: + data: + type: array + items: + type: object + properties: + job_uuid: + type: string + additionalProperties: false + required: + - job_uuid + title: PostTrainingJob + additionalProperties: false + required: + - data + title: ListPostTrainingJobsResponse + DPOAlignmentConfig: + type: object + properties: + beta: + type: number + description: Temperature parameter for the DPO loss + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid + description: The type of loss function to use for DPO + additionalProperties: false + required: + - beta + - loss_type + title: DPOAlignmentConfig + description: >- + Configuration for Direct Preference Optimization (DPO) alignment. + DPOLossType: + type: string + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + DataConfig: + type: object + properties: + dataset_id: + type: string + description: >- + Unique identifier for the training dataset + batch_size: + type: integer + description: Number of samples per training batch + shuffle: + type: boolean + description: >- + Whether to shuffle the dataset during training + data_format: + $ref: '#/components/schemas/DatasetFormat' + description: >- + Format of the dataset (instruct or dialog) + validation_dataset_id: + type: string + description: >- + (Optional) Unique identifier for the validation dataset + packed: + type: boolean + default: false + description: >- + (Optional) Whether to pack multiple samples into a single sequence for + efficiency + train_on_input: + type: boolean + default: false + description: >- + (Optional) Whether to compute loss on input tokens as well as output tokens + additionalProperties: false + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: >- + Configuration for training data and data loading. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + EfficiencyConfig: + type: object + properties: + enable_activation_checkpointing: + type: boolean + default: false + description: >- + (Optional) Whether to use activation checkpointing to reduce memory usage + enable_activation_offloading: + type: boolean + default: false + description: >- + (Optional) Whether to offload activations to CPU to save GPU memory + memory_efficient_fsdp_wrap: + type: boolean + default: false + description: >- + (Optional) Whether to use memory-efficient FSDP wrapping + fsdp_cpu_offload: + type: boolean + default: false + description: >- + (Optional) Whether to offload FSDP parameters to CPU + additionalProperties: false + title: EfficiencyConfig + description: >- + Configuration for memory and compute efficiency optimizations. + OptimizerConfig: + type: object + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + description: >- + Type of optimizer to use (adam, adamw, or sgd) + lr: + type: number + description: Learning rate for the optimizer + weight_decay: + type: number + description: >- + Weight decay coefficient for regularization + num_warmup_steps: + type: integer + description: Number of steps for learning rate warmup + additionalProperties: false + required: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + description: >- + Configuration parameters for the optimization algorithm. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: >- + Available optimizer algorithms for training. + TrainingConfig: + type: object + properties: + n_epochs: + type: integer + description: Number of training epochs to run + max_steps_per_epoch: + type: integer + default: 1 + description: Maximum number of steps to run per epoch + gradient_accumulation_steps: + type: integer + default: 1 + description: >- + Number of steps to accumulate gradients before updating + max_validation_steps: + type: integer + default: 1 + description: >- + (Optional) Maximum number of validation steps per epoch + data_config: + $ref: '#/components/schemas/DataConfig' + description: >- + (Optional) Configuration for data loading and formatting + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + description: >- + (Optional) Configuration for the optimization algorithm + efficiency_config: + $ref: '#/components/schemas/EfficiencyConfig' + description: >- + (Optional) Configuration for memory and compute optimizations + dtype: + type: string + default: bf16 + description: >- + (Optional) Data type for model parameters (bf16, fp16, fp32) + additionalProperties: false + required: + - n_epochs + - max_steps_per_epoch + - gradient_accumulation_steps + title: TrainingConfig + description: >- + Comprehensive configuration for the training process. + PreferenceOptimizeRequest: + type: object + properties: + job_uuid: + type: string + description: The UUID of the job to create. + finetuned_model: + type: string + description: The model to fine-tune. + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + description: The algorithm configuration. + training_config: + $ref: '#/components/schemas/TrainingConfig' + description: The training configuration. + hyperparam_search_config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The hyperparam search configuration. + logger_config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The logger configuration. + additionalProperties: false + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: PreferenceOptimizeRequest + PostTrainingJob: + type: object + properties: + job_uuid: + type: string + additionalProperties: false + required: + - job_uuid + title: PostTrainingJob + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + - $ref: '#/components/schemas/QATFinetuningConfig' + SpanEndPayload: + description: Payload for a span end event. + properties: + type: + const: span_end + default: span_end + title: Type + type: string + status: + $ref: '#/components/schemas/SpanStatus' + required: + - status + title: SpanEndPayload + type: object + SpanStartPayload: + description: Payload for a span start event. + properties: + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + title: Parent Span Id + nullable: true + required: + - name + title: SpanStartPayload + type: object + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: Value + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + - $ref: '#/components/schemas/SpanEndPayload' + title: Payload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + - type: 'null' + title: Attributes + type: + const: unstructured_log + default: unstructured_log + title: Type + type: string + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' + required: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent + type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + - $ref: '#/components/schemas/MetricEvent' + - $ref: '#/components/schemas/StructuredLogEvent' + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. + 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 + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. + properties: + created_at: + title: Created At + type: integer + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + - type: 'null' + 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: + anyOf: + - type: string + - type: 'null' + title: Previous Response Id + nullable: true + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + - type: 'null' + nullable: true + status: + title: Status + type: string + temperature: + anyOf: + - type: number + - type: 'null' + title: Temperature + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + title: Top P + nullable: true + tools: + anyOf: + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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 + - type: 'null' + title: Tools + nullable: true + truncation: + anyOf: + - type: string + - type: 'null' + title: Truncation + nullable: true + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: 'null' + nullable: true + instructions: + anyOf: + - type: string + - type: 'null' + title: Instructions + 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 + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. + 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 - SpanStartPayload: - description: Payload for a span start event. + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. properties: type: - const: span_start - default: span_start title: Type type: string - name: - title: Name + required: + - type + title: ResponseGuardrailSpec + type: object + ListBatchesResponse: + description: Response containing a list of batch objects. + properties: + object: + const: list + default: list + title: Object type: string - parent_span_id: + data: + description: List of batch objects + items: + $ref: '#/components/schemas/Batch' + title: Data + type: array + first_id: anyOf: - type: string - type: 'null' - title: Parent Span Id + description: ID of the first batch in the list + title: First Id + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + description: ID of the last batch in the list + title: Last Id nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean required: - - name - title: SpanStartPayload + - data + title: ListBatchesResponse type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - - $ref: '#/components/schemas/SpanEndPayload' - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. + MetricInResponse: + description: A metric value included in API responses. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - type: object - - type: 'null' - title: Attributes - type: - const: metric - default: metric - title: Type - type: string metric: title: Metric type: string @@ -13935,157 +19155,116 @@ components: - type: number title: Value unit: + anyOf: + - type: string + - type: 'null' title: Unit - type: string + nullable: true required: - - trace_id - - span_id - - timestamp - metric - value - - unit - title: MetricEvent + title: MetricInResponse type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. + PaginatedResponse: + description: A generic paginated response that follows a simple format. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' + data: + items: + additionalProperties: true type: object - - type: 'null' - title: Attributes - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - - $ref: '#/components/schemas/SpanEndPayload' - title: Payload - required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent - type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: + title: Data + type: array + has_more: + title: Has More + type: boolean + url: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - type: object + - type: string - type: 'null' - title: Attributes - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message - type: string - severity: - $ref: '#/components/schemas/LogSeverity' + title: Url + nullable: true required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent + - data + - has_more + title: PaginatedResponse type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - - $ref: '#/components/schemas/MetricEvent' - - $ref: '#/components/schemas/StructuredLogEvent' - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. + PostTrainingMetric: + description: Training metrics captured during post-training jobs. properties: - type: - title: Type - type: string + 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: - - type - title: ResponseGuardrailSpec - type: object - OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + type: object + Checkpoint: + description: Checkpoint created during training runs. properties: + identifier: + title: Identifier + type: string created_at: + format: date-time title: Created At + type: string + epoch: + title: Epoch type: integer - error: + post_training_job_id: + title: Post Training Job Id + type: string + path: + title: Path + type: string + training_metrics: anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' + - $ref: '#/components/schemas/PostTrainingMetric' - type: 'null' nullable: true - id: - title: Id - type: string - model: - title: Model - type: string - object: - const: response - default: response - title: Object + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + type: object + DialogType: + description: Parameter type for dialog data with semantic output labels. + properties: + type: + const: dialog + default: dialog + title: Type type: string - output: + title: DialogType + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. items: discriminator: 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' @@ -14096,241 +19275,373 @@ components: - $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' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: Output + maxItems: 20 + title: Items type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls + required: + - items + title: ConversationItemCreateRequest + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true + type: object + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage + type: object + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. + properties: + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + title: Data + type: array + has_more: + title: Has More type: boolean - previous_response_id: + 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 + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). + properties: + type: + const: bf16 + default: bf16 + title: Type + type: string + title: Bf16QuantizationConfig + type: object + LogProbConfig: + description: '' + properties: + top_k: + anyOf: + - type: integer + - type: 'null' + default: 0 + title: Top K + title: LogProbConfig + type: object + SystemMessageBehavior: + description: Config for how to override the default system prompt. + enum: + - append + - replace + title: SystemMessageBehavior + 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. + enum: + - auto + - required + - none + title: ToolChoice + type: string + ToolConfig: + description: Configuration for tool use. + properties: + tool_choice: anyOf: + - $ref: '#/components/schemas/ToolChoice' - type: string - type: 'null' - title: Previous Response Id - nullable: true - prompt: + default: auto + title: Tool Choice + tool_prompt_format: anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' + - $ref: '#/components/schemas/ToolPromptFormat' - type: 'null' nullable: true - status: - title: Status - type: string - temperature: + system_message_behavior: anyOf: - - type: number + - $ref: '#/components/schemas/SystemMessageBehavior' - type: 'null' - title: Temperature - nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: + default: append + title: ToolConfig + type: object + ToolPromptFormat: + description: Prompt format for calling custom / zero shot tools. + enum: + - json + - function_tag + - python_list + title: ToolPromptFormat + type: string + ChatCompletionRequest: + properties: + model: + title: Model + type: string + messages: + items: + discriminator: + mapping: + assistant: '#/components/schemas/CompletionMessage' + system: '#/components/schemas/SystemMessage' + tool: '#/components/schemas/ToolResponseMessage' + user: '#/components/schemas/UserMessage' + propertyName: role + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/SystemMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + - $ref: '#/components/schemas/CompletionMessage' + title: Messages + type: array + sampling_params: anyOf: - - type: number + - $ref: '#/components/schemas/SamplingParams' - type: 'null' - title: Top P - nullable: true tools: anyOf: - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' + $ref: '#/components/schemas/ToolDefinition' type: array - type: 'null' title: Tools - nullable: true - truncation: + tool_config: anyOf: - - type: string + - $ref: '#/components/schemas/ToolConfig' - type: 'null' - title: Truncation + response_format: + anyOf: + - discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + - type: 'null' + title: Response Format nullable: true - usage: + stream: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' + - type: boolean + - type: 'null' + default: false + title: Stream + logprobs: + anyOf: + - $ref: '#/components/schemas/LogProbConfig' - type: 'null' nullable: true - instructions: + required: + - model + - messages + title: ChatCompletionRequest + type: object + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object + required: + - logprobs_by_token + title: TokenLogProbs + type: object + ChatCompletionResponse: + description: Response from a chat completion request. + properties: + metrics: anyOf: - - type: string + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array - type: 'null' - title: Instructions + title: Metrics nullable: true - max_tool_calls: + completion_message: + $ref: '#/components/schemas/CompletionMessage' + logprobs: anyOf: - - type: integer + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array - type: 'null' - title: Max Tool Calls + title: Logprobs 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 + - completion_message + title: ChatCompletionResponse type: object - MetricInResponse: - description: A metric value included in API responses. + ChatCompletionResponseEventType: + description: Types of events that can occur during chat completion. + enum: + - start + - complete + - progress + title: ChatCompletionResponseEventType + type: string + ChatCompletionResponseEvent: + description: An event during chat completion generation. properties: - metric: - title: Metric - type: string - value: + event_type: + $ref: '#/components/schemas/ChatCompletionResponseEventType' + delta: + discriminator: + mapping: + image: '#/components/schemas/ImageDelta' + text: '#/components/schemas/TextDelta' + tool_call: '#/components/schemas/ToolCallDelta' + propertyName: type + oneOf: + - $ref: '#/components/schemas/TextDelta' + - $ref: '#/components/schemas/ImageDelta' + - $ref: '#/components/schemas/ToolCallDelta' + title: Delta + logprobs: anyOf: - - type: integer - - type: number - title: Value - unit: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true + stop_reason: anyOf: - - type: string + - $ref: '#/components/schemas/StopReason' - type: 'null' - title: Unit nullable: true required: - - metric - - value - title: MetricInResponse - type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. - properties: - type: - const: dialog - default: dialog - title: Type - type: string - title: DialogType + - event_type + - delta + title: ChatCompletionResponseEvent type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. + ChatCompletionResponseStreamChunk: + description: A chunk of a streamed chat completion response. properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. - items: - discriminator: - 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' - 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/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - maxItems: 20 - title: Items - type: array + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + event: + $ref: '#/components/schemas/ChatCompletionResponseEvent' required: - - items - title: ConversationItemCreateRequest + - event + title: ChatCompletionResponseStreamChunk type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. + CompletionResponse: + description: Response from a completion request. properties: - id: - description: unique identifier for this message - title: Id - type: string + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true content: - description: message content - items: - additionalProperties: true - type: object title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status - type: string - type: - const: message - default: message - title: Type - type: string - object: - const: message - default: message - title: Object type: string + stop_reason: + $ref: '#/components/schemas/StopReason' + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true required: - - id - content - - role - - status - title: ConversationMessage + - stop_reason + title: CompletionResponse type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). + CompletionResponseStreamChunk: + description: A chunk of a streamed completion response. properties: - type: - const: bf16 - default: bf16 - title: Type + metrics: + anyOf: + - items: + $ref: '#/components/schemas/MetricInResponse' + type: array + - type: 'null' + title: Metrics + nullable: true + delta: + title: Delta type: string - title: Bf16QuantizationConfig + stop_reason: + anyOf: + - $ref: '#/components/schemas/StopReason' + - type: 'null' + nullable: true + logprobs: + anyOf: + - items: + $ref: '#/components/schemas/TokenLogProbs' + type: array + - type: 'null' + title: Logprobs + nullable: true + required: + - delta + title: CompletionResponseStreamChunk type: object EmbeddingsResponse: description: Response containing generated embeddings. @@ -14356,21 +19667,107 @@ components: type: string title: Fp8QuantizationConfig type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. + properties: + type: + const: int4_mixed + default: int4_mixed + title: Type + type: string + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Scheme + title: Int4QuantizationConfig + type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + - type: 'null' + 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. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Content + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + title: Refusal + nullable: true + title: OpenAIChoiceLogprobs + type: object + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. properties: - type: - const: int4_mixed - default: int4_mixed - title: Type + data: + items: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - scheme: - anyOf: - - type: string - - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Scheme - title: Int4QuantizationConfig + 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 OpenAIChoiceDelta: description: A delta from an OpenAI-compatible chat completion streaming response. @@ -14409,27 +19806,6 @@ components: nullable: true title: OpenAIChoiceDelta type: object - OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. - properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - nullable: true - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - nullable: true - title: OpenAIChoiceLogprobs - type: object OpenAIChunkChoice: description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: @@ -14486,42 +19862,6 @@ components: - model title: OpenAIChatCompletionChunk type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - - type: 'null' - nullable: true - required: - - message - - finish_reason - - index - title: OpenAIChoice - type: object OpenAICompletionChoice: description: |- A choice from an OpenAI-compatible completion response. @@ -14596,29 +19936,17 @@ components: nullable: true title: OpenAICompletionLogprobs type: object - TokenLogProbs: - description: Log probabilities for generated tokens. - properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs - type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. + ToolResponse: + description: Response from a tool invocation. properties: - role: - const: tool - default: tool - title: Role - type: string call_id: title: Call Id type: string + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name content: anyOf: - type: string @@ -14641,84 +19969,127 @@ components: - $ref: '#/components/schemas/TextContentItem' type: array title: Content + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Metadata + nullable: true required: - call_id + - tool_name - content - title: ToolResponseMessage + title: ToolResponse type: object - UserMessage: - description: A message from the user in a chat conversation. + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - role: - const: user - default: user - title: Role + route: + title: Route type: string - content: + method: + title: Method + type: string + provider_types: + items: + type: string + title: Provider Types + type: array + required: + - route + - method + - provider_types + title: RouteInfo + type: object + ListRoutesResponse: + description: Response containing a list of all available API routes. + properties: + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array + required: + - data + title: ListRoutesResponse + type: object + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. + 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 + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. + properties: + job_uuid: + title: Job Uuid + type: string + log_lines: + items: + type: string + title: Log Lines + type: array + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream + type: object + PostTrainingJobStatusResponse: + description: Status of a finetuning job. + properties: + job_uuid: + title: Job Uuid + type: string + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - title: Content - context: + - format: date-time + type: string + - type: 'null' + title: Scheduled At + nullable: true + started_at: anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array + - format: date-time + type: string - type: 'null' - title: Context + title: Started At nullable: true - required: - - content - title: UserMessage - type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. - properties: - job_uuid: - title: Job Uuid - type: string - log_lines: - items: + completed_at: + anyOf: + - format: date-time type: string - title: Log Lines + - type: 'null' + title: Completed At + nullable: true + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: Resources Allocated + nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints type: array required: - job_uuid - - log_lines - title: PostTrainingJobLogStream + - status + title: PostTrainingJobStatusResponse type: object RLHFAlgorithm: description: Available reinforcement learning from human feedback algorithms. @@ -14758,11 +20129,15 @@ components: type: object required: <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 87bc7442f (chore: re-add missing endpoints) - job_uuid - training_config - hyperparam_search_config - logger_config title: SupervisedFineTuneRequest +<<<<<<< HEAD RegisterModelRequest: type: object properties: @@ -14909,6 +20284,8 @@ components: - toolgroup_id - provider_id title: RegisterToolGroupRequest +======= +>>>>>>> 87bc7442f (chore: re-add missing endpoints) DataSource: oneOf: - $ref: '#/components/schemas/URIDataSource' @@ -14919,6 +20296,7 @@ components: uri: '#/components/schemas/URIDataSource' rows: '#/components/schemas/RowsDataSource' RegisterDatasetRequest: +<<<<<<< HEAD ======= - job_uuid - finetuned_model @@ -14932,211 +20310,101 @@ components: - logger_config title: PostTrainingRLHFRequest >>>>>>> ceca36b91 (chore: regen scehma with main) +======= +>>>>>>> 87bc7442f (chore: re-add missing endpoints) type: object - ToolGroupInput: - description: Input data for registering a tool group. - properties: - toolgroup_id: - title: Toolgroup Id - type: string - provider_id: - title: Provider Id - type: string - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Args - nullable: true - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' - nullable: true - required: - - toolgroup_id - - provider_id - title: ToolGroupInput - type: object - Chunk: - description: A chunk of content that can be inserted into a vector database. properties: - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - title: Content - chunk_id: - title: Chunk Id + purpose: type: string + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + description: >- + 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" } + source: + $ref: '#/components/schemas/DataSource' + description: >- + 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!"}, ] + } ] } metadata: - additionalProperties: true - title: Metadata type: object - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - title: Embedding - nullable: true - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - - type: 'null' - nullable: true + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The metadata for the dataset. - E.g. {"description": "My dataset"}. + dataset_id: + type: string + description: >- + The ID of the dataset. If not provided, an ID will be generated. + additionalProperties: false required: - - content - - chunk_id - title: Chunk + - purpose + - source + title: RegisterDatasetRequest + RegisterBenchmarkRequest: type: object - VectorStoreCreateRequest: - description: Request to create a vector store. properties: - name: - anyOf: - - type: string - - type: 'null' - title: Name - nullable: true - file_ids: + benchmark_id: + type: string + description: The ID of the benchmark to register. + dataset_id: + type: string + description: >- + The ID of the dataset to use for the benchmark. + scoring_functions: + type: array items: type: string - title: File Ids - type: array - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Expires After - nullable: true - chunking_strategy: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Chunking Strategy - nullable: true + description: >- + The scoring functions to use for the benchmark. + provider_benchmark_id: + type: string + description: >- + The ID of the provider benchmark to use for the benchmark. + provider_id: + type: string + description: >- + The ID of the provider to use for the benchmark. metadata: - additionalProperties: true - title: Metadata type: object - title: VectorStoreCreateRequest - type: object - VectorStoreModifyRequest: - description: Request to modify a vector store. - properties: - name: - anyOf: - - type: string - - type: 'null' - title: Name - nullable: true - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Expires After - nullable: true - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata - nullable: true - title: VectorStoreModifyRequest - type: object - VectorStoreSearchRequest: - description: Request to search a vector store. - properties: - query: - anyOf: - - type: string - - items: - type: string - type: array - title: Query - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Filters - nullable: true - max_num_results: - default: 10 - title: Max Num Results - type: integer - ranking_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Ranking Options - nullable: true - rewrite_query: - default: false - title: Rewrite Query - type: boolean - required: - - query - title: VectorStoreSearchRequest - type: object - _safety_run_shield_Request: - properties: - shield_id: - title: Shield Id - type: string - 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 + additionalProperties: oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam' - - $ref: '#/components/schemas/OpenAISystemMessageParam' - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - - $ref: '#/components/schemas/OpenAIToolMessageParam' - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: Messages - type: array - params: - additionalProperties: true - title: Params - type: object + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The metadata to use for the benchmark. + additionalProperties: false required: - - shield_id - - messages - - params - title: _safety_run_shield_Request - type: object + - benchmark_id + - dataset_id + - scoring_functions + title: RegisterBenchmarkRequest 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 72475b8bd5..fdbc2c6f48 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -1469,64 +1469,6 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' /v1/responses: - post: - tags: - - Agents - summary: Create Openai Response - description: Create a model response. - operationId: create_openai_response_v1_responses_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/_responses_Request' - x-llama-stack-extra-body-params: - guardrails: - $defs: - ResponseGuardrailSpec: - description: |- - Specification for a guardrail to apply during response generation. - - :param type: The type/identifier of the guardrail. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - type: object - anyOf: - - items: - anyOf: - - type: string - - $ref: '#/components/schemas/ResponseGuardrailSpec' - type: array - - type: 'null' - description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. - responses: - '200': - description: An OpenAIResponseObject. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseObject' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIResponseObjectStream' - '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: - Agents @@ -1587,6 +1529,64 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + post: + tags: + - Agents + summary: Create Openai Response + description: Create a model response. + operationId: create_openai_response_v1_responses_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_responses_Request' + x-llama-stack-extra-body-params: + guardrails: + $defs: + ResponseGuardrailSpec: + description: |- + Specification for a guardrail to apply during response generation. + + :param type: The type/identifier of the guardrail. + properties: + type: + title: Type + type: string + required: + - type + title: ResponseGuardrailSpec + type: object + anyOf: + - items: + anyOf: + - type: string + - $ref: '#/components/schemas/ResponseGuardrailSpec' + type: array + - type: 'null' + description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. + responses: + '200': + description: An OpenAIResponseObject. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseObject' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIResponseObjectStream' + '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}: get: tags: @@ -2335,44 +2335,6 @@ paths: $ref: '#/components/responses/DefaultError' description: Default Response /v1/vector_stores/{vector_store_id}/files: - post: - tags: - - Vector Io - summary: Openai Attach File To Vector Store - description: Attach a file to a vector store. - 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' get: tags: - Vector Io @@ -2454,6 +2416,44 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + post: + tags: + - Vector Io + summary: Openai Attach File To Vector Store + description: Attach a file to a vector store. + 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}/file_batches/{batch_id}/cancel: post: tags: @@ -2494,40 +2494,6 @@ paths: type: string description: 'Path parameter: batch_id' /v1/vector_stores: - post: - tags: - - Vector Io - summary: Openai Create Vector Store - description: |- - Creates a vector store. - - Generate an OpenAI-compatible vector store with the given parameters. - 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 get: tags: - Vector Io @@ -2588,6 +2554,40 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + post: + tags: + - Vector Io + summary: Openai Create Vector Store + description: |- + Creates a vector store. + + Generate an OpenAI-compatible vector store with the given parameters. + 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}/file_batches: post: tags: @@ -4708,40 +4708,6 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' /v1/prompts/{prompt_id}: - delete: - tags: - - Prompts - summary: Delete Prompt - description: |- - Delete prompt. - - Delete a prompt. - operationId: delete_prompt_v1_prompts__prompt_id__delete - 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 - parameters: - - name: prompt_id - in: path - required: true - schema: - type: string - description: 'Path parameter: prompt_id' get: tags: - Prompts @@ -4826,6 +4792,40 @@ paths: schema: type: string description: 'Path parameter: prompt_id' + delete: + tags: + - Prompts + summary: Delete Prompt + description: |- + Delete prompt. + + Delete a prompt. + operationId: delete_prompt_v1_prompts__prompt_id__delete + 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 + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' /v1/prompts/{prompt_id}/versions: get: tags: @@ -4905,47 +4905,6 @@ paths: type: string description: 'Path parameter: prompt_id' /v1/conversations/{conversation_id}/items: - post: - tags: - - Conversations - summary: Add Items - description: |- - Create items. - - Create items in the conversation. - 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' get: tags: - Conversations @@ -5018,6 +4977,47 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + post: + tags: + - Conversations + summary: Add Items + description: |- + Create items. + + Create items in the conversation. + 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: post: tags: diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index 688360a0a9..3f573f1ccf 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -1647,19 +1647,30 @@ def _filter_combined_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: # 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: + if not isinstance(path_item, dict): continue - # Include stable v1 paths - if _is_stable_path(path): - filtered_paths[path] = path_item - # Include experimental paths (v1alpha or v1beta) - elif _is_experimental_path(path): - filtered_paths[path] = path_item + # Filter at operation level, not path level + # This allows paths with both deprecated and non-deprecated operations + filtered_path_item = {} + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + if method not in path_item: + continue + operation = path_item[method] + if not isinstance(operation, dict): + continue + + # Skip deprecated operations + if operation.get("deprecated", False): + continue + + filtered_path_item[method] = operation + + # Only include path if it has at least one operation after filtering + if filtered_path_item: + # Check if path matches version filter (stable or experimental) + if _is_stable_path(path) or _is_experimental_path(path): + filtered_paths[path] = filtered_path_item filtered_schema["paths"] = filtered_paths From 500804f0ebfd88b51171876715d26be3bc921c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 12 Nov 2025 14:48:34 +0100 Subject: [PATCH 13/46] chore: add deprecated to combined schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The _filter_combined_schema function was excluding deprecated operations. I updated it to include all operations (deprecated and non-deprecated) for the combined/stainless spec, so these deprecated endpoints are now included. Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 32 +++++++++++++++++++++ docs/static/stainless-llama-stack-spec.yaml | 32 +++++++++++++++++++++ scripts/fastapi_generator.py | 15 ++++------ 3 files changed, 70 insertions(+), 9 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index 55b5a2b8f0..ef70cdbce1 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -3460,6 +3460,38 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Shields + summary: Register Shield + description: Register a shield. + 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' + deprecated: true /v1beta/datasetio/append-rows/{dataset_id}: post: tags: diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index fdbc2c6f48..9851d15db9 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -3446,6 +3446,38 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Shields + summary: Register Shield + description: Register a shield. + 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' + deprecated: true /v1beta/datasetio/append-rows/{dataset_id}: post: tags: diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index 3f573f1ccf..1561e9b35c 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -1637,21 +1637,21 @@ def _filter_deprecated_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: 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. + Includes 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 + # Filter paths to include stable (v1) and experimental (v1alpha, v1beta), including deprecated filtered_paths = {} for path, path_item in filtered_schema["paths"].items(): if not isinstance(path_item, dict): continue - # Filter at operation level, not path level - # This allows paths with both deprecated and non-deprecated operations + # Include all operations (both deprecated and non-deprecated) for the combined spec + # Filter at operation level to preserve the structure filtered_path_item = {} for method in ["get", "post", "put", "delete", "patch", "head", "options"]: if method not in path_item: @@ -1660,13 +1660,10 @@ def _filter_combined_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: if not isinstance(operation, dict): continue - # Skip deprecated operations - if operation.get("deprecated", False): - continue - + # Include all operations, including deprecated ones filtered_path_item[method] = operation - # Only include path if it has at least one operation after filtering + # Only include path if it has at least one operation if filtered_path_item: # Check if path matches version filter (stable or experimental) if _is_stable_path(path) or _is_experimental_path(path): From 221f28b6857a0e23b908524193bf64f24fc2cd33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 12 Nov 2025 15:20:58 +0100 Subject: [PATCH 14/46] chore: fix missing titles for unions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added _add_titles_to_unions() to: Recursively scan all schemas for anyOf/oneOf unions Generate descriptive titles from the union members Add those titles to help code generators infer names Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 881 ++++++++----- docs/static/deprecated-llama-stack-spec.yaml | 1124 +++++++++++------ .../static/experimental-llama-stack-spec.yaml | 911 ++++++++----- docs/static/llama-stack-spec.yaml | 1032 ++++++++++----- docs/static/stainless-llama-stack-spec.yaml | 990 ++++++++++----- scripts/fastapi_generator.py | 129 +- 6 files changed, 3404 insertions(+), 1663 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index ef70cdbce1..eaf3ed1632 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -5314,7 +5314,6 @@ components: type: string type: array - type: 'null' - title: Tool Names type: object title: AllowedToolsFilter description: Filter configuration for restricting which MCP tools can be used. @@ -5381,76 +5380,70 @@ components: anyOf: - type: integer - type: 'null' - title: Cancelled At cancelling_at: anyOf: - type: integer - type: 'null' - title: Cancelling At completed_at: anyOf: - type: integer - type: 'null' - title: Completed At error_file_id: anyOf: - type: string - type: 'null' - title: Error File Id errors: anyOf: - $ref: '#/components/schemas/Errors' + title: Errors - type: 'null' + title: Errors expired_at: anyOf: - type: integer - type: 'null' - title: Expired At expires_at: anyOf: - type: integer - type: 'null' - title: Expires At failed_at: anyOf: - type: integer - type: 'null' - title: Failed At finalizing_at: anyOf: - type: integer - type: 'null' - title: Finalizing At in_progress_at: anyOf: - type: integer - type: 'null' - title: In Progress At metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - title: Metadata model: anyOf: - type: string - type: 'null' - title: Model output_file_id: anyOf: - type: string - type: 'null' - title: Output File Id request_counts: anyOf: - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts - type: 'null' + title: BatchRequestCounts usage: anyOf: - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage - type: 'null' + title: BatchUsage additionalProperties: true type: object required: @@ -5468,22 +5461,18 @@ components: anyOf: - type: string - type: 'null' - title: Code line: anyOf: - type: integer - type: 'null' - title: Line message: anyOf: - type: string - type: 'null' - title: Message param: anyOf: - type: string - type: 'null' - title: Param additionalProperties: true type: object title: BatchError @@ -5539,7 +5528,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -5579,14 +5567,18 @@ components: additionalProperties: oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams type: object title: Scoring Params description: Map between scoring function id and parameters for each scoring function you want to run @@ -5594,7 +5586,6 @@ components: 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: object required: @@ -5612,7 +5603,9 @@ components: expires_after: anyOf: - $ref: '#/components/schemas/ExpiresAfter' + title: ExpiresAfter - type: 'null' + title: ExpiresAfter type: object required: - file @@ -5630,7 +5623,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Metadata type: object required: - scoring_functions @@ -5640,27 +5632,40 @@ components: return_type: anyOf: - $ref: '#/components/schemas/StringType' + title: StringType - $ref: '#/components/schemas/NumberType' + title: NumberType - $ref: '#/components/schemas/BooleanType' + title: BooleanType - $ref: '#/components/schemas/ArrayType' + title: ArrayType - $ref: '#/components/schemas/ObjectType' + title: ObjectType - $ref: '#/components/schemas/JsonType' + title: JsonType - $ref: '#/components/schemas/UnionType' + title: UnionType - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType - $ref: '#/components/schemas/CompletionInputType' - title: Return Type + title: CompletionInputType + title: StringType | ... (9 variants) params: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' title: Params type: object @@ -5672,13 +5677,14 @@ components: mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' + title: URL args: anyOf: - additionalProperties: true type: object - type: 'null' - title: Args type: object title: Body_register_tool_group_v1_toolgroups_post BooleanType: @@ -5708,23 +5714,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: Content + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] chunk_id: type: string title: Chunk Id @@ -5738,11 +5751,12 @@ components: type: number type: array - type: 'null' - title: Embedding chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' + title: ChunkMetadata type: object required: - content @@ -5756,23 +5770,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array - title: Content + title: list[ImageContentItem-Output | TextContentItem] + title: string | list[ImageContentItem-Output | TextContentItem] chunk_id: type: string title: Chunk Id @@ -5786,11 +5807,12 @@ components: type: number type: array - type: 'null' - title: Embedding chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' + title: ChunkMetadata type: object required: - content @@ -5803,57 +5825,46 @@ components: 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 type: object title: ChunkMetadata description: |- @@ -5893,7 +5904,6 @@ components: type: string type: object - type: 'null' - 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. items: anyOf: @@ -5902,7 +5912,6 @@ components: type: object type: array - type: 'null' - title: Items description: Initial items to include in the conversation context. You may add up to 20 items at a time. type: object required: @@ -5975,14 +5984,23 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools discriminator: propertyName: type mapping: @@ -5995,6 +6013,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (9 variants) type: array title: Data description: List of conversation items @@ -6002,13 +6021,11 @@ components: anyOf: - type: string - type: 'null' - title: First Id description: The ID of the first item in the list last_id: anyOf: - type: string - type: 'null' - title: Last Id description: The ID of the last item in the list has_more: type: boolean @@ -6058,18 +6075,15 @@ components: anyOf: - type: string - type: 'null' - title: Validation Dataset Id packed: anyOf: - type: boolean - type: 'null' - title: Packed default: false train_on_input: anyOf: - type: boolean - type: 'null' - title: Train On Input default: false type: object required: @@ -6089,7 +6103,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -6105,8 +6118,10 @@ components: source: oneOf: - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource - $ref: '#/components/schemas/RowsDataSource' - title: Source + title: RowsDataSource + title: URIDataSource | RowsDataSource discriminator: propertyName: type mapping: @@ -6146,25 +6161,21 @@ components: anyOf: - type: boolean - type: 'null' - title: Enable Activation Checkpointing default: false enable_activation_offloading: anyOf: - type: boolean - type: 'null' - title: Enable Activation Offloading default: false memory_efficient_fsdp_wrap: anyOf: - type: boolean - type: 'null' - title: Memory Efficient Fsdp Wrap default: false fsdp_cpu_offload: anyOf: - type: boolean - type: 'null' - title: Fsdp Cpu Offload default: false type: object title: EfficiencyConfig @@ -6177,12 +6188,10 @@ components: $ref: '#/components/schemas/BatchError' type: array - type: 'null' - title: Data object: anyOf: - type: string - type: 'null' - title: Object additionalProperties: true type: object title: Errors @@ -6338,7 +6347,6 @@ components: anyOf: - type: string - type: 'null' - title: Prompt Template judge_score_regexes: items: type: string @@ -6476,13 +6484,11 @@ components: anyOf: - type: boolean - type: 'null' - title: Use Dora default: false quantize_base: anyOf: - type: boolean - type: 'null' - title: Quantize Base default: false type: object required: @@ -6506,7 +6512,6 @@ components: anyOf: - type: string - type: 'null' - title: Description type: object required: - input_schema @@ -6523,7 +6528,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -6563,7 +6567,9 @@ components: system_message: anyOf: - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage - type: 'null' + title: SystemMessage type: object required: - model @@ -6609,7 +6615,6 @@ components: type: boolean type: object - type: 'null' - title: Categories category_applied_input_types: anyOf: - additionalProperties: @@ -6618,19 +6623,16 @@ components: type: array type: object - type: 'null' - title: Category Applied Input Types category_scores: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Category Scores user_message: anyOf: - type: string - type: 'null' - title: User Message metadata: additionalProperties: true type: object @@ -6673,20 +6675,19 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name tool_calls: anyOf: - items: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls type: object title: OpenAIAssistantMessageParam description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. @@ -6703,20 +6704,19 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name tool_calls: anyOf: - items: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls type: object title: OpenAIAssistantMessageParam description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. @@ -6744,7 +6744,9 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' + title: OpenAIChatCompletionUsage type: object required: - id @@ -6791,10 +6793,15 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam discriminator: propertyName: role mapping: @@ -6803,6 +6810,7 @@ components: system: '#/components/schemas/OpenAISystemMessageParam' tool: '#/components/schemas/OpenAIToolMessageParam' user: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input | ... (5 variants) type: array minItems: 1 title: Messages @@ -6810,14 +6818,13 @@ components: anyOf: - type: number - type: 'null' - title: Frequency Penalty function_call: anyOf: - type: string - additionalProperties: true type: object - type: 'null' - title: Function Call + title: string | object functions: anyOf: - items: @@ -6825,94 +6832,87 @@ components: type: object type: array - type: 'null' - title: Functions logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Logit Bias logprobs: anyOf: - type: boolean - type: 'null' - title: Logprobs max_completion_tokens: anyOf: - type: integer - type: 'null' - title: Max Completion Tokens max_tokens: anyOf: - type: integer - type: 'null' - title: Max Tokens n: anyOf: - type: integer - type: 'null' - title: N parallel_tool_calls: anyOf: - type: boolean - type: 'null' - title: Parallel Tool Calls presence_penalty: anyOf: - type: number - type: 'null' - title: Presence Penalty response_format: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject discriminator: propertyName: type mapping: json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' text: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - type: 'null' title: Response Format seed: anyOf: - type: integer - type: 'null' - title: Seed stop: anyOf: - type: string - items: type: string type: array + title: list[string] - type: 'null' - title: Stop + title: string | list[string] stream: anyOf: - type: boolean - type: 'null' - title: Stream stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - title: Stream Options temperature: anyOf: - type: number - type: 'null' - title: Temperature tool_choice: anyOf: - type: string - additionalProperties: true type: object - type: 'null' - title: Tool Choice + title: string | object tools: anyOf: - items: @@ -6920,22 +6920,18 @@ components: type: object type: array - type: 'null' - title: Tools top_logprobs: anyOf: - type: integer - type: 'null' - title: Top Logprobs top_p: anyOf: - type: number - type: 'null' - title: Top P user: anyOf: - type: string - type: 'null' - title: User additionalProperties: true type: object required: @@ -6949,12 +6945,10 @@ components: anyOf: - type: integer - type: 'null' - title: Index id: anyOf: - type: string - type: 'null' - title: Id type: type: string const: function @@ -6963,7 +6957,9 @@ components: function: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction - type: 'null' + title: OpenAIChatCompletionToolCallFunction type: object title: OpenAIChatCompletionToolCall description: Tool call specification for OpenAI-compatible chat completion responses. @@ -6973,12 +6969,10 @@ components: anyOf: - type: string - type: 'null' - title: Name arguments: anyOf: - type: string - type: 'null' - title: Arguments type: object title: OpenAIChatCompletionToolCallFunction description: Function call details for OpenAI-compatible tool calls. @@ -6996,11 +6990,15 @@ components: prompt_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' + title: OpenAIChatCompletionUsagePromptTokensDetails completion_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' + title: OpenAIChatCompletionUsageCompletionTokensDetails type: object required: - prompt_tokens @@ -7014,7 +7012,6 @@ components: anyOf: - type: integer - type: 'null' - title: Reasoning Tokens type: object title: OpenAIChatCompletionUsageCompletionTokensDetails description: Token details for output tokens in OpenAI chat completion usage. @@ -7024,7 +7021,6 @@ components: anyOf: - type: integer - type: 'null' - title: Cached Tokens type: object title: OpenAIChatCompletionUsagePromptTokensDetails description: Token details for prompt tokens in OpenAI chat completion usage. @@ -7033,11 +7029,16 @@ components: message: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: Message + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam-Output | ... (5 variants) discriminator: propertyName: role mapping: @@ -7055,7 +7056,9 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + title: OpenAIChoiceLogprobs-Output - type: 'null' + title: OpenAIChoiceLogprobs-Output type: object required: - message @@ -7071,14 +7074,12 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Content refusal: anyOf: - items: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Refusal type: object title: OpenAIChoiceLogprobs description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. @@ -7132,7 +7133,9 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + title: OpenAIChoiceLogprobs-Output - type: 'null' + title: OpenAIChoiceLogprobs-Output type: object required: - finish_reason @@ -7157,101 +7160,90 @@ components: - items: type: string type: array + title: list[string] - items: type: integer type: array + title: list[integer] - items: items: type: integer type: array type: array - title: Prompt + title: list[array] + title: string | ... (4 variants) best_of: anyOf: - type: integer - type: 'null' - title: Best Of echo: anyOf: - type: boolean - type: 'null' - title: Echo frequency_penalty: anyOf: - type: number - type: 'null' - title: Frequency Penalty logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Logit Bias logprobs: anyOf: - type: boolean - type: 'null' - title: Logprobs max_tokens: anyOf: - type: integer - type: 'null' - title: Max Tokens n: anyOf: - type: integer - type: 'null' - title: N presence_penalty: anyOf: - type: number - type: 'null' - title: Presence Penalty seed: anyOf: - type: integer - type: 'null' - title: Seed stop: anyOf: - type: string - items: type: string type: array + title: list[string] - type: 'null' - title: Stop + title: string | list[string] stream: anyOf: - type: boolean - type: 'null' - title: Stream stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - title: Stream Options temperature: anyOf: - type: number - type: 'null' - title: Temperature top_p: anyOf: - type: number - type: 'null' - title: Top P user: anyOf: - type: string - type: 'null' - title: User suffix: anyOf: - type: string - type: 'null' - title: Suffix additionalProperties: true type: object required: @@ -7283,15 +7275,22 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' + title: OpenAIChatCompletionUsage input_messages: items: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam discriminator: propertyName: role mapping: @@ -7300,6 +7299,7 @@ components: system: '#/components/schemas/OpenAISystemMessageParam' tool: '#/components/schemas/OpenAIToolMessageParam' user: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output | ... (5 variants) type: array title: Input Messages type: object @@ -7322,17 +7322,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Attributes chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy additionalProperties: true @@ -7347,30 +7349,30 @@ components: anyOf: - type: string - type: 'null' - title: Name file_ids: anyOf: - items: type: string type: array - type: 'null' - title: File Ids expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - title: Expires After chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy metadata: @@ -7378,7 +7380,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Metadata additionalProperties: true type: object title: OpenAICreateVectorStoreRequestWithExtraBody @@ -7415,12 +7416,12 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -7438,8 +7439,9 @@ components: - items: type: number type: array + title: list[number] - type: string - title: Embedding + title: list[number] | string index: type: integer title: Index @@ -7474,23 +7476,21 @@ components: - items: type: string type: array - title: Input + title: list[string] + title: string | list[string] encoding_format: anyOf: - type: string - type: 'null' - title: Encoding Format default: float dimensions: anyOf: - type: integer - type: 'null' - title: Dimensions user: anyOf: - type: string - type: 'null' - title: User additionalProperties: true type: object required: @@ -7560,17 +7560,14 @@ components: 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 type: object title: OpenAIFileFile OpenAIFileObject: @@ -7623,7 +7620,6 @@ components: anyOf: - type: string - type: 'null' - title: Detail type: object required: - url @@ -7638,18 +7634,15 @@ components: anyOf: - type: string - type: 'null' - title: Description strict: anyOf: - type: boolean - type: 'null' - title: Strict schema: anyOf: - additionalProperties: true type: object - type: 'null' - title: Schema type: object title: OpenAIJSONSchema description: JSON schema specification for OpenAI-compatible structured response format. @@ -7685,7 +7678,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Custom Metadata type: object required: - id @@ -7878,12 +7870,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - call_id @@ -7901,22 +7891,18 @@ components: anyOf: - type: string - type: 'null' - title: File Data file_id: anyOf: - type: string - type: 'null' - title: File Id file_url: anyOf: - type: string - type: 'null' - title: File Url filename: anyOf: - type: string - type: 'null' - title: Filename type: object title: OpenAIResponseInputMessageContentFile description: File content for input messages in OpenAI response format. @@ -7930,7 +7916,7 @@ components: const: high - type: string const: auto - title: Detail + title: string default: auto type: type: string @@ -7941,12 +7927,10 @@ components: anyOf: - type: string - type: 'null' - title: File Id image_url: anyOf: - type: string - type: 'null' - title: Image Url type: object title: OpenAIResponseInputMessageContentImage description: Image content for input messages in OpenAI response format. @@ -7982,19 +7966,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Filters max_num_results: anyOf: - type: integer maximum: 50.0 minimum: 1.0 - type: 'null' - title: Max Num Results default: 10 ranking_options: anyOf: - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions - type: 'null' + title: SearchRankingOptions type: object required: - vector_store_ids @@ -8014,18 +7998,15 @@ components: 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 type: object required: - name @@ -8044,14 +8025,13 @@ components: const: web_search_preview_2025_03_11 - type: string const: web_search_2025_08_26 - title: Type + title: string default: web_search search_context_size: anyOf: - type: string pattern: ^low|medium|high$ - type: 'null' - title: Search Context Size default: medium type: object title: OpenAIResponseInputToolWebSearch @@ -8100,12 +8080,10 @@ components: anyOf: - type: string - type: 'null' - title: Id reason: anyOf: - type: string - type: 'null' - title: Reason type: object required: - approval_request_id @@ -8120,26 +8098,35 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal discriminator: propertyName: type mapping: output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - type: string @@ -8150,7 +8137,7 @@ components: const: user - type: string const: assistant - title: Role + title: string type: type: string const: message @@ -8160,12 +8147,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - content @@ -8184,26 +8169,35 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal discriminator: propertyName: type mapping: output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - type: string @@ -8214,7 +8208,7 @@ components: const: user - type: string const: assistant - title: Role + title: string type: type: string const: message @@ -8224,12 +8218,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - content @@ -8248,7 +8240,9 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' + title: OpenAIResponseError id: type: string title: Id @@ -8264,12 +8258,19 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -8280,6 +8281,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array title: Output parallel_tool_calls: @@ -8290,11 +8292,12 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + title: OpenAIResponsePrompt status: type: string title: Status @@ -8302,7 +8305,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -8312,15 +8314,18 @@ components: anyOf: - type: number - type: 'null' - title: Top P tools: anyOf: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP discriminator: propertyName: type mapping: @@ -8331,18 +8336,19 @@ components: web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools truncation: anyOf: - type: string - type: 'null' - title: Truncation usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' + title: OpenAIResponseUsage instructions: anyOf: - type: string @@ -8371,9 +8377,13 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath discriminator: propertyName: type mapping: @@ -8381,6 +8391,7 @@ components: file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) type: array title: Annotations type: object @@ -8411,7 +8422,6 @@ components: $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' - title: Results type: object required: - id @@ -8466,12 +8476,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - call_id @@ -8502,12 +8510,10 @@ components: anyOf: - type: string - type: 'null' - title: Error output: anyOf: - type: string - type: 'null' - title: Output type: object required: - id @@ -8570,22 +8576,24 @@ components: - additionalProperties: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: object - type: 'null' - title: Variables version: anyOf: - type: string - type: 'null' - title: Version type: object required: - id @@ -8596,7 +8604,9 @@ components: format: anyOf: - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat - type: 'null' + title: OpenAIResponseTextFormat type: object title: OpenAIResponseText description: Text response configuration for OpenAI responses. @@ -8610,28 +8620,24 @@ components: const: json_schema - type: string const: json_object - title: Type + title: string 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 type: object title: OpenAIResponseTextFormat description: Configuration for Responses API text format. @@ -8650,9 +8656,11 @@ components: - items: type: string type: array + title: list[string] - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - title: Allowed Tools + title: list[string] | AllowedToolsFilter type: object required: - server_label @@ -8672,11 +8680,15 @@ components: input_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails - type: 'null' + title: OpenAIResponseUsageInputTokensDetails output_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails - type: 'null' + title: OpenAIResponseUsageOutputTokensDetails type: object required: - input_tokens @@ -8690,7 +8702,6 @@ components: anyOf: - type: integer - type: 'null' - title: Cached Tokens type: object title: OpenAIResponseUsageInputTokensDetails description: Token details for input tokens in OpenAI response usage. @@ -8700,7 +8711,6 @@ components: anyOf: - type: integer - type: 'null' - title: Reasoning Tokens type: object title: OpenAIResponseUsageOutputTokensDetails description: Token details for output tokens in OpenAI response usage. @@ -8717,12 +8727,12 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -8739,7 +8749,6 @@ components: type: integer type: array - type: 'null' - title: Bytes logprob: type: number title: Logprob @@ -8777,7 +8786,8 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] type: object required: - tool_call_id @@ -8795,7 +8805,6 @@ components: type: integer type: array - type: 'null' - title: Bytes logprob: type: number title: Logprob @@ -8823,21 +8832,25 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile discriminator: propertyName: type mapping: file: '#/components/schemas/OpenAIFile' image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -8856,21 +8869,25 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile discriminator: propertyName: type mapping: file: '#/components/schemas/OpenAIFile' image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -8937,7 +8954,6 @@ components: anyOf: - type: string - type: 'null' - title: Prompt description: The system prompt with variable placeholders version: type: integer @@ -9101,7 +9117,9 @@ components: violation: anyOf: - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation - type: 'null' + title: SafetyViolation type: object title: RunShieldResponse description: Response from running a safety shield. @@ -9113,7 +9131,6 @@ components: anyOf: - type: string - type: 'null' - title: User Message metadata: additionalProperties: true type: object @@ -9128,9 +9145,12 @@ components: strategy: oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy - $ref: '#/components/schemas/TopKSamplingStrategy' - title: Strategy + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy discriminator: propertyName: type mapping: @@ -9141,12 +9161,10 @@ components: anyOf: - type: integer - type: 'null' - title: Max Tokens repetition_penalty: anyOf: - type: number - type: 'null' - title: Repetition Penalty default: 1.0 stop: anyOf: @@ -9154,7 +9172,6 @@ components: type: string type: array - type: 'null' - title: Stop type: object title: SamplingParams description: Sampling parameters. @@ -9164,7 +9181,6 @@ components: anyOf: - type: string - type: 'null' - title: Dataset Id results: additionalProperties: $ref: '#/components/schemas/ScoringResult' @@ -9197,7 +9213,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -9212,7 +9227,6 @@ components: anyOf: - type: string - type: 'null' - title: Description metadata: additionalProperties: true type: object @@ -9221,15 +9235,24 @@ components: return_type: oneOf: - $ref: '#/components/schemas/StringType' + title: StringType - $ref: '#/components/schemas/NumberType' + title: NumberType - $ref: '#/components/schemas/BooleanType' + title: BooleanType - $ref: '#/components/schemas/ArrayType' + title: ArrayType - $ref: '#/components/schemas/ObjectType' + title: ObjectType - $ref: '#/components/schemas/JsonType' + title: JsonType - $ref: '#/components/schemas/UnionType' + title: UnionType - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType - $ref: '#/components/schemas/CompletionInputType' - title: Return Type + title: CompletionInputType + title: StringType | ... (9 variants) description: The return type of the deterministic function discriminator: propertyName: type @@ -9247,14 +9270,18 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' title: Params description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval @@ -9289,12 +9316,10 @@ components: anyOf: - type: string - type: 'null' - title: Ranker score_threshold: anyOf: - type: number - type: 'null' - title: Score Threshold default: 0.0 type: object title: SearchRankingOptions @@ -9309,7 +9334,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -9325,7 +9349,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Params type: object required: - identifier @@ -9354,23 +9377,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: Content + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] type: object required: - content @@ -9397,7 +9427,6 @@ components: anyOf: - type: string - type: 'null' - title: Toolgroup Id name: type: string title: Name @@ -9405,25 +9434,21 @@ components: 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 type: object required: - name @@ -9439,7 +9464,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -9453,13 +9477,14 @@ components: mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' + title: URL args: anyOf: - additionalProperties: true type: object - type: 'null' - title: Args type: object required: - identifier @@ -9473,40 +9498,44 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array + title: list[ImageContentItem-Output | TextContentItem] - type: 'null' - title: Content + title: string | list[ImageContentItem-Output | TextContentItem] error_message: anyOf: - type: string - type: 'null' - title: Error Message error_code: anyOf: - type: integer - type: 'null' - title: Error Code metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata type: object title: ToolInvocationResult description: Result of a tool invocation. @@ -9538,12 +9567,10 @@ components: - type: number minimum: 0.0 - type: 'null' - title: Temperature top_p: anyOf: - type: number - type: 'null' - title: Top P default: 0.95 type: object required: @@ -9567,25 +9594,29 @@ components: anyOf: - type: integer - type: 'null' - title: Max Validation Steps default: 1 data_config: anyOf: - $ref: '#/components/schemas/DataConfig' + title: DataConfig - type: 'null' + title: DataConfig optimizer_config: anyOf: - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig - type: 'null' + title: OptimizerConfig efficiency_config: anyOf: - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig - type: 'null' + title: EfficiencyConfig dtype: anyOf: - type: string - type: 'null' - title: Dtype default: bf16 type: object required: @@ -9724,7 +9755,7 @@ components: const: cancelled - type: string const: failed - title: Status + title: string file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' type: object @@ -9813,7 +9844,7 @@ components: const: server_error - type: string const: rate_limit_exceeded - title: Code + title: string message: type: string title: Message @@ -9839,8 +9870,10 @@ components: chunking_strategy: oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: Chunking Strategy + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: @@ -9852,7 +9885,9 @@ components: last_error: anyOf: - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' + title: VectorStoreFileLastError status: anyOf: - type: string @@ -9863,7 +9898,7 @@ components: const: cancelled - type: string const: failed - title: Status + title: string usage_bytes: type: integer title: Usage Bytes @@ -9896,7 +9931,6 @@ components: anyOf: - type: string - type: 'null' - title: Name usage_bytes: type: integer title: Usage Bytes @@ -9912,17 +9946,14 @@ components: - 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 type: object @@ -9952,9 +9983,9 @@ components: - type: string - type: number - type: boolean + title: string | number | boolean type: object - type: 'null' - title: Attributes content: items: $ref: '#/components/schemas/VectorStoreContent' @@ -9992,7 +10023,6 @@ components: anyOf: - type: string - type: 'null' - title: Next Page type: object required: - search_query @@ -10022,13 +10052,14 @@ components: url: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' + title: URL data: anyOf: - type: string - type: 'null' contentEncoding: base64 - title: Data type: object title: _URLOrData description: A URL or a base64 encoded string @@ -10050,12 +10081,10 @@ components: type: string type: object - type: 'null' - title: Metadata idempotency_key: anyOf: - type: string - type: 'null' - title: Idempotency Key type: object required: - input_file_id @@ -10069,14 +10098,23 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools discriminator: propertyName: type mapping: @@ -10089,16 +10127,15 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Input' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) type: array - type: 'null' - title: Items metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - title: Metadata type: object title: _conversations_Request _conversations_conversation_id_Request: @@ -10118,14 +10155,23 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools discriminator: propertyName: type mapping: @@ -10138,6 +10184,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Input' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) type: array title: Items type: object @@ -10189,21 +10236,25 @@ components: anyOf: - type: string - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: Query + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam items: items: anyOf: - type: string - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam type: array title: Items max_num_results: anyOf: - type: integer - type: 'null' - title: Max Num Results type: object required: - model @@ -10219,22 +10270,21 @@ components: anyOf: - type: string - type: 'null' - title: Provider Model Id provider_id: anyOf: - type: string - type: 'null' - title: Provider Id metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata model_type: anyOf: - $ref: '#/components/schemas/ModelType' + title: ModelType - type: 'null' + title: ModelType type: object required: - model_id @@ -10247,12 +10297,12 @@ components: - items: type: string type: array - title: Input + title: list[string] + title: string | list[string] model: anyOf: - type: string - type: 'null' - title: Model type: object required: - input @@ -10305,23 +10355,24 @@ components: anyOf: - type: string - type: 'null' - title: Model description: Model descriptor for training if not in provider config` checkpoint_dir: anyOf: - type: string - type: 'null' - title: Checkpoint Dir algorithm_config: anyOf: - oneOf: - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig discriminator: propertyName: type mapping: LoRA: '#/components/schemas/LoraFinetuningConfig' QAT: '#/components/schemas/QATFinetuningConfig' + title: LoraFinetuningConfig | QATFinetuningConfig - type: 'null' title: Algorithm Config type: object @@ -10342,7 +10393,6 @@ components: type: string type: array - type: 'null' - title: Variables type: object required: - prompt @@ -10361,7 +10411,6 @@ components: type: string type: array - type: 'null' - title: Variables set_as_default: type: boolean title: Set As Default @@ -10431,15 +10480,20 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' + title: AdditionalpropertiesUnion type: object title: Scoring Functions type: object @@ -10457,15 +10511,20 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' + title: AdditionalpropertiesUnion type: object title: Scoring Functions save_results_dataset: @@ -10486,18 +10545,15 @@ components: anyOf: - type: string - type: 'null' - title: Provider Shield Id provider_id: anyOf: - type: string - type: 'null' - title: Provider Id params: anyOf: - additionalProperties: true type: object - type: 'null' - title: Params type: object required: - shield_id @@ -10526,29 +10582,35 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: Query + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] params: anyOf: - additionalProperties: true type: object - type: 'null' - title: Params type: object required: - vector_store_id @@ -10560,19 +10622,16 @@ components: anyOf: - type: string - type: 'null' - title: Name expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - title: Expires After metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata type: object title: _vector_stores_vector_store_id_Request _vector_stores_vector_store_id_files_Request: @@ -10585,17 +10644,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Attributes chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy type: object @@ -10620,34 +10681,33 @@ components: - items: type: string type: array - title: Query + title: list[string] + title: string | list[string] filters: anyOf: - additionalProperties: true type: object - type: 'null' - title: Filters max_num_results: anyOf: - type: integer - type: 'null' - title: Max Num Results default: 10 ranking_options: anyOf: - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions - type: 'null' + title: SearchRankingOptions rewrite_query: anyOf: - type: boolean - type: 'null' - title: Rewrite Query default: false search_mode: anyOf: - type: string - type: 'null' - title: Search Mode default: vector type: object required: @@ -10669,7 +10729,6 @@ components: anyOf: - type: string - type: 'null' - title: Instance nullable: true required: - status @@ -10699,7 +10758,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem InterleavedContent: anyOf: - type: string @@ -10710,7 +10772,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -10719,8 +10784,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] BuiltinTool: enum: - brave_search @@ -10768,8 +10838,9 @@ components: tool_name: anyOf: - $ref: '#/components/schemas/BuiltinTool' + title: BuiltinTool - type: string - title: Tool Name + title: BuiltinTool | string arguments: title: Arguments type: string @@ -10791,7 +10862,8 @@ components: anyOf: - type: string - $ref: '#/components/schemas/ToolCall' - title: Tool Call + title: ToolCall + title: string | ToolCall parse_status: $ref: '#/components/schemas/ToolCallParseStatus' required: @@ -10817,7 +10889,9 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/TextDelta' + title: TextDelta - $ref: '#/components/schemas/ImageDelta' + title: ImageDelta - $ref: '#/components/schemas/ToolCallDelta' ToolDefinition: properties: @@ -10859,7 +10933,9 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy - $ref: '#/components/schemas/TopKSamplingStrategy' CompletionMessage: description: A message containing the model's (assistant) response in a chat conversation. @@ -11061,7 +11137,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat OpenAIChatCompletionContentPartParam: discriminator: mapping: @@ -11071,8 +11150,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIAssistantMessageParam: description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: @@ -11087,14 +11170,14 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] nullable: true name: anyOf: - type: string - type: 'null' - title: Name nullable: true tool_calls: anyOf: @@ -11102,7 +11185,6 @@ components: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls nullable: true title: OpenAIAssistantMessageParam type: object @@ -11126,15 +11208,19 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name nullable: true required: - content @@ -11151,10 +11237,16 @@ components: propertyName: role oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) OpenAIResponseFormatParam: discriminator: mapping: @@ -11164,8 +11256,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject VectorStoreChunkingStrategy: discriminator: mapping: @@ -11174,7 +11270,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreFileStatus: anyOf: - const: completed @@ -11185,6 +11284,7 @@ components: type: string - const: failed type: string + title: string OpenAIResponseInputMessageContent: discriminator: mapping: @@ -11194,8 +11294,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseAnnotations: discriminator: mapping: @@ -11206,9 +11310,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseOutputMessageContent: discriminator: mapping: @@ -11217,7 +11326,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal OpenAIResponseMessage: description: |- Corresponds to the various Message types in the Responses API. @@ -11237,9 +11349,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: discriminator: mapping: @@ -11248,9 +11365,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - const: system @@ -11261,7 +11382,7 @@ components: type: string - const: assistant type: string - title: Role + title: string type: const: message default: message @@ -11271,13 +11392,11 @@ components: anyOf: - type: string - type: 'null' - title: Id nullable: true status: anyOf: - type: string - type: 'null' - title: Status nullable: true required: - content @@ -11297,11 +11416,17 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' ApprovalFilter: description: Filter configuration for MCP tool approval requirements. @@ -11381,9 +11506,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseTool: discriminator: mapping: @@ -11397,9 +11527,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseContentPartOutputText: description: Text content within a streamed response part. properties: @@ -11422,9 +11557,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) title: Annotations type: array logprobs: @@ -11434,7 +11574,6 @@ components: type: object type: array - type: 'null' - title: Logprobs nullable: true required: - text @@ -11464,8 +11603,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText OpenAIResponseContentPartReasoningSummary: description: Reasoning summary part in a streamed response. properties: @@ -11519,9 +11662,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: Part + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText sequence_number: title: Sequence Number type: integer @@ -11563,9 +11709,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: Part + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText sequence_number: title: Sequence Number type: integer @@ -11940,13 +12089,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: Item + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) output_index: title: Output Index type: integer @@ -11984,13 +12140,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: Item + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) output_index: title: Output Index type: integer @@ -12034,10 +12197,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: Annotation + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) sequence_number: title: Sequence Number type: integer @@ -12473,41 +12640,78 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) OpenAIResponseInput: anyOf: - discriminator: @@ -12522,15 +12726,27 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage ConversationItem: discriminator: mapping: @@ -14245,14 +14461,24 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) DataSource: discriminator: mapping: @@ -17028,14 +17254,24 @@ components: VectorStoreChunkingStrategy: oneOf: - $ref: '#/components/schemas/StringType' + title: StringType - $ref: '#/components/schemas/NumberType' + title: NumberType - $ref: '#/components/schemas/BooleanType' + title: BooleanType - $ref: '#/components/schemas/ArrayType' + title: ArrayType - $ref: '#/components/schemas/ObjectType' + title: ObjectType - $ref: '#/components/schemas/JsonType' + title: JsonType - $ref: '#/components/schemas/UnionType' + title: UnionType - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) ScoringFnParams: discriminator: mapping: @@ -18694,7 +18930,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig SpanEndPayload: description: Payload for a span end event. properties: @@ -18724,7 +18963,6 @@ components: anyOf: - type: string - type: 'null' - title: Parent Span Id nullable: true required: - name @@ -18745,7 +18983,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload LogSeverity: description: The severity level of a log message. enum: @@ -18779,9 +19020,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: metric default: metric @@ -18794,7 +19035,7 @@ components: anyOf: - type: integer - type: number - title: Value + title: integer | number unit: title: Unit type: string @@ -18829,9 +19070,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: structured_log default: structured_log @@ -18845,8 +19086,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload - $ref: '#/components/schemas/SpanEndPayload' - title: Payload + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload required: - trace_id - span_id @@ -18876,9 +19119,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: unstructured_log default: unstructured_log @@ -18906,7 +19149,9 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent - $ref: '#/components/schemas/StructuredLogEvent' ListOpenAIResponseInputItem: description: List container for OpenAI response input items. @@ -18955,8 +19200,10 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' nullable: true + title: OpenAIResponseError id: title: Id type: string @@ -18982,12 +19229,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) title: Output type: array parallel_tool_calls: @@ -18998,13 +19253,14 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' nullable: true + title: OpenAIResponsePrompt status: title: Status type: string @@ -19012,7 +19268,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' @@ -19023,7 +19278,6 @@ components: anyOf: - type: number - type: 'null' - title: Top P nullable: true tools: anyOf: @@ -19040,29 +19294,33 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools nullable: true truncation: anyOf: - type: string - type: 'null' - title: Truncation nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' nullable: true + title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - title: Instructions nullable: true input: items: @@ -19079,15 +19337,27 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage title: Input type: array required: @@ -19185,12 +19455,11 @@ components: anyOf: - type: integer - type: number - title: Value + title: integer | number unit: anyOf: - type: string - type: 'null' - title: Unit nullable: true required: - metric @@ -19304,14 +19573,24 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) maxItems: 20 title: Items type: array @@ -19712,7 +19991,6 @@ components: - type: string - type: 'null' default: int4_weight_int8_dynamic_activation - title: Scheme title: Int4QuantizationConfig type: object OpenAIChoice: @@ -19808,19 +20086,16 @@ components: anyOf: - type: string - type: 'null' - title: Content nullable: true refusal: anyOf: - type: string - type: 'null' - title: Refusal nullable: true role: anyOf: - type: string - type: 'null' - title: Role nullable: true tool_calls: anyOf: @@ -19828,13 +20103,11 @@ components: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls nullable: true reasoning_content: anyOf: - type: string - type: 'null' - title: Reasoning Content nullable: true title: OpenAIChoiceDelta type: object @@ -19852,8 +20125,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - delta - finish_reason @@ -19885,8 +20160,10 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' nullable: true + title: OpenAIChatCompletionUsage required: - id - choices @@ -19915,8 +20192,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - finish_reason - text @@ -19938,7 +20217,6 @@ components: type: integer type: array - type: 'null' - title: Text Offset nullable: true token_logprobs: anyOf: @@ -19946,7 +20224,6 @@ components: type: number type: array - type: 'null' - title: Token Logprobs nullable: true tokens: anyOf: @@ -19954,7 +20231,6 @@ components: type: string type: array - type: 'null' - title: Tokens nullable: true top_logprobs: anyOf: @@ -19964,7 +20240,6 @@ components: type: object type: array - type: 'null' - title: Top Logprobs nullable: true title: OpenAICompletionLogprobs type: object @@ -19989,7 +20264,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -19998,7 +20276,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array title: Content metadata: diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index eb041b243d..d61fb4f80c 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -776,7 +776,6 @@ components: type: string type: array - type: 'null' - title: Tool Names type: object title: AllowedToolsFilter description: Filter configuration for restricting which MCP tools can be used. @@ -788,14 +787,12 @@ components: type: string type: array - type: 'null' - title: Always never: anyOf: - items: type: string type: array - type: 'null' - title: Never type: object title: ApprovalFilter description: Filter configuration for MCP tool approval requirements. @@ -862,76 +859,70 @@ components: anyOf: - type: integer - type: 'null' - title: Cancelled At cancelling_at: anyOf: - type: integer - type: 'null' - title: Cancelling At completed_at: anyOf: - type: integer - type: 'null' - title: Completed At error_file_id: anyOf: - type: string - type: 'null' - title: Error File Id errors: anyOf: - $ref: '#/components/schemas/Errors' + title: Errors - type: 'null' + title: Errors expired_at: anyOf: - type: integer - type: 'null' - title: Expired At expires_at: anyOf: - type: integer - type: 'null' - title: Expires At failed_at: anyOf: - type: integer - type: 'null' - title: Failed At finalizing_at: anyOf: - type: integer - type: 'null' - title: Finalizing At in_progress_at: anyOf: - type: integer - type: 'null' - title: In Progress At metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - title: Metadata model: anyOf: - type: string - type: 'null' - title: Model output_file_id: anyOf: - type: string - type: 'null' - title: Output File Id request_counts: anyOf: - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts - type: 'null' + title: BatchRequestCounts usage: anyOf: - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage - type: 'null' + title: BatchUsage additionalProperties: true type: object required: @@ -949,22 +940,18 @@ components: anyOf: - type: string - type: 'null' - title: Code line: anyOf: - type: integer - type: 'null' - title: Line message: anyOf: - type: string - type: 'null' - title: Message param: anyOf: - type: string - type: 'null' - title: Param additionalProperties: true type: object title: BatchError @@ -1020,7 +1007,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -1060,14 +1046,18 @@ components: additionalProperties: oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams type: object title: Scoring Params description: Map between scoring function id and parameters for each scoring function you want to run @@ -1075,7 +1065,6 @@ components: 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: object required: @@ -1093,7 +1082,9 @@ components: expires_after: anyOf: - $ref: '#/components/schemas/ExpiresAfter' + title: ExpiresAfter - type: 'null' + title: ExpiresAfter type: object required: - file @@ -1111,7 +1102,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Metadata type: object required: - scoring_functions @@ -1121,27 +1111,40 @@ components: return_type: anyOf: - $ref: '#/components/schemas/StringType' + title: StringType - $ref: '#/components/schemas/NumberType' + title: NumberType - $ref: '#/components/schemas/BooleanType' + title: BooleanType - $ref: '#/components/schemas/ArrayType' + title: ArrayType - $ref: '#/components/schemas/ObjectType' + title: ObjectType - $ref: '#/components/schemas/JsonType' + title: JsonType - $ref: '#/components/schemas/UnionType' + title: UnionType - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType - $ref: '#/components/schemas/CompletionInputType' - title: Return Type + title: CompletionInputType + title: StringType | ... (9 variants) params: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' title: Params type: object @@ -1153,13 +1156,14 @@ components: mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' + title: URL args: anyOf: - additionalProperties: true type: object - type: 'null' - title: Args type: object title: Body_register_tool_group_v1_toolgroups_post BooleanType: @@ -1203,7 +1207,9 @@ components: training_metrics: anyOf: - $ref: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric - type: 'null' + title: PostTrainingMetric type: object required: - identifier @@ -1220,23 +1226,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: Content + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] chunk_id: type: string title: Chunk Id @@ -1250,11 +1263,12 @@ components: type: number type: array - type: 'null' - title: Embedding chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' + title: ChunkMetadata type: object required: - content @@ -1268,23 +1282,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array - title: Content + title: list[ImageContentItem-Output | TextContentItem] + title: string | list[ImageContentItem-Output | TextContentItem] chunk_id: type: string title: Chunk Id @@ -1298,11 +1319,12 @@ components: type: number type: array - type: 'null' - title: Embedding chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' + title: ChunkMetadata type: object required: - content @@ -1315,57 +1337,46 @@ components: 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 type: object title: ChunkMetadata description: |- @@ -1405,7 +1416,6 @@ components: type: string type: object - type: 'null' - 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. items: anyOf: @@ -1414,7 +1424,6 @@ components: type: object type: array - type: 'null' - title: Items description: Initial items to include in the conversation context. You may add up to 20 items at a time. type: object required: @@ -1487,14 +1496,23 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools discriminator: propertyName: type mapping: @@ -1507,6 +1525,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (9 variants) type: array title: Data description: List of conversation items @@ -1514,13 +1533,11 @@ components: anyOf: - type: string - type: 'null' - title: First Id description: The ID of the first item in the list last_id: anyOf: - type: string - type: 'null' - title: Last Id description: The ID of the last item in the list has_more: type: boolean @@ -1570,18 +1587,15 @@ components: anyOf: - type: string - type: 'null' - title: Validation Dataset Id packed: anyOf: - type: boolean - type: 'null' - title: Packed default: false train_on_input: anyOf: - type: boolean - type: 'null' - title: Train On Input default: false type: object required: @@ -1601,7 +1615,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -1617,8 +1630,10 @@ components: source: oneOf: - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource - $ref: '#/components/schemas/RowsDataSource' - title: Source + title: RowsDataSource + title: URIDataSource | RowsDataSource discriminator: propertyName: type mapping: @@ -1658,25 +1673,21 @@ components: anyOf: - type: boolean - type: 'null' - title: Enable Activation Checkpointing default: false enable_activation_offloading: anyOf: - type: boolean - type: 'null' - title: Enable Activation Offloading default: false memory_efficient_fsdp_wrap: anyOf: - type: boolean - type: 'null' - title: Memory Efficient Fsdp Wrap default: false fsdp_cpu_offload: anyOf: - type: boolean - type: 'null' - title: Fsdp Cpu Offload default: false type: object title: EfficiencyConfig @@ -1689,12 +1700,10 @@ components: $ref: '#/components/schemas/BatchError' type: array - type: 'null' - title: Data object: anyOf: - type: string - type: 'null' - title: Object additionalProperties: true type: object title: Errors @@ -1850,7 +1859,6 @@ components: anyOf: - type: string - type: 'null' - title: Prompt Template judge_score_regexes: items: type: string @@ -1885,13 +1893,11 @@ components: anyOf: - type: string - type: 'null' - title: First Id description: ID of the first batch in the list last_id: anyOf: - type: string - type: 'null' - title: Last Id description: ID of the last batch in the list has_more: type: boolean @@ -1991,12 +1997,19 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -2007,9 +2020,14 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array title: Data object: @@ -2172,13 +2190,11 @@ components: anyOf: - type: boolean - type: 'null' - title: Use Dora default: false quantize_base: anyOf: - type: boolean - type: 'null' - title: Quantize Base default: false type: object required: @@ -2202,7 +2218,6 @@ components: anyOf: - type: string - type: 'null' - title: Description type: object required: - input_schema @@ -2219,7 +2234,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -2259,7 +2273,9 @@ components: system_message: anyOf: - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage - type: 'null' + title: SystemMessage type: object required: - model @@ -2305,7 +2321,6 @@ components: type: boolean type: object - type: 'null' - title: Categories category_applied_input_types: anyOf: - additionalProperties: @@ -2314,19 +2329,16 @@ components: type: array type: object - type: 'null' - title: Category Applied Input Types category_scores: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Category Scores user_message: anyOf: - type: string - type: 'null' - title: User Message metadata: additionalProperties: true type: object @@ -2369,20 +2381,19 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name tool_calls: anyOf: - items: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls type: object title: OpenAIAssistantMessageParam description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. @@ -2399,20 +2410,19 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name tool_calls: anyOf: - items: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls type: object title: OpenAIAssistantMessageParam description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. @@ -2440,7 +2450,9 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' + title: OpenAIChatCompletionUsage type: object required: - id @@ -2487,10 +2499,15 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam discriminator: propertyName: role mapping: @@ -2499,6 +2516,7 @@ components: system: '#/components/schemas/OpenAISystemMessageParam' tool: '#/components/schemas/OpenAIToolMessageParam' user: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input | ... (5 variants) type: array minItems: 1 title: Messages @@ -2506,14 +2524,13 @@ components: anyOf: - type: number - type: 'null' - title: Frequency Penalty function_call: anyOf: - type: string - additionalProperties: true type: object - type: 'null' - title: Function Call + title: string | object functions: anyOf: - items: @@ -2521,94 +2538,87 @@ components: type: object type: array - type: 'null' - title: Functions logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Logit Bias logprobs: anyOf: - type: boolean - type: 'null' - title: Logprobs max_completion_tokens: anyOf: - type: integer - type: 'null' - title: Max Completion Tokens max_tokens: anyOf: - type: integer - type: 'null' - title: Max Tokens n: anyOf: - type: integer - type: 'null' - title: N parallel_tool_calls: anyOf: - type: boolean - type: 'null' - title: Parallel Tool Calls presence_penalty: anyOf: - type: number - type: 'null' - title: Presence Penalty response_format: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject discriminator: propertyName: type mapping: json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' text: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - type: 'null' title: Response Format seed: anyOf: - type: integer - type: 'null' - title: Seed stop: anyOf: - type: string - items: type: string type: array + title: list[string] - type: 'null' - title: Stop + title: string | list[string] stream: anyOf: - type: boolean - type: 'null' - title: Stream stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - title: Stream Options temperature: anyOf: - type: number - type: 'null' - title: Temperature tool_choice: anyOf: - type: string - additionalProperties: true type: object - type: 'null' - title: Tool Choice + title: string | object tools: anyOf: - items: @@ -2616,22 +2626,18 @@ components: type: object type: array - type: 'null' - title: Tools top_logprobs: anyOf: - type: integer - type: 'null' - title: Top Logprobs top_p: anyOf: - type: number - type: 'null' - title: Top P user: anyOf: - type: string - type: 'null' - title: User additionalProperties: true type: object required: @@ -2645,12 +2651,10 @@ components: anyOf: - type: integer - type: 'null' - title: Index id: anyOf: - type: string - type: 'null' - title: Id type: type: string const: function @@ -2659,7 +2663,9 @@ components: function: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction - type: 'null' + title: OpenAIChatCompletionToolCallFunction type: object title: OpenAIChatCompletionToolCall description: Tool call specification for OpenAI-compatible chat completion responses. @@ -2669,12 +2675,10 @@ components: anyOf: - type: string - type: 'null' - title: Name arguments: anyOf: - type: string - type: 'null' - title: Arguments type: object title: OpenAIChatCompletionToolCallFunction description: Function call details for OpenAI-compatible tool calls. @@ -2692,11 +2696,15 @@ components: prompt_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' + title: OpenAIChatCompletionUsagePromptTokensDetails completion_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' + title: OpenAIChatCompletionUsageCompletionTokensDetails type: object required: - prompt_tokens @@ -2710,7 +2718,6 @@ components: anyOf: - type: integer - type: 'null' - title: Reasoning Tokens type: object title: OpenAIChatCompletionUsageCompletionTokensDetails description: Token details for output tokens in OpenAI chat completion usage. @@ -2720,7 +2727,6 @@ components: anyOf: - type: integer - type: 'null' - title: Cached Tokens type: object title: OpenAIChatCompletionUsagePromptTokensDetails description: Token details for prompt tokens in OpenAI chat completion usage. @@ -2729,11 +2735,16 @@ components: message: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: Message + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam-Input | ... (5 variants) discriminator: propertyName: role mapping: @@ -2751,7 +2762,9 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Input' + title: OpenAIChoiceLogprobs-Input - type: 'null' + title: OpenAIChoiceLogprobs-Input type: object required: - message @@ -2764,11 +2777,16 @@ components: message: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: Message + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam-Output | ... (5 variants) discriminator: propertyName: role mapping: @@ -2786,7 +2804,9 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + title: OpenAIChoiceLogprobs-Output - type: 'null' + title: OpenAIChoiceLogprobs-Output type: object required: - message @@ -2802,14 +2822,12 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Content refusal: anyOf: - items: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Refusal type: object title: OpenAIChoiceLogprobs description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. @@ -2821,14 +2839,12 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Content refusal: anyOf: - items: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Refusal type: object title: OpenAIChoiceLogprobs description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. @@ -2882,7 +2898,9 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Input' + title: OpenAIChoiceLogprobs-Input - type: 'null' + title: OpenAIChoiceLogprobs-Input type: object required: - finish_reason @@ -2910,7 +2928,9 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + title: OpenAIChoiceLogprobs-Output - type: 'null' + title: OpenAIChoiceLogprobs-Output type: object required: - finish_reason @@ -2935,101 +2955,90 @@ components: - items: type: string type: array + title: list[string] - items: type: integer type: array + title: list[integer] - items: items: type: integer type: array type: array - title: Prompt + title: list[array] + title: string | ... (4 variants) best_of: anyOf: - type: integer - type: 'null' - title: Best Of echo: anyOf: - type: boolean - type: 'null' - title: Echo frequency_penalty: anyOf: - type: number - type: 'null' - title: Frequency Penalty logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Logit Bias logprobs: anyOf: - type: boolean - type: 'null' - title: Logprobs max_tokens: anyOf: - type: integer - type: 'null' - title: Max Tokens n: anyOf: - type: integer - type: 'null' - title: N presence_penalty: anyOf: - type: number - type: 'null' - title: Presence Penalty seed: anyOf: - type: integer - type: 'null' - title: Seed stop: anyOf: - type: string - items: type: string type: array + title: list[string] - type: 'null' - title: Stop + title: string | list[string] stream: anyOf: - type: boolean - type: 'null' - title: Stream stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - title: Stream Options temperature: anyOf: - type: number - type: 'null' - title: Temperature top_p: anyOf: - type: number - type: 'null' - title: Top P user: anyOf: - type: string - type: 'null' - title: User suffix: anyOf: - type: string - type: 'null' - title: Suffix additionalProperties: true type: object required: @@ -3061,15 +3070,22 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' + title: OpenAIChatCompletionUsage input_messages: items: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam discriminator: propertyName: role mapping: @@ -3078,6 +3094,7 @@ components: system: '#/components/schemas/OpenAISystemMessageParam' tool: '#/components/schemas/OpenAIToolMessageParam' user: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output | ... (5 variants) type: array title: Input Messages type: object @@ -3100,17 +3117,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Attributes chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy additionalProperties: true @@ -3125,30 +3144,30 @@ components: anyOf: - type: string - type: 'null' - title: Name file_ids: anyOf: - items: type: string type: array - type: 'null' - title: File Ids expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - title: Expires After chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy metadata: @@ -3156,7 +3175,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Metadata additionalProperties: true type: object title: OpenAICreateVectorStoreRequestWithExtraBody @@ -3193,12 +3211,12 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -3216,8 +3234,9 @@ components: - items: type: number type: array + title: list[number] - type: string - title: Embedding + title: list[number] | string index: type: integer title: Index @@ -3252,23 +3271,21 @@ components: - items: type: string type: array - title: Input + title: list[string] + title: string | list[string] encoding_format: anyOf: - type: string - type: 'null' - title: Encoding Format default: float dimensions: anyOf: - type: integer - type: 'null' - title: Dimensions user: anyOf: - type: string - type: 'null' - title: User additionalProperties: true type: object required: @@ -3338,17 +3355,14 @@ components: 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 type: object title: OpenAIFileFile OpenAIFileObject: @@ -3401,7 +3415,6 @@ components: anyOf: - type: string - type: 'null' - title: Detail type: object required: - url @@ -3416,18 +3429,15 @@ components: anyOf: - type: string - type: 'null' - title: Description strict: anyOf: - type: boolean - type: 'null' - title: Strict schema: anyOf: - additionalProperties: true type: object - type: 'null' - title: Schema type: object title: OpenAIJSONSchema description: JSON schema specification for OpenAI-compatible structured response format. @@ -3463,7 +3473,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Custom Metadata type: object required: - id @@ -3656,12 +3665,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - call_id @@ -3679,22 +3686,18 @@ components: anyOf: - type: string - type: 'null' - title: File Data file_id: anyOf: - type: string - type: 'null' - title: File Id file_url: anyOf: - type: string - type: 'null' - title: File Url filename: anyOf: - type: string - type: 'null' - title: Filename type: object title: OpenAIResponseInputMessageContentFile description: File content for input messages in OpenAI response format. @@ -3708,7 +3711,7 @@ components: const: high - type: string const: auto - title: Detail + title: string default: auto type: type: string @@ -3719,12 +3722,10 @@ components: anyOf: - type: string - type: 'null' - title: File Id image_url: anyOf: - type: string - type: 'null' - title: Image Url type: object title: OpenAIResponseInputMessageContentImage description: Image content for input messages in OpenAI response format. @@ -3760,19 +3761,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Filters max_num_results: anyOf: - type: integer maximum: 50.0 minimum: 1.0 - type: 'null' - title: Max Num Results default: 10 ranking_options: anyOf: - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions - type: 'null' + title: SearchRankingOptions type: object required: - vector_store_ids @@ -3792,18 +3793,15 @@ components: 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 type: object required: - name @@ -3828,7 +3826,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Headers require_approval: anyOf: - type: string @@ -3836,16 +3833,19 @@ components: - type: string const: never - $ref: '#/components/schemas/ApprovalFilter' - title: Require Approval + title: ApprovalFilter + title: string | ApprovalFilter default: never allowed_tools: anyOf: - items: type: string type: array + title: list[string] - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - title: Allowed Tools + title: list[string] | AllowedToolsFilter type: object required: - server_label @@ -3864,14 +3864,13 @@ components: const: web_search_preview_2025_03_11 - type: string const: web_search_2025_08_26 - title: Type + title: string default: web_search search_context_size: anyOf: - type: string pattern: ^low|medium|high$ - type: 'null' - title: Search Context Size default: medium type: object title: OpenAIResponseInputToolWebSearch @@ -3920,12 +3919,10 @@ components: anyOf: - type: string - type: 'null' - title: Id reason: anyOf: - type: string - type: 'null' - title: Reason type: object required: - approval_request_id @@ -3940,26 +3937,35 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal discriminator: propertyName: type mapping: output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - type: string @@ -3970,7 +3976,7 @@ components: const: user - type: string const: assistant - title: Role + title: string type: type: string const: message @@ -3980,12 +3986,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - content @@ -4004,26 +4008,35 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal discriminator: propertyName: type mapping: output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - type: string @@ -4034,7 +4047,7 @@ components: const: user - type: string const: assistant - title: Role + title: string type: type: string const: message @@ -4044,12 +4057,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - content @@ -4068,7 +4079,9 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' + title: OpenAIResponseError id: type: string title: Id @@ -4084,12 +4097,19 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -4100,6 +4120,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array title: Output parallel_tool_calls: @@ -4110,11 +4131,12 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + title: OpenAIResponsePrompt status: type: string title: Status @@ -4122,7 +4144,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -4132,15 +4153,18 @@ components: anyOf: - type: number - type: 'null' - title: Top P tools: anyOf: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP discriminator: propertyName: type mapping: @@ -4151,28 +4175,27 @@ components: web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools truncation: anyOf: - type: string - type: 'null' - title: Truncation usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' + title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - title: Instructions max_tool_calls: anyOf: - type: integer - type: 'null' - title: Max Tool Calls type: object required: - created_at @@ -4190,7 +4213,9 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' + title: OpenAIResponseError id: type: string title: Id @@ -4206,12 +4231,19 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -4222,6 +4254,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Input' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) type: array title: Output parallel_tool_calls: @@ -4232,11 +4265,12 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + title: OpenAIResponsePrompt status: type: string title: Status @@ -4244,7 +4278,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -4254,15 +4287,18 @@ components: anyOf: - type: number - type: 'null' - title: Top P tools: anyOf: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP discriminator: propertyName: type mapping: @@ -4273,39 +4309,45 @@ components: web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools truncation: anyOf: - type: string - type: 'null' - title: Truncation usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' + title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - title: Instructions max_tool_calls: anyOf: - type: integer - type: 'null' - title: Max Tool Calls input: items: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -4316,9 +4358,14 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Input' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input type: array title: Input type: object @@ -4339,7 +4386,9 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' + title: OpenAIResponseError id: type: string title: Id @@ -4355,12 +4404,19 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -4371,6 +4427,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array title: Output parallel_tool_calls: @@ -4381,11 +4438,12 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + title: OpenAIResponsePrompt status: type: string title: Status @@ -4393,7 +4451,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -4403,15 +4460,18 @@ components: anyOf: - type: number - type: 'null' - title: Top P tools: anyOf: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP discriminator: propertyName: type mapping: @@ -4422,39 +4482,45 @@ components: web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools truncation: anyOf: - type: string - type: 'null' - title: Truncation usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' + title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - title: Instructions max_tool_calls: anyOf: - type: integer - type: 'null' - title: Max Tool Calls input: items: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -4465,9 +4531,14 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array title: Input type: object @@ -4494,9 +4565,13 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath discriminator: propertyName: type mapping: @@ -4504,6 +4579,7 @@ components: file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) type: array title: Annotations type: object @@ -4534,7 +4610,6 @@ components: $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' - title: Results type: object required: - id @@ -4589,12 +4664,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - call_id @@ -4625,12 +4698,10 @@ components: anyOf: - type: string - type: 'null' - title: Error output: anyOf: - type: string - type: 'null' - title: Output type: object required: - id @@ -4693,22 +4764,24 @@ components: - additionalProperties: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: object - type: 'null' - title: Variables version: anyOf: - type: string - type: 'null' - title: Version type: object required: - id @@ -4719,7 +4792,9 @@ components: format: anyOf: - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat - type: 'null' + title: OpenAIResponseTextFormat type: object title: OpenAIResponseText description: Text response configuration for OpenAI responses. @@ -4733,28 +4808,24 @@ components: const: json_schema - type: string const: json_object - title: Type + title: string 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 type: object title: OpenAIResponseTextFormat description: Configuration for Responses API text format. @@ -4773,9 +4844,11 @@ components: - items: type: string type: array + title: list[string] - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - title: Allowed Tools + title: list[string] | AllowedToolsFilter type: object required: - server_label @@ -4795,11 +4868,15 @@ components: input_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails - type: 'null' + title: OpenAIResponseUsageInputTokensDetails output_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails - type: 'null' + title: OpenAIResponseUsageOutputTokensDetails type: object required: - input_tokens @@ -4813,7 +4890,6 @@ components: anyOf: - type: integer - type: 'null' - title: Cached Tokens type: object title: OpenAIResponseUsageInputTokensDetails description: Token details for input tokens in OpenAI response usage. @@ -4823,7 +4899,6 @@ components: anyOf: - type: integer - type: 'null' - title: Reasoning Tokens type: object title: OpenAIResponseUsageOutputTokensDetails description: Token details for output tokens in OpenAI response usage. @@ -4840,12 +4915,12 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -4862,7 +4937,6 @@ components: type: integer type: array - type: 'null' - title: Bytes logprob: type: number title: Logprob @@ -4900,7 +4974,8 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] type: object required: - tool_call_id @@ -4918,7 +4993,6 @@ components: type: integer type: array - type: 'null' - title: Bytes logprob: type: number title: Logprob @@ -4946,21 +5020,25 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile discriminator: propertyName: type mapping: file: '#/components/schemas/OpenAIFile' image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -4979,21 +5057,25 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile discriminator: propertyName: type mapping: file: '#/components/schemas/OpenAIFile' image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -5060,7 +5142,6 @@ components: anyOf: - type: string - type: 'null' - title: Url type: object required: - data @@ -5103,25 +5184,21 @@ components: - type: string format: date-time - type: 'null' - title: Scheduled At started_at: anyOf: - type: string format: date-time - type: 'null' - title: Started At completed_at: anyOf: - type: string format: date-time - type: 'null' - title: Completed At resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' - title: Resources Allocated checkpoints: items: $ref: '#/components/schemas/Checkpoint' @@ -5161,7 +5238,6 @@ components: anyOf: - type: string - type: 'null' - title: Prompt description: The system prompt with variable placeholders version: type: integer @@ -5345,7 +5421,9 @@ components: violation: anyOf: - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation - type: 'null' + title: SafetyViolation type: object title: RunShieldResponse description: Response from running a safety shield. @@ -5357,7 +5435,6 @@ components: anyOf: - type: string - type: 'null' - title: User Message metadata: additionalProperties: true type: object @@ -5372,9 +5449,12 @@ components: strategy: oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy - $ref: '#/components/schemas/TopKSamplingStrategy' - title: Strategy + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy discriminator: propertyName: type mapping: @@ -5385,12 +5465,10 @@ components: anyOf: - type: integer - type: 'null' - title: Max Tokens repetition_penalty: anyOf: - type: number - type: 'null' - title: Repetition Penalty default: 1.0 stop: anyOf: @@ -5398,7 +5476,6 @@ components: type: string type: array - type: 'null' - title: Stop type: object title: SamplingParams description: Sampling parameters. @@ -5408,7 +5485,6 @@ components: anyOf: - type: string - type: 'null' - title: Dataset Id results: additionalProperties: $ref: '#/components/schemas/ScoringResult' @@ -5441,7 +5517,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -5456,7 +5531,6 @@ components: anyOf: - type: string - type: 'null' - title: Description metadata: additionalProperties: true type: object @@ -5465,15 +5539,24 @@ components: return_type: oneOf: - $ref: '#/components/schemas/StringType' + title: StringType - $ref: '#/components/schemas/NumberType' + title: NumberType - $ref: '#/components/schemas/BooleanType' + title: BooleanType - $ref: '#/components/schemas/ArrayType' + title: ArrayType - $ref: '#/components/schemas/ObjectType' + title: ObjectType - $ref: '#/components/schemas/JsonType' + title: JsonType - $ref: '#/components/schemas/UnionType' + title: UnionType - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType - $ref: '#/components/schemas/CompletionInputType' - title: Return Type + title: CompletionInputType + title: StringType | ... (9 variants) description: The return type of the deterministic function discriminator: propertyName: type @@ -5491,14 +5574,18 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' title: Params description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval @@ -5533,12 +5620,10 @@ components: anyOf: - type: string - type: 'null' - title: Ranker score_threshold: anyOf: - type: number - type: 'null' - title: Score Threshold default: 0.0 type: object title: SearchRankingOptions @@ -5553,7 +5638,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -5569,7 +5653,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Params type: object required: - identifier @@ -5598,23 +5681,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: Content + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] type: object required: - content @@ -5641,7 +5731,6 @@ components: anyOf: - type: string - type: 'null' - title: Toolgroup Id name: type: string title: Name @@ -5649,25 +5738,21 @@ components: 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 type: object required: - name @@ -5683,7 +5768,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -5697,13 +5781,14 @@ components: mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' + title: URL args: anyOf: - additionalProperties: true type: object - type: 'null' - title: Args type: object required: - identifier @@ -5717,40 +5802,44 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array + title: list[ImageContentItem-Output | TextContentItem] - type: 'null' - title: Content + title: string | list[ImageContentItem-Output | TextContentItem] error_message: anyOf: - type: string - type: 'null' - title: Error Message error_code: anyOf: - type: integer - type: 'null' - title: Error Code metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata type: object title: ToolInvocationResult description: Result of a tool invocation. @@ -5782,12 +5871,10 @@ components: - type: number minimum: 0.0 - type: 'null' - title: Temperature top_p: anyOf: - type: number - type: 'null' - title: Top P default: 0.95 type: object required: @@ -5811,25 +5898,29 @@ components: anyOf: - type: integer - type: 'null' - title: Max Validation Steps default: 1 data_config: anyOf: - $ref: '#/components/schemas/DataConfig' + title: DataConfig - type: 'null' + title: DataConfig optimizer_config: anyOf: - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig - type: 'null' + title: OptimizerConfig efficiency_config: anyOf: - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig - type: 'null' + title: EfficiencyConfig dtype: anyOf: - type: string - type: 'null' - title: Dtype default: bf16 type: object required: @@ -5968,7 +6059,7 @@ components: const: cancelled - type: string const: failed - title: Status + title: string file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' type: object @@ -5999,7 +6090,6 @@ components: anyOf: - type: string - type: 'null' - title: Next Page type: object required: - data @@ -6058,7 +6148,7 @@ components: const: server_error - type: string const: rate_limit_exceeded - title: Code + title: string message: type: string title: Message @@ -6084,8 +6174,10 @@ components: chunking_strategy: oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: Chunking Strategy + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: @@ -6097,7 +6189,9 @@ components: last_error: anyOf: - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' + title: VectorStoreFileLastError status: anyOf: - type: string @@ -6108,7 +6202,7 @@ components: const: cancelled - type: string const: failed - title: Status + title: string usage_bytes: type: integer title: Usage Bytes @@ -6140,12 +6234,10 @@ components: anyOf: - type: string - type: 'null' - title: First Id last_id: anyOf: - type: string - type: 'null' - title: Last Id has_more: type: boolean title: Has More @@ -6170,12 +6262,10 @@ components: anyOf: - type: string - type: 'null' - title: First Id last_id: anyOf: - type: string - type: 'null' - title: Last Id has_more: type: boolean title: Has More @@ -6200,12 +6290,10 @@ components: anyOf: - type: string - type: 'null' - title: First Id last_id: anyOf: - type: string - type: 'null' - title: Last Id has_more: type: boolean title: Has More @@ -6231,7 +6319,6 @@ components: anyOf: - type: string - type: 'null' - title: Name usage_bytes: type: integer title: Usage Bytes @@ -6247,17 +6334,14 @@ components: - 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 type: object @@ -6287,9 +6371,9 @@ components: - type: string - type: number - type: boolean + title: string | number | boolean type: object - type: 'null' - title: Attributes content: items: $ref: '#/components/schemas/VectorStoreContent' @@ -6327,7 +6411,6 @@ components: anyOf: - type: string - type: 'null' - title: Next Page type: object required: - search_query @@ -6357,13 +6440,14 @@ components: url: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' + title: URL data: anyOf: - type: string - type: 'null' contentEncoding: base64 - title: Data type: object title: _URLOrData description: A URL or a base64 encoded string @@ -6385,12 +6469,10 @@ components: type: string type: object - type: 'null' - title: Metadata idempotency_key: anyOf: - type: string - type: 'null' - title: Idempotency Key type: object required: - input_file_id @@ -6404,14 +6486,23 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools discriminator: propertyName: type mapping: @@ -6424,16 +6515,15 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Input' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) type: array - type: 'null' - title: Items metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - title: Metadata type: object title: _conversations_Request _conversations_conversation_id_Request: @@ -6453,14 +6543,23 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools discriminator: propertyName: type mapping: @@ -6473,6 +6572,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Input' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) type: array title: Items type: object @@ -6524,21 +6624,25 @@ components: anyOf: - type: string - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: Query + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam items: items: anyOf: - type: string - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam type: array title: Items max_num_results: anyOf: - type: integer - type: 'null' - title: Max Num Results type: object required: - model @@ -6554,22 +6658,21 @@ components: anyOf: - type: string - type: 'null' - title: Provider Model Id provider_id: anyOf: - type: string - type: 'null' - title: Provider Id metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata model_type: anyOf: - $ref: '#/components/schemas/ModelType' + title: ModelType - type: 'null' + title: ModelType type: object required: - model_id @@ -6582,12 +6685,12 @@ components: - items: type: string type: array - title: Input + title: list[string] + title: string | list[string] model: anyOf: - type: string - type: 'null' - title: Model type: object required: - input @@ -6640,23 +6743,24 @@ components: anyOf: - type: string - type: 'null' - title: Model description: Model descriptor for training if not in provider config` checkpoint_dir: anyOf: - type: string - type: 'null' - title: Checkpoint Dir algorithm_config: anyOf: - oneOf: - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig discriminator: propertyName: type mapping: LoRA: '#/components/schemas/LoraFinetuningConfig' QAT: '#/components/schemas/QATFinetuningConfig' + title: LoraFinetuningConfig | QATFinetuningConfig - type: 'null' title: Algorithm Config type: object @@ -6677,7 +6781,6 @@ components: type: string type: array - type: 'null' - title: Variables type: object required: - prompt @@ -6696,7 +6799,6 @@ components: type: string type: array - type: 'null' - title: Variables set_as_default: type: boolean title: Set As Default @@ -6724,12 +6826,19 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -6740,62 +6849,70 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Input' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input type: array - title: Input + title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] model: type: string title: Model prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + title: OpenAIResponsePrompt instructions: anyOf: - type: string - type: 'null' - title: Instructions previous_response_id: anyOf: - type: string - type: 'null' - title: Previous Response Id conversation: anyOf: - type: string - type: 'null' - title: Conversation store: anyOf: - type: boolean - type: 'null' - title: Store default: true stream: anyOf: - type: boolean - type: 'null' - title: Stream default: false temperature: anyOf: - type: number - type: 'null' - title: Temperature text: anyOf: - $ref: '#/components/schemas/OpenAIResponseText' + title: OpenAIResponseText - type: 'null' + title: OpenAIResponseText tools: anyOf: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP discriminator: propertyName: type mapping: @@ -6806,27 +6923,24 @@ components: web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools include: anyOf: - items: type: string type: array - type: 'null' - title: Include max_infer_iters: anyOf: - type: integer - type: 'null' - title: Max Infer Iters default: 10 max_tool_calls: anyOf: - type: integer - type: 'null' - title: Max Tool Calls type: object required: - input @@ -6845,15 +6959,20 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' + title: AdditionalpropertiesUnion type: object title: Scoring Functions type: object @@ -6871,15 +6990,20 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' + title: AdditionalpropertiesUnion type: object title: Scoring Functions save_results_dataset: @@ -6900,18 +7024,15 @@ components: anyOf: - type: string - type: 'null' - title: Provider Shield Id provider_id: anyOf: - type: string - type: 'null' - title: Provider Id params: anyOf: - additionalProperties: true type: object - type: 'null' - title: Params type: object required: - shield_id @@ -6940,29 +7061,35 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: Query + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] params: anyOf: - additionalProperties: true type: object - type: 'null' - title: Params type: object required: - vector_store_id @@ -6974,19 +7101,16 @@ components: anyOf: - type: string - type: 'null' - title: Name expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - title: Expires After metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata type: object title: _vector_stores_vector_store_id_Request _vector_stores_vector_store_id_files_Request: @@ -6999,17 +7123,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Attributes chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy type: object @@ -7034,34 +7160,33 @@ components: - items: type: string type: array - title: Query + title: list[string] + title: string | list[string] filters: anyOf: - additionalProperties: true type: object - type: 'null' - title: Filters max_num_results: anyOf: - type: integer - type: 'null' - title: Max Num Results default: 10 ranking_options: anyOf: - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions - type: 'null' + title: SearchRankingOptions rewrite_query: anyOf: - type: boolean - type: 'null' - title: Rewrite Query default: false search_mode: anyOf: - type: string - type: 'null' - title: Search Mode default: vector type: object required: @@ -7083,7 +7208,6 @@ components: anyOf: - type: string - type: 'null' - title: Instance nullable: true required: - status @@ -7113,7 +7237,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem InterleavedContent: anyOf: - type: string @@ -7124,7 +7251,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -7133,8 +7263,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] BuiltinTool: enum: - brave_search @@ -7182,8 +7317,9 @@ components: tool_name: anyOf: - $ref: '#/components/schemas/BuiltinTool' + title: BuiltinTool - type: string - title: Tool Name + title: BuiltinTool | string arguments: title: Arguments type: string @@ -7205,7 +7341,8 @@ components: anyOf: - type: string - $ref: '#/components/schemas/ToolCall' - title: Tool Call + title: ToolCall + title: string | ToolCall parse_status: $ref: '#/components/schemas/ToolCallParseStatus' required: @@ -7231,8 +7368,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/TextDelta' + title: TextDelta - $ref: '#/components/schemas/ImageDelta' + title: ImageDelta - $ref: '#/components/schemas/ToolCallDelta' + title: ToolCallDelta + title: TextDelta | ImageDelta | ToolCallDelta SamplingStrategy: discriminator: mapping: @@ -7242,8 +7383,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy GrammarResponseFormat: description: Configuration for grammar-guided response generation. properties: @@ -7284,7 +7429,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat OpenAIChatCompletionContentPartParam: discriminator: mapping: @@ -7294,8 +7442,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIAssistantMessageParam: description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: @@ -7310,14 +7462,14 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] nullable: true name: anyOf: - type: string - type: 'null' - title: Name nullable: true tool_calls: anyOf: @@ -7325,7 +7477,6 @@ components: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls nullable: true title: OpenAIAssistantMessageParam type: object @@ -7349,15 +7500,19 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name nullable: true required: - content @@ -7374,10 +7529,16 @@ components: propertyName: role oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) OpenAIResponseFormatParam: discriminator: mapping: @@ -7387,8 +7548,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject VectorStoreChunkingStrategy: discriminator: mapping: @@ -7397,7 +7562,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreFileStatus: anyOf: - const: completed @@ -7408,6 +7576,7 @@ components: type: string - const: failed type: string + title: string OpenAIResponseInputMessageContent: discriminator: mapping: @@ -7417,8 +7586,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseAnnotations: discriminator: mapping: @@ -7429,9 +7602,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseOutputMessageContent: discriminator: mapping: @@ -7440,7 +7618,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal OpenAIResponseMessage: description: |- Corresponds to the various Message types in the Responses API. @@ -7460,9 +7641,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: discriminator: mapping: @@ -7471,9 +7657,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - const: system @@ -7484,7 +7674,7 @@ components: type: string - const: assistant type: string - title: Role + title: string type: const: message default: message @@ -7494,13 +7684,11 @@ components: anyOf: - type: string - type: 'null' - title: Id nullable: true status: anyOf: - type: string - type: 'null' - title: Status nullable: true required: - content @@ -7520,12 +7708,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) OpenAIResponseInputTool: discriminator: mapping: @@ -7539,9 +7735,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseTool: discriminator: mapping: @@ -7555,9 +7756,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseContentPartOutputText: description: Text content within a streamed response part. properties: @@ -7580,9 +7786,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) title: Annotations type: array logprobs: @@ -7592,7 +7803,6 @@ components: type: object type: array - type: 'null' - title: Logprobs nullable: true required: - text @@ -7622,8 +7832,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText OpenAIResponseContentPartReasoningSummary: description: Reasoning summary part in a streamed response. properties: @@ -7677,9 +7891,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: Part + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText sequence_number: title: Sequence Number type: integer @@ -7721,9 +7938,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: Part + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText sequence_number: title: Sequence Number type: integer @@ -8098,13 +8318,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: Item + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) output_index: title: Output Index type: integer @@ -8142,13 +8369,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: Item + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) output_index: title: Output Index type: integer @@ -8192,10 +8426,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: Annotation + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) sequence_number: title: Sequence Number type: integer @@ -8631,41 +8869,78 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) OpenAIResponseInput: anyOf: - discriminator: @@ -8680,15 +8955,27 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage ConversationItem: discriminator: mapping: @@ -8704,14 +8991,24 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) DataSource: discriminator: mapping: @@ -8720,7 +9017,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource ParamType: discriminator: mapping: @@ -8736,14 +9036,24 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/StringType' + title: StringType - $ref: '#/components/schemas/NumberType' + title: NumberType - $ref: '#/components/schemas/BooleanType' + title: BooleanType - $ref: '#/components/schemas/ArrayType' + title: ArrayType - $ref: '#/components/schemas/ObjectType' + title: ObjectType - $ref: '#/components/schemas/JsonType' + title: JsonType - $ref: '#/components/schemas/UnionType' + title: UnionType - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) ScoringFnParams: discriminator: mapping: @@ -8753,8 +9063,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams AlgorithmConfig: discriminator: mapping: @@ -8763,7 +9077,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig SpanEndPayload: description: Payload for a span end event. properties: @@ -8793,7 +9110,6 @@ components: anyOf: - type: string - type: 'null' - title: Parent Span Id nullable: true required: - name @@ -8814,7 +9130,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload LogSeverity: description: The severity level of a log message. enum: @@ -8848,9 +9167,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: metric default: metric @@ -8863,7 +9182,7 @@ components: anyOf: - type: integer - type: number - title: Value + title: integer | number unit: title: Unit type: string @@ -8898,9 +9217,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: structured_log default: structured_log @@ -8914,8 +9233,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload - $ref: '#/components/schemas/SpanEndPayload' - title: Payload + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload required: - trace_id - span_id @@ -8945,9 +9266,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: unstructured_log default: unstructured_log @@ -8975,8 +9296,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent ResponseGuardrailSpec: description: Specification for a guardrail to apply during response generation. properties: @@ -8996,8 +9321,10 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' nullable: true + title: OpenAIResponseError id: title: Id type: string @@ -9023,12 +9350,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) title: Output type: array parallel_tool_calls: @@ -9039,13 +9374,14 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' nullable: true + title: OpenAIResponsePrompt status: title: Status type: string @@ -9053,7 +9389,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' @@ -9064,7 +9399,6 @@ components: anyOf: - type: number - type: 'null' - title: Top P nullable: true tools: anyOf: @@ -9081,35 +9415,38 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools nullable: true truncation: anyOf: - type: string - type: 'null' - title: Truncation nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' nullable: true + title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - title: Instructions nullable: true max_tool_calls: anyOf: - type: integer - type: 'null' - title: Max Tool Calls nullable: true input: items: @@ -9126,15 +9463,27 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage title: Input type: array required: @@ -9156,12 +9505,11 @@ components: anyOf: - type: integer - type: number - title: Value + title: integer | number unit: anyOf: - type: string - type: 'null' - title: Unit nullable: true required: - metric @@ -9198,14 +9546,24 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) maxItems: 20 title: Items type: array @@ -9299,7 +9657,6 @@ components: - type: string - type: 'null' default: int4_weight_int8_dynamic_activation - title: Scheme title: Int4QuantizationConfig type: object OpenAIChoiceDelta: @@ -9309,19 +9666,16 @@ components: anyOf: - type: string - type: 'null' - title: Content nullable: true refusal: anyOf: - type: string - type: 'null' - title: Refusal nullable: true role: anyOf: - type: string - type: 'null' - title: Role nullable: true tool_calls: anyOf: @@ -9329,13 +9683,11 @@ components: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls nullable: true reasoning_content: anyOf: - type: string - type: 'null' - title: Reasoning Content nullable: true title: OpenAIChoiceDelta type: object @@ -9348,7 +9700,6 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Content nullable: true refusal: anyOf: @@ -9356,7 +9707,6 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Refusal nullable: true title: OpenAIChoiceLogprobs type: object @@ -9374,8 +9724,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - delta - finish_reason @@ -9407,8 +9759,10 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' nullable: true + title: OpenAIChatCompletionUsage required: - id - choices @@ -9430,11 +9784,16 @@ components: propertyName: role oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: Message + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) finish_reason: title: Finish Reason type: string @@ -9444,8 +9803,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - message - finish_reason @@ -9473,8 +9834,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - finish_reason - text @@ -9496,7 +9859,6 @@ components: type: integer type: array - type: 'null' - title: Text Offset nullable: true token_logprobs: anyOf: @@ -9504,7 +9866,6 @@ components: type: number type: array - type: 'null' - title: Token Logprobs nullable: true tokens: anyOf: @@ -9512,7 +9873,6 @@ components: type: string type: array - type: 'null' - title: Tokens nullable: true top_logprobs: anyOf: @@ -9522,7 +9882,6 @@ components: type: object type: array - type: 'null' - title: Top Logprobs nullable: true title: OpenAICompletionLogprobs type: object @@ -9559,7 +9918,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -9568,9 +9930,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - title: Content + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - call_id - content @@ -9594,7 +9960,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -9603,9 +9972,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - title: Content + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] context: anyOf: - type: string @@ -9616,7 +9989,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -9625,10 +10001,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array + title: list[ImageContentItem | TextContentItem] - type: 'null' - title: Context + title: string | list[ImageContentItem | TextContentItem] nullable: true required: - content @@ -9713,13 +10093,14 @@ components: - additionalProperties: true type: object - type: 'null' - title: Args nullable: true mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true + title: URL required: - toolgroup_id - provider_id @@ -9738,7 +10119,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -9747,9 +10131,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - title: Content + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] chunk_id: title: Chunk Id type: string @@ -9763,13 +10151,14 @@ components: type: number type: array - type: 'null' - title: Embedding nullable: true chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true + title: ChunkMetadata required: - content - chunk_id @@ -9782,7 +10171,6 @@ components: anyOf: - type: string - type: 'null' - title: Name nullable: true file_ids: items: @@ -9794,14 +10182,12 @@ components: - additionalProperties: true type: object - type: 'null' - title: Expires After nullable: true chunking_strategy: anyOf: - additionalProperties: true type: object - type: 'null' - title: Chunking Strategy nullable: true metadata: additionalProperties: true @@ -9816,21 +10202,18 @@ components: anyOf: - type: string - type: 'null' - title: Name nullable: true expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - title: Expires After nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata nullable: true title: VectorStoreModifyRequest type: object @@ -9843,13 +10226,13 @@ components: - items: type: string type: array - title: Query + title: list[string] + title: string | list[string] filters: anyOf: - additionalProperties: true type: object - type: 'null' - title: Filters nullable: true max_num_results: default: 10 @@ -9860,7 +10243,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Ranking Options nullable: true rewrite_query: default: false @@ -9887,10 +10269,16 @@ components: propertyName: role oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) title: Messages type: array params: diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index 30bd2a5ad9..163ef01c43 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -664,7 +664,6 @@ components: type: string type: array - type: 'null' - title: Tool Names type: object title: AllowedToolsFilter description: Filter configuration for restricting which MCP tools can be used. @@ -676,14 +675,12 @@ components: type: string type: array - type: 'null' - title: Always never: anyOf: - items: type: string type: array - type: 'null' - title: Never type: object title: ApprovalFilter description: Filter configuration for MCP tool approval requirements. @@ -750,76 +747,70 @@ components: anyOf: - type: integer - type: 'null' - title: Cancelled At cancelling_at: anyOf: - type: integer - type: 'null' - title: Cancelling At completed_at: anyOf: - type: integer - type: 'null' - title: Completed At error_file_id: anyOf: - type: string - type: 'null' - title: Error File Id errors: anyOf: - $ref: '#/components/schemas/Errors' + title: Errors - type: 'null' + title: Errors expired_at: anyOf: - type: integer - type: 'null' - title: Expired At expires_at: anyOf: - type: integer - type: 'null' - title: Expires At failed_at: anyOf: - type: integer - type: 'null' - title: Failed At finalizing_at: anyOf: - type: integer - type: 'null' - title: Finalizing At in_progress_at: anyOf: - type: integer - type: 'null' - title: In Progress At metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - title: Metadata model: anyOf: - type: string - type: 'null' - title: Model output_file_id: anyOf: - type: string - type: 'null' - title: Output File Id request_counts: anyOf: - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts - type: 'null' + title: BatchRequestCounts usage: anyOf: - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage - type: 'null' + title: BatchUsage additionalProperties: true type: object required: @@ -837,22 +828,18 @@ components: anyOf: - type: string - type: 'null' - title: Code line: anyOf: - type: integer - type: 'null' - title: Line message: anyOf: - type: string - type: 'null' - title: Message param: anyOf: - type: string - type: 'null' - title: Param additionalProperties: true type: object title: BatchError @@ -908,7 +895,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -948,14 +934,18 @@ components: additionalProperties: oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams type: object title: Scoring Params description: Map between scoring function id and parameters for each scoring function you want to run @@ -963,7 +953,6 @@ components: 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: object required: @@ -1011,7 +1000,9 @@ components: training_metrics: anyOf: - $ref: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric - type: 'null' + title: PostTrainingMetric type: object required: - identifier @@ -1028,23 +1019,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array - title: Content + title: list[ImageContentItem-Output | TextContentItem] + title: string | list[ImageContentItem-Output | TextContentItem] chunk_id: type: string title: Chunk Id @@ -1058,11 +1056,12 @@ components: type: number type: array - type: 'null' - title: Embedding chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' + title: ChunkMetadata type: object required: - content @@ -1075,57 +1074,46 @@ components: 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 type: object title: ChunkMetadata description: |- @@ -1165,7 +1153,6 @@ components: type: string type: object - type: 'null' - 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. items: anyOf: @@ -1174,7 +1161,6 @@ components: type: object type: array - type: 'null' - title: Items description: Initial items to include in the conversation context. You may add up to 20 items at a time. type: object required: @@ -1235,14 +1221,23 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools discriminator: propertyName: type mapping: @@ -1255,6 +1250,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (9 variants) type: array title: Data description: List of conversation items @@ -1262,13 +1258,11 @@ components: anyOf: - type: string - type: 'null' - title: First Id description: The ID of the first item in the list last_id: anyOf: - type: string - type: 'null' - title: Last Id description: The ID of the last item in the list has_more: type: boolean @@ -1318,18 +1312,15 @@ components: anyOf: - type: string - type: 'null' - title: Validation Dataset Id packed: anyOf: - type: boolean - type: 'null' - title: Packed default: false train_on_input: anyOf: - type: boolean - type: 'null' - title: Train On Input default: false type: object required: @@ -1349,7 +1340,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -1365,8 +1355,10 @@ components: source: oneOf: - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource - $ref: '#/components/schemas/RowsDataSource' - title: Source + title: RowsDataSource + title: URIDataSource | RowsDataSource discriminator: propertyName: type mapping: @@ -1406,25 +1398,21 @@ components: anyOf: - type: boolean - type: 'null' - title: Enable Activation Checkpointing default: false enable_activation_offloading: anyOf: - type: boolean - type: 'null' - title: Enable Activation Offloading default: false memory_efficient_fsdp_wrap: anyOf: - type: boolean - type: 'null' - title: Memory Efficient Fsdp Wrap default: false fsdp_cpu_offload: anyOf: - type: boolean - type: 'null' - title: Fsdp Cpu Offload default: false type: object title: EfficiencyConfig @@ -1437,12 +1425,10 @@ components: $ref: '#/components/schemas/BatchError' type: array - type: 'null' - title: Data object: anyOf: - type: string - type: 'null' - title: Object additionalProperties: true type: object title: Errors @@ -1598,7 +1584,6 @@ components: anyOf: - type: string - type: 'null' - title: Prompt Template judge_score_regexes: items: type: string @@ -1633,13 +1618,11 @@ components: anyOf: - type: string - type: 'null' - title: First Id description: ID of the first batch in the list last_id: anyOf: - type: string - type: 'null' - title: Last Id description: ID of the last batch in the list has_more: type: boolean @@ -1739,12 +1722,19 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -1755,9 +1745,14 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array title: Data object: @@ -1862,13 +1857,11 @@ components: anyOf: - type: boolean - type: 'null' - title: Use Dora default: false quantize_base: anyOf: - type: boolean - type: 'null' - title: Quantize Base default: false type: object required: @@ -1892,7 +1885,6 @@ components: anyOf: - type: string - type: 'null' - title: Description type: object required: - input_schema @@ -1909,7 +1901,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -1949,7 +1940,9 @@ components: system_message: anyOf: - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage - type: 'null' + title: SystemMessage type: object required: - model @@ -1995,7 +1988,6 @@ components: type: boolean type: object - type: 'null' - title: Categories category_applied_input_types: anyOf: - additionalProperties: @@ -2004,19 +1996,16 @@ components: type: array type: object - type: 'null' - title: Category Applied Input Types category_scores: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Category Scores user_message: anyOf: - type: string - type: 'null' - title: User Message metadata: additionalProperties: true type: object @@ -2059,20 +2048,19 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name tool_calls: anyOf: - items: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls type: object title: OpenAIAssistantMessageParam description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. @@ -2089,20 +2077,19 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name tool_calls: anyOf: - items: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls type: object title: OpenAIAssistantMessageParam description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. @@ -2130,7 +2117,9 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' + title: OpenAIChatCompletionUsage type: object required: - id @@ -2177,10 +2166,15 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam discriminator: propertyName: role mapping: @@ -2189,6 +2183,7 @@ components: system: '#/components/schemas/OpenAISystemMessageParam' tool: '#/components/schemas/OpenAIToolMessageParam' user: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input | ... (5 variants) type: array minItems: 1 title: Messages @@ -2196,14 +2191,13 @@ components: anyOf: - type: number - type: 'null' - title: Frequency Penalty function_call: anyOf: - type: string - additionalProperties: true type: object - type: 'null' - title: Function Call + title: string | object functions: anyOf: - items: @@ -2211,94 +2205,87 @@ components: type: object type: array - type: 'null' - title: Functions logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Logit Bias logprobs: anyOf: - type: boolean - type: 'null' - title: Logprobs max_completion_tokens: anyOf: - type: integer - type: 'null' - title: Max Completion Tokens max_tokens: anyOf: - type: integer - type: 'null' - title: Max Tokens n: anyOf: - type: integer - type: 'null' - title: N parallel_tool_calls: anyOf: - type: boolean - type: 'null' - title: Parallel Tool Calls presence_penalty: anyOf: - type: number - type: 'null' - title: Presence Penalty response_format: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject discriminator: propertyName: type mapping: json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' text: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - type: 'null' title: Response Format seed: anyOf: - type: integer - type: 'null' - title: Seed stop: anyOf: - type: string - items: type: string type: array + title: list[string] - type: 'null' - title: Stop + title: string | list[string] stream: anyOf: - type: boolean - type: 'null' - title: Stream stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - title: Stream Options temperature: anyOf: - type: number - type: 'null' - title: Temperature tool_choice: anyOf: - type: string - additionalProperties: true type: object - type: 'null' - title: Tool Choice + title: string | object tools: anyOf: - items: @@ -2306,22 +2293,18 @@ components: type: object type: array - type: 'null' - title: Tools top_logprobs: anyOf: - type: integer - type: 'null' - title: Top Logprobs top_p: anyOf: - type: number - type: 'null' - title: Top P user: anyOf: - type: string - type: 'null' - title: User additionalProperties: true type: object required: @@ -2335,12 +2318,10 @@ components: anyOf: - type: integer - type: 'null' - title: Index id: anyOf: - type: string - type: 'null' - title: Id type: type: string const: function @@ -2349,7 +2330,9 @@ components: function: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction - type: 'null' + title: OpenAIChatCompletionToolCallFunction type: object title: OpenAIChatCompletionToolCall description: Tool call specification for OpenAI-compatible chat completion responses. @@ -2359,12 +2342,10 @@ components: anyOf: - type: string - type: 'null' - title: Name arguments: anyOf: - type: string - type: 'null' - title: Arguments type: object title: OpenAIChatCompletionToolCallFunction description: Function call details for OpenAI-compatible tool calls. @@ -2382,11 +2363,15 @@ components: prompt_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' + title: OpenAIChatCompletionUsagePromptTokensDetails completion_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' + title: OpenAIChatCompletionUsageCompletionTokensDetails type: object required: - prompt_tokens @@ -2400,7 +2385,6 @@ components: anyOf: - type: integer - type: 'null' - title: Reasoning Tokens type: object title: OpenAIChatCompletionUsageCompletionTokensDetails description: Token details for output tokens in OpenAI chat completion usage. @@ -2410,7 +2394,6 @@ components: anyOf: - type: integer - type: 'null' - title: Cached Tokens type: object title: OpenAIChatCompletionUsagePromptTokensDetails description: Token details for prompt tokens in OpenAI chat completion usage. @@ -2419,11 +2402,16 @@ components: message: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: Message + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam-Output | ... (5 variants) discriminator: propertyName: role mapping: @@ -2441,7 +2429,9 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + title: OpenAIChoiceLogprobs-Output - type: 'null' + title: OpenAIChoiceLogprobs-Output type: object required: - message @@ -2457,14 +2447,12 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Content refusal: anyOf: - items: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Refusal type: object title: OpenAIChoiceLogprobs description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. @@ -2518,7 +2506,9 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + title: OpenAIChoiceLogprobs-Output - type: 'null' + title: OpenAIChoiceLogprobs-Output type: object required: - finish_reason @@ -2543,101 +2533,90 @@ components: - items: type: string type: array + title: list[string] - items: type: integer type: array + title: list[integer] - items: items: type: integer type: array type: array - title: Prompt + title: list[array] + title: string | ... (4 variants) best_of: anyOf: - type: integer - type: 'null' - title: Best Of echo: anyOf: - type: boolean - type: 'null' - title: Echo frequency_penalty: anyOf: - type: number - type: 'null' - title: Frequency Penalty logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Logit Bias logprobs: anyOf: - type: boolean - type: 'null' - title: Logprobs max_tokens: anyOf: - type: integer - type: 'null' - title: Max Tokens n: anyOf: - type: integer - type: 'null' - title: N presence_penalty: anyOf: - type: number - type: 'null' - title: Presence Penalty seed: anyOf: - type: integer - type: 'null' - title: Seed stop: anyOf: - type: string - items: type: string type: array + title: list[string] - type: 'null' - title: Stop + title: string | list[string] stream: anyOf: - type: boolean - type: 'null' - title: Stream stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - title: Stream Options temperature: anyOf: - type: number - type: 'null' - title: Temperature top_p: anyOf: - type: number - type: 'null' - title: Top P user: anyOf: - type: string - type: 'null' - title: User suffix: anyOf: - type: string - type: 'null' - title: Suffix additionalProperties: true type: object required: @@ -2669,15 +2648,22 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' + title: OpenAIChatCompletionUsage input_messages: items: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam discriminator: propertyName: role mapping: @@ -2686,6 +2672,7 @@ components: system: '#/components/schemas/OpenAISystemMessageParam' tool: '#/components/schemas/OpenAIToolMessageParam' user: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output | ... (5 variants) type: array title: Input Messages type: object @@ -2708,17 +2695,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Attributes chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy additionalProperties: true @@ -2733,30 +2722,30 @@ components: anyOf: - type: string - type: 'null' - title: Name file_ids: anyOf: - items: type: string type: array - type: 'null' - title: File Ids expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - title: Expires After chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy metadata: @@ -2764,7 +2753,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Metadata additionalProperties: true type: object title: OpenAICreateVectorStoreRequestWithExtraBody @@ -2801,12 +2789,12 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -2824,8 +2812,9 @@ components: - items: type: number type: array + title: list[number] - type: string - title: Embedding + title: list[number] | string index: type: integer title: Index @@ -2860,23 +2849,21 @@ components: - items: type: string type: array - title: Input + title: list[string] + title: string | list[string] encoding_format: anyOf: - type: string - type: 'null' - title: Encoding Format default: float dimensions: anyOf: - type: integer - type: 'null' - title: Dimensions user: anyOf: - type: string - type: 'null' - title: User additionalProperties: true type: object required: @@ -2946,17 +2933,14 @@ components: 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 type: object title: OpenAIFileFile OpenAIFileObject: @@ -3009,7 +2993,6 @@ components: anyOf: - type: string - type: 'null' - title: Detail type: object required: - url @@ -3024,18 +3007,15 @@ components: anyOf: - type: string - type: 'null' - title: Description strict: anyOf: - type: boolean - type: 'null' - title: Strict schema: anyOf: - additionalProperties: true type: object - type: 'null' - title: Schema type: object title: OpenAIJSONSchema description: JSON schema specification for OpenAI-compatible structured response format. @@ -3060,7 +3040,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Custom Metadata type: object required: - id @@ -3253,12 +3232,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - call_id @@ -3276,22 +3253,18 @@ components: anyOf: - type: string - type: 'null' - title: File Data file_id: anyOf: - type: string - type: 'null' - title: File Id file_url: anyOf: - type: string - type: 'null' - title: File Url filename: anyOf: - type: string - type: 'null' - title: Filename type: object title: OpenAIResponseInputMessageContentFile description: File content for input messages in OpenAI response format. @@ -3305,7 +3278,7 @@ components: const: high - type: string const: auto - title: Detail + title: string default: auto type: type: string @@ -3316,12 +3289,10 @@ components: anyOf: - type: string - type: 'null' - title: File Id image_url: anyOf: - type: string - type: 'null' - title: Image Url type: object title: OpenAIResponseInputMessageContentImage description: Image content for input messages in OpenAI response format. @@ -3357,19 +3328,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Filters max_num_results: anyOf: - type: integer maximum: 50.0 minimum: 1.0 - type: 'null' - title: Max Num Results default: 10 ranking_options: anyOf: - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions - type: 'null' + title: SearchRankingOptions type: object required: - vector_store_ids @@ -3389,18 +3360,15 @@ components: 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 type: object required: - name @@ -3425,7 +3393,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Headers require_approval: anyOf: - type: string @@ -3433,16 +3400,19 @@ components: - type: string const: never - $ref: '#/components/schemas/ApprovalFilter' - title: Require Approval + title: ApprovalFilter + title: string | ApprovalFilter default: never allowed_tools: anyOf: - items: type: string type: array + title: list[string] - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - title: Allowed Tools + title: list[string] | AllowedToolsFilter type: object required: - server_label @@ -3461,14 +3431,13 @@ components: const: web_search_preview_2025_03_11 - type: string const: web_search_2025_08_26 - title: Type + title: string default: web_search search_context_size: anyOf: - type: string pattern: ^low|medium|high$ - type: 'null' - title: Search Context Size default: medium type: object title: OpenAIResponseInputToolWebSearch @@ -3517,12 +3486,10 @@ components: anyOf: - type: string - type: 'null' - title: Id reason: anyOf: - type: string - type: 'null' - title: Reason type: object required: - approval_request_id @@ -3537,26 +3504,35 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal discriminator: propertyName: type mapping: output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - type: string @@ -3567,7 +3543,7 @@ components: const: user - type: string const: assistant - title: Role + title: string type: type: string const: message @@ -3577,12 +3553,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - content @@ -3601,7 +3575,9 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' + title: OpenAIResponseError id: type: string title: Id @@ -3617,12 +3593,19 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -3633,6 +3616,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array title: Output parallel_tool_calls: @@ -3643,11 +3627,12 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + title: OpenAIResponsePrompt status: type: string title: Status @@ -3655,7 +3640,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -3665,15 +3649,18 @@ components: anyOf: - type: number - type: 'null' - title: Top P tools: anyOf: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP discriminator: propertyName: type mapping: @@ -3684,28 +3671,27 @@ components: web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools truncation: anyOf: - type: string - type: 'null' - title: Truncation usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' + title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - title: Instructions max_tool_calls: anyOf: - type: integer - type: 'null' - title: Max Tool Calls type: object required: - created_at @@ -3723,7 +3709,9 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' + title: OpenAIResponseError id: type: string title: Id @@ -3739,12 +3727,19 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -3755,6 +3750,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array title: Output parallel_tool_calls: @@ -3765,11 +3761,12 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + title: OpenAIResponsePrompt status: type: string title: Status @@ -3777,7 +3774,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -3787,15 +3783,18 @@ components: anyOf: - type: number - type: 'null' - title: Top P tools: anyOf: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP discriminator: propertyName: type mapping: @@ -3806,39 +3805,45 @@ components: web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools truncation: anyOf: - type: string - type: 'null' - title: Truncation usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' + title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - title: Instructions max_tool_calls: anyOf: - type: integer - type: 'null' - title: Max Tool Calls input: items: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -3849,9 +3854,14 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array title: Input type: object @@ -3878,9 +3888,13 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath discriminator: propertyName: type mapping: @@ -3888,6 +3902,7 @@ components: file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) type: array title: Annotations type: object @@ -3918,7 +3933,6 @@ components: $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' - title: Results type: object required: - id @@ -3973,12 +3987,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - call_id @@ -4009,12 +4021,10 @@ components: anyOf: - type: string - type: 'null' - title: Error output: anyOf: - type: string - type: 'null' - title: Output type: object required: - id @@ -4077,22 +4087,24 @@ components: - additionalProperties: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: object - type: 'null' - title: Variables version: anyOf: - type: string - type: 'null' - title: Version type: object required: - id @@ -4103,7 +4115,9 @@ components: format: anyOf: - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat - type: 'null' + title: OpenAIResponseTextFormat type: object title: OpenAIResponseText description: Text response configuration for OpenAI responses. @@ -4117,28 +4131,24 @@ components: const: json_schema - type: string const: json_object - title: Type + title: string 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 type: object title: OpenAIResponseTextFormat description: Configuration for Responses API text format. @@ -4157,9 +4167,11 @@ components: - items: type: string type: array + title: list[string] - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - title: Allowed Tools + title: list[string] | AllowedToolsFilter type: object required: - server_label @@ -4179,11 +4191,15 @@ components: input_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails - type: 'null' + title: OpenAIResponseUsageInputTokensDetails output_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails - type: 'null' + title: OpenAIResponseUsageOutputTokensDetails type: object required: - input_tokens @@ -4197,7 +4213,6 @@ components: anyOf: - type: integer - type: 'null' - title: Cached Tokens type: object title: OpenAIResponseUsageInputTokensDetails description: Token details for input tokens in OpenAI response usage. @@ -4207,7 +4222,6 @@ components: anyOf: - type: integer - type: 'null' - title: Reasoning Tokens type: object title: OpenAIResponseUsageOutputTokensDetails description: Token details for output tokens in OpenAI response usage. @@ -4224,12 +4238,12 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -4246,7 +4260,6 @@ components: type: integer type: array - type: 'null' - title: Bytes logprob: type: number title: Logprob @@ -4284,7 +4297,8 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] type: object required: - tool_call_id @@ -4302,7 +4316,6 @@ components: type: integer type: array - type: 'null' - title: Bytes logprob: type: number title: Logprob @@ -4330,21 +4343,25 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile discriminator: propertyName: type mapping: file: '#/components/schemas/OpenAIFile' image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -4363,21 +4380,25 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile discriminator: propertyName: type mapping: file: '#/components/schemas/OpenAIFile' image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -4437,7 +4458,6 @@ components: anyOf: - type: string - type: 'null' - title: Url type: object required: - data @@ -4480,25 +4500,21 @@ components: - type: string format: date-time - type: 'null' - title: Scheduled At started_at: anyOf: - type: string format: date-time - type: 'null' - title: Started At completed_at: anyOf: - type: string format: date-time - type: 'null' - title: Completed At resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' - title: Resources Allocated checkpoints: items: $ref: '#/components/schemas/Checkpoint' @@ -4538,7 +4554,6 @@ components: anyOf: - type: string - type: 'null' - title: Prompt description: The system prompt with variable placeholders version: type: integer @@ -4722,7 +4737,9 @@ components: violation: anyOf: - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation - type: 'null' + title: SafetyViolation type: object title: RunShieldResponse description: Response from running a safety shield. @@ -4734,7 +4751,6 @@ components: anyOf: - type: string - type: 'null' - title: User Message metadata: additionalProperties: true type: object @@ -4749,9 +4765,12 @@ components: strategy: oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy - $ref: '#/components/schemas/TopKSamplingStrategy' - title: Strategy + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy discriminator: propertyName: type mapping: @@ -4762,12 +4781,10 @@ components: anyOf: - type: integer - type: 'null' - title: Max Tokens repetition_penalty: anyOf: - type: number - type: 'null' - title: Repetition Penalty default: 1.0 stop: anyOf: @@ -4775,7 +4792,6 @@ components: type: string type: array - type: 'null' - title: Stop type: object title: SamplingParams description: Sampling parameters. @@ -4785,7 +4801,6 @@ components: anyOf: - type: string - type: 'null' - title: Dataset Id results: additionalProperties: $ref: '#/components/schemas/ScoringResult' @@ -4818,7 +4833,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -4833,7 +4847,6 @@ components: anyOf: - type: string - type: 'null' - title: Description metadata: additionalProperties: true type: object @@ -4842,15 +4855,24 @@ components: return_type: oneOf: - $ref: '#/components/schemas/StringType' + title: StringType - $ref: '#/components/schemas/NumberType' + title: NumberType - $ref: '#/components/schemas/BooleanType' + title: BooleanType - $ref: '#/components/schemas/ArrayType' + title: ArrayType - $ref: '#/components/schemas/ObjectType' + title: ObjectType - $ref: '#/components/schemas/JsonType' + title: JsonType - $ref: '#/components/schemas/UnionType' + title: UnionType - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType - $ref: '#/components/schemas/CompletionInputType' - title: Return Type + title: CompletionInputType + title: StringType | ... (9 variants) description: The return type of the deterministic function discriminator: propertyName: type @@ -4868,14 +4890,18 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' title: Params description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval @@ -4910,12 +4936,10 @@ components: anyOf: - type: string - type: 'null' - title: Ranker score_threshold: anyOf: - type: number - type: 'null' - title: Score Threshold default: 0.0 type: object title: SearchRankingOptions @@ -4930,7 +4954,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -4946,7 +4969,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Params type: object required: - identifier @@ -4975,23 +4997,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: Content + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] type: object required: - content @@ -5018,7 +5047,6 @@ components: anyOf: - type: string - type: 'null' - title: Toolgroup Id name: type: string title: Name @@ -5026,25 +5054,21 @@ components: 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 type: object required: - name @@ -5060,7 +5084,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -5074,13 +5097,14 @@ components: mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' + title: URL args: anyOf: - additionalProperties: true type: object - type: 'null' - title: Args type: object required: - identifier @@ -5094,40 +5118,44 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array + title: list[ImageContentItem-Output | TextContentItem] - type: 'null' - title: Content + title: string | list[ImageContentItem-Output | TextContentItem] error_message: anyOf: - type: string - type: 'null' - title: Error Message error_code: anyOf: - type: integer - type: 'null' - title: Error Code metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata type: object title: ToolInvocationResult description: Result of a tool invocation. @@ -5159,12 +5187,10 @@ components: - type: number minimum: 0.0 - type: 'null' - title: Temperature top_p: anyOf: - type: number - type: 'null' - title: Top P default: 0.95 type: object required: @@ -5188,25 +5214,29 @@ components: anyOf: - type: integer - type: 'null' - title: Max Validation Steps default: 1 data_config: anyOf: - $ref: '#/components/schemas/DataConfig' + title: DataConfig - type: 'null' + title: DataConfig optimizer_config: anyOf: - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig - type: 'null' + title: OptimizerConfig efficiency_config: anyOf: - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig - type: 'null' + title: EfficiencyConfig dtype: anyOf: - type: string - type: 'null' - title: Dtype default: bf16 type: object required: @@ -5345,7 +5375,7 @@ components: const: cancelled - type: string const: failed - title: Status + title: string file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' type: object @@ -5376,7 +5406,6 @@ components: anyOf: - type: string - type: 'null' - title: Next Page type: object required: - data @@ -5435,7 +5464,7 @@ components: const: server_error - type: string const: rate_limit_exceeded - title: Code + title: string message: type: string title: Message @@ -5461,8 +5490,10 @@ components: chunking_strategy: oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: Chunking Strategy + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: @@ -5474,7 +5505,9 @@ components: last_error: anyOf: - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' + title: VectorStoreFileLastError status: anyOf: - type: string @@ -5485,7 +5518,7 @@ components: const: cancelled - type: string const: failed - title: Status + title: string usage_bytes: type: integer title: Usage Bytes @@ -5517,12 +5550,10 @@ components: anyOf: - type: string - type: 'null' - title: First Id last_id: anyOf: - type: string - type: 'null' - title: Last Id has_more: type: boolean title: Has More @@ -5547,12 +5578,10 @@ components: anyOf: - type: string - type: 'null' - title: First Id last_id: anyOf: - type: string - type: 'null' - title: Last Id has_more: type: boolean title: Has More @@ -5577,12 +5606,10 @@ components: anyOf: - type: string - type: 'null' - title: First Id last_id: anyOf: - type: string - type: 'null' - title: Last Id has_more: type: boolean title: Has More @@ -5608,7 +5635,6 @@ components: anyOf: - type: string - type: 'null' - title: Name usage_bytes: type: integer title: Usage Bytes @@ -5624,17 +5650,14 @@ components: - 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 type: object @@ -5664,9 +5687,9 @@ components: - type: string - type: number - type: boolean + title: string | number | boolean type: object - type: 'null' - title: Attributes content: items: $ref: '#/components/schemas/VectorStoreContent' @@ -5704,7 +5727,6 @@ components: anyOf: - type: string - type: 'null' - title: Next Page type: object required: - search_query @@ -5734,13 +5756,14 @@ components: url: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' + title: URL data: anyOf: - type: string - type: 'null' contentEncoding: base64 - title: Data type: object title: _URLOrData description: A URL or a base64 encoded string @@ -5774,21 +5797,25 @@ components: anyOf: - type: string - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: Query + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam items: items: anyOf: - type: string - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam type: array title: Items max_num_results: anyOf: - type: integer - type: 'null' - title: Max Num Results type: object required: - model @@ -5843,23 +5870,24 @@ components: anyOf: - type: string - type: 'null' - title: Model description: Model descriptor for training if not in provider config` checkpoint_dir: anyOf: - type: string - type: 'null' - title: Checkpoint Dir algorithm_config: anyOf: - oneOf: - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig discriminator: propertyName: type mapping: LoRA: '#/components/schemas/LoraFinetuningConfig' QAT: '#/components/schemas/QATFinetuningConfig' + title: LoraFinetuningConfig | QATFinetuningConfig - type: 'null' title: Algorithm Config type: object @@ -5885,7 +5913,6 @@ components: anyOf: - type: string - type: 'null' - title: Instance nullable: true required: - status @@ -5915,7 +5942,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem InterleavedContent: anyOf: - type: string @@ -5926,7 +5956,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -5935,8 +5968,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] BuiltinTool: enum: - brave_search @@ -5984,8 +6022,9 @@ components: tool_name: anyOf: - $ref: '#/components/schemas/BuiltinTool' + title: BuiltinTool - type: string - title: Tool Name + title: BuiltinTool | string arguments: title: Arguments type: string @@ -6007,7 +6046,8 @@ components: anyOf: - type: string - $ref: '#/components/schemas/ToolCall' - title: Tool Call + title: ToolCall + title: string | ToolCall parse_status: $ref: '#/components/schemas/ToolCallParseStatus' required: @@ -6033,8 +6073,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/TextDelta' + title: TextDelta - $ref: '#/components/schemas/ImageDelta' + title: ImageDelta - $ref: '#/components/schemas/ToolCallDelta' + title: ToolCallDelta + title: TextDelta | ImageDelta | ToolCallDelta SamplingStrategy: discriminator: mapping: @@ -6044,8 +6088,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy GrammarResponseFormat: description: Configuration for grammar-guided response generation. properties: @@ -6086,7 +6134,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat OpenAIChatCompletionContentPartParam: discriminator: mapping: @@ -6096,8 +6147,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIAssistantMessageParam: description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: @@ -6112,14 +6167,14 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] nullable: true name: anyOf: - type: string - type: 'null' - title: Name nullable: true tool_calls: anyOf: @@ -6127,7 +6182,6 @@ components: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls nullable: true title: OpenAIAssistantMessageParam type: object @@ -6151,15 +6205,19 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name nullable: true required: - content @@ -6176,10 +6234,16 @@ components: propertyName: role oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) OpenAIResponseFormatParam: discriminator: mapping: @@ -6189,8 +6253,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject VectorStoreChunkingStrategy: discriminator: mapping: @@ -6199,7 +6267,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreFileStatus: anyOf: - const: completed @@ -6210,6 +6281,7 @@ components: type: string - const: failed type: string + title: string OpenAIResponseInputMessageContent: discriminator: mapping: @@ -6219,8 +6291,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseAnnotations: discriminator: mapping: @@ -6231,9 +6307,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseOutputMessageContent: discriminator: mapping: @@ -6242,7 +6323,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal OpenAIResponseMessage: description: |- Corresponds to the various Message types in the Responses API. @@ -6262,9 +6346,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: discriminator: mapping: @@ -6273,9 +6362,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - const: system @@ -6286,7 +6379,7 @@ components: type: string - const: assistant type: string - title: Role + title: string type: const: message default: message @@ -6296,13 +6389,11 @@ components: anyOf: - type: string - type: 'null' - title: Id nullable: true status: anyOf: - type: string - type: 'null' - title: Status nullable: true required: - content @@ -6322,12 +6413,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) OpenAIResponseInputTool: discriminator: mapping: @@ -6341,9 +6440,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseTool: discriminator: mapping: @@ -6357,9 +6461,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseContentPartOutputText: description: Text content within a streamed response part. properties: @@ -6382,9 +6491,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) title: Annotations type: array logprobs: @@ -6394,7 +6508,6 @@ components: type: object type: array - type: 'null' - title: Logprobs nullable: true required: - text @@ -6424,8 +6537,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText OpenAIResponseContentPartReasoningSummary: description: Reasoning summary part in a streamed response. properties: @@ -6479,9 +6596,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: Part + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText sequence_number: title: Sequence Number type: integer @@ -6523,9 +6643,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: Part + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText sequence_number: title: Sequence Number type: integer @@ -6900,13 +7023,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: Item + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) output_index: title: Output Index type: integer @@ -6944,13 +7074,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: Item + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) output_index: title: Output Index type: integer @@ -6994,10 +7131,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: Annotation + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) sequence_number: title: Sequence Number type: integer @@ -7433,41 +7574,78 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) OpenAIResponseInput: anyOf: - discriminator: @@ -7482,15 +7660,27 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage ConversationItem: discriminator: mapping: @@ -7506,14 +7696,24 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) DataSource: discriminator: mapping: @@ -7522,7 +7722,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource ParamType: discriminator: mapping: @@ -7538,14 +7741,24 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/StringType' + title: StringType - $ref: '#/components/schemas/NumberType' + title: NumberType - $ref: '#/components/schemas/BooleanType' + title: BooleanType - $ref: '#/components/schemas/ArrayType' + title: ArrayType - $ref: '#/components/schemas/ObjectType' + title: ObjectType - $ref: '#/components/schemas/JsonType' + title: JsonType - $ref: '#/components/schemas/UnionType' + title: UnionType - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) ScoringFnParams: discriminator: mapping: @@ -7555,8 +7768,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams AlgorithmConfig: discriminator: mapping: @@ -7565,7 +7782,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig SpanEndPayload: description: Payload for a span end event. properties: @@ -7595,7 +7815,6 @@ components: anyOf: - type: string - type: 'null' - title: Parent Span Id nullable: true required: - name @@ -7616,7 +7835,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload LogSeverity: description: The severity level of a log message. enum: @@ -7650,9 +7872,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: metric default: metric @@ -7665,7 +7887,7 @@ components: anyOf: - type: integer - type: number - title: Value + title: integer | number unit: title: Unit type: string @@ -7700,9 +7922,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: structured_log default: structured_log @@ -7716,8 +7938,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload - $ref: '#/components/schemas/SpanEndPayload' - title: Payload + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload required: - trace_id - span_id @@ -7747,9 +7971,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: unstructured_log default: unstructured_log @@ -7777,8 +8001,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent ResponseGuardrailSpec: description: Specification for a guardrail to apply during response generation. properties: @@ -7798,8 +8026,10 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' nullable: true + title: OpenAIResponseError id: title: Id type: string @@ -7825,12 +8055,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) title: Output type: array parallel_tool_calls: @@ -7841,13 +8079,14 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' nullable: true + title: OpenAIResponsePrompt status: title: Status type: string @@ -7855,7 +8094,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' @@ -7866,7 +8104,6 @@ components: anyOf: - type: number - type: 'null' - title: Top P nullable: true tools: anyOf: @@ -7883,35 +8120,38 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools nullable: true truncation: anyOf: - type: string - type: 'null' - title: Truncation nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' nullable: true + title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - title: Instructions nullable: true max_tool_calls: anyOf: - type: integer - type: 'null' - title: Max Tool Calls nullable: true input: items: @@ -7928,15 +8168,27 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage title: Input type: array required: @@ -7958,12 +8210,11 @@ components: anyOf: - type: integer - type: number - title: Value + title: integer | number unit: anyOf: - type: string - type: 'null' - title: Unit nullable: true required: - metric @@ -8000,14 +8251,24 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) maxItems: 20 title: Items type: array @@ -8101,7 +8362,6 @@ components: - type: string - type: 'null' default: int4_weight_int8_dynamic_activation - title: Scheme title: Int4QuantizationConfig type: object OpenAIChoiceDelta: @@ -8111,19 +8371,16 @@ components: anyOf: - type: string - type: 'null' - title: Content nullable: true refusal: anyOf: - type: string - type: 'null' - title: Refusal nullable: true role: anyOf: - type: string - type: 'null' - title: Role nullable: true tool_calls: anyOf: @@ -8131,13 +8388,11 @@ components: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls nullable: true reasoning_content: anyOf: - type: string - type: 'null' - title: Reasoning Content nullable: true title: OpenAIChoiceDelta type: object @@ -8150,7 +8405,6 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Content nullable: true refusal: anyOf: @@ -8158,7 +8412,6 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Refusal nullable: true title: OpenAIChoiceLogprobs type: object @@ -8176,8 +8429,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - delta - finish_reason @@ -8209,8 +8464,10 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' nullable: true + title: OpenAIChatCompletionUsage required: - id - choices @@ -8232,11 +8489,16 @@ components: propertyName: role oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: Message + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) finish_reason: title: Finish Reason type: string @@ -8246,8 +8508,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - message - finish_reason @@ -8275,8 +8539,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - finish_reason - text @@ -8298,7 +8564,6 @@ components: type: integer type: array - type: 'null' - title: Text Offset nullable: true token_logprobs: anyOf: @@ -8306,7 +8571,6 @@ components: type: number type: array - type: 'null' - title: Token Logprobs nullable: true tokens: anyOf: @@ -8314,7 +8578,6 @@ components: type: string type: array - type: 'null' - title: Tokens nullable: true top_logprobs: anyOf: @@ -8324,7 +8587,6 @@ components: type: object type: array - type: 'null' - title: Top Logprobs nullable: true title: OpenAICompletionLogprobs type: object @@ -8361,7 +8623,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -8370,9 +8635,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - title: Content + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - call_id - content @@ -8396,7 +8665,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -8405,9 +8677,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - title: Content + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] context: anyOf: - type: string @@ -8418,7 +8694,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -8427,10 +8706,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array + title: list[ImageContentItem | TextContentItem] - type: 'null' - title: Context + title: string | list[ImageContentItem | TextContentItem] nullable: true required: - content @@ -8515,13 +8798,14 @@ components: - additionalProperties: true type: object - type: 'null' - title: Args nullable: true mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true + title: URL required: - toolgroup_id - provider_id @@ -8540,7 +8824,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -8549,9 +8836,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - title: Content + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] chunk_id: title: Chunk Id type: string @@ -8565,13 +8856,14 @@ components: type: number type: array - type: 'null' - title: Embedding nullable: true chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true + title: ChunkMetadata required: - content - chunk_id @@ -8584,7 +8876,6 @@ components: anyOf: - type: string - type: 'null' - title: Name nullable: true file_ids: items: @@ -8596,14 +8887,12 @@ components: - additionalProperties: true type: object - type: 'null' - title: Expires After nullable: true chunking_strategy: anyOf: - additionalProperties: true type: object - type: 'null' - title: Chunking Strategy nullable: true metadata: additionalProperties: true @@ -8618,21 +8907,18 @@ components: anyOf: - type: string - type: 'null' - title: Name nullable: true expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - title: Expires After nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata nullable: true title: VectorStoreModifyRequest type: object @@ -8645,13 +8931,13 @@ components: - items: type: string type: array - title: Query + title: list[string] + title: string | list[string] filters: anyOf: - additionalProperties: true type: object - type: 'null' - title: Filters nullable: true max_num_results: default: 10 @@ -8662,7 +8948,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Ranking Options nullable: true rewrite_query: default: false diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index 172e426d2b..3646a41a3b 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -3041,7 +3041,6 @@ components: type: string type: array - type: 'null' - title: Tool Names type: object title: AllowedToolsFilter description: Filter configuration for restricting which MCP tools can be used. @@ -3053,14 +3052,12 @@ components: type: string type: array - type: 'null' - title: Always never: anyOf: - items: type: string type: array - type: 'null' - title: Never type: object title: ApprovalFilter description: Filter configuration for MCP tool approval requirements. @@ -3127,76 +3124,70 @@ components: anyOf: - type: integer - type: 'null' - title: Cancelled At cancelling_at: anyOf: - type: integer - type: 'null' - title: Cancelling At completed_at: anyOf: - type: integer - type: 'null' - title: Completed At error_file_id: anyOf: - type: string - type: 'null' - title: Error File Id errors: anyOf: - $ref: '#/components/schemas/Errors' + title: Errors - type: 'null' + title: Errors expired_at: anyOf: - type: integer - type: 'null' - title: Expired At expires_at: anyOf: - type: integer - type: 'null' - title: Expires At failed_at: anyOf: - type: integer - type: 'null' - title: Failed At finalizing_at: anyOf: - type: integer - type: 'null' - title: Finalizing At in_progress_at: anyOf: - type: integer - type: 'null' - title: In Progress At metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - title: Metadata model: anyOf: - type: string - type: 'null' - title: Model output_file_id: anyOf: - type: string - type: 'null' - title: Output File Id request_counts: anyOf: - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts - type: 'null' + title: BatchRequestCounts usage: anyOf: - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage - type: 'null' + title: BatchUsage additionalProperties: true type: object required: @@ -3214,22 +3205,18 @@ components: anyOf: - type: string - type: 'null' - title: Code line: anyOf: - type: integer - type: 'null' - title: Line message: anyOf: - type: string - type: 'null' - title: Message param: anyOf: - type: string - type: 'null' - title: Param additionalProperties: true type: object title: BatchError @@ -3285,7 +3272,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -3325,14 +3311,18 @@ components: additionalProperties: oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams type: object title: Scoring Params description: Map between scoring function id and parameters for each scoring function you want to run @@ -3340,7 +3330,6 @@ components: 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: object required: @@ -3358,7 +3347,9 @@ components: expires_after: anyOf: - $ref: '#/components/schemas/ExpiresAfter' + title: ExpiresAfter - type: 'null' + title: ExpiresAfter type: object required: - file @@ -3405,7 +3396,9 @@ components: training_metrics: anyOf: - $ref: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric - type: 'null' + title: PostTrainingMetric type: object required: - identifier @@ -3422,23 +3415,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: Content + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] chunk_id: type: string title: Chunk Id @@ -3452,11 +3452,12 @@ components: type: number type: array - type: 'null' - title: Embedding chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' + title: ChunkMetadata type: object required: - content @@ -3470,23 +3471,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array - title: Content + title: list[ImageContentItem-Output | TextContentItem] + title: string | list[ImageContentItem-Output | TextContentItem] chunk_id: type: string title: Chunk Id @@ -3500,11 +3508,12 @@ components: type: number type: array - type: 'null' - title: Embedding chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' + title: ChunkMetadata type: object required: - content @@ -3517,57 +3526,46 @@ components: 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 type: object title: ChunkMetadata description: |- @@ -3607,7 +3605,6 @@ components: type: string type: object - type: 'null' - 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. items: anyOf: @@ -3616,7 +3613,6 @@ components: type: object type: array - type: 'null' - title: Items description: Initial items to include in the conversation context. You may add up to 20 items at a time. type: object required: @@ -3689,14 +3685,23 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools discriminator: propertyName: type mapping: @@ -3709,6 +3714,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (9 variants) type: array title: Data description: List of conversation items @@ -3716,13 +3722,11 @@ components: anyOf: - type: string - type: 'null' - title: First Id description: The ID of the first item in the list last_id: anyOf: - type: string - type: 'null' - title: Last Id description: The ID of the last item in the list has_more: type: boolean @@ -3772,18 +3776,15 @@ components: anyOf: - type: string - type: 'null' - title: Validation Dataset Id packed: anyOf: - type: boolean - type: 'null' - title: Packed default: false train_on_input: anyOf: - type: boolean - type: 'null' - title: Train On Input default: false type: object required: @@ -3803,7 +3804,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -3819,8 +3819,10 @@ components: source: oneOf: - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource - $ref: '#/components/schemas/RowsDataSource' - title: Source + title: RowsDataSource + title: URIDataSource | RowsDataSource discriminator: propertyName: type mapping: @@ -3860,25 +3862,21 @@ components: anyOf: - type: boolean - type: 'null' - title: Enable Activation Checkpointing default: false enable_activation_offloading: anyOf: - type: boolean - type: 'null' - title: Enable Activation Offloading default: false memory_efficient_fsdp_wrap: anyOf: - type: boolean - type: 'null' - title: Memory Efficient Fsdp Wrap default: false fsdp_cpu_offload: anyOf: - type: boolean - type: 'null' - title: Fsdp Cpu Offload default: false type: object title: EfficiencyConfig @@ -3891,12 +3889,10 @@ components: $ref: '#/components/schemas/BatchError' type: array - type: 'null' - title: Data object: anyOf: - type: string - type: 'null' - title: Object additionalProperties: true type: object title: Errors @@ -4052,7 +4048,6 @@ components: anyOf: - type: string - type: 'null' - title: Prompt Template judge_score_regexes: items: type: string @@ -4087,13 +4082,11 @@ components: anyOf: - type: string - type: 'null' - title: First Id description: ID of the first batch in the list last_id: anyOf: - type: string - type: 'null' - title: Last Id description: ID of the last batch in the list has_more: type: boolean @@ -4170,12 +4163,19 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -4186,9 +4186,14 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array title: Data object: @@ -4340,13 +4345,11 @@ components: anyOf: - type: boolean - type: 'null' - title: Use Dora default: false quantize_base: anyOf: - type: boolean - type: 'null' - title: Quantize Base default: false type: object required: @@ -4370,7 +4373,6 @@ components: anyOf: - type: string - type: 'null' - title: Description type: object required: - input_schema @@ -4387,7 +4389,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -4427,7 +4428,9 @@ components: system_message: anyOf: - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage - type: 'null' + title: SystemMessage type: object required: - model @@ -4473,7 +4476,6 @@ components: type: boolean type: object - type: 'null' - title: Categories category_applied_input_types: anyOf: - additionalProperties: @@ -4482,19 +4484,16 @@ components: type: array type: object - type: 'null' - title: Category Applied Input Types category_scores: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Category Scores user_message: anyOf: - type: string - type: 'null' - title: User Message metadata: additionalProperties: true type: object @@ -4537,20 +4536,19 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name tool_calls: anyOf: - items: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls type: object title: OpenAIAssistantMessageParam description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. @@ -4567,20 +4565,19 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name tool_calls: anyOf: - items: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls type: object title: OpenAIAssistantMessageParam description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. @@ -4608,7 +4605,9 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' + title: OpenAIChatCompletionUsage type: object required: - id @@ -4655,10 +4654,15 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam discriminator: propertyName: role mapping: @@ -4667,6 +4671,7 @@ components: system: '#/components/schemas/OpenAISystemMessageParam' tool: '#/components/schemas/OpenAIToolMessageParam' user: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input | ... (5 variants) type: array minItems: 1 title: Messages @@ -4674,14 +4679,13 @@ components: anyOf: - type: number - type: 'null' - title: Frequency Penalty function_call: anyOf: - type: string - additionalProperties: true type: object - type: 'null' - title: Function Call + title: string | object functions: anyOf: - items: @@ -4689,94 +4693,87 @@ components: type: object type: array - type: 'null' - title: Functions logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Logit Bias logprobs: anyOf: - type: boolean - type: 'null' - title: Logprobs max_completion_tokens: anyOf: - type: integer - type: 'null' - title: Max Completion Tokens max_tokens: anyOf: - type: integer - type: 'null' - title: Max Tokens n: anyOf: - type: integer - type: 'null' - title: N parallel_tool_calls: anyOf: - type: boolean - type: 'null' - title: Parallel Tool Calls presence_penalty: anyOf: - type: number - type: 'null' - title: Presence Penalty response_format: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject discriminator: propertyName: type mapping: json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' text: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - type: 'null' title: Response Format seed: anyOf: - type: integer - type: 'null' - title: Seed stop: anyOf: - type: string - items: type: string type: array + title: list[string] - type: 'null' - title: Stop + title: string | list[string] stream: anyOf: - type: boolean - type: 'null' - title: Stream stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - title: Stream Options temperature: anyOf: - type: number - type: 'null' - title: Temperature tool_choice: anyOf: - type: string - additionalProperties: true type: object - type: 'null' - title: Tool Choice + title: string | object tools: anyOf: - items: @@ -4784,22 +4781,18 @@ components: type: object type: array - type: 'null' - title: Tools top_logprobs: anyOf: - type: integer - type: 'null' - title: Top Logprobs top_p: anyOf: - type: number - type: 'null' - title: Top P user: anyOf: - type: string - type: 'null' - title: User additionalProperties: true type: object required: @@ -4813,12 +4806,10 @@ components: anyOf: - type: integer - type: 'null' - title: Index id: anyOf: - type: string - type: 'null' - title: Id type: type: string const: function @@ -4827,7 +4818,9 @@ components: function: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction - type: 'null' + title: OpenAIChatCompletionToolCallFunction type: object title: OpenAIChatCompletionToolCall description: Tool call specification for OpenAI-compatible chat completion responses. @@ -4837,12 +4830,10 @@ components: anyOf: - type: string - type: 'null' - title: Name arguments: anyOf: - type: string - type: 'null' - title: Arguments type: object title: OpenAIChatCompletionToolCallFunction description: Function call details for OpenAI-compatible tool calls. @@ -4860,11 +4851,15 @@ components: prompt_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' + title: OpenAIChatCompletionUsagePromptTokensDetails completion_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' + title: OpenAIChatCompletionUsageCompletionTokensDetails type: object required: - prompt_tokens @@ -4878,7 +4873,6 @@ components: anyOf: - type: integer - type: 'null' - title: Reasoning Tokens type: object title: OpenAIChatCompletionUsageCompletionTokensDetails description: Token details for output tokens in OpenAI chat completion usage. @@ -4888,7 +4882,6 @@ components: anyOf: - type: integer - type: 'null' - title: Cached Tokens type: object title: OpenAIChatCompletionUsagePromptTokensDetails description: Token details for prompt tokens in OpenAI chat completion usage. @@ -4897,11 +4890,16 @@ components: message: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: Message + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam-Output | ... (5 variants) discriminator: propertyName: role mapping: @@ -4919,7 +4917,9 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + title: OpenAIChoiceLogprobs-Output - type: 'null' + title: OpenAIChoiceLogprobs-Output type: object required: - message @@ -4935,14 +4935,12 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Content refusal: anyOf: - items: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Refusal type: object title: OpenAIChoiceLogprobs description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. @@ -4996,7 +4994,9 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + title: OpenAIChoiceLogprobs-Output - type: 'null' + title: OpenAIChoiceLogprobs-Output type: object required: - finish_reason @@ -5021,101 +5021,90 @@ components: - items: type: string type: array + title: list[string] - items: type: integer type: array + title: list[integer] - items: items: type: integer type: array type: array - title: Prompt + title: list[array] + title: string | ... (4 variants) best_of: anyOf: - type: integer - type: 'null' - title: Best Of echo: anyOf: - type: boolean - type: 'null' - title: Echo frequency_penalty: anyOf: - type: number - type: 'null' - title: Frequency Penalty logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Logit Bias logprobs: anyOf: - type: boolean - type: 'null' - title: Logprobs max_tokens: anyOf: - type: integer - type: 'null' - title: Max Tokens n: anyOf: - type: integer - type: 'null' - title: N presence_penalty: anyOf: - type: number - type: 'null' - title: Presence Penalty seed: anyOf: - type: integer - type: 'null' - title: Seed stop: anyOf: - type: string - items: type: string type: array + title: list[string] - type: 'null' - title: Stop + title: string | list[string] stream: anyOf: - type: boolean - type: 'null' - title: Stream stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - title: Stream Options temperature: anyOf: - type: number - type: 'null' - title: Temperature top_p: anyOf: - type: number - type: 'null' - title: Top P user: anyOf: - type: string - type: 'null' - title: User suffix: anyOf: - type: string - type: 'null' - title: Suffix additionalProperties: true type: object required: @@ -5147,15 +5136,22 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' + title: OpenAIChatCompletionUsage input_messages: items: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam discriminator: propertyName: role mapping: @@ -5164,6 +5160,7 @@ components: system: '#/components/schemas/OpenAISystemMessageParam' tool: '#/components/schemas/OpenAIToolMessageParam' user: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output | ... (5 variants) type: array title: Input Messages type: object @@ -5186,17 +5183,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Attributes chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy additionalProperties: true @@ -5211,30 +5210,30 @@ components: anyOf: - type: string - type: 'null' - title: Name file_ids: anyOf: - items: type: string type: array - type: 'null' - title: File Ids expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - title: Expires After chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy metadata: @@ -5242,7 +5241,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Metadata additionalProperties: true type: object title: OpenAICreateVectorStoreRequestWithExtraBody @@ -5279,12 +5277,12 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -5302,8 +5300,9 @@ components: - items: type: number type: array + title: list[number] - type: string - title: Embedding + title: list[number] | string index: type: integer title: Index @@ -5338,23 +5337,21 @@ components: - items: type: string type: array - title: Input + title: list[string] + title: string | list[string] encoding_format: anyOf: - type: string - type: 'null' - title: Encoding Format default: float dimensions: anyOf: - type: integer - type: 'null' - title: Dimensions user: anyOf: - type: string - type: 'null' - title: User additionalProperties: true type: object required: @@ -5424,17 +5421,14 @@ components: 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 type: object title: OpenAIFileFile OpenAIFileObject: @@ -5487,7 +5481,6 @@ components: anyOf: - type: string - type: 'null' - title: Detail type: object required: - url @@ -5502,18 +5495,15 @@ components: anyOf: - type: string - type: 'null' - title: Description strict: anyOf: - type: boolean - type: 'null' - title: Strict schema: anyOf: - additionalProperties: true type: object - type: 'null' - title: Schema type: object title: OpenAIJSONSchema description: JSON schema specification for OpenAI-compatible structured response format. @@ -5549,7 +5539,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Custom Metadata type: object required: - id @@ -5742,12 +5731,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - call_id @@ -5765,22 +5752,18 @@ components: anyOf: - type: string - type: 'null' - title: File Data file_id: anyOf: - type: string - type: 'null' - title: File Id file_url: anyOf: - type: string - type: 'null' - title: File Url filename: anyOf: - type: string - type: 'null' - title: Filename type: object title: OpenAIResponseInputMessageContentFile description: File content for input messages in OpenAI response format. @@ -5794,7 +5777,7 @@ components: const: high - type: string const: auto - title: Detail + title: string default: auto type: type: string @@ -5805,12 +5788,10 @@ components: anyOf: - type: string - type: 'null' - title: File Id image_url: anyOf: - type: string - type: 'null' - title: Image Url type: object title: OpenAIResponseInputMessageContentImage description: Image content for input messages in OpenAI response format. @@ -5846,19 +5827,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Filters max_num_results: anyOf: - type: integer maximum: 50.0 minimum: 1.0 - type: 'null' - title: Max Num Results default: 10 ranking_options: anyOf: - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions - type: 'null' + title: SearchRankingOptions type: object required: - vector_store_ids @@ -5878,18 +5859,15 @@ components: 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 type: object required: - name @@ -5914,7 +5892,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Headers require_approval: anyOf: - type: string @@ -5922,16 +5899,19 @@ components: - type: string const: never - $ref: '#/components/schemas/ApprovalFilter' - title: Require Approval + title: ApprovalFilter + title: string | ApprovalFilter default: never allowed_tools: anyOf: - items: type: string type: array + title: list[string] - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - title: Allowed Tools + title: list[string] | AllowedToolsFilter type: object required: - server_label @@ -5950,14 +5930,13 @@ components: const: web_search_preview_2025_03_11 - type: string const: web_search_2025_08_26 - title: Type + title: string default: web_search search_context_size: anyOf: - type: string pattern: ^low|medium|high$ - type: 'null' - title: Search Context Size default: medium type: object title: OpenAIResponseInputToolWebSearch @@ -6006,12 +5985,10 @@ components: anyOf: - type: string - type: 'null' - title: Id reason: anyOf: - type: string - type: 'null' - title: Reason type: object required: - approval_request_id @@ -6026,26 +6003,35 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal discriminator: propertyName: type mapping: output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - type: string @@ -6056,7 +6042,7 @@ components: const: user - type: string const: assistant - title: Role + title: string type: type: string const: message @@ -6066,12 +6052,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - content @@ -6090,26 +6074,35 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal discriminator: propertyName: type mapping: output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - type: string @@ -6120,7 +6113,7 @@ components: const: user - type: string const: assistant - title: Role + title: string type: type: string const: message @@ -6130,12 +6123,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - content @@ -6154,7 +6145,9 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' + title: OpenAIResponseError id: type: string title: Id @@ -6170,12 +6163,19 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -6186,6 +6186,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array title: Output parallel_tool_calls: @@ -6196,11 +6197,12 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + title: OpenAIResponsePrompt status: type: string title: Status @@ -6208,7 +6210,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -6218,15 +6219,18 @@ components: anyOf: - type: number - type: 'null' - title: Top P tools: anyOf: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP discriminator: propertyName: type mapping: @@ -6237,28 +6241,27 @@ components: web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools truncation: anyOf: - type: string - type: 'null' - title: Truncation usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' + title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - title: Instructions max_tool_calls: anyOf: - type: integer - type: 'null' - title: Max Tool Calls type: object required: - created_at @@ -6276,7 +6279,9 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' + title: OpenAIResponseError id: type: string title: Id @@ -6292,12 +6297,19 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -6308,6 +6320,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array title: Output parallel_tool_calls: @@ -6318,11 +6331,12 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + title: OpenAIResponsePrompt status: type: string title: Status @@ -6330,7 +6344,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -6340,15 +6353,18 @@ components: anyOf: - type: number - type: 'null' - title: Top P tools: anyOf: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP discriminator: propertyName: type mapping: @@ -6359,39 +6375,45 @@ components: web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools truncation: anyOf: - type: string - type: 'null' - title: Truncation usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' + title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - title: Instructions max_tool_calls: anyOf: - type: integer - type: 'null' - title: Max Tool Calls input: items: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -6402,9 +6424,14 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array title: Input type: object @@ -6431,9 +6458,13 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath discriminator: propertyName: type mapping: @@ -6441,6 +6472,7 @@ components: file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) type: array title: Annotations type: object @@ -6471,7 +6503,6 @@ components: $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' - title: Results type: object required: - id @@ -6526,12 +6557,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - call_id @@ -6562,12 +6591,10 @@ components: anyOf: - type: string - type: 'null' - title: Error output: anyOf: - type: string - type: 'null' - title: Output type: object required: - id @@ -6630,22 +6657,24 @@ components: - additionalProperties: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: object - type: 'null' - title: Variables version: anyOf: - type: string - type: 'null' - title: Version type: object required: - id @@ -6656,7 +6685,9 @@ components: format: anyOf: - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat - type: 'null' + title: OpenAIResponseTextFormat type: object title: OpenAIResponseText description: Text response configuration for OpenAI responses. @@ -6670,28 +6701,24 @@ components: const: json_schema - type: string const: json_object - title: Type + title: string 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 type: object title: OpenAIResponseTextFormat description: Configuration for Responses API text format. @@ -6710,9 +6737,11 @@ components: - items: type: string type: array + title: list[string] - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - title: Allowed Tools + title: list[string] | AllowedToolsFilter type: object required: - server_label @@ -6732,11 +6761,15 @@ components: input_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails - type: 'null' + title: OpenAIResponseUsageInputTokensDetails output_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails - type: 'null' + title: OpenAIResponseUsageOutputTokensDetails type: object required: - input_tokens @@ -6750,7 +6783,6 @@ components: anyOf: - type: integer - type: 'null' - title: Cached Tokens type: object title: OpenAIResponseUsageInputTokensDetails description: Token details for input tokens in OpenAI response usage. @@ -6760,7 +6792,6 @@ components: anyOf: - type: integer - type: 'null' - title: Reasoning Tokens type: object title: OpenAIResponseUsageOutputTokensDetails description: Token details for output tokens in OpenAI response usage. @@ -6777,12 +6808,12 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -6799,7 +6830,6 @@ components: type: integer type: array - type: 'null' - title: Bytes logprob: type: number title: Logprob @@ -6837,7 +6867,8 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] type: object required: - tool_call_id @@ -6855,7 +6886,6 @@ components: type: integer type: array - type: 'null' - title: Bytes logprob: type: number title: Logprob @@ -6883,21 +6913,25 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile discriminator: propertyName: type mapping: file: '#/components/schemas/OpenAIFile' image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -6916,21 +6950,25 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile discriminator: propertyName: type mapping: file: '#/components/schemas/OpenAIFile' image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -6997,7 +7035,6 @@ components: anyOf: - type: string - type: 'null' - title: Url type: object required: - data @@ -7031,25 +7068,21 @@ components: - type: string format: date-time - type: 'null' - title: Scheduled At started_at: anyOf: - type: string format: date-time - type: 'null' - title: Started At completed_at: anyOf: - type: string format: date-time - type: 'null' - title: Completed At resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' - title: Resources Allocated checkpoints: items: $ref: '#/components/schemas/Checkpoint' @@ -7089,7 +7122,6 @@ components: anyOf: - type: string - type: 'null' - title: Prompt description: The system prompt with variable placeholders version: type: integer @@ -7273,7 +7305,9 @@ components: violation: anyOf: - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation - type: 'null' + title: SafetyViolation type: object title: RunShieldResponse description: Response from running a safety shield. @@ -7285,7 +7319,6 @@ components: anyOf: - type: string - type: 'null' - title: User Message metadata: additionalProperties: true type: object @@ -7300,9 +7333,12 @@ components: strategy: oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy - $ref: '#/components/schemas/TopKSamplingStrategy' - title: Strategy + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy discriminator: propertyName: type mapping: @@ -7313,12 +7349,10 @@ components: anyOf: - type: integer - type: 'null' - title: Max Tokens repetition_penalty: anyOf: - type: number - type: 'null' - title: Repetition Penalty default: 1.0 stop: anyOf: @@ -7326,7 +7360,6 @@ components: type: string type: array - type: 'null' - title: Stop type: object title: SamplingParams description: Sampling parameters. @@ -7336,7 +7369,6 @@ components: anyOf: - type: string - type: 'null' - title: Dataset Id results: additionalProperties: $ref: '#/components/schemas/ScoringResult' @@ -7369,7 +7401,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -7384,7 +7415,6 @@ components: anyOf: - type: string - type: 'null' - title: Description metadata: additionalProperties: true type: object @@ -7393,15 +7423,24 @@ components: return_type: oneOf: - $ref: '#/components/schemas/StringType' + title: StringType - $ref: '#/components/schemas/NumberType' + title: NumberType - $ref: '#/components/schemas/BooleanType' + title: BooleanType - $ref: '#/components/schemas/ArrayType' + title: ArrayType - $ref: '#/components/schemas/ObjectType' + title: ObjectType - $ref: '#/components/schemas/JsonType' + title: JsonType - $ref: '#/components/schemas/UnionType' + title: UnionType - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType - $ref: '#/components/schemas/CompletionInputType' - title: Return Type + title: CompletionInputType + title: StringType | ... (9 variants) description: The return type of the deterministic function discriminator: propertyName: type @@ -7419,14 +7458,18 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' title: Params description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval @@ -7461,12 +7504,10 @@ components: anyOf: - type: string - type: 'null' - title: Ranker score_threshold: anyOf: - type: number - type: 'null' - title: Score Threshold default: 0.0 type: object title: SearchRankingOptions @@ -7481,7 +7522,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -7497,7 +7537,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Params type: object required: - identifier @@ -7526,23 +7565,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: Content + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] type: object required: - content @@ -7569,7 +7615,6 @@ components: anyOf: - type: string - type: 'null' - title: Toolgroup Id name: type: string title: Name @@ -7577,25 +7622,21 @@ components: 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 type: object required: - name @@ -7611,7 +7652,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -7625,13 +7665,14 @@ components: mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' + title: URL args: anyOf: - additionalProperties: true type: object - type: 'null' - title: Args type: object required: - identifier @@ -7645,40 +7686,44 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array + title: list[ImageContentItem-Output | TextContentItem] - type: 'null' - title: Content + title: string | list[ImageContentItem-Output | TextContentItem] error_message: anyOf: - type: string - type: 'null' - title: Error Message error_code: anyOf: - type: integer - type: 'null' - title: Error Code metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata type: object title: ToolInvocationResult description: Result of a tool invocation. @@ -7710,12 +7755,10 @@ components: - type: number minimum: 0.0 - type: 'null' - title: Temperature top_p: anyOf: - type: number - type: 'null' - title: Top P default: 0.95 type: object required: @@ -7739,25 +7782,29 @@ components: anyOf: - type: integer - type: 'null' - title: Max Validation Steps default: 1 data_config: anyOf: - $ref: '#/components/schemas/DataConfig' + title: DataConfig - type: 'null' + title: DataConfig optimizer_config: anyOf: - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig - type: 'null' + title: OptimizerConfig efficiency_config: anyOf: - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig - type: 'null' + title: EfficiencyConfig dtype: anyOf: - type: string - type: 'null' - title: Dtype default: bf16 type: object required: @@ -7896,7 +7943,7 @@ components: const: cancelled - type: string const: failed - title: Status + title: string file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' type: object @@ -7927,7 +7974,6 @@ components: anyOf: - type: string - type: 'null' - title: Next Page type: object required: - data @@ -7986,7 +8032,7 @@ components: const: server_error - type: string const: rate_limit_exceeded - title: Code + title: string message: type: string title: Message @@ -8012,8 +8058,10 @@ components: chunking_strategy: oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: Chunking Strategy + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: @@ -8025,7 +8073,9 @@ components: last_error: anyOf: - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' + title: VectorStoreFileLastError status: anyOf: - type: string @@ -8036,7 +8086,7 @@ components: const: cancelled - type: string const: failed - title: Status + title: string usage_bytes: type: integer title: Usage Bytes @@ -8068,12 +8118,10 @@ components: anyOf: - type: string - type: 'null' - title: First Id last_id: anyOf: - type: string - type: 'null' - title: Last Id has_more: type: boolean title: Has More @@ -8098,12 +8146,10 @@ components: anyOf: - type: string - type: 'null' - title: First Id last_id: anyOf: - type: string - type: 'null' - title: Last Id has_more: type: boolean title: Has More @@ -8128,12 +8174,10 @@ components: anyOf: - type: string - type: 'null' - title: First Id last_id: anyOf: - type: string - type: 'null' - title: Last Id has_more: type: boolean title: Has More @@ -8159,7 +8203,6 @@ components: anyOf: - type: string - type: 'null' - title: Name usage_bytes: type: integer title: Usage Bytes @@ -8175,17 +8218,14 @@ components: - 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 type: object @@ -8215,9 +8255,9 @@ components: - type: string - type: number - type: boolean + title: string | number | boolean type: object - type: 'null' - title: Attributes content: items: $ref: '#/components/schemas/VectorStoreContent' @@ -8255,7 +8295,6 @@ components: anyOf: - type: string - type: 'null' - title: Next Page type: object required: - search_query @@ -8285,13 +8324,14 @@ components: url: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' + title: URL data: anyOf: - type: string - type: 'null' contentEncoding: base64 - title: Data type: object title: _URLOrData description: A URL or a base64 encoded string @@ -8313,12 +8353,10 @@ components: type: string type: object - type: 'null' - title: Metadata idempotency_key: anyOf: - type: string - type: 'null' - title: Idempotency Key type: object required: - input_file_id @@ -8332,14 +8370,23 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools discriminator: propertyName: type mapping: @@ -8352,16 +8399,15 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Input' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) type: array - type: 'null' - title: Items metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - title: Metadata type: object title: _conversations_Request _conversations_conversation_id_Request: @@ -8381,14 +8427,23 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools discriminator: propertyName: type mapping: @@ -8401,6 +8456,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Input' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) type: array title: Items type: object @@ -8415,12 +8471,12 @@ components: - items: type: string type: array - title: Input + title: list[string] + title: string | list[string] model: anyOf: - type: string - type: 'null' - title: Model type: object required: - input @@ -8436,7 +8492,6 @@ components: type: string type: array - type: 'null' - title: Variables type: object required: - prompt @@ -8455,7 +8510,6 @@ components: type: string type: array - type: 'null' - title: Variables set_as_default: type: boolean title: Set As Default @@ -8483,12 +8537,19 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -8499,62 +8560,70 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Input' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input type: array - title: Input + title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] model: type: string title: Model prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + title: OpenAIResponsePrompt instructions: anyOf: - type: string - type: 'null' - title: Instructions previous_response_id: anyOf: - type: string - type: 'null' - title: Previous Response Id conversation: anyOf: - type: string - type: 'null' - title: Conversation store: anyOf: - type: boolean - type: 'null' - title: Store default: true stream: anyOf: - type: boolean - type: 'null' - title: Stream default: false temperature: anyOf: - type: number - type: 'null' - title: Temperature text: anyOf: - $ref: '#/components/schemas/OpenAIResponseText' + title: OpenAIResponseText - type: 'null' + title: OpenAIResponseText tools: anyOf: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP discriminator: propertyName: type mapping: @@ -8565,27 +8634,24 @@ components: web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools include: anyOf: - items: type: string type: array - type: 'null' - title: Include max_infer_iters: anyOf: - type: integer - type: 'null' - title: Max Infer Iters default: 10 max_tool_calls: anyOf: - type: integer - type: 'null' - title: Max Tool Calls type: object required: - input @@ -8604,15 +8670,20 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' + title: AdditionalpropertiesUnion type: object title: Scoring Functions type: object @@ -8630,15 +8701,20 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' + title: AdditionalpropertiesUnion type: object title: Scoring Functions save_results_dataset: @@ -8674,29 +8750,35 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: Query + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] params: anyOf: - additionalProperties: true type: object - type: 'null' - title: Params type: object required: - vector_store_id @@ -8708,19 +8790,16 @@ components: anyOf: - type: string - type: 'null' - title: Name expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - title: Expires After metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata type: object title: _vector_stores_vector_store_id_Request _vector_stores_vector_store_id_files_Request: @@ -8733,17 +8812,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Attributes chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy type: object @@ -8768,34 +8849,33 @@ components: - items: type: string type: array - title: Query + title: list[string] + title: string | list[string] filters: anyOf: - additionalProperties: true type: object - type: 'null' - title: Filters max_num_results: anyOf: - type: integer - type: 'null' - title: Max Num Results default: 10 ranking_options: anyOf: - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions - type: 'null' + title: SearchRankingOptions rewrite_query: anyOf: - type: boolean - type: 'null' - title: Rewrite Query default: false search_mode: anyOf: - type: string - type: 'null' - title: Search Mode default: vector type: object required: @@ -8817,7 +8897,6 @@ components: anyOf: - type: string - type: 'null' - title: Instance nullable: true required: - status @@ -8847,7 +8926,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem InterleavedContent: anyOf: - type: string @@ -8858,7 +8940,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -8867,8 +8952,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] BuiltinTool: enum: - brave_search @@ -8916,8 +9006,9 @@ components: tool_name: anyOf: - $ref: '#/components/schemas/BuiltinTool' + title: BuiltinTool - type: string - title: Tool Name + title: BuiltinTool | string arguments: title: Arguments type: string @@ -8939,7 +9030,8 @@ components: anyOf: - type: string - $ref: '#/components/schemas/ToolCall' - title: Tool Call + title: ToolCall + title: string | ToolCall parse_status: $ref: '#/components/schemas/ToolCallParseStatus' required: @@ -8965,8 +9057,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/TextDelta' + title: TextDelta - $ref: '#/components/schemas/ImageDelta' + title: ImageDelta - $ref: '#/components/schemas/ToolCallDelta' + title: ToolCallDelta + title: TextDelta | ImageDelta | ToolCallDelta SamplingStrategy: discriminator: mapping: @@ -8976,8 +9072,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy GrammarResponseFormat: description: Configuration for grammar-guided response generation. properties: @@ -9018,7 +9118,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat OpenAIChatCompletionContentPartParam: discriminator: mapping: @@ -9028,8 +9131,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIAssistantMessageParam: description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: @@ -9044,14 +9151,14 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] nullable: true name: anyOf: - type: string - type: 'null' - title: Name nullable: true tool_calls: anyOf: @@ -9059,7 +9166,6 @@ components: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls nullable: true title: OpenAIAssistantMessageParam type: object @@ -9083,15 +9189,19 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name nullable: true required: - content @@ -9108,10 +9218,16 @@ components: propertyName: role oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) OpenAIResponseFormatParam: discriminator: mapping: @@ -9121,8 +9237,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject VectorStoreChunkingStrategy: discriminator: mapping: @@ -9131,7 +9251,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreFileStatus: anyOf: - const: completed @@ -9142,6 +9265,7 @@ components: type: string - const: failed type: string + title: string OpenAIResponseInputMessageContent: discriminator: mapping: @@ -9151,8 +9275,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseAnnotations: discriminator: mapping: @@ -9163,9 +9291,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseOutputMessageContent: discriminator: mapping: @@ -9174,7 +9307,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal OpenAIResponseMessage: description: |- Corresponds to the various Message types in the Responses API. @@ -9194,9 +9330,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: discriminator: mapping: @@ -9205,9 +9346,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - const: system @@ -9218,7 +9363,7 @@ components: type: string - const: assistant type: string - title: Role + title: string type: const: message default: message @@ -9228,13 +9373,11 @@ components: anyOf: - type: string - type: 'null' - title: Id nullable: true status: anyOf: - type: string - type: 'null' - title: Status nullable: true required: - content @@ -9254,12 +9397,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) OpenAIResponseInputTool: discriminator: mapping: @@ -9273,9 +9424,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseTool: discriminator: mapping: @@ -9289,9 +9445,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseContentPartOutputText: description: Text content within a streamed response part. properties: @@ -9314,9 +9475,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) title: Annotations type: array logprobs: @@ -9326,7 +9492,6 @@ components: type: object type: array - type: 'null' - title: Logprobs nullable: true required: - text @@ -9356,8 +9521,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText OpenAIResponseContentPartReasoningSummary: description: Reasoning summary part in a streamed response. properties: @@ -9411,9 +9580,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: Part + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText sequence_number: title: Sequence Number type: integer @@ -9455,9 +9627,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: Part + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText sequence_number: title: Sequence Number type: integer @@ -9832,13 +10007,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: Item + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) output_index: title: Output Index type: integer @@ -9876,13 +10058,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: Item + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) output_index: title: Output Index type: integer @@ -9926,10 +10115,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: Annotation + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) sequence_number: title: Sequence Number type: integer @@ -10365,41 +10558,78 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) OpenAIResponseInput: anyOf: - discriminator: @@ -10414,15 +10644,27 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage ConversationItem: discriminator: mapping: @@ -10438,14 +10680,24 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) DataSource: discriminator: mapping: @@ -10454,7 +10706,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource ParamType: discriminator: mapping: @@ -10470,14 +10725,24 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/StringType' + title: StringType - $ref: '#/components/schemas/NumberType' + title: NumberType - $ref: '#/components/schemas/BooleanType' + title: BooleanType - $ref: '#/components/schemas/ArrayType' + title: ArrayType - $ref: '#/components/schemas/ObjectType' + title: ObjectType - $ref: '#/components/schemas/JsonType' + title: JsonType - $ref: '#/components/schemas/UnionType' + title: UnionType - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) ScoringFnParams: discriminator: mapping: @@ -10487,8 +10752,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams AlgorithmConfig: discriminator: mapping: @@ -10497,7 +10766,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig SpanEndPayload: description: Payload for a span end event. properties: @@ -10527,7 +10799,6 @@ components: anyOf: - type: string - type: 'null' - title: Parent Span Id nullable: true required: - name @@ -10548,7 +10819,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload LogSeverity: description: The severity level of a log message. enum: @@ -10582,9 +10856,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: metric default: metric @@ -10597,7 +10871,7 @@ components: anyOf: - type: integer - type: number - title: Value + title: integer | number unit: title: Unit type: string @@ -10632,9 +10906,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: structured_log default: structured_log @@ -10648,8 +10922,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload - $ref: '#/components/schemas/SpanEndPayload' - title: Payload + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload required: - trace_id - span_id @@ -10679,9 +10955,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: unstructured_log default: unstructured_log @@ -10709,8 +10985,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent ResponseGuardrailSpec: description: Specification for a guardrail to apply during response generation. properties: @@ -10730,8 +11010,10 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' nullable: true + title: OpenAIResponseError id: title: Id type: string @@ -10757,12 +11039,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) title: Output type: array parallel_tool_calls: @@ -10773,13 +11063,14 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' nullable: true + title: OpenAIResponsePrompt status: title: Status type: string @@ -10787,7 +11078,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' @@ -10798,7 +11088,6 @@ components: anyOf: - type: number - type: 'null' - title: Top P nullable: true tools: anyOf: @@ -10815,35 +11104,38 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools nullable: true truncation: anyOf: - type: string - type: 'null' - title: Truncation nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' nullable: true + title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - title: Instructions nullable: true max_tool_calls: anyOf: - type: integer - type: 'null' - title: Max Tool Calls nullable: true input: items: @@ -10860,15 +11152,27 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage title: Input type: array required: @@ -10890,12 +11194,11 @@ components: anyOf: - type: integer - type: number - title: Value + title: integer | number unit: anyOf: - type: string - type: 'null' - title: Unit nullable: true required: - metric @@ -10932,14 +11235,24 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) maxItems: 20 title: Items type: array @@ -11033,7 +11346,6 @@ components: - type: string - type: 'null' default: int4_weight_int8_dynamic_activation - title: Scheme title: Int4QuantizationConfig type: object OpenAIChoiceDelta: @@ -11043,19 +11355,16 @@ components: anyOf: - type: string - type: 'null' - title: Content nullable: true refusal: anyOf: - type: string - type: 'null' - title: Refusal nullable: true role: anyOf: - type: string - type: 'null' - title: Role nullable: true tool_calls: anyOf: @@ -11063,13 +11372,11 @@ components: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls nullable: true reasoning_content: anyOf: - type: string - type: 'null' - title: Reasoning Content nullable: true title: OpenAIChoiceDelta type: object @@ -11082,7 +11389,6 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Content nullable: true refusal: anyOf: @@ -11090,7 +11396,6 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Refusal nullable: true title: OpenAIChoiceLogprobs type: object @@ -11108,8 +11413,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - delta - finish_reason @@ -11141,8 +11448,10 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' nullable: true + title: OpenAIChatCompletionUsage required: - id - choices @@ -11164,11 +11473,16 @@ components: propertyName: role oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: Message + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) finish_reason: title: Finish Reason type: string @@ -11178,8 +11492,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - message - finish_reason @@ -11207,8 +11523,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - finish_reason - text @@ -11230,7 +11548,6 @@ components: type: integer type: array - type: 'null' - title: Text Offset nullable: true token_logprobs: anyOf: @@ -11238,7 +11555,6 @@ components: type: number type: array - type: 'null' - title: Token Logprobs nullable: true tokens: anyOf: @@ -11246,7 +11562,6 @@ components: type: string type: array - type: 'null' - title: Tokens nullable: true top_logprobs: anyOf: @@ -11256,7 +11571,6 @@ components: type: object type: array - type: 'null' - title: Top Logprobs nullable: true title: OpenAICompletionLogprobs type: object @@ -11293,7 +11607,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -11302,9 +11619,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - title: Content + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - call_id - content @@ -11328,7 +11649,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -11337,9 +11661,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - title: Content + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] context: anyOf: - type: string @@ -11350,7 +11678,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -11359,10 +11690,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array + title: list[ImageContentItem | TextContentItem] - type: 'null' - title: Context + title: string | list[ImageContentItem | TextContentItem] nullable: true required: - content @@ -11447,13 +11782,14 @@ components: - additionalProperties: true type: object - type: 'null' - title: Args nullable: true mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true + title: URL required: - toolgroup_id - provider_id @@ -11472,7 +11808,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -11481,9 +11820,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - title: Content + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] chunk_id: title: Chunk Id type: string @@ -11497,13 +11840,14 @@ components: type: number type: array - type: 'null' - title: Embedding nullable: true chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true + title: ChunkMetadata required: - content - chunk_id @@ -11516,7 +11860,6 @@ components: anyOf: - type: string - type: 'null' - title: Name nullable: true file_ids: items: @@ -11528,14 +11871,12 @@ components: - additionalProperties: true type: object - type: 'null' - title: Expires After nullable: true chunking_strategy: anyOf: - additionalProperties: true type: object - type: 'null' - title: Chunking Strategy nullable: true metadata: additionalProperties: true @@ -11550,14 +11891,12 @@ components: anyOf: - type: string - type: 'null' - title: Name nullable: true expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - title: Expires After nullable: true metadata: type: object @@ -12017,13 +12356,13 @@ components: - items: type: string type: array - title: Query + title: list[string] + title: string | list[string] filters: anyOf: - additionalProperties: true type: object - type: 'null' - title: Filters nullable: true max_num_results: default: 10 @@ -12034,7 +12373,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Ranking Options nullable: true rewrite_query: default: false @@ -12061,10 +12399,16 @@ components: propertyName: role oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) title: Messages type: array params: diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index 9851d15db9..e47f104e38 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -5300,7 +5300,6 @@ components: type: string type: array - type: 'null' - title: Tool Names type: object title: AllowedToolsFilter description: Filter configuration for restricting which MCP tools can be used. @@ -5312,14 +5311,12 @@ components: type: string type: array - type: 'null' - title: Always never: anyOf: - items: type: string type: array - type: 'null' - title: Never type: object title: ApprovalFilter description: Filter configuration for MCP tool approval requirements. @@ -5386,76 +5383,70 @@ components: anyOf: - type: integer - type: 'null' - title: Cancelled At cancelling_at: anyOf: - type: integer - type: 'null' - title: Cancelling At completed_at: anyOf: - type: integer - type: 'null' - title: Completed At error_file_id: anyOf: - type: string - type: 'null' - title: Error File Id errors: anyOf: - $ref: '#/components/schemas/Errors' + title: Errors - type: 'null' + title: Errors expired_at: anyOf: - type: integer - type: 'null' - title: Expired At expires_at: anyOf: - type: integer - type: 'null' - title: Expires At failed_at: anyOf: - type: integer - type: 'null' - title: Failed At finalizing_at: anyOf: - type: integer - type: 'null' - title: Finalizing At in_progress_at: anyOf: - type: integer - type: 'null' - title: In Progress At metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - title: Metadata model: anyOf: - type: string - type: 'null' - title: Model output_file_id: anyOf: - type: string - type: 'null' - title: Output File Id request_counts: anyOf: - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts - type: 'null' + title: BatchRequestCounts usage: anyOf: - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage - type: 'null' + title: BatchUsage additionalProperties: true type: object required: @@ -5473,22 +5464,18 @@ components: anyOf: - type: string - type: 'null' - title: Code line: anyOf: - type: integer - type: 'null' - title: Line message: anyOf: - type: string - type: 'null' - title: Message param: anyOf: - type: string - type: 'null' - title: Param additionalProperties: true type: object title: BatchError @@ -5544,7 +5531,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -5584,14 +5570,18 @@ components: additionalProperties: oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams type: object title: Scoring Params description: Map between scoring function id and parameters for each scoring function you want to run @@ -5599,7 +5589,6 @@ components: 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: object required: @@ -5617,7 +5606,9 @@ components: expires_after: anyOf: - $ref: '#/components/schemas/ExpiresAfter' + title: ExpiresAfter - type: 'null' + title: ExpiresAfter type: object required: - file @@ -5635,7 +5626,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Metadata type: object required: - scoring_functions @@ -5645,27 +5635,40 @@ components: return_type: anyOf: - $ref: '#/components/schemas/StringType' + title: StringType - $ref: '#/components/schemas/NumberType' + title: NumberType - $ref: '#/components/schemas/BooleanType' + title: BooleanType - $ref: '#/components/schemas/ArrayType' + title: ArrayType - $ref: '#/components/schemas/ObjectType' + title: ObjectType - $ref: '#/components/schemas/JsonType' + title: JsonType - $ref: '#/components/schemas/UnionType' + title: UnionType - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType - $ref: '#/components/schemas/CompletionInputType' - title: Return Type + title: CompletionInputType + title: StringType | ... (9 variants) params: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' title: Params type: object @@ -5677,13 +5680,14 @@ components: mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' + title: URL args: anyOf: - additionalProperties: true type: object - type: 'null' - title: Args type: object title: Body_register_tool_group_v1_toolgroups_post BooleanType: @@ -5727,7 +5731,9 @@ components: training_metrics: anyOf: - $ref: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric - type: 'null' + title: PostTrainingMetric type: object required: - identifier @@ -5744,23 +5750,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: Content + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] chunk_id: type: string title: Chunk Id @@ -5774,11 +5787,12 @@ components: type: number type: array - type: 'null' - title: Embedding chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' + title: ChunkMetadata type: object required: - content @@ -5792,23 +5806,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array - title: Content + title: list[ImageContentItem-Output | TextContentItem] + title: string | list[ImageContentItem-Output | TextContentItem] chunk_id: type: string title: Chunk Id @@ -5822,11 +5843,12 @@ components: type: number type: array - type: 'null' - title: Embedding chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' + title: ChunkMetadata type: object required: - content @@ -5839,57 +5861,46 @@ components: 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 type: object title: ChunkMetadata description: |- @@ -5929,7 +5940,6 @@ components: type: string type: object - type: 'null' - 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. items: anyOf: @@ -5938,7 +5948,6 @@ components: type: object type: array - type: 'null' - title: Items description: Initial items to include in the conversation context. You may add up to 20 items at a time. type: object required: @@ -6011,14 +6020,23 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools discriminator: propertyName: type mapping: @@ -6031,6 +6049,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (9 variants) type: array title: Data description: List of conversation items @@ -6038,13 +6057,11 @@ components: anyOf: - type: string - type: 'null' - title: First Id description: The ID of the first item in the list last_id: anyOf: - type: string - type: 'null' - title: Last Id description: The ID of the last item in the list has_more: type: boolean @@ -6094,18 +6111,15 @@ components: anyOf: - type: string - type: 'null' - title: Validation Dataset Id packed: anyOf: - type: boolean - type: 'null' - title: Packed default: false train_on_input: anyOf: - type: boolean - type: 'null' - title: Train On Input default: false type: object required: @@ -6125,7 +6139,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -6141,8 +6154,10 @@ components: source: oneOf: - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource - $ref: '#/components/schemas/RowsDataSource' - title: Source + title: RowsDataSource + title: URIDataSource | RowsDataSource discriminator: propertyName: type mapping: @@ -6182,25 +6197,21 @@ components: anyOf: - type: boolean - type: 'null' - title: Enable Activation Checkpointing default: false enable_activation_offloading: anyOf: - type: boolean - type: 'null' - title: Enable Activation Offloading default: false memory_efficient_fsdp_wrap: anyOf: - type: boolean - type: 'null' - title: Memory Efficient Fsdp Wrap default: false fsdp_cpu_offload: anyOf: - type: boolean - type: 'null' - title: Fsdp Cpu Offload default: false type: object title: EfficiencyConfig @@ -6213,12 +6224,10 @@ components: $ref: '#/components/schemas/BatchError' type: array - type: 'null' - title: Data object: anyOf: - type: string - type: 'null' - title: Object additionalProperties: true type: object title: Errors @@ -6374,7 +6383,6 @@ components: anyOf: - type: string - type: 'null' - title: Prompt Template judge_score_regexes: items: type: string @@ -6512,13 +6520,11 @@ components: anyOf: - type: boolean - type: 'null' - title: Use Dora default: false quantize_base: anyOf: - type: boolean - type: 'null' - title: Quantize Base default: false type: object required: @@ -6542,7 +6548,6 @@ components: anyOf: - type: string - type: 'null' - title: Description type: object required: - input_schema @@ -6559,7 +6564,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -6599,7 +6603,9 @@ components: system_message: anyOf: - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage - type: 'null' + title: SystemMessage type: object required: - model @@ -6645,7 +6651,6 @@ components: type: boolean type: object - type: 'null' - title: Categories category_applied_input_types: anyOf: - additionalProperties: @@ -6654,19 +6659,16 @@ components: type: array type: object - type: 'null' - title: Category Applied Input Types category_scores: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Category Scores user_message: anyOf: - type: string - type: 'null' - title: User Message metadata: additionalProperties: true type: object @@ -6709,20 +6711,19 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name tool_calls: anyOf: - items: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls type: object title: OpenAIAssistantMessageParam description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. @@ -6739,20 +6740,19 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name tool_calls: anyOf: - items: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls type: object title: OpenAIAssistantMessageParam description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. @@ -6780,7 +6780,9 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' + title: OpenAIChatCompletionUsage type: object required: - id @@ -6827,10 +6829,15 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam discriminator: propertyName: role mapping: @@ -6839,6 +6846,7 @@ components: system: '#/components/schemas/OpenAISystemMessageParam' tool: '#/components/schemas/OpenAIToolMessageParam' user: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input | ... (5 variants) type: array minItems: 1 title: Messages @@ -6846,14 +6854,13 @@ components: anyOf: - type: number - type: 'null' - title: Frequency Penalty function_call: anyOf: - type: string - additionalProperties: true type: object - type: 'null' - title: Function Call + title: string | object functions: anyOf: - items: @@ -6861,94 +6868,87 @@ components: type: object type: array - type: 'null' - title: Functions logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Logit Bias logprobs: anyOf: - type: boolean - type: 'null' - title: Logprobs max_completion_tokens: anyOf: - type: integer - type: 'null' - title: Max Completion Tokens max_tokens: anyOf: - type: integer - type: 'null' - title: Max Tokens n: anyOf: - type: integer - type: 'null' - title: N parallel_tool_calls: anyOf: - type: boolean - type: 'null' - title: Parallel Tool Calls presence_penalty: anyOf: - type: number - type: 'null' - title: Presence Penalty response_format: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject discriminator: propertyName: type mapping: json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' text: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - type: 'null' title: Response Format seed: anyOf: - type: integer - type: 'null' - title: Seed stop: anyOf: - type: string - items: type: string type: array + title: list[string] - type: 'null' - title: Stop + title: string | list[string] stream: anyOf: - type: boolean - type: 'null' - title: Stream stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - title: Stream Options temperature: anyOf: - type: number - type: 'null' - title: Temperature tool_choice: anyOf: - type: string - additionalProperties: true type: object - type: 'null' - title: Tool Choice + title: string | object tools: anyOf: - items: @@ -6956,22 +6956,18 @@ components: type: object type: array - type: 'null' - title: Tools top_logprobs: anyOf: - type: integer - type: 'null' - title: Top Logprobs top_p: anyOf: - type: number - type: 'null' - title: Top P user: anyOf: - type: string - type: 'null' - title: User additionalProperties: true type: object required: @@ -6985,12 +6981,10 @@ components: anyOf: - type: integer - type: 'null' - title: Index id: anyOf: - type: string - type: 'null' - title: Id type: type: string const: function @@ -6999,7 +6993,9 @@ components: function: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction - type: 'null' + title: OpenAIChatCompletionToolCallFunction type: object title: OpenAIChatCompletionToolCall description: Tool call specification for OpenAI-compatible chat completion responses. @@ -7009,12 +7005,10 @@ components: anyOf: - type: string - type: 'null' - title: Name arguments: anyOf: - type: string - type: 'null' - title: Arguments type: object title: OpenAIChatCompletionToolCallFunction description: Function call details for OpenAI-compatible tool calls. @@ -7032,11 +7026,15 @@ components: prompt_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' + title: OpenAIChatCompletionUsagePromptTokensDetails completion_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' + title: OpenAIChatCompletionUsageCompletionTokensDetails type: object required: - prompt_tokens @@ -7050,7 +7048,6 @@ components: anyOf: - type: integer - type: 'null' - title: Reasoning Tokens type: object title: OpenAIChatCompletionUsageCompletionTokensDetails description: Token details for output tokens in OpenAI chat completion usage. @@ -7060,7 +7057,6 @@ components: anyOf: - type: integer - type: 'null' - title: Cached Tokens type: object title: OpenAIChatCompletionUsagePromptTokensDetails description: Token details for prompt tokens in OpenAI chat completion usage. @@ -7069,11 +7065,16 @@ components: message: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: Message + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam-Output | ... (5 variants) discriminator: propertyName: role mapping: @@ -7091,7 +7092,9 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + title: OpenAIChoiceLogprobs-Output - type: 'null' + title: OpenAIChoiceLogprobs-Output type: object required: - message @@ -7107,14 +7110,12 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Content refusal: anyOf: - items: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Refusal type: object title: OpenAIChoiceLogprobs description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. @@ -7168,7 +7169,9 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + title: OpenAIChoiceLogprobs-Output - type: 'null' + title: OpenAIChoiceLogprobs-Output type: object required: - finish_reason @@ -7193,101 +7196,90 @@ components: - items: type: string type: array + title: list[string] - items: type: integer type: array + title: list[integer] - items: items: type: integer type: array type: array - title: Prompt + title: list[array] + title: string | ... (4 variants) best_of: anyOf: - type: integer - type: 'null' - title: Best Of echo: anyOf: - type: boolean - type: 'null' - title: Echo frequency_penalty: anyOf: - type: number - type: 'null' - title: Frequency Penalty logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - title: Logit Bias logprobs: anyOf: - type: boolean - type: 'null' - title: Logprobs max_tokens: anyOf: - type: integer - type: 'null' - title: Max Tokens n: anyOf: - type: integer - type: 'null' - title: N presence_penalty: anyOf: - type: number - type: 'null' - title: Presence Penalty seed: anyOf: - type: integer - type: 'null' - title: Seed stop: anyOf: - type: string - items: type: string type: array + title: list[string] - type: 'null' - title: Stop + title: string | list[string] stream: anyOf: - type: boolean - type: 'null' - title: Stream stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - title: Stream Options temperature: anyOf: - type: number - type: 'null' - title: Temperature top_p: anyOf: - type: number - type: 'null' - title: Top P user: anyOf: - type: string - type: 'null' - title: User suffix: anyOf: - type: string - type: 'null' - title: Suffix additionalProperties: true type: object required: @@ -7319,15 +7311,22 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' + title: OpenAIChatCompletionUsage input_messages: items: oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam discriminator: propertyName: role mapping: @@ -7336,6 +7335,7 @@ components: system: '#/components/schemas/OpenAISystemMessageParam' tool: '#/components/schemas/OpenAIToolMessageParam' user: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output | ... (5 variants) type: array title: Input Messages type: object @@ -7358,17 +7358,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Attributes chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy additionalProperties: true @@ -7383,30 +7385,30 @@ components: anyOf: - type: string - type: 'null' - title: Name file_ids: anyOf: - items: type: string type: array - type: 'null' - title: File Ids expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - title: Expires After chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy metadata: @@ -7414,7 +7416,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Metadata additionalProperties: true type: object title: OpenAICreateVectorStoreRequestWithExtraBody @@ -7451,12 +7452,12 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -7474,8 +7475,9 @@ components: - items: type: number type: array + title: list[number] - type: string - title: Embedding + title: list[number] | string index: type: integer title: Index @@ -7510,23 +7512,21 @@ components: - items: type: string type: array - title: Input + title: list[string] + title: string | list[string] encoding_format: anyOf: - type: string - type: 'null' - title: Encoding Format default: float dimensions: anyOf: - type: integer - type: 'null' - title: Dimensions user: anyOf: - type: string - type: 'null' - title: User additionalProperties: true type: object required: @@ -7596,17 +7596,14 @@ components: 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 type: object title: OpenAIFileFile OpenAIFileObject: @@ -7659,7 +7656,6 @@ components: anyOf: - type: string - type: 'null' - title: Detail type: object required: - url @@ -7674,18 +7670,15 @@ components: anyOf: - type: string - type: 'null' - title: Description strict: anyOf: - type: boolean - type: 'null' - title: Strict schema: anyOf: - additionalProperties: true type: object - type: 'null' - title: Schema type: object title: OpenAIJSONSchema description: JSON schema specification for OpenAI-compatible structured response format. @@ -7721,7 +7714,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Custom Metadata type: object required: - id @@ -7914,12 +7906,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - call_id @@ -7937,22 +7927,18 @@ components: anyOf: - type: string - type: 'null' - title: File Data file_id: anyOf: - type: string - type: 'null' - title: File Id file_url: anyOf: - type: string - type: 'null' - title: File Url filename: anyOf: - type: string - type: 'null' - title: Filename type: object title: OpenAIResponseInputMessageContentFile description: File content for input messages in OpenAI response format. @@ -7966,7 +7952,7 @@ components: const: high - type: string const: auto - title: Detail + title: string default: auto type: type: string @@ -7977,12 +7963,10 @@ components: anyOf: - type: string - type: 'null' - title: File Id image_url: anyOf: - type: string - type: 'null' - title: Image Url type: object title: OpenAIResponseInputMessageContentImage description: Image content for input messages in OpenAI response format. @@ -8018,19 +8002,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Filters max_num_results: anyOf: - type: integer maximum: 50.0 minimum: 1.0 - type: 'null' - title: Max Num Results default: 10 ranking_options: anyOf: - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions - type: 'null' + title: SearchRankingOptions type: object required: - vector_store_ids @@ -8050,18 +8034,15 @@ components: 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 type: object required: - name @@ -8086,7 +8067,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Headers require_approval: anyOf: - type: string @@ -8094,16 +8074,19 @@ components: - type: string const: never - $ref: '#/components/schemas/ApprovalFilter' - title: Require Approval + title: ApprovalFilter + title: string | ApprovalFilter default: never allowed_tools: anyOf: - items: type: string type: array + title: list[string] - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - title: Allowed Tools + title: list[string] | AllowedToolsFilter type: object required: - server_label @@ -8122,14 +8105,13 @@ components: const: web_search_preview_2025_03_11 - type: string const: web_search_2025_08_26 - title: Type + title: string default: web_search search_context_size: anyOf: - type: string pattern: ^low|medium|high$ - type: 'null' - title: Search Context Size default: medium type: object title: OpenAIResponseInputToolWebSearch @@ -8178,12 +8160,10 @@ components: anyOf: - type: string - type: 'null' - title: Id reason: anyOf: - type: string - type: 'null' - title: Reason type: object required: - approval_request_id @@ -8198,26 +8178,35 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal discriminator: propertyName: type mapping: output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - type: string @@ -8228,7 +8217,7 @@ components: const: user - type: string const: assistant - title: Role + title: string type: type: string const: message @@ -8238,12 +8227,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - content @@ -8262,26 +8249,35 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal discriminator: propertyName: type mapping: output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - type: string @@ -8292,7 +8288,7 @@ components: const: user - type: string const: assistant - title: Role + title: string type: type: string const: message @@ -8302,12 +8298,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - content @@ -8326,7 +8320,9 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' + title: OpenAIResponseError id: type: string title: Id @@ -8342,12 +8338,19 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -8358,6 +8361,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array title: Output parallel_tool_calls: @@ -8368,11 +8372,12 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + title: OpenAIResponsePrompt status: type: string title: Status @@ -8380,7 +8385,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -8390,15 +8394,18 @@ components: anyOf: - type: number - type: 'null' - title: Top P tools: anyOf: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP discriminator: propertyName: type mapping: @@ -8409,18 +8416,19 @@ components: web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools truncation: anyOf: - type: string - type: 'null' - title: Truncation usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' + title: OpenAIResponseUsage instructions: anyOf: - type: string @@ -8443,7 +8451,9 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' + title: OpenAIResponseError id: type: string title: Id @@ -8459,12 +8469,19 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -8475,6 +8492,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array title: Output parallel_tool_calls: @@ -8485,11 +8503,12 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + title: OpenAIResponsePrompt status: type: string title: Status @@ -8497,7 +8516,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -8507,15 +8525,18 @@ components: anyOf: - type: number - type: 'null' - title: Top P tools: anyOf: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP discriminator: propertyName: type mapping: @@ -8526,39 +8547,45 @@ components: web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools truncation: anyOf: - type: string - type: 'null' - title: Truncation usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' + title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - title: Instructions max_tool_calls: anyOf: - type: integer - type: 'null' - title: Max Tool Calls input: items: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -8569,9 +8596,14 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Output' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array title: Input type: object @@ -8598,9 +8630,13 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath discriminator: propertyName: type mapping: @@ -8608,6 +8644,7 @@ components: file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) type: array title: Annotations type: object @@ -8638,7 +8675,6 @@ components: $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' - title: Results type: object required: - id @@ -8693,12 +8729,10 @@ components: anyOf: - type: string - type: 'null' - title: Id status: anyOf: - type: string - type: 'null' - title: Status type: object required: - call_id @@ -8729,12 +8763,10 @@ components: anyOf: - type: string - type: 'null' - title: Error output: anyOf: - type: string - type: 'null' - title: Output type: object required: - id @@ -8797,22 +8829,24 @@ components: - additionalProperties: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile discriminator: propertyName: type mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: object - type: 'null' - title: Variables version: anyOf: - type: string - type: 'null' - title: Version type: object required: - id @@ -8823,7 +8857,9 @@ components: format: anyOf: - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat - type: 'null' + title: OpenAIResponseTextFormat type: object title: OpenAIResponseText description: Text response configuration for OpenAI responses. @@ -8837,28 +8873,24 @@ components: const: json_schema - type: string const: json_object - title: Type + title: string 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 type: object title: OpenAIResponseTextFormat description: Configuration for Responses API text format. @@ -8877,9 +8909,11 @@ components: - items: type: string type: array + title: list[string] - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - title: Allowed Tools + title: list[string] | AllowedToolsFilter type: object required: - server_label @@ -8899,11 +8933,15 @@ components: input_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails - type: 'null' + title: OpenAIResponseUsageInputTokensDetails output_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails - type: 'null' + title: OpenAIResponseUsageOutputTokensDetails type: object required: - input_tokens @@ -8917,7 +8955,6 @@ components: anyOf: - type: integer - type: 'null' - title: Cached Tokens type: object title: OpenAIResponseUsageInputTokensDetails description: Token details for input tokens in OpenAI response usage. @@ -8927,7 +8964,6 @@ components: anyOf: - type: integer - type: 'null' - title: Reasoning Tokens type: object title: OpenAIResponseUsageOutputTokensDetails description: Token details for output tokens in OpenAI response usage. @@ -8944,12 +8980,12 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -8966,7 +9002,6 @@ components: type: integer type: array - type: 'null' - title: Bytes logprob: type: number title: Logprob @@ -9004,7 +9039,8 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] type: object required: - tool_call_id @@ -9022,7 +9058,6 @@ components: type: integer type: array - type: 'null' - title: Bytes logprob: type: number title: Logprob @@ -9050,21 +9085,25 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile discriminator: propertyName: type mapping: file: '#/components/schemas/OpenAIFile' image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -9083,21 +9122,25 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile discriminator: propertyName: type mapping: file: '#/components/schemas/OpenAIFile' image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name type: object required: - content @@ -9164,7 +9207,6 @@ components: anyOf: - type: string - type: 'null' - title: Url type: object required: - data @@ -9207,25 +9249,21 @@ components: - type: string format: date-time - type: 'null' - title: Scheduled At started_at: anyOf: - type: string format: date-time - type: 'null' - title: Started At completed_at: anyOf: - type: string format: date-time - type: 'null' - title: Completed At resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' - title: Resources Allocated checkpoints: items: $ref: '#/components/schemas/Checkpoint' @@ -9265,7 +9303,6 @@ components: anyOf: - type: string - type: 'null' - title: Prompt description: The system prompt with variable placeholders version: type: integer @@ -9449,7 +9486,9 @@ components: violation: anyOf: - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation - type: 'null' + title: SafetyViolation type: object title: RunShieldResponse description: Response from running a safety shield. @@ -9461,7 +9500,6 @@ components: anyOf: - type: string - type: 'null' - title: User Message metadata: additionalProperties: true type: object @@ -9476,9 +9514,12 @@ components: strategy: oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy - $ref: '#/components/schemas/TopKSamplingStrategy' - title: Strategy + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy discriminator: propertyName: type mapping: @@ -9489,12 +9530,10 @@ components: anyOf: - type: integer - type: 'null' - title: Max Tokens repetition_penalty: anyOf: - type: number - type: 'null' - title: Repetition Penalty default: 1.0 stop: anyOf: @@ -9502,7 +9541,6 @@ components: type: string type: array - type: 'null' - title: Stop type: object title: SamplingParams description: Sampling parameters. @@ -9512,7 +9550,6 @@ components: anyOf: - type: string - type: 'null' - title: Dataset Id results: additionalProperties: $ref: '#/components/schemas/ScoringResult' @@ -9545,7 +9582,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -9560,7 +9596,6 @@ components: anyOf: - type: string - type: 'null' - title: Description metadata: additionalProperties: true type: object @@ -9569,15 +9604,24 @@ components: return_type: oneOf: - $ref: '#/components/schemas/StringType' + title: StringType - $ref: '#/components/schemas/NumberType' + title: NumberType - $ref: '#/components/schemas/BooleanType' + title: BooleanType - $ref: '#/components/schemas/ArrayType' + title: ArrayType - $ref: '#/components/schemas/ObjectType' + title: ObjectType - $ref: '#/components/schemas/JsonType' + title: JsonType - $ref: '#/components/schemas/UnionType' + title: UnionType - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType - $ref: '#/components/schemas/CompletionInputType' - title: Return Type + title: CompletionInputType + title: StringType | ... (9 variants) description: The return type of the deterministic function discriminator: propertyName: type @@ -9595,14 +9639,18 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' title: Params description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval @@ -9637,12 +9685,10 @@ components: anyOf: - type: string - type: 'null' - title: Ranker score_threshold: anyOf: - type: number - type: 'null' - title: Score Threshold default: 0.0 type: object title: SearchRankingOptions @@ -9657,7 +9703,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -9673,7 +9718,6 @@ components: - additionalProperties: true type: object - type: 'null' - title: Params type: object required: - identifier @@ -9702,23 +9746,30 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: Content + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] type: object required: - content @@ -9745,7 +9796,6 @@ components: anyOf: - type: string - type: 'null' - title: Toolgroup Id name: type: string title: Name @@ -9753,25 +9803,21 @@ components: 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 type: object required: - name @@ -9787,7 +9833,6 @@ components: anyOf: - type: string - type: 'null' - title: Provider Resource Id description: Unique identifier for this resource in the provider provider_id: type: string @@ -9801,13 +9846,14 @@ components: mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' + title: URL args: anyOf: - additionalProperties: true type: object - type: 'null' - title: Args type: object required: - identifier @@ -9821,40 +9867,44 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Output' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array + title: list[ImageContentItem-Output | TextContentItem] - type: 'null' - title: Content + title: string | list[ImageContentItem-Output | TextContentItem] error_message: anyOf: - type: string - type: 'null' - title: Error Message error_code: anyOf: - type: integer - type: 'null' - title: Error Code metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata type: object title: ToolInvocationResult description: Result of a tool invocation. @@ -9886,12 +9936,10 @@ components: - type: number minimum: 0.0 - type: 'null' - title: Temperature top_p: anyOf: - type: number - type: 'null' - title: Top P default: 0.95 type: object required: @@ -9915,25 +9963,29 @@ components: anyOf: - type: integer - type: 'null' - title: Max Validation Steps default: 1 data_config: anyOf: - $ref: '#/components/schemas/DataConfig' + title: DataConfig - type: 'null' + title: DataConfig optimizer_config: anyOf: - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig - type: 'null' + title: OptimizerConfig efficiency_config: anyOf: - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig - type: 'null' + title: EfficiencyConfig dtype: anyOf: - type: string - type: 'null' - title: Dtype default: bf16 type: object required: @@ -10072,7 +10124,7 @@ components: const: cancelled - type: string const: failed - title: Status + title: string file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' type: object @@ -10161,7 +10213,7 @@ components: const: server_error - type: string const: rate_limit_exceeded - title: Code + title: string message: type: string title: Message @@ -10187,8 +10239,10 @@ components: chunking_strategy: oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: Chunking Strategy + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: @@ -10200,7 +10254,9 @@ components: last_error: anyOf: - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' + title: VectorStoreFileLastError status: anyOf: - type: string @@ -10211,7 +10267,7 @@ components: const: cancelled - type: string const: failed - title: Status + title: string usage_bytes: type: integer title: Usage Bytes @@ -10243,12 +10299,10 @@ components: anyOf: - type: string - type: 'null' - title: First Id last_id: anyOf: - type: string - type: 'null' - title: Last Id has_more: type: boolean title: Has More @@ -10273,12 +10327,10 @@ components: anyOf: - type: string - type: 'null' - title: First Id last_id: anyOf: - type: string - type: 'null' - title: Last Id has_more: type: boolean title: Has More @@ -10303,12 +10355,10 @@ components: anyOf: - type: string - type: 'null' - title: First Id last_id: anyOf: - type: string - type: 'null' - title: Last Id has_more: type: boolean title: Has More @@ -10334,7 +10384,6 @@ components: anyOf: - type: string - type: 'null' - title: Name usage_bytes: type: integer title: Usage Bytes @@ -10350,17 +10399,14 @@ components: - 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 type: object @@ -10390,9 +10436,9 @@ components: - type: string - type: number - type: boolean + title: string | number | boolean type: object - type: 'null' - title: Attributes content: items: $ref: '#/components/schemas/VectorStoreContent' @@ -10430,7 +10476,6 @@ components: anyOf: - type: string - type: 'null' - title: Next Page type: object required: - search_query @@ -10460,13 +10505,14 @@ components: url: anyOf: - $ref: '#/components/schemas/URL' + title: URL - type: 'null' + title: URL data: anyOf: - type: string - type: 'null' contentEncoding: base64 - title: Data type: object title: _URLOrData description: A URL or a base64 encoded string @@ -10488,12 +10534,10 @@ components: type: string type: object - type: 'null' - title: Metadata idempotency_key: anyOf: - type: string - type: 'null' - title: Idempotency Key type: object required: - input_file_id @@ -10507,14 +10551,23 @@ components: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools discriminator: propertyName: type mapping: @@ -10527,16 +10580,15 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Input' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) type: array - type: 'null' - title: Items metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - title: Metadata type: object title: _conversations_Request _conversations_conversation_id_Request: @@ -10556,14 +10608,23 @@ components: items: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools discriminator: propertyName: type mapping: @@ -10576,6 +10637,7 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Input' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) type: array title: Items type: object @@ -10627,21 +10689,25 @@ components: anyOf: - type: string - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: Query + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam items: items: anyOf: - type: string - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam type: array title: Items max_num_results: anyOf: - type: integer - type: 'null' - title: Max Num Results type: object required: - model @@ -10657,22 +10723,21 @@ components: anyOf: - type: string - type: 'null' - title: Provider Model Id provider_id: anyOf: - type: string - type: 'null' - title: Provider Id metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata model_type: anyOf: - $ref: '#/components/schemas/ModelType' + title: ModelType - type: 'null' + title: ModelType type: object required: - model_id @@ -10685,12 +10750,12 @@ components: - items: type: string type: array - title: Input + title: list[string] + title: string | list[string] model: anyOf: - type: string - type: 'null' - title: Model type: object required: - input @@ -10743,23 +10808,24 @@ components: anyOf: - type: string - type: 'null' - title: Model description: Model descriptor for training if not in provider config` checkpoint_dir: anyOf: - type: string - type: 'null' - title: Checkpoint Dir algorithm_config: anyOf: - oneOf: - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig discriminator: propertyName: type mapping: LoRA: '#/components/schemas/LoraFinetuningConfig' QAT: '#/components/schemas/QATFinetuningConfig' + title: LoraFinetuningConfig | QATFinetuningConfig - type: 'null' title: Algorithm Config type: object @@ -10780,7 +10846,6 @@ components: type: string type: array - type: 'null' - title: Variables type: object required: - prompt @@ -10799,7 +10864,6 @@ components: type: string type: array - type: 'null' - title: Variables set_as_default: type: boolean title: Set As Default @@ -10827,12 +10891,19 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest discriminator: propertyName: type mapping: @@ -10843,62 +10914,70 @@ components: mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' message: '#/components/schemas/OpenAIResponseMessage-Input' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input type: array - title: Input + title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] model: type: string title: Model prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + title: OpenAIResponsePrompt instructions: anyOf: - type: string - type: 'null' - title: Instructions previous_response_id: anyOf: - type: string - type: 'null' - title: Previous Response Id conversation: anyOf: - type: string - type: 'null' - title: Conversation store: anyOf: - type: boolean - type: 'null' - title: Store default: true stream: anyOf: - type: boolean - type: 'null' - title: Stream default: false temperature: anyOf: - type: number - type: 'null' - title: Temperature text: anyOf: - $ref: '#/components/schemas/OpenAIResponseText' + title: OpenAIResponseText - type: 'null' + title: OpenAIResponseText tools: anyOf: - items: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP discriminator: propertyName: type mapping: @@ -10909,21 +10988,19 @@ components: web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools include: anyOf: - items: type: string type: array - type: 'null' - title: Include max_infer_iters: anyOf: - type: integer - type: 'null' - title: Max Infer Iters default: 10 guardrails: title: Guardrails @@ -10945,15 +11022,20 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' + title: AdditionalpropertiesUnion type: object title: Scoring Functions type: object @@ -10971,15 +11053,20 @@ components: anyOf: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams discriminator: propertyName: type mapping: basic: '#/components/schemas/BasicScoringFnParams' llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' + title: AdditionalpropertiesUnion type: object title: Scoring Functions save_results_dataset: @@ -11000,18 +11087,15 @@ components: anyOf: - type: string - type: 'null' - title: Provider Shield Id provider_id: anyOf: - type: string - type: 'null' - title: Provider Id params: anyOf: - additionalProperties: true type: object - type: 'null' - title: Params type: object required: - shield_id @@ -11040,29 +11124,35 @@ components: - type: string - oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: oneOf: - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: Query + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] params: anyOf: - additionalProperties: true type: object - type: 'null' - title: Params type: object required: - vector_store_id @@ -11074,19 +11164,16 @@ components: anyOf: - type: string - type: 'null' - title: Name expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - title: Expires After metadata: anyOf: - additionalProperties: true type: object - type: 'null' - title: Metadata type: object title: _vector_stores_vector_store_id_Request _vector_stores_vector_store_id_files_Request: @@ -11099,17 +11186,19 @@ components: - additionalProperties: true type: object - type: 'null' - title: Attributes chunking_strategy: anyOf: - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic discriminator: propertyName: type mapping: auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy type: object @@ -11134,34 +11223,33 @@ components: - items: type: string type: array - title: Query + title: list[string] + title: string | list[string] filters: anyOf: - additionalProperties: true type: object - type: 'null' - title: Filters max_num_results: anyOf: - type: integer - type: 'null' - title: Max Num Results default: 10 ranking_options: anyOf: - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions - type: 'null' + title: SearchRankingOptions rewrite_query: anyOf: - type: boolean - type: 'null' - title: Rewrite Query default: false search_mode: anyOf: - type: string - type: 'null' - title: Search Mode default: vector type: object required: @@ -11183,7 +11271,6 @@ components: anyOf: - type: string - type: 'null' - title: Instance nullable: true required: - status @@ -11213,7 +11300,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem InterleavedContent: anyOf: - type: string @@ -11224,7 +11314,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -11233,8 +11326,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] BuiltinTool: enum: - brave_search @@ -11282,8 +11380,9 @@ components: tool_name: anyOf: - $ref: '#/components/schemas/BuiltinTool' + title: BuiltinTool - type: string - title: Tool Name + title: BuiltinTool | string arguments: title: Arguments type: string @@ -11305,7 +11404,8 @@ components: anyOf: - type: string - $ref: '#/components/schemas/ToolCall' - title: Tool Call + title: ToolCall + title: string | ToolCall parse_status: $ref: '#/components/schemas/ToolCallParseStatus' required: @@ -11331,7 +11431,9 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/TextDelta' + title: TextDelta - $ref: '#/components/schemas/ImageDelta' + title: ImageDelta - $ref: '#/components/schemas/ToolCallDelta' ToolDefinition: properties: @@ -11373,7 +11475,9 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy - $ref: '#/components/schemas/TopKSamplingStrategy' CompletionMessage: description: A message containing the model's (assistant) response in a chat conversation. @@ -11575,7 +11679,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat OpenAIChatCompletionContentPartParam: discriminator: mapping: @@ -11585,8 +11692,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIAssistantMessageParam: description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: @@ -11601,14 +11712,14 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: Content + title: string | list[OpenAIChatCompletionContentPartTextParam] nullable: true name: anyOf: - type: string - type: 'null' - title: Name nullable: true tool_calls: anyOf: @@ -11616,7 +11727,6 @@ components: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls nullable: true title: OpenAIAssistantMessageParam type: object @@ -11640,15 +11750,19 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: Content + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: anyOf: - type: string - type: 'null' - title: Name nullable: true required: - content @@ -11665,10 +11779,16 @@ components: propertyName: role oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) OpenAIResponseFormatParam: discriminator: mapping: @@ -11678,8 +11798,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject VectorStoreChunkingStrategy: discriminator: mapping: @@ -11688,7 +11812,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreFileStatus: anyOf: - const: completed @@ -11699,6 +11826,7 @@ components: type: string - const: failed type: string + title: string OpenAIResponseInputMessageContent: discriminator: mapping: @@ -11708,8 +11836,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseAnnotations: discriminator: mapping: @@ -11720,9 +11852,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseOutputMessageContent: discriminator: mapping: @@ -11731,7 +11868,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal OpenAIResponseMessage: description: |- Corresponds to the various Message types in the Responses API. @@ -11751,9 +11891,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - items: discriminator: mapping: @@ -11762,9 +11907,13 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: Content + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: anyOf: - const: system @@ -11775,7 +11924,7 @@ components: type: string - const: assistant type: string - title: Role + title: string type: const: message default: message @@ -11785,13 +11934,11 @@ components: anyOf: - type: string - type: 'null' - title: Id nullable: true status: anyOf: - type: string - type: 'null' - title: Status nullable: true required: - content @@ -11811,12 +11958,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) OpenAIResponseInputTool: discriminator: mapping: @@ -11830,9 +11985,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseTool: discriminator: mapping: @@ -11846,9 +12006,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseContentPartOutputText: description: Text content within a streamed response part. properties: @@ -11871,9 +12036,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) title: Annotations type: array logprobs: @@ -11883,7 +12053,6 @@ components: type: object type: array - type: 'null' - title: Logprobs nullable: true required: - text @@ -11913,8 +12082,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText OpenAIResponseContentPartReasoningSummary: description: Reasoning summary part in a streamed response. properties: @@ -11968,9 +12141,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: Part + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText sequence_number: title: Sequence Number type: integer @@ -12012,9 +12188,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: Part + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText sequence_number: title: Sequence Number type: integer @@ -12389,13 +12568,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: Item + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) output_index: title: Output Index type: integer @@ -12433,13 +12619,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: Item + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) output_index: title: Output Index type: integer @@ -12483,10 +12676,14 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: Annotation + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) sequence_number: title: Sequence Number type: integer @@ -12922,41 +13119,78 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) OpenAIResponseInput: anyOf: - discriminator: @@ -12971,15 +13205,27 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage ConversationItem: discriminator: mapping: @@ -14694,14 +14940,24 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) DataSource: discriminator: mapping: @@ -17477,14 +17733,24 @@ components: VectorStoreChunkingStrategy: oneOf: - $ref: '#/components/schemas/StringType' + title: StringType - $ref: '#/components/schemas/NumberType' + title: NumberType - $ref: '#/components/schemas/BooleanType' + title: BooleanType - $ref: '#/components/schemas/ArrayType' + title: ArrayType - $ref: '#/components/schemas/ObjectType' + title: ObjectType - $ref: '#/components/schemas/JsonType' + title: JsonType - $ref: '#/components/schemas/UnionType' + title: UnionType - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) ScoringFnParams: discriminator: mapping: @@ -19143,7 +19409,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig SpanEndPayload: description: Payload for a span end event. properties: @@ -19173,7 +19442,6 @@ components: anyOf: - type: string - type: 'null' - title: Parent Span Id nullable: true required: - name @@ -19194,7 +19462,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload LogSeverity: description: The severity level of a log message. enum: @@ -19228,9 +19499,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: metric default: metric @@ -19243,7 +19514,7 @@ components: anyOf: - type: integer - type: number - title: Value + title: integer | number unit: title: Unit type: string @@ -19278,9 +19549,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: structured_log default: structured_log @@ -19294,8 +19565,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload - $ref: '#/components/schemas/SpanEndPayload' - title: Payload + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload required: - trace_id - span_id @@ -19325,9 +19598,9 @@ components: - type: number - type: boolean - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - title: Attributes type: const: unstructured_log default: unstructured_log @@ -19355,8 +19628,12 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent ResponseGuardrailSpec: description: Specification for a guardrail to apply during response generation. properties: @@ -19376,8 +19653,10 @@ components: error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' nullable: true + title: OpenAIResponseError id: title: Id type: string @@ -19403,12 +19682,20 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) title: Output type: array parallel_tool_calls: @@ -19419,13 +19706,14 @@ components: anyOf: - type: string - type: 'null' - title: Previous Response Id nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' nullable: true + title: OpenAIResponsePrompt status: title: Status type: string @@ -19433,7 +19721,6 @@ components: anyOf: - type: number - type: 'null' - title: Temperature nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' @@ -19444,7 +19731,6 @@ components: anyOf: - type: number - type: 'null' - title: Top P nullable: true tools: anyOf: @@ -19461,29 +19747,33 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools nullable: true truncation: anyOf: - type: string - type: 'null' - title: Truncation nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' nullable: true + title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - title: Instructions nullable: true input: items: @@ -19500,15 +19790,27 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage title: Input type: array required: @@ -19530,12 +19832,11 @@ components: anyOf: - type: integer - type: number - title: Value + title: integer | number unit: anyOf: - type: string - type: 'null' - title: Unit nullable: true required: - metric @@ -19572,14 +19873,24 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) maxItems: 20 title: Items type: array @@ -19951,7 +20262,6 @@ components: - type: string - type: 'null' default: int4_weight_int8_dynamic_activation - title: Scheme title: Int4QuantizationConfig type: object OpenAIChoiceDelta: @@ -19961,19 +20271,16 @@ components: anyOf: - type: string - type: 'null' - title: Content nullable: true refusal: anyOf: - type: string - type: 'null' - title: Refusal nullable: true role: anyOf: - type: string - type: 'null' - title: Role nullable: true tool_calls: anyOf: @@ -19981,13 +20288,11 @@ components: $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - title: Tool Calls nullable: true reasoning_content: anyOf: - type: string - type: 'null' - title: Reasoning Content nullable: true title: OpenAIChoiceDelta type: object @@ -20000,7 +20305,6 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Content nullable: true refusal: anyOf: @@ -20008,7 +20312,6 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - title: Refusal nullable: true title: OpenAIChoiceLogprobs type: object @@ -20026,8 +20329,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - delta - finish_reason @@ -20059,8 +20364,10 @@ components: usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' nullable: true + title: OpenAIChatCompletionUsage required: - id - choices @@ -20082,11 +20389,16 @@ components: propertyName: role oneOf: - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: Message + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) finish_reason: title: Finish Reason type: string @@ -20096,8 +20408,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - message - finish_reason @@ -20125,8 +20439,10 @@ components: logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - finish_reason - text @@ -20148,7 +20464,6 @@ components: type: integer type: array - type: 'null' - title: Text Offset nullable: true token_logprobs: anyOf: @@ -20156,7 +20471,6 @@ components: type: number type: array - type: 'null' - title: Token Logprobs nullable: true tokens: anyOf: @@ -20164,7 +20478,6 @@ components: type: string type: array - type: 'null' - title: Tokens nullable: true top_logprobs: anyOf: @@ -20174,7 +20487,6 @@ components: type: object type: array - type: 'null' - title: Top Logprobs nullable: true title: OpenAICompletionLogprobs type: object @@ -20199,7 +20511,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: @@ -20208,7 +20523,10 @@ components: propertyName: type oneOf: - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array title: Content metadata: diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index 1561e9b35c..85cdd1f2ed 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -1030,10 +1030,11 @@ def _fix_path_parameters(openapi_schema: dict[str, Any]) -> dict[str, Any]: def _fix_schema_issues(openapi_schema: dict[str, Any]) -> dict[str, Any]: - """Fix common schema issues: exclusiveMinimum and null defaults.""" + """Fix common schema issues: exclusiveMinimum, null defaults, and add titles to unions.""" if "components" in openapi_schema and "schemas" in openapi_schema["components"]: - for schema_def in openapi_schema["components"]["schemas"].values(): + for schema_name, schema_def in openapi_schema["components"]["schemas"].items(): _fix_schema_recursive(schema_def) + _add_titles_to_unions(schema_def, schema_name) return openapi_schema @@ -1064,6 +1065,130 @@ def validate_openapi_schema(schema: dict[str, Any], schema_name: str = "OpenAPI return False +def _get_schema_title(item: dict[str, Any]) -> str | None: + """Extract a title for a schema item to use in union variant names.""" + if "$ref" in item: + return item["$ref"].split("/")[-1] + elif "type" in item: + type_val = item["type"] + if type_val == "null": + return None + if type_val == "array" and "items" in item: + items = item["items"] + if isinstance(items, dict): + if "anyOf" in items or "oneOf" in items: + nested_union = items.get("anyOf") or items.get("oneOf") + if isinstance(nested_union, list) and len(nested_union) > 0: + nested_types = [] + for nested_item in nested_union: + if isinstance(nested_item, dict): + if "$ref" in nested_item: + nested_types.append(nested_item["$ref"].split("/")[-1]) + elif "oneOf" in nested_item: + one_of_items = nested_item.get("oneOf", []) + if one_of_items and isinstance(one_of_items[0], dict) and "$ref" in one_of_items[0]: + base_name = one_of_items[0]["$ref"].split("/")[-1].split("-")[0] + nested_types.append(f"{base_name}Union") + else: + nested_types.append("Union") + elif "type" in nested_item and nested_item["type"] != "null": + nested_types.append(nested_item["type"]) + if nested_types: + unique_nested = list(dict.fromkeys(nested_types)) + # Use more descriptive names for better code generation + if len(unique_nested) <= 3: + return f"list[{' | '.join(unique_nested)}]" + else: + # Include first few types for better naming + return f"list[{unique_nested[0]} | {unique_nested[1]} | ...]" + return "list[Union]" + elif "$ref" in items: + return f"list[{items['$ref'].split('/')[-1]}]" + elif "type" in items: + return f"list[{items['type']}]" + return "array" + return type_val + elif "title" in item: + return item["title"] + return None + + +def _add_titles_to_unions(obj: Any, parent_key: str | None = None) -> None: + """Recursively add titles to union schemas (anyOf/oneOf) to help code generators infer names.""" + if isinstance(obj, dict): + # Check if this is a union schema (anyOf or oneOf) + if "anyOf" in obj or "oneOf" in obj: + union_type = "anyOf" if "anyOf" in obj else "oneOf" + union_items = obj[union_type] + + if isinstance(union_items, list) and len(union_items) > 0: + # Skip simple nullable unions (type | null) - these don't need titles + is_simple_nullable = ( + len(union_items) == 2 + and any(isinstance(item, dict) and item.get("type") == "null" for item in union_items) + and any( + isinstance(item, dict) and "type" in item and item.get("type") != "null" for item in union_items + ) + and not any( + isinstance(item, dict) and ("$ref" in item or "anyOf" in item or "oneOf" in item) + for item in union_items + ) + ) + + if is_simple_nullable: + # Remove title from simple nullable unions if it exists + if "title" in obj: + del obj["title"] + else: + # Add titles to individual union variants that need them + for item in union_items: + if isinstance(item, dict): + # Skip null types + if item.get("type") == "null": + continue + # Add title to complex variants (arrays with unions, nested unions, etc.) + # Also add to simple types if they're part of a complex union + needs_title = ( + "items" in item + or "anyOf" in item + or "oneOf" in item + or ("$ref" in item and "title" not in item) + ) + if needs_title and "title" not in item: + variant_title = _get_schema_title(item) + if variant_title: + item["title"] = variant_title + + # Try to infer a meaningful title from the union items for the parent + titles = [] + for item in union_items: + if isinstance(item, dict): + title = _get_schema_title(item) + if title: + titles.append(title) + + if titles: + # Create a title from the union items + unique_titles = list(dict.fromkeys(titles)) # Preserve order, remove duplicates + if len(unique_titles) <= 3: + title = " | ".join(unique_titles) + else: + title = f"{unique_titles[0]} | ... ({len(unique_titles)} variants)" + # Always set the title for unions to help code generators + # This will replace generic property titles with union-specific ones + obj["title"] = title + elif "title" not in obj and parent_key: + # Use parent key as fallback only if no title exists + obj["title"] = f"{parent_key.title()}Union" + + # Recursively process all values + for key, value in obj.items(): + _add_titles_to_unions(value, key) + elif isinstance(obj, list): + for item in obj: + _add_titles_to_unions(item, parent_key) + + def _fix_schema_recursive(obj: Any) -> None: """Recursively fix schema issues: exclusiveMinimum and null defaults.""" if isinstance(obj, dict): From 09280301dec85d99ae989b0676049b047e4e3e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 13 Nov 2025 09:29:13 +0100 Subject: [PATCH 15/46] fix: Query default values can't be set in Annotated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The error is that Query default values can't be set in Annotated; they must be set with = in the function signature. See the error: ``` The error is that Query default values can't be set in Annotated; they must be set with = in the function signature. Searching for where include_embeddings is defined: ``` Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 11063 ++++------------ docs/static/deprecated-llama-stack-spec.yaml | 92 +- .../static/experimental-llama-stack-spec.yaml | 58 +- docs/static/llama-stack-spec.yaml | 694 +- docs/static/stainless-llama-stack-spec.yaml | 8345 ++---------- src/llama_stack_api/vector_io.py | 4 +- 6 files changed, 4121 insertions(+), 16135 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index eaf3ed1632..61543d325b 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -7,7 +7,6 @@ info: 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. @@ -1470,37 +1469,6 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' /v1/responses: - post: - tags: - - Agents - summary: Create Openai Response - description: Create a model response. - 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 get: tags: - Agents @@ -1561,6 +1529,64 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + post: + tags: + - Agents + summary: Create Openai Response + description: Create a model response. + operationId: create_openai_response_v1_responses_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_responses_Request' + x-llama-stack-extra-body-params: + guardrails: + $defs: + ResponseGuardrailSpec: + description: |- + Specification for a guardrail to apply during response generation. + + :param type: The type/identifier of the guardrail. + properties: + type: + title: Type + type: string + required: + - type + title: ResponseGuardrailSpec + type: object + anyOf: + - items: + anyOf: + - type: string + - $ref: '#/components/schemas/ResponseGuardrailSpec' + type: array + - type: 'null' + description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. + responses: + '200': + description: An OpenAIResponseObject. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseObject' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIResponseObjectStream' + '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}: get: tags: @@ -1674,16 +1700,16 @@ paths: schema: type: string description: 'Path parameter: response_id' - requestBody: - content: - application/json: - schema: - anyOf: - - type: array - items: - type: string - - type: 'null' - title: Include + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Include responses: '200': description: An ListOpenAIResponseInputItem. @@ -1799,6 +1825,8 @@ paths: description: Internal Server Error default: $ref: '#/components/responses/DefaultError' + description: Default Response + post: tags: - ScoringFunctions summary: List all scoring functions. @@ -1840,6 +1868,9 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIChatCompletion' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionChunk' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -1960,6 +1991,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + /v1alpha/inference/rerank: + post: tags: - Shields summary: List all shields. @@ -2020,15 +2053,53 @@ paths: /v1/health: get: tags: - - Shields - summary: Get a shield by its identifier. - description: Get a shield by its identifier. + - Inspect + summary: Health + description: |- + Get health status. + + Get the current health status of the service. + 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: + - Inspect + summary: List Routes + description: |- + List routes. + + List all available API routes with their methods and implementing providers. + operationId: list_routes_v1_inspect_routes_get parameters: - - name: identifier - in: path - description: The identifier of the shield to get. - required: true - schema: + - name: api_filter + in: query + required: false + schema: + anyOf: + - enum: + - v1 + - v1alpha + - v1beta + - deprecated type: string deprecated: false delete: @@ -2197,123 +2268,110 @@ paths: deprecated: true /v1/tools: get: - responses: - '200': - description: A ListToolGroupsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListToolGroupsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - ToolGroups - summary: List tool groups with optional provider. - description: List tool groups with optional provider. - parameters: [] - deprecated: false - /v1/toolgroups/{toolgroup_id}: - get: + - Batches + summary: List Batches + description: List all batches for the current user. + operationId: list_batches_v1_batches_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit responses: '200': - description: A ToolGroup. + description: A list of batch objects. content: application/json: schema: - $ref: '#/components/schemas/ToolGroup' + $ref: '#/components/schemas/ListBatchesResponse' '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' + description: Default Response + post: tags: - - ToolGroups - summary: Get a tool group by its ID. - description: Get a tool group by its ID. - parameters: - - name: toolgroup_id - in: path - description: The ID of the tool group to get. - required: true - schema: - type: string - deprecated: false - /v1/tools: - get: + - Batches + summary: Create Batch + description: Create a new batch for processing multiple API requests. + operationId: create_batch_v1_batches_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_batches_Request' responses: '200': - description: A ListToolDefsResponse. + description: The created batch object. content: application/json: schema: - $ref: '#/components/schemas/ListToolDefsResponse' + $ref: '#/components/schemas/Batch' '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: - - ToolGroups - summary: List tools with optional tool group. - description: List tools with optional tool group. - parameters: - - name: toolgroup_id - in: query - description: >- - The ID of the tool group to list tools for. - required: false - schema: - type: string - deprecated: false - /v1/tools/{tool_name}: + description: Default Response + /v1/batches/{batch_id}: get: + tags: + - Batches + summary: Retrieve Batch + description: Retrieve information about a specific batch. + operationId: retrieve_batch_v1_batches__batch_id__get responses: '200': - description: A ToolDef. + description: The batch object. content: application/json: schema: - $ref: '#/components/schemas/ToolDef' + $ref: '#/components/schemas/Batch' '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: - - ToolGroups - summary: Get a tool by its name. - description: Get a tool by its name. parameters: - - name: tool_name - in: path - description: The name of the tool to get. - required: true - schema: - type: string - deprecated: false + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' /v1/vector-io/insert: post: tags: @@ -2349,44 +2407,6 @@ paths: $ref: '#/components/responses/DefaultError' description: Default Response /v1/vector_stores/{vector_store_id}/files: - post: - tags: - - Vector Io - summary: Openai Attach File To Vector Store - description: Attach a file to a vector store. - 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' get: tags: - Vector Io @@ -2468,6 +2488,44 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + post: + tags: + - Vector Io + summary: Openai Attach File To Vector Store + description: Attach a file to a vector store. + 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}/file_batches/{batch_id}/cancel: post: tags: @@ -2508,40 +2566,6 @@ paths: type: string description: 'Path parameter: batch_id' /v1/vector_stores: - post: - tags: - - Vector Io - summary: Openai Create Vector Store - description: |- - Creates a vector store. - - Generate an OpenAI-compatible vector store with the given parameters. - 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 get: tags: - Vector Io @@ -2602,6 +2626,40 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + post: + tags: + - Vector Io + summary: Openai Create Vector Store + description: |- + Creates a vector store. + + Generate an OpenAI-compatible vector store with the given parameters. + 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}/file_batches: post: tags: @@ -2995,26 +3053,25 @@ paths: summary: Openai Retrieve Vector Store File Contents description: Retrieves the contents of a vector store file. operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get - responses: - '200': - description: A list of InterleavedContent representing the file contents. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileContentsResponse' - '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: include_embeddings + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Include Embeddings + - name: include_metadata + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Include Metadata - name: vector_store_id in: path required: true @@ -3027,6 +3084,25 @@ paths: schema: type: string description: 'Path parameter: file_id' + responses: + '200': + description: File contents, optionally with embeddings and metadata based on query parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileContentResponse' + '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: @@ -3164,6 +3240,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - name: model_id in: path @@ -3231,6 +3308,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true /v1/moderations: post: tags: @@ -3358,6 +3436,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - name: identifier in: path @@ -3374,13 +3453,11 @@ paths: operationId: list_shields_v1_shields_get responses: '200': - description: >- - File contents, optionally with embeddings and metadata based on query - parameters. + description: A ListShieldsResponse. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileContentResponse' + $ref: '#/components/schemas/ListShieldsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3393,42 +3470,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: >- - Retrieves the contents of a vector store file. - description: >- - Retrieves the contents of a vector store file. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to retrieve. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to retrieve. - required: true - schema: - type: string - - name: include_embeddings - in: query - description: >- - Whether to include embedding vectors in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - - name: include_metadata - in: query - description: >- - Whether to include chunk metadata in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - deprecated: false - /v1/vector_stores/{vector_store_id}/search: post: tags: - Shields @@ -3460,61 +3501,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true + /v1beta/datasetio/append-rows/{dataset_id}: post: tags: - - Shields - summary: Register Shield - description: Register a shield. - operationId: register_shield_v1_shields_post + - Datasetio + summary: Append Rows + description: Append rows to a dataset. + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post requestBody: content: application/json: schema: - $ref: '#/components/schemas/_shields_Request' + items: + additionalProperties: true + type: object + type: array + title: Rows required: true responses: '200': - description: A Shield. + description: Successful Response 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' - deprecated: true - /v1beta/datasetio/append-rows/{dataset_id}: - post: - tags: - - Datasetio - summary: Append Rows - description: Append rows to a dataset. - operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post - requestBody: - content: - application/json: - schema: - items: - additionalProperties: true - type: object - type: array - title: Rows - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3649,6 +3659,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - name: dataset_id in: path @@ -3694,9 +3705,6 @@ paths: schema: $ref: '#/components/schemas/_datasets_Request' required: true - deprecated: true - /v1beta/datasets/{dataset_id}: - get: responses: '200': description: A Dataset. @@ -3716,6 +3724,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true /v1/scoring/score: post: tags: @@ -3837,6 +3846,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - name: scoring_fn_id in: path @@ -3876,6 +3886,7 @@ paths: summary: Register Scoring Function description: Register a scoring function. operationId: register_scoring_function_v1_scoring_functions_post + deprecated: true requestBody: required: true content: @@ -3933,124 +3944,57 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: dataset_id - in: path - description: The ID of the dataset to unregister. - required: true - schema: - type: string - deprecated: true - /v1alpha/eval/benchmarks: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: get: tags: - - Benchmarks - summary: List Benchmarks - description: List all benchmarks. - operationId: list_benchmarks_v1alpha_eval_benchmarks_get + - Eval + summary: Job Status + description: Get the status of a job. + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': - description: A ListBenchmarksResponse. + description: The status of the evaluation job. content: application/json: schema: - $ref: '#/components/schemas/ListBenchmarksResponse' + $ref: '#/components/schemas/Job' '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: - - Benchmarks - summary: Register Benchmark - description: Register a benchmark. - operationId: register_benchmark_v1alpha_eval_benchmarks_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterBenchmarkRequest' - required: true - deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}: - get: - 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 + $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: - - Benchmarks - summary: Get a benchmark by its ID. - description: Get a benchmark by its ID. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to get. - required: true - schema: - type: string - 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. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to unregister. - required: true - schema: - type: string - deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: - post: - tags: - - Post Training - summary: Cancel Training Job - description: Cancel a training job. - operationId: cancel_training_job_v1alpha_post_training_job_cancel_post parameters: - - name: job_uuid - in: query + - name: benchmark_id + in: path required: true schema: type: string - title: Job Uuid + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + delete: + tags: + - Eval + summary: Job Cancel + description: Cancel a job. + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete responses: '200': description: Successful Response @@ -4058,97 +4002,122 @@ paths: application/json: schema: {} '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 - /v1alpha/post-training/job/artifacts: - get: - tags: - - Post Training - summary: Get Training Job Artifacts - description: Get the artifacts of a training job. - operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get + $ref: '#/components/responses/DefaultError' parameters: - - name: job_uuid - in: query + - name: benchmark_id + in: path required: true schema: type: string - title: Job Uuid + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: + get: + tags: + - Eval + summary: Job Result + description: Get the result of a job. + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get responses: '200': - description: A PostTrainingJobArtifactsResponse. + description: The result of the job. content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + $ref: '#/components/schemas/EvaluateResponse' '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 - /v1alpha/post-training/job/status: - get: - tags: - - Post Training - summary: Get Training Job Status - description: Get the status of a training job. - operationId: get_training_job_status_v1alpha_post_training_job_status_get + $ref: '#/components/responses/DefaultError' parameters: - - name: job_uuid - in: query + - name: benchmark_id + in: path required: true schema: type: string - title: Job Uuid + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs: + post: + tags: + - Eval + summary: Run Eval + description: Run an evaluation on a benchmark. + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BenchmarkConfig' + required: true responses: '200': - description: A PostTrainingJobStatusResponse. + description: The job that was created to run the evaluation. content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJobStatusResponse' + $ref: '#/components/schemas/Job' '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 - /v1alpha/post-training/jobs: + $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}: get: tags: - - Post Training - summary: Get Training Jobs - description: Get all training jobs. - operationId: get_training_jobs_v1alpha_post_training_jobs_get + - Benchmarks + summary: Get Benchmark + description: Get a benchmark by its ID. + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': - description: A ListPostTrainingJobsResponse. + description: A Benchmark. content: application/json: schema: - $ref: '#/components/schemas/ListPostTrainingJobsResponse' + $ref: '#/components/schemas/Benchmark' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -4161,26 +4130,246 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/preference-optimize: - post: - tags: - - Post Training - summary: Preference Optimize - description: Run preference optimization of a model. - operationId: preference_optimize_v1alpha_post_training_preference_optimize_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_post_training_preference_optimize_Request' + parameters: + - name: benchmark_id + in: path required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + delete: + tags: + - Benchmarks + summary: Unregister Benchmark + description: Unregister a benchmark. + operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete responses: '200': - description: A PostTrainingJob. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' + schema: {} + '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' + deprecated: true + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks: + get: + tags: + - Benchmarks + summary: List Benchmarks + description: List all benchmarks. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get + responses: + '200': + description: A ListBenchmarksResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListBenchmarksResponse' + '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: + - Benchmarks + summary: Register Benchmark + description: Register a benchmark. + operationId: register_benchmark_v1alpha_eval_benchmarks_post + deprecated: true + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_benchmark_v1alpha_eval_benchmarks_post' + 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 + /v1alpha/post-training/job/cancel: + post: + tags: + - Post Training + summary: Cancel Training Job + description: Cancel a training job. + operationId: cancel_training_job_v1alpha_post_training_job_cancel_post + parameters: + - name: job_uuid + in: query + required: true + schema: + type: string + title: Job Uuid + 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 + /v1alpha/post-training/job/artifacts: + get: + tags: + - Post Training + summary: Get Training Job Artifacts + description: Get the artifacts of a training job. + 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. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + '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 + /v1alpha/post-training/job/status: + get: + tags: + - Post Training + summary: Get Training Job Status + description: Get the status of a training job. + 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. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobStatusResponse' + '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 + /v1alpha/post-training/jobs: + get: + tags: + - Post Training + summary: Get Training Jobs + description: Get all training jobs. + operationId: get_training_jobs_v1alpha_post_training_jobs_get + responses: + '200': + description: A ListPostTrainingJobsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPostTrainingJobsResponse' + '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' + /v1alpha/post-training/preference-optimize: + post: + tags: + - Post Training + summary: Preference Optimize + description: Run preference optimization of a model. + operationId: preference_optimize_v1alpha_post_training_preference_optimize_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_post_training_preference_optimize_Request' + required: true + responses: + '200': + description: A PostTrainingJob. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJob' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -4315,6 +4504,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - name: toolgroup_id in: path @@ -4354,6 +4544,7 @@ paths: summary: Register Tool Group description: Register a tool group. operationId: register_tool_group_v1_toolgroups_post + deprecated: true requestBody: content: application/json: @@ -4460,14 +4651,14 @@ paths: - type: string - type: 'null' title: Tool Group Id - requestBody: - content: - application/json: - schema: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' - title: Mcp Endpoint + - name: mcp_endpoint + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + title: Mcp Endpoint responses: '200': description: A ListToolDefsResponse. @@ -4754,21 +4945,37 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' /v1/prompts/{prompt_id}: - delete: + get: tags: - Prompts - summary: Delete Prompt + summary: Get Prompt description: |- - Delete prompt. + Get prompt. - Delete a prompt. - operationId: delete_prompt_v1_prompts__prompt_id__delete + Get a prompt by its identifier and optional version. + operationId: get_prompt_v1_prompts__prompt_id__get + parameters: + - name: version + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Version + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' responses: '200': - description: Successful Response + description: A Prompt resource. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Prompt' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -4781,40 +4988,24 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - parameters: - - name: prompt_id - in: path - required: true - schema: - type: string - description: 'Path parameter: prompt_id' - get: + post: tags: - Prompts - summary: Get Prompt + summary: Update Prompt description: |- - Get prompt. + Update prompt. - Get a prompt by its identifier and optional version. - operationId: get_prompt_v1_prompts__prompt_id__get - parameters: - - name: version - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - title: Version - - name: prompt_id - in: path + Update an existing prompt (increments version). + operationId: update_prompt_v1_prompts__prompt_id__post + requestBody: required: true - schema: - type: string - description: 'Path parameter: prompt_id' + content: + application/json: + schema: + $ref: '#/components/schemas/_prompts_prompt_id_Request' responses: '200': - description: A Prompt resource. + description: The updated Prompt resource with incremented version. content: application/json: schema: @@ -4831,28 +5022,28 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - post: + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + delete: tags: - Prompts - summary: Update Prompt + summary: Delete Prompt description: |- - Update prompt. + Delete prompt. - Update an existing prompt (increments version). - operationId: update_prompt_v1_prompts__prompt_id__post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/_prompts_prompt_id_Request' + Delete a prompt. + operationId: delete_prompt_v1_prompts__prompt_id__delete responses: '200': - description: The updated Prompt resource with incremented version. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Prompt' + schema: {} '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -4951,47 +5142,6 @@ paths: type: string description: 'Path parameter: prompt_id' /v1/conversations/{conversation_id}/items: - post: - tags: - - Conversations - summary: Add Items - description: |- - Create items. - - Create items in the conversation. - 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' get: tags: - Conversations @@ -5035,19 +5185,53 @@ paths: schema: type: string description: 'Path parameter: conversation_id' + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + $ref: '#/components/schemas/ConversationItemInclude' + - type: 'null' + title: Include + 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: + - Conversations + summary: Add Items + description: |- + Create items. + + Create items in the conversation. + operationId: add_items_v1_conversations__conversation_id__items_post requestBody: + required: true content: application/json: schema: - anyOf: - - type: array - items: - $ref: '#/components/schemas/ConversationItemInclude' - - type: 'null' - title: Include + $ref: '#/components/schemas/_conversations_conversation_id_items_Request' responses: '200': - description: List of conversation items. + description: List of created items. content: application/json: schema: @@ -5064,6 +5248,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: post: tags: @@ -5317,6 +5508,23 @@ components: type: object title: AllowedToolsFilter description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. ArrayType: properties: type: @@ -5707,6 +5915,39 @@ components: type: object title: ChatCompletionInputType description: Parameter type for chat completion input. + Checkpoint: + properties: + identifier: + type: string + title: Identifier + created_at: + type: string + format: date-time + title: Created At + epoch: + type: integer + title: Epoch + post_training_job_id: + type: string + title: Post Training Job Id + path: + type: string + title: Path + training_metrics: + anyOf: + - $ref: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric + - type: 'null' + title: PostTrainingMetric + type: object + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. Chunk-Input: properties: content: @@ -6364,48 +6605,218 @@ components: - judge_model title: LLMAsJudgeScoringFnParams description: Parameters for LLM-as-judge scoring function configuration. - ListBenchmarksResponse: + ListBatchesResponse: properties: + object: + type: string + const: list + title: Object + default: list data: items: - $ref: '#/components/schemas/Benchmark' + $ref: '#/components/schemas/Batch' type: array title: Data + description: List of batch objects + first_id: + anyOf: + - type: string + - type: 'null' + description: ID of the first batch in the list + last_id: + anyOf: + - type: string + - type: 'null' + description: ID of the last batch in the list + has_more: + type: boolean + title: Has More + description: Whether there are more batches available + default: false type: object required: - data - title: ListBenchmarksResponse - ListDatasetsResponse: + title: ListBatchesResponse + description: Response containing a list of batch objects. + ListBenchmarksResponse: properties: data: items: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/Benchmark' type: array title: Data type: object required: - data - title: ListDatasetsResponse - description: Response from listing datasets. - ListPostTrainingJobsResponse: + title: ListBenchmarksResponse + ListDatasetsResponse: properties: data: items: - $ref: '#/components/schemas/PostTrainingJob' + $ref: '#/components/schemas/Dataset' type: array title: Data type: object required: - data - title: ListPostTrainingJobsResponse - ListPromptsResponse: + title: ListDatasetsResponse + description: Response from listing datasets. + ListOpenAIChatCompletionResponse: properties: data: items: - $ref: '#/components/schemas/Prompt' + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' type: array title: Data - type: object + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse + description: Response from listing OpenAI-compatible chat completions. + ListOpenAIFileResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse + description: Response for listing files in OpenAI Files API. + ListOpenAIResponseInputItem: + properties: + data: + items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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' + title: OpenAIResponseMessage-Output | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + type: array + title: Data + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + title: ListOpenAIResponseInputItem + description: List container for OpenAI response input items. + ListOpenAIResponseObject: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput-Output' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject + description: Paginated list of OpenAI response objects with navigation metadata. + 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 @@ -6422,6 +6833,18 @@ components: - data title: ListProvidersResponse description: Response containing a list of all available providers. + 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. ListScoringFunctionsResponse: properties: data: @@ -6444,6 +6867,18 @@ components: required: - data title: ListShieldsResponse + ListToolDefsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ToolDef' + type: array + title: Data + type: object + required: + - data + title: ListToolDefsResponse + description: Response containing a list of tool definitions. ListToolGroupsResponse: properties: data: @@ -8013,6 +8448,50 @@ components: - parameters title: OpenAIResponseInputToolFunction description: Function tool configuration for OpenAI response inputs. + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + require_approval: + anyOf: + - type: string + const: always + - type: string + const: never + - $ref: '#/components/schemas/ApprovalFilter' + title: ApprovalFilter + title: string | ApprovalFilter + default: never + allowed_tools: + anyOf: + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter + - type: 'null' + title: list[string] | AllowedToolsFilter + type: object + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. OpenAIResponseInputToolWebSearch: properties: type: @@ -8353,7 +8832,10 @@ components: anyOf: - type: string - type: 'null' - title: Instructions + max_tool_calls: + anyOf: + - type: integer + - type: 'null' type: object required: - created_at @@ -8363,38 +8845,211 @@ components: - status title: OpenAIResponseObject description: Complete OpenAI response object containing generation results and metadata. - OpenAIResponseOutputMessageContentOutputText: + OpenAIResponseObjectWithInput-Output: properties: - text: + created_at: + type: integer + title: Created At + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + title: OpenAIResponseError + id: type: string - title: Text - type: + title: Id + model: type: string - const: output_text - title: Type - default: output_text - annotations: + title: Model + object: + type: string + const: response + title: Object + default: response + output: items: oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: 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' - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - type: array - title: Annotations - type: object + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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' + title: OpenAIResponseMessage-Output | ... (7 variants) + type: array + title: Output + parallel_tool_calls: + type: boolean + title: Parallel Tool Calls + default: false + previous_response_id: + anyOf: + - type: string + - type: 'null' + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + title: OpenAIResponsePrompt + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + truncation: + anyOf: + - type: string + - type: 'null' + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage + - type: 'null' + title: OpenAIResponseUsage + instructions: + anyOf: + - type: string + - type: 'null' + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + input: + items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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' + title: OpenAIResponseMessage-Output | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + type: array + title: Input + type: object + required: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput + description: OpenAI response object extended with input context information. + 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' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: 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' + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + type: array + title: Annotations + type: object required: - text title: OpenAIResponseOutputMessageContentOutputText @@ -8939,6 +9594,27 @@ components: required: - reasoning_tokens title: OutputTokensDetails + PaginatedResponse: + properties: + data: + items: + additionalProperties: true + type: object + type: array + title: Data + has_more: + type: boolean + title: Has More + url: + anyOf: + - type: string + - type: 'null' + type: object + required: + - data + - has_more + title: PaginatedResponse + description: A generic paginated response that follows a simple format. PostTrainingJob: properties: job_uuid: @@ -8948,63 +9624,138 @@ components: required: - job_uuid title: PostTrainingJob - Prompt: + PostTrainingJobArtifactsResponse: properties: - prompt: - anyOf: - - type: string - - type: 'null' - description: The system prompt with variable placeholders - version: - type: integer - minimum: 1.0 - title: Version - description: Version (integer starting at 1, incremented on save) - prompt_id: + job_uuid: type: string - title: Prompt Id - description: Unique identifier in format 'pmpt_<48-digit-hash>' - variables: + title: Job Uuid + checkpoints: items: - type: string + $ref: '#/components/schemas/Checkpoint' 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 + title: Checkpoints type: object required: - - version - - prompt_id - title: Prompt - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. - ProviderInfo: + - job_uuid + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingJobStatusResponse: properties: - api: - type: string - title: Api - provider_id: - type: string - title: Provider Id - provider_type: + job_uuid: 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 + title: Job Uuid + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - type: string + format: date-time + - type: 'null' + started_at: + anyOf: + - type: string + format: date-time + - type: 'null' + completed_at: + anyOf: + - type: string + format: date-time + - type: 'null' + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints + type: object + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + PostTrainingMetric: + properties: + epoch: + type: integer + title: Epoch + train_loss: + type: number + title: Train Loss + validation_loss: + type: number + title: Validation Loss + perplexity: + type: number + title: Perplexity + type: object + required: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: Training metrics captured during post-training jobs. + Prompt: + properties: + prompt: + anyOf: + - type: string + - type: 'null' + description: The system prompt with variable placeholders + 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. + 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 @@ -9094,6 +9845,26 @@ components: - data title: RerankResponse description: Response from a reranking request. + 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. RowsDataSource: properties: type: @@ -9706,6 +10477,23 @@ components: text: type: string title: Text + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' type: object required: - type @@ -9767,31 +10555,31 @@ components: - file_counts title: VectorStoreFileBatchObject description: OpenAI Vector Store File Batch object. - VectorStoreFileContentsResponse: + VectorStoreFileContentResponse: properties: - file_id: - type: string - title: File Id - filename: + object: type: string - title: Filename - attributes: - additionalProperties: true - type: object - title: Attributes - content: + const: vector_store.file_content.page + title: Object + default: vector_store.file_content.page + data: items: $ref: '#/components/schemas/VectorStoreContent' type: array - title: Content + title: Data + has_more: + type: boolean + title: Has More + default: false + next_page: + anyOf: + - type: string + - type: 'null' type: object required: - - file_id - - filename - - attributes - - content - title: VectorStoreFileContentsResponse - description: Response from retrieving the contents of a vector store file. + - data + title: VectorStoreFileContentResponse + description: Represents the parsed content of a vector store file. VectorStoreFileCounts: properties: completed: @@ -9915,59 +10703,143 @@ components: - vector_store_id title: VectorStoreFileObject description: OpenAI Vector Store File object. - VectorStoreObject: + VectorStoreFilesListInBatchResponse: properties: - id: - type: string - title: Id object: type: string title: Object - default: vector_store - created_at: - type: integer - title: Created At - name: + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: anyOf: - type: string - type: 'null' - usage_bytes: - type: integer - title: Usage Bytes - default: 0 - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - status: - type: string - title: Status - default: completed - expires_after: + last_id: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - expires_at: + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreFilesListInBatchResponse + description: Response from listing files in a vector store file batch. + VectorStoreListFilesResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: anyOf: - - type: integer + - type: string - type: 'null' - last_active_at: + last_id: anyOf: - - type: integer + - type: string - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata + has_more: + type: boolean + title: Has More + default: false type: object required: - - id - - created_at - - file_counts - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreSearchResponse: + - data + title: VectorStoreListFilesResponse + description: Response from listing files in a vector store. + VectorStoreListResponse: properties: - file_id: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + last_id: + anyOf: + - type: string + - type: 'null' + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreListResponse + description: Response from listing vector stores. + VectorStoreObject: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store + created_at: + type: integer + title: Created At + name: + anyOf: + - type: string + - type: 'null' + usage_bytes: + type: integer + title: Usage Bytes + default: 0 + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + type: string + title: Status + default: completed + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + expires_at: + anyOf: + - type: integer + - type: 'null' + last_active_at: + anyOf: + - type: integer + - type: 'null' + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - id + - created_at + - file_counts + title: VectorStoreObject + description: OpenAI Vector Store object. + VectorStoreSearchResponse-Output: + properties: + file_id: type: string title: File Id filename: @@ -10012,7 +10884,7 @@ components: title: Search Query data: items: - $ref: '#/components/schemas/VectorStoreSearchResponse' + $ref: '#/components/schemas/VectorStoreSearchResponse-Output' type: array title: Data has_more: @@ -10432,36 +11304,127 @@ components: _responses_Request: properties: input: - title: Input + anyOf: + - type: string + - items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input + type: array + title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] model: + type: string title: Model prompt: - title: Prompt + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + title: OpenAIResponsePrompt instructions: - title: Instructions + anyOf: + - type: string + - type: 'null' previous_response_id: - title: Previous Response Id + anyOf: + - type: string + - type: 'null' conversation: - title: Conversation + anyOf: + - type: string + - type: 'null' store: - title: Store + anyOf: + - type: boolean + - type: 'null' default: true stream: - title: Stream + anyOf: + - type: boolean + - type: 'null' default: false temperature: - title: Temperature + anyOf: + - type: number + - type: 'null' text: - title: Text + anyOf: + - $ref: '#/components/schemas/OpenAIResponseText' + title: OpenAIResponseText + - type: 'null' + title: OpenAIResponseText tools: - title: Tools + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' include: - title: Include + anyOf: + - items: + type: string + type: array + - type: 'null' max_infer_iters: - title: Max Infer Iters + anyOf: + - type: integer + - type: 'null' default: 10 - guardrails: - title: Guardrails + max_tool_calls: + anyOf: + - type: integer + - type: 'null' type: object required: - input @@ -10893,37 +11856,8 @@ components: - $ref: '#/components/schemas/ImageDelta' title: ImageDelta - $ref: '#/components/schemas/ToolCallDelta' - ToolDefinition: - properties: - tool_name: - anyOf: - - $ref: '#/components/schemas/BuiltinTool' - - type: string - title: Tool Name - description: - anyOf: - - type: string - - type: 'null' - title: Description - nullable: true - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Input Schema - nullable: true - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Output Schema - nullable: true - required: - - tool_name - title: ToolDefinition - type: object + title: ToolCallDelta + title: TextDelta | ImageDelta | ToolCallDelta SamplingStrategy: discriminator: mapping: @@ -10937,227 +11871,69 @@ components: - $ref: '#/components/schemas/TopPSamplingStrategy' title: TopPSamplingStrategy - $ref: '#/components/schemas/TopKSamplingStrategy' - CompletionMessage: - description: A message containing the model's (assistant) response in a chat conversation. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - title: Content - stop_reason: - $ref: '#/components/schemas/StopReason' - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/ToolCall' - type: array - - type: 'null' - title: Tool Calls - required: - - content - - stop_reason - title: CompletionMessage - type: object - StopReason: - enum: - - end_of_turn - - end_of_message - - out_of_tokens - title: StopReason - type: string - ToolResponseMessage: - description: A message representing the result of a tool invocation. - properties: - role: - const: tool - default: tool - title: Role - type: string - call_id: - title: Call Id - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - title: Content - required: - - call_id - - content - title: ToolResponseMessage - type: object - UserMessage: - description: A message from the user in a chat conversation. - properties: - role: - const: user - default: user - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - title: Content - context: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - - type: 'null' - title: Context - nullable: true - required: - - content - title: UserMessage - type: object - Message: - discriminator: - mapping: - assistant: '#/components/schemas/CompletionMessage' - system: '#/components/schemas/SystemMessage' - tool: '#/components/schemas/ToolResponseMessage' - user: '#/components/schemas/UserMessage' - propertyName: role - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat - type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. - 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 - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: role: const: assistant @@ -11428,71 +12204,8 @@ components: - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. - properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Always - nullable: true - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Never - nullable: true - title: ApprovalFilter - type: object - OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - properties: - type: - const: mcp - default: mcp - title: Type - type: string - server_label: - title: Server Label - type: string - server_url: - title: Server Url - type: string - headers: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Headers - nullable: true - require_approval: - anyOf: - - const: always - type: string - - const: never - type: string - - $ref: '#/components/schemas/ApprovalFilter' - default: never - title: Require Approval - allowed_tools: - anyOf: - - items: - type: string - type: array - - $ref: '#/components/schemas/AllowedToolsFilter' - - type: 'null' - title: Allowed Tools - nullable: true - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - type: object + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) OpenAIResponseInputTool: discriminator: mapping: @@ -12757,6697 +13470,195 @@ components: 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: + message: '#/components/schemas/OpenAIResponseMessage' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + DataSource: discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + ParamType: + discriminator: 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: + 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/OpenAIResponseInputMessageContentText' - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + - $ref: '#/components/schemas/StringType' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + ScoringFnParams: discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + AlgorithmConfig: + discriminator: mapping: - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - OpenAIResponseInputMessageContentFile: - type: object + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + SpanEndPayload: + description: Payload for a span end event. properties: type: + const: span_end + default: span_end + title: 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 + status: + $ref: '#/components/schemas/SpanStatus' required: - - type - title: OpenAIResponseInputMessageContentFile - description: >- - File content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentImage: + - status + title: SpanEndPayload type: object + SpanStartPayload: + description: Payload for a span start event. 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: + const: span_start + default: span_start + title: 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: + name: + title: Name type: string - const: input_text - default: input_text - description: >- - Content type identifier, always "input_text" - additionalProperties: false + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - text - - type - title: OpenAIResponseInputMessageContentText - description: >- - Text content for input messages in OpenAI response format. - OpenAIResponseMCPApprovalRequest: + - name + title: SpanStartPayload 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: - 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: - type: object - 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' + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: 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 - items: - 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 - required: - - id - - queries - - status - - type - title: >- - OpenAIResponseOutputMessageFileSearchToolCall - description: >- - File search tool call output message for OpenAI responses. - "OpenAIResponseOutputMessageFunctionToolCall": - type: object - properties: - 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 - required: - - call_id - - name - - arguments - - type - title: >- - OpenAIResponseOutputMessageFunctionToolCall - description: >- - Function tool call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPCall: - type: object - 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 - properties: - items: - type: array - items: - $ref: '#/components/schemas/ConversationItem' - description: >- - Initial items to include in the conversation context. - metadata: - type: object - additionalProperties: - type: string - description: >- - Set of key-value pairs that can be attached to an object. - additionalProperties: false - title: CreateConversationRequest - Conversation: - type: object + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: - id: - type: string - object: - type: string - const: conversation - default: conversation - created_at: - type: integer - metadata: - type: object - additionalProperties: - type: string - items: - type: array - items: - type: object - title: dict - description: >- - dict() -> new empty dictionary dict(mapping) -> new dictionary initialized - from a mapping object's (key, value) pairs dict(iterable) -> new - dictionary initialized as if via: d = {} for k, v in iterable: d[k] - = v dict(**kwargs) -> new dictionary initialized with the name=value - pairs in the keyword argument list. For example: dict(one=1, two=2) - additionalProperties: false - required: - - id - - object - - created_at - title: Conversation - description: OpenAI-compatible conversation object. - UpdateConversationRequest: - type: object - properties: - metadata: - type: object - additionalProperties: - type: string - description: >- - Set of key-value pairs that can be attached to an object. - additionalProperties: false - required: - - metadata - title: UpdateConversationRequest - ConversationDeletedResource: - type: object - properties: - id: - type: string - object: - type: string - default: conversation.deleted - deleted: - type: boolean - default: true - additionalProperties: false - required: - - id - - object - - deleted - title: ConversationDeletedResource - description: Response for deleted conversation. - ConversationItemList: - type: object - properties: - object: - type: string - default: list - data: - type: array - items: - $ref: '#/components/schemas/ConversationItem' - first_id: - type: string - last_id: - type: string - has_more: - type: boolean - default: false - additionalProperties: false - required: - - object - - data - - has_more - title: ConversationItemList - description: >- - List of conversation items with pagination. - AddItemsRequest: - type: object - properties: - items: - type: array - items: - $ref: '#/components/schemas/ConversationItem' - description: >- - Items to include in the conversation context. - additionalProperties: false - required: - - items - title: AddItemsRequest - ConversationItemDeletedResource: - type: object - properties: - id: - type: string - object: - type: string - default: conversation.item.deleted - deleted: - type: boolean - default: true - additionalProperties: false - required: - - id - - object - - deleted - title: ConversationItemDeletedResource - description: Response for deleted conversation item. - OpenAIEmbeddingsRequestWithExtraBody: - type: object - properties: - model: - type: string - description: >- - The identifier of the model to use. The model must be an embedding model - registered with Llama Stack and available via the /models endpoint. - input: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - 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. - encoding_format: - type: string - default: float - description: >- - (Optional) The format to return the embeddings in. Can be either "float" - or "base64". Defaults to "float". - dimensions: - type: integer - description: >- - (Optional) The number of dimensions the resulting output embeddings should - have. Only supported in text-embedding-3 and later models. - user: - type: string - description: >- - (Optional) A unique identifier representing your end-user, which can help - OpenAI to monitor and detect abuse. - additionalProperties: false - required: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody - description: >- - Request parameters for OpenAI-compatible embeddings endpoint. - OpenAIEmbeddingData: - type: object - properties: - object: - type: string - const: embedding - default: embedding - description: >- - The object type, which will be "embedding" - embedding: - oneOf: - - type: array - items: - type: number - - type: string - description: >- - The embedding vector as a list of floats (when encoding_format="float") - or as a base64-encoded string (when encoding_format="base64") - index: - type: integer - description: >- - The index of the embedding in the input list - additionalProperties: false - required: - - object - - embedding - - index - title: OpenAIEmbeddingData - description: >- - A single embedding data object from an OpenAI-compatible embeddings response. - OpenAIEmbeddingUsage: - type: object - properties: - prompt_tokens: - type: integer - description: The number of tokens in the input - total_tokens: - type: integer - description: The total number of tokens used - additionalProperties: false - required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage - description: >- - Usage information for an OpenAI-compatible embeddings response. - OpenAIEmbeddingsResponse: - type: object - properties: - object: - type: string - const: list - default: list - description: The object type, which will be "list" - data: - type: array - items: - $ref: '#/components/schemas/OpenAIEmbeddingData' - description: List of embedding data objects - model: - type: string - description: >- - The model that was used to generate the embeddings - usage: - $ref: '#/components/schemas/OpenAIEmbeddingUsage' - description: Usage information - additionalProperties: false - required: - - object - - data - - model - - usage - title: OpenAIEmbeddingsResponse - description: >- - Response from an OpenAI-compatible embeddings request. - OpenAIFilePurpose: - type: string - enum: - - assistants - - batch - title: OpenAIFilePurpose - description: >- - Valid purpose values for OpenAI Files API. - ListOpenAIFileResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIFileObject' - description: List of file objects - has_more: - type: boolean - description: >- - Whether there are more files available beyond this page - first_id: - type: string - description: >- - ID of the first file in the list for pagination - last_id: - type: string - description: >- - ID of the last file in the list for pagination - object: - type: string - const: list - default: list - description: The object type, which is always "list" - additionalProperties: false - required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIFileResponse - description: >- - Response for listing files in OpenAI Files API. - OpenAIFileObject: - type: object - properties: - object: - type: string - const: file - default: file - description: The object type, which is always "file" - id: - type: string - description: >- - The file identifier, which can be referenced in the API endpoints - bytes: - type: integer - description: The size of the file, in bytes - created_at: - type: integer - description: >- - The Unix timestamp (in seconds) for when the file was created - expires_at: - type: integer - description: >- - The Unix timestamp (in seconds) for when the file expires - filename: - type: string - description: The name of the file - purpose: - type: string - enum: - - assistants - - batch - description: The intended purpose of the file - additionalProperties: false - required: - - object - - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject - description: >- - OpenAI File object as defined in the OpenAI Files API. - ExpiresAfter: - type: object - properties: - anchor: - type: string - const: created_at - seconds: - type: integer - additionalProperties: false - required: - - anchor - - seconds - title: 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) - OpenAIFileDeleteResponse: - type: object - properties: - id: - type: string - description: The file identifier that was deleted - object: - type: string - const: file - default: file - description: The object type, which is always "file" - deleted: - type: boolean - description: >- - Whether the file was successfully deleted - additionalProperties: false - required: - - id - - object - - deleted - title: OpenAIFileDeleteResponse - description: >- - Response for deleting a file in OpenAI Files API. - Response: - type: object - title: Response - HealthInfo: - type: object - properties: - status: - type: string - enum: - - OK - - Error - - Not Implemented - description: Current health status of the service - additionalProperties: false - required: - - status - title: HealthInfo - description: >- - Health status information for the service. - RouteInfo: - type: object - properties: - route: - type: string - description: The API endpoint path - method: - type: string - description: HTTP method for the route - provider_types: - type: array - items: - type: string - description: >- - List of provider types that implement this route - additionalProperties: false - required: - - route - - method - - provider_types - title: RouteInfo - description: >- - Information about an API route including its path, method, and implementing - providers. - ListRoutesResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/RouteInfo' - description: >- - List of available route information objects - additionalProperties: false - required: - - data - title: ListRoutesResponse - description: >- - Response containing a list of all available API routes. - OpenAIModel: - type: object - properties: - id: - type: string - object: - type: string - const: model - default: model - created: - type: integer - owned_by: - type: string - custom_metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - additionalProperties: false - required: - - id - - object - - created - - owned_by - title: OpenAIModel - description: A model from OpenAI. - OpenAIListModelsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIModel' - additionalProperties: false - required: - - data - title: OpenAIListModelsResponse - Model: - type: object - properties: - identifier: - type: string - description: >- - Unique identifier for this resource in llama stack - provider_resource_id: - type: string - description: >- - Unique identifier for this resource in the provider - provider_id: - type: string - description: >- - ID of the provider that owns this resource - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: model - default: model - description: >- - The resource type, always 'model' for model resources - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Any additional metadata for this model - model_type: - $ref: '#/components/schemas/ModelType' - default: llm - description: >- - The type of model (LLM or embedding model) - additionalProperties: false - required: - - identifier - - provider_id - - type - - metadata - - model_type - title: Model - description: >- - A model resource representing an AI model registered in Llama Stack. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType - description: >- - Enumeration of supported model types in Llama Stack. - RunModerationRequest: - type: object - properties: - input: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - Input (or inputs) to classify. Can be a single string, an array of strings, - or an array of multi-modal input objects similar to other models. - model: - type: string - description: >- - (Optional) The content moderation model you would like to use. - additionalProperties: false - required: - - input - title: RunModerationRequest - ModerationObject: - type: object - properties: - id: - type: string - description: >- - The unique identifier for the moderation request. - model: - type: string - description: >- - The model used to generate the moderation results. - results: - type: array - items: - $ref: '#/components/schemas/ModerationObjectResults' - description: A list of moderation objects - additionalProperties: false - required: - - id - - model - - results - title: ModerationObject - description: A moderation object. - ModerationObjectResults: - type: object - properties: - flagged: - type: boolean - description: >- - Whether any of the below categories are flagged. - categories: - type: object - additionalProperties: - type: boolean - description: >- - A list of the categories, and whether they are flagged or not. - category_applied_input_types: - type: object - additionalProperties: - type: array - items: - type: string - description: >- - A list of the categories along with the input type(s) that the score applies - to. - category_scores: - type: object - additionalProperties: - type: number - description: >- - A list of the categories along with their scores as predicted by model. - user_message: - type: string - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - additionalProperties: false - required: - - flagged - - metadata - title: ModerationObjectResults - description: A moderation object. - Prompt: - type: object - properties: - prompt: - type: string - description: >- - The system prompt text with variable placeholders. Variables are only - supported when using the Responses API. - version: - type: integer - description: >- - Version (integer starting at 1, incremented on save) - prompt_id: - type: string - description: >- - Unique identifier formatted as 'pmpt_<48-digit-hash>' - variables: - type: array - items: - type: string - description: >- - List of prompt variable names that can be used in the prompt template - is_default: - type: boolean - default: false - description: >- - Boolean indicating whether this version is the default version for this - prompt - additionalProperties: false - required: - - version - - prompt_id - - variables - - is_default - title: Prompt - description: >- - A prompt resource representing a stored OpenAI Compatible prompt template - in Llama Stack. - ListPromptsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Prompt' - additionalProperties: false - required: - - data - title: ListPromptsResponse - description: Response model to list prompts. - CreatePromptRequest: - type: object - properties: - prompt: - type: string - description: >- - The prompt text content with variable placeholders. - variables: - type: array - items: - type: string - description: >- - List of variable names that can be used in the prompt template. - additionalProperties: false - required: - - prompt - title: CreatePromptRequest - UpdatePromptRequest: - type: object - properties: - prompt: - type: string - description: The updated prompt text content. - version: - type: integer - description: >- - The current version of the prompt being updated. - variables: - type: array - items: - type: string - description: >- - Updated list of variable names that can be used in the prompt template. - set_as_default: - type: boolean - description: >- - Set the new version as the default (default=True). - additionalProperties: false - required: - - prompt - - version - - set_as_default - title: UpdatePromptRequest - SetDefaultVersionRequest: - type: object - properties: - version: - type: integer - description: The version to set as default. - additionalProperties: false - required: - - version - title: SetDefaultVersionRequest - ProviderInfo: - type: object - properties: - api: - type: string - description: The API name this provider implements - provider_id: - type: string - description: Unique identifier for the provider - provider_type: - type: string - description: The type of provider implementation - config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Configuration parameters for the provider - health: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Current health status of the provider - additionalProperties: false - required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo - description: >- - Information about a registered provider including its configuration and health - status. - ListProvidersResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ProviderInfo' - description: List of provider information objects - additionalProperties: false - required: - - data - title: ListProvidersResponse - description: >- - Response containing a list of all available providers. - ListOpenAIResponseObject: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - description: >- - List of response objects with their input context - has_more: - type: boolean - description: >- - Whether there are more results available beyond this page - first_id: - type: string - description: >- - Identifier of the first item in this page - last_id: - type: string - description: Identifier of the last item in this page - object: - type: string - const: list - default: list - description: Object type identifier, always "list" - additionalProperties: false - required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIResponseObject - description: >- - Paginated list of OpenAI response objects with navigation metadata. - OpenAIResponseError: - type: object - properties: - code: - 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 - - type: string - const: web_search_2025_08_26 - 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 - max_tool_calls: - type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response - 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' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - DataSource: - discriminator: - 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 - max_tool_calls: - type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response. - additionalProperties: false - required: - - input - - model - title: CreateOpenaiResponseRequest - OpenAIResponseObject: - 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 - max_tool_calls: - type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response - additionalProperties: false - required: - - created_at - - id - - model - - object - - output - - parallel_tool_calls - - status - - text - title: OpenAIResponseObject - description: >- - Complete OpenAI response object containing generation results and metadata. - OpenAIResponseContentPartOutputText: - type: object - properties: - type: - type: string - const: output_text - default: output_text - description: >- - Content part type identifier, always "output_text" - text: - type: string - description: Text emitted for this content part - annotations: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseAnnotations' - description: >- - Structured annotations associated with the text - logprobs: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) Token log probability details - additionalProperties: false - required: - - type - - text - - annotations - title: OpenAIResponseContentPartOutputText - description: >- - Text content within a streamed response part. - "OpenAIResponseContentPartReasoningSummary": - type: object - properties: - type: - type: string - const: summary_text - default: summary_text - description: >- - Content part type identifier, always "summary_text" - text: - type: string - description: Summary text - additionalProperties: false - required: - - type - - text - title: >- - OpenAIResponseContentPartReasoningSummary - description: >- - Reasoning summary part in a streamed response. - OpenAIResponseContentPartReasoningText: - type: object - properties: - type: - type: string - const: reasoning_text - default: reasoning_text - description: >- - Content part type identifier, always "reasoning_text" - text: - type: string - description: Reasoning text supplied by the model - additionalProperties: false - required: - - type - - text - title: OpenAIResponseContentPartReasoningText - description: >- - Reasoning text emitted as part of a streamed response. - OpenAIResponseObjectStream: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - discriminator: - propertyName: type - mapping: - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - "OpenAIResponseObjectStreamResponseCompleted": - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Completed response object - type: - type: string - const: response.completed - default: response.completed - description: >- - Event type identifier, always "response.completed" - additionalProperties: false - required: - - response - - type - title: >- - OpenAIResponseObjectStreamResponseCompleted - description: >- - Streaming event indicating a response has been completed. - "OpenAIResponseObjectStreamResponseContentPartAdded": - type: object - properties: - content_index: - type: integer - description: >- - Index position of the part within the content array - response_id: - type: string - description: >- - Unique identifier of the response containing this content - item_id: - type: string - description: >- - Unique identifier of the output item containing this content part - output_index: - type: integer - description: >- - Index position of the output item in the response - part: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - description: The content part that was added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.content_part.added - default: response.content_part.added - description: >- - Event type identifier, always "response.content_part.added" - additionalProperties: false - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseContentPartAdded - description: >- - Streaming event for when a new content part is added to a response item. - "OpenAIResponseObjectStreamResponseContentPartDone": - type: object - properties: - content_index: - type: integer - description: >- - Index position of the part within the content array - response_id: - type: string - description: >- - Unique identifier of the response containing this content - item_id: - type: string - description: >- - Unique identifier of the output item containing this content part - output_index: - type: integer - description: >- - Index position of the output item in the response - part: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - description: The completed content part - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.content_part.done - default: response.content_part.done - description: >- - Event type identifier, always "response.content_part.done" - additionalProperties: false - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseContentPartDone - description: >- - Streaming event for when a content part is completed. - "OpenAIResponseObjectStreamResponseCreated": - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: The response object that was created - type: - type: string - const: response.created - default: response.created - description: >- - Event type identifier, always "response.created" - additionalProperties: false - required: - - response - - type - title: >- - OpenAIResponseObjectStreamResponseCreated - description: >- - Streaming event indicating a new response has been created. - OpenAIResponseObjectStreamResponseFailed: - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Response object describing the failure - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.failed - default: response.failed - description: >- - Event type identifier, always "response.failed" - additionalProperties: false - required: - - response - - sequence_number - - type - title: OpenAIResponseObjectStreamResponseFailed - description: >- - Streaming event emitted when a response fails. - "OpenAIResponseObjectStreamResponseFileSearchCallCompleted": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the completed file search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.file_search_call.completed - default: response.file_search_call.completed - description: >- - Event type identifier, always "response.file_search_call.completed" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFileSearchCallCompleted - description: >- - Streaming event for completed file search calls. - "OpenAIResponseObjectStreamResponseFileSearchCallInProgress": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the file search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - description: >- - Event type identifier, always "response.file_search_call.in_progress" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFileSearchCallInProgress - description: >- - Streaming event for file search calls in progress. - "OpenAIResponseObjectStreamResponseFileSearchCallSearching": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the file search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.file_search_call.searching - default: response.file_search_call.searching - description: >- - Event type identifier, always "response.file_search_call.searching" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFileSearchCallSearching - description: >- - Streaming event for file search currently searching. - "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta": - type: object - properties: - delta: - type: string - description: >- - Incremental function call arguments being added - item_id: - type: string - description: >- - Unique identifier of the function call being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - description: >- - Event type identifier, always "response.function_call_arguments.delta" - additionalProperties: false - required: - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - description: >- - Streaming event for incremental function call argument updates. - "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone": - type: object - properties: - arguments: - type: string - description: >- - Final complete arguments JSON string for the function call - item_id: - type: string - description: >- - Unique identifier of the completed function call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.function_call_arguments.done - default: response.function_call_arguments.done - description: >- - Event type identifier, always "response.function_call_arguments.done" - additionalProperties: false - required: - - arguments - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - description: >- - Streaming event for when function call arguments are completed. - "OpenAIResponseObjectStreamResponseInProgress": - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Current response state while in progress - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.in_progress - default: response.in_progress - description: >- - Event type identifier, always "response.in_progress" - additionalProperties: false - required: - - response - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseInProgress - description: >- - Streaming event indicating the response remains in progress. - "OpenAIResponseObjectStreamResponseIncomplete": - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: >- - Response object describing the incomplete state - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.incomplete - default: response.incomplete - description: >- - Event type identifier, always "response.incomplete" - additionalProperties: false - required: - - response - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseIncomplete - description: >- - Streaming event emitted when a response ends in an incomplete state. - "OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta": - type: object - properties: - delta: - type: string - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer - type: - type: string - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - additionalProperties: false - required: - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - "OpenAIResponseObjectStreamResponseMcpCallArgumentsDone": - type: object - properties: - arguments: - type: string - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer - type: - type: string - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - additionalProperties: false - required: - - arguments - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - "OpenAIResponseObjectStreamResponseMcpCallCompleted": - type: object - properties: - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.mcp_call.completed - default: response.mcp_call.completed - description: >- - Event type identifier, always "response.mcp_call.completed" - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallCompleted - description: Streaming event for completed MCP calls. - "OpenAIResponseObjectStreamResponseMcpCallFailed": - type: object - properties: - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.mcp_call.failed - default: response.mcp_call.failed - description: >- - Event type identifier, always "response.mcp_call.failed" - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallFailed - description: Streaming event for failed MCP calls. - "OpenAIResponseObjectStreamResponseMcpCallInProgress": - type: object - properties: - item_id: - type: string - description: Unique identifier of the MCP call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - description: >- - Event type identifier, always "response.mcp_call.in_progress" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallInProgress - description: >- - Streaming event for MCP calls in progress. - "OpenAIResponseObjectStreamResponseMcpListToolsCompleted": - type: object - properties: - sequence_number: - type: integer - type: - type: string - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsCompleted - "OpenAIResponseObjectStreamResponseMcpListToolsFailed": - type: object - properties: - sequence_number: - type: integer - type: - type: string - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsFailed - "OpenAIResponseObjectStreamResponseMcpListToolsInProgress": - type: object - properties: - sequence_number: - type: integer - type: - type: string - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsInProgress - "OpenAIResponseObjectStreamResponseOutputItemAdded": - type: object - properties: - response_id: - type: string - description: >- - Unique identifier of the response containing this output - item: - 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' - description: >- - The output item that was added (message, tool call, etc.) - output_index: - type: integer - description: >- - Index position of this item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_item.added - default: response.output_item.added - description: >- - Event type identifier, always "response.output_item.added" - additionalProperties: false - required: - - response_id - - item - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputItemAdded - description: >- - Streaming event for when a new output item is added to the response. - "OpenAIResponseObjectStreamResponseOutputItemDone": - type: object - properties: - response_id: - type: string - description: >- - Unique identifier of the response containing this output - item: - 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' - description: >- - The completed output item (message, tool call, etc.) - output_index: - type: integer - description: >- - Index position of this item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_item.done - default: response.output_item.done - description: >- - Event type identifier, always "response.output_item.done" - additionalProperties: false - required: - - response_id - - item - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputItemDone - description: >- - Streaming event for when an output item is completed. - "OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the item to which the annotation is being added - output_index: - type: integer - description: >- - Index position of the output item in the response's output array - content_index: - type: integer - description: >- - Index position of the content part within the output item - annotation_index: - type: integer - description: >- - Index of the annotation within the content part - annotation: - 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' - description: The annotation object being added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_text.annotation.added - default: response.output_text.annotation.added - description: >- - Event type identifier, always "response.output_text.annotation.added" - additionalProperties: false - required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - description: >- - Streaming event for when an annotation is added to output text. - "OpenAIResponseObjectStreamResponseOutputTextDelta": - type: object - properties: - content_index: - type: integer - description: Index position within the text content - delta: - type: string - description: Incremental text content being added - item_id: - type: string - description: >- - Unique identifier of the output item being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_text.delta - default: response.output_text.delta - description: >- - Event type identifier, always "response.output_text.delta" - additionalProperties: false - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextDelta - description: >- - Streaming event for incremental text content updates. - "OpenAIResponseObjectStreamResponseOutputTextDone": - type: object - properties: - content_index: - type: integer - description: Index position within the text content - text: - type: string - description: >- - Final complete text content of the output item - item_id: - type: string - description: >- - Unique identifier of the completed output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_text.done - default: response.output_text.done - description: >- - Event type identifier, always "response.output_text.done" - additionalProperties: false - required: - - content_index - - text - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextDone - description: >- - Streaming event for when text output is completed. - "OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded": - type: object - properties: - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - description: The summary part that was added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - description: >- - Event type identifier, always "response.reasoning_summary_part.added" - additionalProperties: false - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - description: >- - Streaming event for when a new reasoning summary part is added. - "OpenAIResponseObjectStreamResponseReasoningSummaryPartDone": - type: object - properties: - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - description: The completed summary part - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - description: >- - Event type identifier, always "response.reasoning_summary_part.done" - additionalProperties: false - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - description: >- - Streaming event for when a reasoning summary part is completed. - "OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta": - type: object - properties: - delta: - type: string - description: Incremental summary text being added - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - description: >- - Event type identifier, always "response.reasoning_summary_text.delta" - additionalProperties: false - required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - description: >- - Streaming event for incremental reasoning summary text updates. - "OpenAIResponseObjectStreamResponseReasoningSummaryTextDone": - type: object - properties: - text: - type: string - description: Final complete summary text - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - description: >- - Event type identifier, always "response.reasoning_summary_text.done" - additionalProperties: false - required: - - text - - item_id - - output_index - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - description: >- - Streaming event for when reasoning summary text is completed. - "OpenAIResponseObjectStreamResponseReasoningTextDelta": - type: object - properties: - content_index: - type: integer - description: >- - Index position of the reasoning content part - delta: - type: string - description: Incremental reasoning text being added - item_id: - type: string - description: >- - Unique identifier of the output item being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.reasoning_text.delta - default: response.reasoning_text.delta - description: >- - Event type identifier, always "response.reasoning_text.delta" - additionalProperties: false - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningTextDelta - description: >- - Streaming event for incremental reasoning text updates. - "OpenAIResponseObjectStreamResponseReasoningTextDone": - type: object - properties: - content_index: - type: integer - description: >- - Index position of the reasoning content part - text: - type: string - description: Final complete reasoning text - item_id: - type: string - description: >- - Unique identifier of the completed output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.reasoning_text.done - default: response.reasoning_text.done - description: >- - Event type identifier, always "response.reasoning_text.done" - additionalProperties: false - required: - - content_index - - text - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningTextDone - description: >- - Streaming event for when reasoning text is completed. - "OpenAIResponseObjectStreamResponseRefusalDelta": - type: object - properties: - content_index: - type: integer - description: Index position of the content part - delta: - type: string - description: Incremental refusal text being added - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.refusal.delta - default: response.refusal.delta - description: >- - Event type identifier, always "response.refusal.delta" - additionalProperties: false - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseRefusalDelta - description: >- - Streaming event for incremental refusal text updates. - "OpenAIResponseObjectStreamResponseRefusalDone": - type: object - properties: - content_index: - type: integer - description: Index position of the content part - refusal: - type: string - description: Final complete refusal text - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.refusal.done - default: response.refusal.done - description: >- - Event type identifier, always "response.refusal.done" - additionalProperties: false - required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseRefusalDone - description: >- - Streaming event for when refusal text is completed. - "OpenAIResponseObjectStreamResponseWebSearchCallCompleted": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the completed web search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.web_search_call.completed - default: response.web_search_call.completed - description: >- - Event type identifier, always "response.web_search_call.completed" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallCompleted - description: >- - Streaming event for completed web search calls. - "OpenAIResponseObjectStreamResponseWebSearchCallInProgress": - type: object - properties: - item_id: - type: string - description: Unique identifier of the web search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - description: >- - Event type identifier, always "response.web_search_call.in_progress" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallInProgress - description: >- - Streaming event for web search calls in progress. - "OpenAIResponseObjectStreamResponseWebSearchCallSearching": - type: object - properties: - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer - type: - type: string - const: response.web_search_call.searching - default: response.web_search_call.searching - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallSearching - OpenAIDeleteResponseObject: - type: object - properties: - id: - type: string - description: >- - Unique identifier of the deleted response - object: - type: string - const: response - default: response - description: >- - Object type identifier, always "response" - deleted: - type: boolean - default: true - description: Deletion confirmation flag, always True - additionalProperties: false - required: - - id - - object - - deleted - title: OpenAIDeleteResponseObject - description: >- - Response object confirming deletion of an OpenAI response. - ListOpenAIResponseInputItem: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: List of input items - object: - type: string - const: list - default: list - description: Object type identifier, always "list" - additionalProperties: false - required: - - data - - object - title: ListOpenAIResponseInputItem - description: >- - List container for OpenAI response input items. - RunShieldRequest: - type: object - properties: - shield_id: - type: string - description: The identifier of the shield to run. - messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - description: The messages to run the shield on. - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The parameters of the shield. - additionalProperties: false - required: - - shield_id - - messages - - params - title: RunShieldRequest - RunShieldResponse: - type: object - properties: - violation: - $ref: '#/components/schemas/SafetyViolation' - description: >- - (Optional) Safety violation detected by the shield, if any - additionalProperties: false - title: RunShieldResponse - description: Response from running a safety shield. - SafetyViolation: - type: object - properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - description: Severity level of the violation - user_message: - type: string - description: >- - (Optional) Message to convey to the user about the violation - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Additional metadata including specific violation codes for debugging and - telemetry - additionalProperties: false - required: - - violation_level - - metadata - title: SafetyViolation - description: >- - Details of a safety violation detected by content moderation. - ViolationLevel: - type: string - enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: >- - Types of aggregation functions for scoring results. - ArrayType: - type: object - properties: - type: - type: string - const: array - default: array - description: Discriminator type. Always "array" - additionalProperties: false - required: - - type - title: ArrayType - description: Parameter type for array values. - BasicScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: basic - default: basic - description: >- - The type of scoring function parameters, always basic - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - aggregation_functions - title: BasicScoringFnParams - description: >- - Parameters for basic scoring function configuration. - BooleanType: - type: object - properties: - type: - type: string - const: boolean - default: boolean - description: Discriminator type. Always "boolean" - additionalProperties: false - required: - - type - title: BooleanType - description: Parameter type for boolean values. - ChatCompletionInputType: - type: object - properties: - type: - type: string - const: chat_completion_input - default: chat_completion_input - description: >- - Discriminator type. Always "chat_completion_input" - additionalProperties: false - required: - - type - title: ChatCompletionInputType - description: >- - Parameter type for chat completion input. - CompletionInputType: - type: object - properties: - type: - type: string - const: completion_input - default: completion_input - description: >- - Discriminator type. Always "completion_input" - additionalProperties: false - required: - - type - title: CompletionInputType - description: Parameter type for completion input. - JsonType: - type: object - properties: - type: - type: string - const: json - default: json - description: Discriminator type. Always "json" - additionalProperties: false - required: - - type - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: llm_as_judge - default: llm_as_judge - description: >- - The type of scoring function parameters, always llm_as_judge - judge_model: - type: string - description: >- - Identifier of the LLM model to use as a judge for scoring - prompt_template: - type: string - description: >- - (Optional) Custom prompt template for the judge model - judge_score_regexes: - type: array - items: - type: string - description: >- - Regexes to extract the answer from generated response - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - judge_model - - judge_score_regexes - - aggregation_functions - title: LLMAsJudgeScoringFnParams - description: >- - Parameters for LLM-as-judge scoring function configuration. - NumberType: - type: object - properties: - type: - type: string - const: number - default: number - description: Discriminator type. Always "number" - additionalProperties: false - required: - - type - title: NumberType - description: Parameter type for numeric values. - ObjectType: - type: object - properties: - type: - type: string - const: object - default: object - description: Discriminator type. Always "object" - additionalProperties: false - required: - - type - title: ObjectType - description: Parameter type for object values. - RegexParserScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: regex_parser - default: regex_parser - description: >- - The type of scoring function parameters, always regex_parser - parsing_regexes: - type: array - items: - type: string - description: >- - Regex to extract the answer from generated response - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - parsing_regexes - - aggregation_functions - title: RegexParserScoringFnParams - description: >- - Parameters for regex parser scoring function configuration. - ScoringFn: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: scoring_function - default: scoring_function - description: >- - The resource type, always scoring_function - description: - type: string - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - 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' - discriminator: - propertyName: type - mapping: - string: '#/components/schemas/StringType' - number: '#/components/schemas/NumberType' - boolean: '#/components/schemas/BooleanType' - array: '#/components/schemas/ArrayType' - object: '#/components/schemas/ObjectType' - json: '#/components/schemas/JsonType' - union: '#/components/schemas/UnionType' - chat_completion_input: '#/components/schemas/ChatCompletionInputType' - completion_input: '#/components/schemas/CompletionInputType' - params: - $ref: '#/components/schemas/ScoringFnParams' - additionalProperties: false - required: - - identifier - - provider_id - - type - - metadata - - return_type - title: ScoringFn - description: >- - A scoring function resource for evaluating model outputs. - ScoringFnParams: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' - - $ref: '#/components/schemas/BasicScoringFnParams' - discriminator: - propertyName: type - mapping: - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - basic: '#/components/schemas/BasicScoringFnParams' - ScoringFnParamsType: - type: string - enum: - - llm_as_judge - - regex_parser - - basic - title: ScoringFnParamsType - description: >- - Types of scoring function parameter configurations. - StringType: - type: object - properties: - type: - type: string - const: string - default: string - description: Discriminator type. Always "string" - additionalProperties: false - required: - - type - title: StringType - description: Parameter type for string values. - UnionType: - type: object - properties: - type: - type: string - const: union - default: union - description: Discriminator type. Always "union" - additionalProperties: false - required: - - type - title: UnionType - description: Parameter type for union values. - ListScoringFunctionsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ScoringFn' - additionalProperties: false - required: - - data - title: ListScoringFunctionsResponse - ScoreRequest: - type: object - properties: - input_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to score. - scoring_functions: - type: object - additionalProperties: - oneOf: - - $ref: '#/components/schemas/ScoringFnParams' - - type: 'null' - description: >- - The scoring functions to use for the scoring. - additionalProperties: false - required: - - input_rows - - scoring_functions - title: ScoreRequest - ScoreResponse: - type: object - properties: - results: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: >- - A map of scoring function name to ScoringResult. - additionalProperties: false - required: - - results - title: ScoreResponse - description: The response from scoring. - ScoringResult: - type: object - properties: - score_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The scoring result for each row. Each row is a map of column name to value. - aggregated_results: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Map of metric name to aggregated value - additionalProperties: false - required: - - score_rows - - aggregated_results - title: ScoringResult - description: A scoring result for a single row. - ScoreBatchRequest: - type: object - properties: - dataset_id: - type: string - description: The ID of the dataset to score. - scoring_functions: - type: object - additionalProperties: - oneOf: - - $ref: '#/components/schemas/ScoringFnParams' - - type: 'null' - description: >- - The scoring functions to use for the scoring. - save_results_dataset: - type: boolean - description: >- - Whether to save the results to a dataset. - additionalProperties: false - required: - - dataset_id - - scoring_functions - - save_results_dataset - title: ScoreBatchRequest - ScoreBatchResponse: - type: object - properties: - dataset_id: - type: string - description: >- - (Optional) The identifier of the dataset that was scored - results: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: >- - A map of scoring function name to ScoringResult - additionalProperties: false - required: - - results - title: ScoreBatchResponse - description: >- - Response from batch scoring operations on datasets. - Shield: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: shield - default: shield - description: The resource type, always shield - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Configuration parameters for the shield - additionalProperties: false - required: - - identifier - - provider_id - - type - title: Shield - description: >- - A safety shield resource that can be used to check content. - ListShieldsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Shield' - additionalProperties: false - required: - - data - title: ListShieldsResponse - InvokeToolRequest: - type: object - properties: - tool_name: - type: string - description: The name of the tool to invoke. - kwargs: - 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. - additionalProperties: false - required: - - tool_name - - kwargs - title: InvokeToolRequest - ImageContentItem: - type: object - properties: - type: - type: string - const: image - default: image - description: >- - Discriminator type of the content item. Always "image" - image: - type: object - properties: - url: - $ref: '#/components/schemas/URL' - description: >- - A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - data: - type: string - contentEncoding: base64 - description: base64 encoded image data as string - additionalProperties: false - description: >- - Image as a base64 encoded string or an URL - additionalProperties: false - required: - - type - - image - title: ImageContentItem - description: A image content item - InterleavedContent: - oneOf: - - type: string - - $ref: '#/components/schemas/InterleavedContentItem' - - type: array - items: - $ref: '#/components/schemas/InterleavedContentItem' - InterleavedContentItem: - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - TextContentItem: - type: object - properties: - type: - type: string - const: text - default: text - description: >- - Discriminator type of the content item. Always "text" - text: - type: string - description: Text content - additionalProperties: false - required: - - type - - text - title: TextContentItem - description: A text content item - ToolInvocationResult: - type: object - properties: - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - (Optional) The output content from the tool execution - error_message: - type: string - description: >- - (Optional) Error message if the tool execution failed - error_code: - type: integer - description: >- - (Optional) Numeric error code if the tool execution failed - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional metadata about the tool execution - additionalProperties: false - title: ToolInvocationResult - description: Result of a tool invocation. - URL: - type: object - properties: - uri: - type: string - description: The URL string pointing to the resource - additionalProperties: false - required: - - uri - title: URL - description: A URL reference to external content. - ToolDef: - type: object - properties: - toolgroup_id: - type: string - description: >- - (Optional) ID of the tool group this tool belongs to - name: - type: string - description: Name of the tool - description: - type: string - description: >- - (Optional) Human-readable description of what the tool does - input_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) JSON Schema for tool inputs (MCP inputSchema) - output_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) JSON Schema for tool outputs (MCP outputSchema) - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional metadata about the tool - additionalProperties: false - required: - - name - title: ToolDef - description: >- - Tool definition used in runtime contexts. - ListToolDefsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ToolDef' - description: List of tool definitions - additionalProperties: false - required: - - data - title: ListToolDefsResponse - description: >- - Response containing a list of tool definitions. - ToolGroup: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: tool_group - default: tool_group - description: Type of resource, always 'tool_group' - mcp_endpoint: - $ref: '#/components/schemas/URL' - description: >- - (Optional) Model Context Protocol endpoint for remote tools - args: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional arguments for the tool group - additionalProperties: false - required: - - identifier - - provider_id - - type - title: ToolGroup - description: >- - A group of related tools managed together. - ListToolGroupsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ToolGroup' - description: List of tool groups - additionalProperties: false - required: - - data - title: ListToolGroupsResponse - description: >- - Response containing a list of tool groups. - 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 - properties: - chunk_id: - type: string - description: >- - The ID of the chunk. If not set, it will be generated based on the document - ID and content. - document_id: - type: string - description: >- - The ID of the document this chunk belongs to. - source: - type: string - description: >- - The source of the content, such as a URL, file path, or other identifier. - created_timestamp: - type: integer - description: >- - An optional timestamp indicating when the chunk was created. - updated_timestamp: - type: integer - description: >- - An optional timestamp indicating when the chunk was last updated. - chunk_window: - type: string - description: >- - The window of the chunk, which can be used to group related chunks together. - chunk_tokenizer: - type: string - description: >- - The tokenizer used to create the chunk. Default is Tiktoken. - chunk_embedding_model: - type: string - description: >- - The embedding model used to create the chunk's embedding. - chunk_embedding_dimension: - type: integer - description: >- - The dimension of the embedding vector for the chunk. - content_token_count: - type: integer - description: >- - The number of tokens in the content of the chunk. - metadata_token_count: - type: integer - description: >- - The number of tokens in the metadata of the chunk. - additionalProperties: false - title: 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. - InsertChunksRequest: - type: object - properties: - vector_store_id: - type: string - description: >- - The identifier of the vector database to insert the chunks into. - chunks: - type: array - items: - $ref: '#/components/schemas/Chunk' - description: >- - The chunks to insert. Each `Chunk` should contain content which can be - interleaved text, images, or other types. `metadata`: `dict[str, Any]` - and `embedding`: `List[float]` are optional. If `metadata` is provided, - you configure how Llama Stack formats the chunk during generation. If - `embedding` is not provided, it will be computed later. - ttl_seconds: - type: integer - description: The time to live of the chunks. - additionalProperties: false - required: - - vector_store_id - - chunks - title: InsertChunksRequest - QueryChunksRequest: - type: object - properties: - vector_store_id: - type: string - description: >- - The identifier of the vector database to query. - query: - $ref: '#/components/schemas/InterleavedContent' - description: The query to search for. - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The parameters of the query. - additionalProperties: false - required: - - vector_store_id - - query - title: QueryChunksRequest - QueryChunksResponse: - type: object - properties: - chunks: - type: array - items: - $ref: '#/components/schemas/Chunk' - description: >- - List of content chunks returned from the query - scores: - type: array - items: - type: number - description: >- - Relevance scores corresponding to each returned chunk - additionalProperties: false - required: - - chunks - - scores - title: QueryChunksResponse - description: >- - Response from querying chunks in a vector database. - VectorStoreFileCounts: - type: object - properties: - completed: - type: integer - description: >- - Number of files that have been successfully processed - cancelled: - type: integer - description: >- - Number of files that had their processing cancelled - failed: - type: integer - description: Number of files that failed to process - in_progress: - type: integer - description: >- - Number of files currently being processed - total: - type: integer - description: >- - Total number of files in the vector store - additionalProperties: false - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - description: >- - File processing status counts for a vector store. - VectorStoreListResponse: - type: object - properties: - object: - type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreObject' - description: List of vector store objects - first_id: - type: string - description: >- - (Optional) ID of the first vector store in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last vector store in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more vector stores available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreListResponse - description: Response from listing vector stores. - VectorStoreObject: - type: object - properties: - id: - type: string - description: Unique identifier for the vector store - object: - type: string - default: vector_store - description: >- - Object type identifier, always "vector_store" - created_at: - type: integer - description: >- - Timestamp when the vector store was created - name: - type: string - description: (Optional) Name of the vector store - usage_bytes: - type: integer - default: 0 - description: >- - Storage space used by the vector store in bytes - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the vector store - status: - type: string - default: completed - description: Current status of the vector store - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Expiration policy for the vector store - expires_at: - type: integer - description: >- - (Optional) Timestamp when the vector store will expire - last_active_at: - type: integer - description: >- - (Optional) Timestamp of last activity on the vector store - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of key-value pairs that can be attached to the vector store - additionalProperties: false - required: - - id - - object - - created_at - - usage_bytes - - file_counts - - status - - metadata - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreChunkingStrategy: - oneOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - ScoringFnParams: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - VectorStoreChunkingStrategyAuto: - type: object - properties: - type: - type: string - const: auto - default: auto - description: >- - Strategy type, always "auto" for automatic chunking - additionalProperties: false - required: - - type - title: VectorStoreChunkingStrategyAuto - description: >- - Automatic chunking strategy for vector store files. - VectorStoreChunkingStrategyStatic: - type: object - properties: - type: - type: string - const: static - default: static - description: >- - Strategy type, always "static" for static chunking - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' - description: >- - Configuration parameters for the static chunking strategy - additionalProperties: false - required: - - type - - static - title: VectorStoreChunkingStrategyStatic - description: >- - Static chunking strategy with configurable parameters. - VectorStoreChunkingStrategyStaticConfig: - type: object - properties: - chunk_overlap_tokens: - type: integer - default: 400 - description: >- - Number of tokens to overlap between adjacent chunks - max_chunk_size_tokens: - type: integer - default: 800 - description: >- - Maximum number of tokens per chunk, must be between 100 and 4096 - additionalProperties: false - required: - - chunk_overlap_tokens - - max_chunk_size_tokens - title: VectorStoreChunkingStrategyStaticConfig - description: >- - Configuration for static chunking strategy. - "OpenAICreateVectorStoreRequestWithExtraBody": - type: object - properties: - name: - type: string - description: (Optional) A name for the vector store - file_ids: - type: array - items: - type: string - description: >- - List of file IDs to include in the vector store - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Expiration policy for the vector store - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - (Optional) Strategy for splitting files into chunks - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of key-value pairs that can be attached to the vector store - additionalProperties: false - title: >- - OpenAICreateVectorStoreRequestWithExtraBody - description: >- - Request to create a vector store with extra_body support. - OpenaiUpdateVectorStoreRequest: - type: object - properties: - name: - type: string - description: The name of the vector store. - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The expiration policy for a vector store. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of 16 key-value pairs that can be attached to an object. - additionalProperties: false - title: OpenaiUpdateVectorStoreRequest - VectorStoreDeleteResponse: - type: object - properties: - id: - type: string - description: >- - Unique identifier of the deleted vector store - object: - type: string - default: vector_store.deleted - description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true - description: >- - Whether the deletion operation was successful - additionalProperties: false - required: - - id - - object - - deleted - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - "OpenAICreateVectorStoreFileBatchRequestWithExtraBody": - type: object - properties: - file_ids: - type: array - items: - type: string - description: >- - A list of File IDs that the vector store should use - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Key-value attributes to store with the files - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - (Optional) The chunking strategy used to chunk the file(s). Defaults to - auto - additionalProperties: false - required: - - file_ids - title: >- - OpenAICreateVectorStoreFileBatchRequestWithExtraBody - description: >- - Request to create a vector store file batch with extra_body support. - VectorStoreFileBatchObject: - type: object - properties: - id: - type: string - description: Unique identifier for the file batch - object: - type: string - default: vector_store.file_batch - description: >- - Object type identifier, always "vector_store.file_batch" - created_at: - type: integer - description: >- - Timestamp when the file batch was created - vector_store_id: - type: string - description: >- - ID of the vector store containing the file batch - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: >- - Current processing status of the file batch - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the batch - additionalProperties: false - required: - - id - - object - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject - description: OpenAI Vector Store File Batch object. - VectorStoreFileStatus: - oneOf: - - type: string - const: completed - - type: string - const: in_progress - - type: string - const: cancelled - - type: string - const: failed - VectorStoreFileLastError: - type: object - properties: - code: - oneOf: - - type: string - const: server_error - - type: string - const: rate_limit_exceeded - description: >- - Error code indicating the type of failure - message: - type: string - description: >- - Human-readable error message describing the failure - additionalProperties: false - required: - - code - - message - title: VectorStoreFileLastError - description: >- - Error information for failed vector store file processing. - VectorStoreFileObject: - type: object - properties: - id: - type: string - description: Unique identifier for the file - object: - type: string - default: vector_store.file - description: >- - Object type identifier, always "vector_store.file" - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Key-value attributes associated with the file - chunking_strategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - description: >- - Strategy used for splitting the file into chunks - created_at: - type: integer - description: >- - Timestamp when the file was added to the vector store - last_error: - $ref: '#/components/schemas/VectorStoreFileLastError' - description: >- - (Optional) Error information if file processing failed - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: Current processing status of the file - usage_bytes: - type: integer - default: 0 - description: Storage space used by this file in bytes - vector_store_id: - type: string - description: >- - ID of the vector store containing this file - additionalProperties: false - required: - - id - - object - - attributes - - chunking_strategy - - created_at - - status - - usage_bytes - - vector_store_id - title: VectorStoreFileObject - description: OpenAI Vector Store File object. - VectorStoreFilesListInBatchResponse: - type: object - properties: - object: - type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: >- - List of vector store file objects in the batch - first_id: - type: string - description: >- - (Optional) ID of the first file in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more files available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreFilesListInBatchResponse - description: >- - Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: - type: object - properties: - object: - type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: List of vector store file objects - first_id: - type: string - description: >- - (Optional) ID of the first file in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more files available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreListFilesResponse - description: >- - Response from listing files in a vector store. - OpenaiAttachFileToVectorStoreRequest: - type: object - properties: - file_id: - type: string - description: >- - The ID of the file to attach to the vector store. - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The key-value attributes stored with the file, which can be used for filtering. - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - The chunking strategy to use for the file. - additionalProperties: false - required: - - file_id - title: OpenaiAttachFileToVectorStoreRequest - OpenaiUpdateVectorStoreFileRequest: - type: object - properties: - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The updated key-value attributes to store with the file. - additionalProperties: false - required: - - attributes - title: OpenaiUpdateVectorStoreFileRequest - VectorStoreFileDeleteResponse: - type: object - properties: - id: - type: string - description: Unique identifier of the deleted file - object: - type: string - default: vector_store.file.deleted - description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true - description: >- - Whether the deletion operation was successful - additionalProperties: false - required: - - id - - object - - deleted - title: VectorStoreFileDeleteResponse - description: >- - Response from deleting a vector store file. - bool: - type: boolean - VectorStoreContent: - type: object - properties: - type: - type: string - const: text - description: >- - Content type, currently only "text" is supported - text: - type: string - description: The actual text content - embedding: - type: array - items: - type: number - description: >- - Optional embedding vector for this content chunk - chunk_metadata: - $ref: '#/components/schemas/ChunkMetadata' - description: Optional chunk metadata - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Optional user-defined metadata - additionalProperties: false - required: - - type - - text - title: VectorStoreContent - description: >- - Content item from a vector store file or search result. - VectorStoreFileContentResponse: - type: object - properties: - object: - type: string - const: vector_store.file_content.page - default: vector_store.file_content.page - description: >- - The object type, which is always `vector_store.file_content.page` - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' - description: Parsed content of the file - has_more: - type: boolean - default: false - description: >- - Indicates if there are more content pages to fetch - next_page: - type: string - description: The token for the next page, if any - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreFileContentResponse - description: >- - Represents the parsed content of a vector store file. - OpenaiSearchVectorStoreRequest: - type: object - properties: - query: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - The query string or array for performing the search. - filters: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Filters based on file attributes to narrow the search results. - max_num_results: - type: integer - description: >- - Maximum number of results to return (1 to 50 inclusive, default 10). - 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: >- - Ranking options for fine-tuning the search results. - rewrite_query: - type: boolean - description: >- - Whether to rewrite the natural language query for vector search (default - false) - search_mode: - type: string - description: >- - The search mode to use - "keyword", "vector", or "hybrid" (default "vector") - additionalProperties: false - required: - - query - title: OpenaiSearchVectorStoreRequest - VectorStoreSearchResponse: - type: object - properties: - 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 - attributes: - type: object - additionalProperties: - oneOf: - - type: string - - type: number - - type: boolean - description: >- - (Optional) Key-value attributes associated with the file - content: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' - description: >- - List of content items matching the search query - additionalProperties: false - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - description: Response from searching a vector store. - VectorStoreSearchResponsePage: - type: object - properties: - object: - type: string - default: vector_store.search_results.page - description: >- - Object type identifier for the search results page - search_query: - type: array - items: - type: string - description: >- - The original search query that was executed - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - description: List of search result objects - has_more: - type: boolean - default: false - description: >- - Whether there are more results available beyond this page - next_page: - type: string - description: >- - (Optional) Token for retrieving the next page of results - additionalProperties: false - required: - - object - - search_query - - data - - has_more - title: VectorStoreSearchResponsePage - description: >- - Paginated response from searching a vector store. - VersionInfo: - type: object - properties: - version: - type: string - description: Version number of the service - additionalProperties: false - required: - - version - title: VersionInfo - description: Version information for the service. - AppendRowsRequest: - type: object - properties: - rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to append to the dataset. - additionalProperties: false - required: - - rows - title: AppendRowsRequest - PaginatedResponse: - type: object - properties: - data: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The list of items for the current page - has_more: - type: boolean - description: >- - Whether there are more items available after this set - url: - type: string - description: The URL for accessing this list - additionalProperties: false - required: - - data - - has_more - title: PaginatedResponse - description: >- - A generic paginated response that follows a simple format. - Dataset: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: dataset - default: dataset - description: >- - Type of resource, always 'dataset' for datasets - purpose: - type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - description: >- - Purpose of the dataset indicating its intended use - source: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - description: >- - Data source configuration for the dataset - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Additional metadata for the dataset - additionalProperties: false - required: - - identifier - - provider_id - - type - - purpose - - source - - metadata - title: Dataset - description: >- - Dataset resource for storing and accessing training or evaluation data. - RowsDataSource: - type: object - properties: - type: - type: string - const: rows - default: rows - rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", - "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, - world!"}]} ] - additionalProperties: false - required: - - type - - rows - title: RowsDataSource - description: A dataset stored in rows. - URIDataSource: - type: object - properties: - type: - type: string - const: uri - default: uri - uri: - type: string - description: >- - The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" - - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" - additionalProperties: false - required: - - type - - uri - title: URIDataSource - description: >- - A dataset that can be obtained from a URI. - ListDatasetsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Dataset' - description: List of datasets - additionalProperties: false - required: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - Benchmark: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: benchmark - default: benchmark - description: The resource type, always benchmark - dataset_id: - type: string - description: >- - Identifier of the dataset to use for the benchmark evaluation - scoring_functions: - type: array - items: - type: string - description: >- - List of scoring function identifiers to apply during evaluation - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Metadata for this evaluation task - additionalProperties: false - required: - - identifier - - provider_id - - type - - dataset_id - - scoring_functions - - metadata - title: Benchmark - description: >- - A benchmark resource for evaluating model performance. - ListBenchmarksResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Benchmark' - additionalProperties: false - required: - - data - title: ListBenchmarksResponse - BenchmarkConfig: - type: object - properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - description: The candidate to evaluate. - scoring_params: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringFnParams' - description: >- - Map between scoring function id and parameters for each scoring function - you want to run - num_examples: - type: integer - description: >- - (Optional) The number of examples to evaluate. If not provided, all examples - in the dataset will be evaluated - additionalProperties: false - required: - - eval_candidate - - scoring_params - title: BenchmarkConfig - description: >- - A benchmark configuration for evaluation. - GreedySamplingStrategy: - type: object - properties: - type: - type: string - const: greedy - default: greedy - description: >- - Must be "greedy" to identify this sampling strategy - additionalProperties: false - required: - - type - title: GreedySamplingStrategy - description: >- - Greedy sampling strategy that selects the highest probability token at each - step. - ModelCandidate: - type: object - properties: - type: - type: string - const: model - default: model - model: - type: string - description: The model ID to evaluate. - sampling_params: - $ref: '#/components/schemas/SamplingParams' - description: The sampling parameters for the model. - system_message: - $ref: '#/components/schemas/SystemMessage' - description: >- - (Optional) The system message providing instructions or context to the - model. - additionalProperties: false - required: - - type - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - SamplingParams: - type: object - properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - - $ref: '#/components/schemas/TopPSamplingStrategy' - - $ref: '#/components/schemas/TopKSamplingStrategy' - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - description: The sampling strategy. - max_tokens: - type: integer - description: >- - 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. - repetition_penalty: - type: number - default: 1.0 - description: >- - 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. - stop: - type: array - items: - type: string - description: >- - Up to 4 sequences where the API will stop generating further tokens. The - returned text will not contain the stop sequence. - additionalProperties: false - required: - - strategy - title: SamplingParams - description: Sampling parameters. - SystemMessage: - type: object - properties: - role: - type: string - const: system - default: system - description: >- - Must be "system" to identify this as a system message - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - 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). - additionalProperties: false - required: - - role - - content - title: SystemMessage - description: >- - A system message providing instructions or context to the model. - TopKSamplingStrategy: - type: object - properties: - type: - type: string - const: top_k - default: top_k - description: >- - Must be "top_k" to identify this sampling strategy - top_k: - type: integer - description: >- - Number of top tokens to consider for sampling. Must be at least 1 - additionalProperties: false - required: - - type - - top_k - title: TopKSamplingStrategy - description: >- - Top-k sampling strategy that restricts sampling to the k most likely tokens. - TopPSamplingStrategy: - type: object - properties: - type: - type: string - const: top_p - default: top_p - description: >- - Must be "top_p" to identify this sampling strategy - temperature: - type: number - description: >- - Controls randomness in sampling. Higher values increase randomness - top_p: - type: number - default: 0.95 - description: >- - Cumulative probability threshold for nucleus sampling. Defaults to 0.95 - additionalProperties: false - required: - - type - title: TopPSamplingStrategy - description: >- - Top-p (nucleus) sampling strategy that samples from the smallest set of tokens - with cumulative probability >= p. - EvaluateRowsRequest: - type: object - properties: - input_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to evaluate. - scoring_functions: - type: array - items: - type: string - description: >- - The scoring functions to use for the evaluation. - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. - additionalProperties: false - required: - - input_rows - - scoring_functions - - benchmark_config - title: EvaluateRowsRequest - EvaluateResponse: - type: object - properties: - generations: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The generations from the evaluation. - scores: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: The scores from the evaluation. - additionalProperties: false - required: - - generations - - scores - title: EvaluateResponse - description: The response from an evaluation. - RunEvalRequest: - type: object - properties: - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. - additionalProperties: false - required: - - benchmark_config - title: RunEvalRequest - Job: - type: object - properties: - job_id: - type: string - description: Unique identifier for the job - status: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current execution status of the job - additionalProperties: false - required: - - job_id - - status - title: Job - description: >- - A job execution instance with status tracking. - RerankRequest: - type: object - properties: - model: - type: string - description: >- - The identifier of the reranking model to use. - query: - oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - description: >- - 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. - items: - type: array - items: - oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - description: >- - 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. - max_num_results: - type: integer - description: >- - (Optional) Maximum number of results to return. Default: returns all. - additionalProperties: false - required: - - model - - query - - items - title: RerankRequest - RerankData: - type: object - properties: - index: - type: integer - description: >- - The original index of the document in the input list - relevance_score: - type: number - description: >- - The relevance score from the model output. Values are inverted when applicable - so that higher scores indicate greater relevance. - additionalProperties: false - required: - - index - - relevance_score - title: RerankData - description: >- - A single rerank result from a reranking response. - RerankResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/RerankData' - description: >- - List of rerank result objects, sorted by relevance score (descending) - additionalProperties: false - required: - - data - title: RerankResponse - description: Response from a reranking request. - Checkpoint: - type: object - properties: - identifier: - type: string - description: Unique identifier for the checkpoint - created_at: - type: string - format: date-time - description: >- - Timestamp when the checkpoint was created - epoch: - type: integer - description: >- - Training epoch when the checkpoint was saved - post_training_job_id: - type: string - description: >- - Identifier of the training job that created this checkpoint - path: - type: string - description: >- - File system path where the checkpoint is stored - training_metrics: - $ref: '#/components/schemas/PostTrainingMetric' - description: >- - (Optional) Training metrics associated with this checkpoint - additionalProperties: false - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - PostTrainingJobArtifactsResponse: - type: object - properties: - job_uuid: - type: string - description: Unique identifier for the training job - checkpoints: - type: array - items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false - required: - - job_uuid - - checkpoints - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingMetric: - type: object - properties: - epoch: - type: integer - description: Training epoch number - train_loss: - type: number - description: Loss value on the training dataset - validation_loss: - type: number - description: Loss value on the validation dataset - perplexity: - type: number - description: >- - Perplexity metric indicating model confidence - additionalProperties: false - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: >- - Training metrics captured during post-training jobs. - CancelTrainingJobRequest: - type: object - properties: - job_uuid: - type: string - description: The UUID of the job to cancel. - additionalProperties: false - required: - - job_uuid - title: CancelTrainingJobRequest - PostTrainingJobStatusResponse: - type: object - properties: - job_uuid: - type: string - description: Unique identifier for the training job - status: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current status of the training job - scheduled_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the job was scheduled - started_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the job execution began - completed_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the job finished, if completed - resources_allocated: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Information about computational resources allocated to the - job - checkpoints: - type: array - items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false - required: - - job_uuid - - status - - checkpoints - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - ListPostTrainingJobsResponse: - type: object - properties: - data: - type: array - items: - type: object - properties: - job_uuid: - type: string - additionalProperties: false - required: - - job_uuid - title: PostTrainingJob - additionalProperties: false - required: - - data - title: ListPostTrainingJobsResponse - DPOAlignmentConfig: - type: object - properties: - beta: - type: number - description: Temperature parameter for the DPO loss - loss_type: - $ref: '#/components/schemas/DPOLossType' - default: sigmoid - description: The type of loss function to use for DPO - additionalProperties: false - required: - - beta - - loss_type - title: DPOAlignmentConfig - description: >- - Configuration for Direct Preference Optimization (DPO) alignment. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: - type: object - properties: - dataset_id: - type: string - description: >- - Unique identifier for the training dataset - batch_size: - type: integer - description: Number of samples per training batch - shuffle: - type: boolean - description: >- - Whether to shuffle the dataset during training - data_format: - $ref: '#/components/schemas/DatasetFormat' - description: >- - Format of the dataset (instruct or dialog) - validation_dataset_id: - type: string - description: >- - (Optional) Unique identifier for the validation dataset - packed: - type: boolean - default: false - description: >- - (Optional) Whether to pack multiple samples into a single sequence for - efficiency - train_on_input: - type: boolean - default: false - description: >- - (Optional) Whether to compute loss on input tokens as well as output tokens - additionalProperties: false - required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: >- - Configuration for training data and data loading. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - EfficiencyConfig: - type: object - properties: - enable_activation_checkpointing: - type: boolean - default: false - description: >- - (Optional) Whether to use activation checkpointing to reduce memory usage - enable_activation_offloading: - type: boolean - default: false - description: >- - (Optional) Whether to offload activations to CPU to save GPU memory - memory_efficient_fsdp_wrap: - type: boolean - default: false - description: >- - (Optional) Whether to use memory-efficient FSDP wrapping - fsdp_cpu_offload: - type: boolean - default: false - description: >- - (Optional) Whether to offload FSDP parameters to CPU - additionalProperties: false - title: EfficiencyConfig - description: >- - Configuration for memory and compute efficiency optimizations. - OptimizerConfig: - type: object - properties: - optimizer_type: - $ref: '#/components/schemas/OptimizerType' - description: >- - Type of optimizer to use (adam, adamw, or sgd) - lr: - type: number - description: Learning rate for the optimizer - weight_decay: - type: number - description: >- - Weight decay coefficient for regularization - num_warmup_steps: - type: integer - description: Number of steps for learning rate warmup - additionalProperties: false - required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: >- - Configuration parameters for the optimization algorithm. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: >- - Available optimizer algorithms for training. - TrainingConfig: - type: object - properties: - n_epochs: - type: integer - description: Number of training epochs to run - max_steps_per_epoch: - type: integer - default: 1 - description: Maximum number of steps to run per epoch - gradient_accumulation_steps: - type: integer - default: 1 - description: >- - Number of steps to accumulate gradients before updating - max_validation_steps: - type: integer - default: 1 - description: >- - (Optional) Maximum number of validation steps per epoch - data_config: - $ref: '#/components/schemas/DataConfig' - description: >- - (Optional) Configuration for data loading and formatting - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - description: >- - (Optional) Configuration for the optimization algorithm - efficiency_config: - $ref: '#/components/schemas/EfficiencyConfig' - description: >- - (Optional) Configuration for memory and compute optimizations - dtype: - type: string - default: bf16 - description: >- - (Optional) Data type for model parameters (bf16, fp16, fp32) - additionalProperties: false - required: - - n_epochs - - max_steps_per_epoch - - gradient_accumulation_steps - title: TrainingConfig - description: >- - Comprehensive configuration for the training process. - PreferenceOptimizeRequest: - type: object - properties: - job_uuid: - type: string - description: The UUID of the job to create. - finetuned_model: - type: string - description: The model to fine-tune. - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - description: The algorithm configuration. - training_config: - $ref: '#/components/schemas/TrainingConfig' - description: The training configuration. - hyperparam_search_config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The hyperparam search configuration. - logger_config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The logger configuration. - additionalProperties: false - required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: PreferenceOptimizeRequest - PostTrainingJob: - type: object - properties: - job_uuid: - type: string - additionalProperties: false - required: - - job_uuid - title: PostTrainingJob - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - SpanEndPayload: - description: Payload for a span end event. - properties: - type: - const: span_end - default: span_end - title: Type - type: string - status: - $ref: '#/components/schemas/SpanStatus' - required: - - status - title: SpanEndPayload - type: object - SpanStartPayload: - description: Payload for a span start event. - properties: - type: - const: span_start - default: span_start - title: Type - type: string - name: - title: Name - type: string - parent_span_id: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - name - title: SpanStartPayload - type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string - required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent - type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent - type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message - type: string - severity: - $ref: '#/components/schemas/LogSeverity' - required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent - type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. - 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 - OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. - properties: - created_at: - title: Created At - type: integer - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - nullable: true - title: OpenAIResponseError - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output - type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: - anyOf: - - type: string - - type: 'null' - nullable: true - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - nullable: true - title: OpenAIResponsePrompt - status: - title: Status - type: string - temperature: - anyOf: - - type: number - - type: 'null' - nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - nullable: true - tools: - anyOf: - - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - nullable: true - truncation: - anyOf: - - type: string - - type: 'null' - nullable: true - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - nullable: true - title: OpenAIResponseUsage - instructions: - anyOf: - - type: string - - type: 'null' - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Input - type: array - required: - - created_at - - id - - model - - output - - status - - input - title: OpenAIResponseObjectWithInput - type: object - ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. - 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 - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - type: object - ListBatchesResponse: - description: Response containing a list of batch objects. - properties: - object: - const: list - default: list - title: Object + trace_id: + title: Trace Id type: string - data: - description: List of batch objects - items: - $ref: '#/components/schemas/Batch' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - title: First Id - nullable: true - last_id: + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - - type: string + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object - type: 'null' - description: ID of the last batch in the list - title: Last Id - nullable: true - has_more: - default: false - description: Whether there are more batches available - title: Has More - type: boolean - required: - - data - title: ListBatchesResponse - type: object - MetricInResponse: - description: A metric value included in API responses. - properties: + type: + const: metric + default: metric + title: Type + type: string metric: title: Metric type: string @@ -19457,115 +13668,165 @@ components: - type: number title: integer | number unit: - anyOf: - - type: string - - type: 'null' - nullable: true + title: Unit + type: string required: + - trace_id + - span_id + - timestamp - metric - value - title: MetricInResponse + - unit + title: MetricEvent type: object - PaginatedResponse: - description: A generic paginated response that follows a simple format. + StructuredLogEvent: + description: A structured log event containing typed payload data. properties: - data: - items: - additionalProperties: true - type: object - title: Data - type: array - has_more: - title: Has More - type: boolean - url: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - - type: string + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object - type: 'null' - title: Url - nullable: true - required: - - data - - has_more - title: PaginatedResponse - type: object - PostTrainingMetric: - description: Training metrics captured during post-training jobs. - 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 + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent type: object - Checkpoint: - description: Checkpoint created during training runs. + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. properties: - identifier: - title: Identifier - type: string - created_at: - format: date-time - title: Created At + trace_id: + title: Trace Id type: string - epoch: - title: Epoch - type: integer - post_training_job_id: - title: Post Training Job Id + span_id: + title: Span Id type: string - path: - title: Path + timestamp: + format: date-time + title: Timestamp type: string - training_metrics: + attributes: anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object - type: 'null' - nullable: true + type: + const: unstructured_log + default: unstructured_log + title: Type + type: string + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. properties: type: - const: dialog - default: dialog title: Type type: string - title: DialogType - type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. - properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. + required: + - type + title: ResponseGuardrailSpec + type: object + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. + properties: + created_at: + title: Created At + type: integer + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + nullable: true + title: OpenAIResponseError + 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' - 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' @@ -19580,379 +13841,268 @@ components: title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array - required: - - items - title: ConversationItemCreateRequest - type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. - properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status - type: string - type: - const: message - default: message - title: Type - type: string - object: - const: message - default: message - title: Object - type: string - required: - - id - - content - - role - - status - title: ConversationMessage - type: object - ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. - properties: - data: - items: - $ref: '#/components/schemas/OpenAIFileObject' - title: Data + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output type: array - has_more: - title: Has More + parallel_tool_calls: + default: false + title: Parallel Tool Calls 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 - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). - properties: - type: - const: bf16 - default: bf16 - title: Type - type: string - title: Bf16QuantizationConfig - type: object - LogProbConfig: - description: '' - properties: - top_k: - anyOf: - - type: integer - - type: 'null' - default: 0 - title: Top K - title: LogProbConfig - type: object - SystemMessageBehavior: - description: Config for how to override the default system prompt. - enum: - - append - - replace - title: SystemMessageBehavior - 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. - enum: - - auto - - required - - none - title: ToolChoice - type: string - ToolConfig: - description: Configuration for tool use. - properties: - tool_choice: + previous_response_id: anyOf: - - $ref: '#/components/schemas/ToolChoice' - type: string - type: 'null' - default: auto - title: Tool Choice - tool_prompt_format: + nullable: true + prompt: anyOf: - - $ref: '#/components/schemas/ToolPromptFormat' + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' nullable: true - system_message_behavior: + title: OpenAIResponsePrompt + status: + title: Status + type: string + temperature: anyOf: - - $ref: '#/components/schemas/SystemMessageBehavior' + - type: number - type: 'null' - default: append - title: ToolConfig - type: object - ToolPromptFormat: - description: Prompt format for calling custom / zero shot tools. - enum: - - json - - function_tag - - python_list - title: ToolPromptFormat - type: string - ChatCompletionRequest: - properties: - model: - title: Model - type: string - messages: - items: - discriminator: - mapping: - assistant: '#/components/schemas/CompletionMessage' - system: '#/components/schemas/SystemMessage' - tool: '#/components/schemas/ToolResponseMessage' - user: '#/components/schemas/UserMessage' - propertyName: role - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' - title: Messages - type: array - sampling_params: + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: anyOf: - - $ref: '#/components/schemas/SamplingParams' + - type: number - type: 'null' + nullable: true tools: anyOf: - items: - $ref: '#/components/schemas/ToolDefinition' + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - title: Tools - tool_config: + nullable: true + truncation: anyOf: - - $ref: '#/components/schemas/ToolConfig' + - type: string - type: 'null' - response_format: + nullable: true + usage: anyOf: - - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - - $ref: '#/components/schemas/GrammarResponseFormat' + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' - title: Response Format nullable: true - stream: + title: OpenAIResponseUsage + instructions: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - title: Stream - logprobs: + nullable: true + max_tool_calls: anyOf: - - $ref: '#/components/schemas/LogProbConfig' + - type: integer - type: 'null' 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + title: Input + type: array required: - - model - - messages - title: ChatCompletionRequest - type: object - TokenLogProbs: - description: Log probabilities for generated tokens. - properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput type: object - ChatCompletionResponse: - description: Response from a chat completion request. + MetricInResponse: + description: A metric value included in API responses. properties: - metrics: + metric: + title: Metric + type: string + value: anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - completion_message: - $ref: '#/components/schemas/CompletionMessage' - logprobs: + - type: integer + - type: number + title: integer | number + unit: anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array + - type: string - type: 'null' - title: Logprobs nullable: true required: - - completion_message - title: ChatCompletionResponse + - metric + - value + title: MetricInResponse type: object - ChatCompletionResponseEventType: - description: Types of events that can occur during chat completion. - enum: - - start - - complete - - progress - title: ChatCompletionResponseEventType - type: string - ChatCompletionResponseEvent: - description: An event during chat completion generation. + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: - event_type: - $ref: '#/components/schemas/ChatCompletionResponseEventType' - delta: - discriminator: - mapping: - image: '#/components/schemas/ImageDelta' - text: '#/components/schemas/TextDelta' - tool_call: '#/components/schemas/ToolCallDelta' - propertyName: type - oneOf: - - $ref: '#/components/schemas/TextDelta' - - $ref: '#/components/schemas/ImageDelta' - - $ref: '#/components/schemas/ToolCallDelta' - title: Delta - logprobs: - anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - - type: 'null' - title: Logprobs - nullable: true - stop_reason: - anyOf: - - $ref: '#/components/schemas/StopReason' - - type: 'null' - nullable: true - required: - - event_type - - delta - title: ChatCompletionResponseEvent + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType type: object - ChatCompletionResponseStreamChunk: - description: A chunk of a streamed chat completion response. + ConversationItemCreateRequest: + description: Request body for creating conversation items. properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - event: - $ref: '#/components/schemas/ChatCompletionResponseEvent' + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array required: - - event - title: ChatCompletionResponseStreamChunk + - items + title: ConversationItemCreateRequest type: object - CompletionResponse: - description: Response from a completion request. + ConversationMessage: + description: OpenAI-compatible message item for conversations. properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true + id: + description: unique identifier for this message + title: Id + type: string content: + description: message content + items: + additionalProperties: true + type: object title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object type: string - stop_reason: - $ref: '#/components/schemas/StopReason' - logprobs: - anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - - type: 'null' - title: Logprobs - nullable: true required: + - id - content - - stop_reason - title: CompletionResponse + - role + - status + title: ConversationMessage type: object - CompletionResponseStreamChunk: - description: A chunk of a streamed completion response. + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - delta: - title: Delta + type: + const: bf16 + default: bf16 + title: Type type: string - stop_reason: - anyOf: - - $ref: '#/components/schemas/StopReason' - - type: 'null' - nullable: true - logprobs: - anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - - type: 'null' - title: Logprobs - nullable: true - required: - - delta - title: CompletionResponseStreamChunk + title: Bf16QuantizationConfig type: object EmbeddingsResponse: description: Response containing generated embeddings. @@ -19983,101 +14133,15 @@ components: properties: type: const: int4_mixed - default: int4_mixed - title: Type - type: string - scheme: - anyOf: - - type: string - - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig - type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - - type: 'null' - 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. - properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - nullable: true - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - nullable: true - title: OpenAIChoiceLogprobs - type: object - ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. - 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 + default: int4_mixed + title: Type type: string - required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIChatCompletionResponse + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig type: object OpenAIChoiceDelta: description: A delta from an OpenAI-compatible chat completion streaming response. @@ -20111,6 +14175,25 @@ components: nullable: true title: OpenAIChoiceDelta type: object + OpenAIChoiceLogprobs: + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs + type: object OpenAIChunkChoice: description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: @@ -20171,6 +14254,49 @@ components: - model title: OpenAIChatCompletionChunk type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs + required: + - message + - finish_reason + - index + title: OpenAIChoice + type: object OpenAICompletionChoice: description: |- A choice from an OpenAI-compatible completion response. @@ -20243,17 +14369,29 @@ components: nullable: true title: OpenAICompletionLogprobs type: object - ToolResponse: - description: Response from a tool invocation. + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object + required: + - logprobs_by_token + title: TokenLogProbs + type: object + ToolResponseMessage: + description: A message representing the result of a tool invocation. properties: + role: + const: tool + default: tool + title: Role + type: string call_id: title: Call Id type: string - tool_name: - anyOf: - - $ref: '#/components/schemas/BuiltinTool' - - type: string - title: Tool Name content: anyOf: - type: string @@ -20281,66 +14419,84 @@ components: title: TextContentItem title: ImageContentItem | TextContentItem type: array - title: Content - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata - nullable: true + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - call_id - - tool_name - content - title: ToolResponse - type: object - RouteInfo: - description: Information about an API route including its path, method, and implementing providers. - 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 - ListRoutesResponse: - description: Response containing a list of all available API routes. - properties: - data: - items: - $ref: '#/components/schemas/RouteInfo' - title: Data - type: array - required: - - data - title: ListRoutesResponse + title: ToolResponseMessage type: object - PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. + UserMessage: + description: A message from the user in a chat conversation. properties: - job_uuid: - title: Job Uuid + role: + const: user + default: user + title: Role type: string - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true required: - - job_uuid - title: PostTrainingJobArtifactsResponse + - content + title: UserMessage type: object PostTrainingJobLogStream: description: Stream of logs from a finetuning job. @@ -20349,60 +14505,14 @@ components: title: Job Uuid type: string log_lines: - items: - type: string - title: Log Lines - type: array - required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream - type: object - PostTrainingJobStatusResponse: - description: Status of a finetuning job. - properties: - job_uuid: - title: Job Uuid - type: string - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Scheduled At - nullable: true - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - nullable: true - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - nullable: true - resources_allocated: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Resources Allocated - nullable: true - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints + items: + type: string + title: Log Lines type: array required: - job_uuid - - status - title: PostTrainingJobStatusResponse + - log_lines + title: PostTrainingJobLogStream type: object RLHFAlgorithm: description: Available reinforcement learning from human feedback algorithms. @@ -20443,6 +14553,7 @@ components: required: <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 87bc7442f (chore: re-add missing endpoints) - job_uuid @@ -20611,6 +14722,8 @@ components: RegisterDatasetRequest: <<<<<<< HEAD ======= +======= +>>>>>>> 9c248d3e0 (fix: Query default values can't be set in Annotated) - job_uuid - finetuned_model - dataset_id @@ -20622,102 +14735,260 @@ components: - hyperparam_search_config - logger_config title: PostTrainingRLHFRequest +<<<<<<< HEAD >>>>>>> ceca36b91 (chore: regen scehma with main) ======= >>>>>>> 87bc7442f (chore: re-add missing endpoints) +======= +>>>>>>> 9c248d3e0 (fix: Query default values can't be set in Annotated) type: object + ToolGroupInput: + description: Input data for registering a tool group. properties: - purpose: + toolgroup_id: + title: Toolgroup Id type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - description: >- - 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" } - source: - $ref: '#/components/schemas/DataSource' - description: >- - 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!"}, ] - } ] } - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The metadata for the dataset. - E.g. {"description": "My dataset"}. - dataset_id: + provider_id: + title: Provider Id type: string - description: >- - The ID of the dataset. If not provided, an ID will be generated. - additionalProperties: false + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL required: - - purpose - - source - title: RegisterDatasetRequest - RegisterBenchmarkRequest: + - toolgroup_id + - provider_id + title: ToolGroupInput type: object + Chunk: + description: A chunk of content that can be inserted into a vector database. properties: - benchmark_id: - type: string - description: The ID of the benchmark to register. - dataset_id: + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id type: string - description: >- - The ID of the dataset to use for the benchmark. - scoring_functions: - type: array + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + nullable: true + title: ChunkMetadata + required: + - content + - chunk_id + title: Chunk + type: object + VectorStoreCreateRequest: + description: Request to create a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + file_ids: items: type: string - description: >- - The scoring functions to use for the benchmark. - provider_benchmark_id: - type: string - description: >- - The ID of the provider benchmark to use for the benchmark. - provider_id: - type: string - description: >- - The ID of the provider to use for the benchmark. + title: File Ids + type: array + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true metadata: + additionalProperties: true + title: Metadata type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number + title: VectorStoreCreateRequest + type: object + VectorStoreModifyRequest: + description: Request to modify a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: VectorStoreModifyRequest + type: object + VectorStoreSearchRequest: + description: Request to search a vector store. + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + max_num_results: + default: 10 + title: Max Num Results + type: integer + ranking_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + rewrite_query: + default: false + title: Rewrite Query + type: boolean + required: + - query + title: VectorStoreSearchRequest + type: object + VectorStoreSearchResponse: + description: Response from searching a vector store. + 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: array - - type: object - description: The metadata to use for the benchmark. - additionalProperties: false + - type: number + - type: boolean + title: string | number | boolean + type: object + - type: 'null' + nullable: true + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Content + type: array + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + type: object + _safety_run_shield_Request: + properties: + shield_id: + title: Shield Id + type: string + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + title: Messages + type: array + params: + additionalProperties: true + title: Params + type: object required: - - benchmark_id - - dataset_id - - scoring_functions - title: RegisterBenchmarkRequest + - 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/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index d61fb4f80c..ea2fac2535 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -6010,6 +6010,23 @@ components: text: type: string title: Text + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' type: object required: - type @@ -6086,6 +6103,7 @@ components: has_more: type: boolean title: Has More + default: false next_page: anyOf: - type: string @@ -6093,7 +6111,6 @@ components: type: object required: - data - - has_more title: VectorStoreFileContentResponse description: Represents the parsed content of a vector store file. VectorStoreFileCounts: @@ -6353,7 +6370,41 @@ components: - file_counts title: VectorStoreObject description: OpenAI Vector Store object. - VectorStoreSearchResponse: + VectorStoreSearchResponse-Input: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + score: + type: number + title: Score + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + title: string | number | boolean + type: object + - type: 'null' + 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. + VectorStoreSearchResponse-Output: properties: file_id: type: string @@ -6400,7 +6451,7 @@ components: title: Search Query data: items: - $ref: '#/components/schemas/VectorStoreSearchResponse' + $ref: '#/components/schemas/VectorStoreSearchResponse-Output' type: array title: Data has_more: @@ -10252,6 +10303,41 @@ components: - query title: VectorStoreSearchRequest type: object + VectorStoreSearchResponse: + description: Response from searching a vector store. + 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 + title: string | number | boolean + type: object + - type: 'null' + nullable: true + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Content + type: array + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + type: object _safety_run_shield_Request: properties: shield_id: diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index 163ef01c43..145e051972 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -5326,6 +5326,23 @@ components: text: type: string title: Text + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' type: object required: - type @@ -5402,6 +5419,7 @@ components: has_more: type: boolean title: Has More + default: false next_page: anyOf: - type: string @@ -5409,7 +5427,6 @@ components: type: object required: - data - - has_more title: VectorStoreFileContentResponse description: Represents the parsed content of a vector store file. VectorStoreFileCounts: @@ -5669,7 +5686,7 @@ components: - file_counts title: VectorStoreObject description: OpenAI Vector Store object. - VectorStoreSearchResponse: + VectorStoreSearchResponse-Output: properties: file_id: type: string @@ -5716,7 +5733,7 @@ components: title: Search Query data: items: - $ref: '#/components/schemas/VectorStoreSearchResponse' + $ref: '#/components/schemas/VectorStoreSearchResponse-Output' type: array title: Data has_more: @@ -8957,6 +8974,41 @@ components: - query title: VectorStoreSearchRequest type: object + VectorStoreSearchResponse: + description: Response from searching a vector store. + 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 + title: string | number | boolean + type: object + - type: 'null' + nullable: true + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Content + type: array + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + 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 3646a41a3b..0e3c11c314 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -1463,38 +1463,56 @@ paths: summary: Openai Retrieve Vector Store File Contents description: Retrieves the contents of a vector store file. operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get + parameters: + - name: include_embeddings + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Include Embeddings + - name: include_metadata + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Include Metadata + - 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' responses: '200': - description: A VectorStoreFileContentResponse representing the file contents. + description: File contents, optionally with embeddings and metadata based on query parameters. content: application/json: schema: $ref: '#/components/schemas/VectorStoreFileContentResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error 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: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' + description: Default Response /v1/vector_stores/{vector_store_id}/search: post: tags: @@ -2352,135 +2370,6 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' /v1/prompts/{prompt_id}: - delete: - tags: - - VectorIO - summary: Delete a vector store file. - description: Delete a vector store file. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to delete. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to delete. - required: true - schema: - type: string - deprecated: false - /v1/vector_stores/{vector_store_id}/files/{file_id}/content: - get: - responses: - '200': - description: >- - File contents, optionally with embeddings and metadata based on query - parameters. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileContentResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: >- - Retrieves the contents of a vector store file. - description: >- - Retrieves the contents of a vector store file. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to retrieve. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to retrieve. - required: true - schema: - type: string - - name: include_embeddings - in: query - description: >- - Whether to include embedding vectors in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - - name: include_metadata - in: query - description: >- - Whether to include chunk metadata in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - deprecated: false - /v1/vector_stores/{vector_store_id}/search: - post: - responses: - '200': - description: >- - A VectorStoreSearchResponse containing the search results. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreSearchResponsePage' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: Search for chunks in a vector store. - description: >- - Search for chunks in a vector store. - - Delete a prompt. - operationId: delete_prompt_v1_prompts__prompt_id__delete - 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 - parameters: - - name: prompt_id - in: path - required: true - schema: - type: string - description: 'Path parameter: prompt_id' get: tags: - Prompts @@ -7894,6 +7783,23 @@ components: text: type: string title: Text + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' type: object required: - type @@ -7970,6 +7876,7 @@ components: has_more: type: boolean title: Has More + default: false next_page: anyOf: - type: string @@ -7977,7 +7884,6 @@ components: type: object required: - data - - has_more title: VectorStoreFileContentResponse description: Represents the parsed content of a vector store file. VectorStoreFileCounts: @@ -8237,7 +8143,7 @@ components: - file_counts title: VectorStoreObject description: OpenAI Vector Store object. - VectorStoreSearchResponse: + VectorStoreSearchResponse-Output: properties: file_id: type: string @@ -8284,7 +8190,7 @@ components: title: Search Query data: items: - $ref: '#/components/schemas/VectorStoreSearchResponse' + $ref: '#/components/schemas/VectorStoreSearchResponse-Output' type: array title: Data has_more: @@ -11899,453 +11805,12 @@ components: - type: 'null' nullable: true metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of key-value pairs that can be attached to the vector store - additionalProperties: false - title: >- - OpenAICreateVectorStoreRequestWithExtraBody - description: >- - Request to create a vector store with extra_body support. - OpenaiUpdateVectorStoreRequest: - type: object - properties: - name: - type: string - description: The name of the vector store. - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The expiration policy for a vector store. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of 16 key-value pairs that can be attached to an object. - additionalProperties: false - title: OpenaiUpdateVectorStoreRequest - VectorStoreDeleteResponse: - type: object - properties: - id: - type: string - description: >- - Unique identifier of the deleted vector store - object: - type: string - default: vector_store.deleted - description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true - description: >- - Whether the deletion operation was successful - additionalProperties: false - required: - - id - - object - - deleted - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - "OpenAICreateVectorStoreFileBatchRequestWithExtraBody": - type: object - properties: - file_ids: - type: array - items: - type: string - description: >- - A list of File IDs that the vector store should use - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Key-value attributes to store with the files - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - (Optional) The chunking strategy used to chunk the file(s). Defaults to - auto - additionalProperties: false - required: - - file_ids - title: >- - OpenAICreateVectorStoreFileBatchRequestWithExtraBody - description: >- - Request to create a vector store file batch with extra_body support. - VectorStoreFileBatchObject: - type: object - properties: - id: - type: string - description: Unique identifier for the file batch - object: - type: string - default: vector_store.file_batch - description: >- - Object type identifier, always "vector_store.file_batch" - created_at: - type: integer - description: >- - Timestamp when the file batch was created - vector_store_id: - type: string - description: >- - ID of the vector store containing the file batch - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: >- - Current processing status of the file batch - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the batch - additionalProperties: false - required: - - id - - object - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject - description: OpenAI Vector Store File Batch object. - VectorStoreFileStatus: - oneOf: - - type: string - const: completed - - type: string - const: in_progress - - type: string - const: cancelled - - type: string - const: failed - VectorStoreFileLastError: - type: object - properties: - code: - oneOf: - - type: string - const: server_error - - type: string - const: rate_limit_exceeded - description: >- - Error code indicating the type of failure - message: - type: string - description: >- - Human-readable error message describing the failure - additionalProperties: false - required: - - code - - message - title: VectorStoreFileLastError - description: >- - Error information for failed vector store file processing. - VectorStoreFileObject: - type: object - properties: - id: - type: string - description: Unique identifier for the file - object: - type: string - default: vector_store.file - description: >- - Object type identifier, always "vector_store.file" - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Key-value attributes associated with the file - chunking_strategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - description: >- - Strategy used for splitting the file into chunks - created_at: - type: integer - description: >- - Timestamp when the file was added to the vector store - last_error: - $ref: '#/components/schemas/VectorStoreFileLastError' - description: >- - (Optional) Error information if file processing failed - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: Current processing status of the file - usage_bytes: - type: integer - default: 0 - description: Storage space used by this file in bytes - vector_store_id: - type: string - description: >- - ID of the vector store containing this file - additionalProperties: false - required: - - id - - object - - attributes - - chunking_strategy - - created_at - - status - - usage_bytes - - vector_store_id - title: VectorStoreFileObject - description: OpenAI Vector Store File object. - VectorStoreFilesListInBatchResponse: - type: object - properties: - object: - type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: >- - List of vector store file objects in the batch - first_id: - type: string - description: >- - (Optional) ID of the first file in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more files available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreFilesListInBatchResponse - description: >- - Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: - type: object - properties: - object: - type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: List of vector store file objects - first_id: - type: string - description: >- - (Optional) ID of the first file in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more files available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreListFilesResponse - description: >- - Response from listing files in a vector store. - OpenaiAttachFileToVectorStoreRequest: - type: object - properties: - file_id: - type: string - description: >- - The ID of the file to attach to the vector store. - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The key-value attributes stored with the file, which can be used for filtering. - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - The chunking strategy to use for the file. - additionalProperties: false - required: - - file_id - title: OpenaiAttachFileToVectorStoreRequest - OpenaiUpdateVectorStoreFileRequest: - type: object - properties: - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The updated key-value attributes to store with the file. - additionalProperties: false - required: - - attributes - title: OpenaiUpdateVectorStoreFileRequest - VectorStoreFileDeleteResponse: - type: object - properties: - id: - type: string - description: Unique identifier of the deleted file - object: - type: string - default: vector_store.file.deleted - description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true - description: >- - Whether the deletion operation was successful - additionalProperties: false - required: - - id - - object - - deleted - title: VectorStoreFileDeleteResponse - description: >- - Response from deleting a vector store file. - bool: - type: boolean - VectorStoreContent: - type: object - properties: - type: - type: string - const: text - description: >- - Content type, currently only "text" is supported - text: - type: string - description: The actual text content - embedding: - type: array - items: - type: number - description: >- - Optional embedding vector for this content chunk - chunk_metadata: - $ref: '#/components/schemas/ChunkMetadata' - description: Optional chunk metadata - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Optional user-defined metadata - additionalProperties: false - required: - - type - - text - title: VectorStoreContent - description: >- - Content item from a vector store file or search result. - VectorStoreFileContentResponse: - type: object - properties: - object: - type: string - const: vector_store.file_content.page - default: vector_store.file_content.page - description: >- - The object type, which is always `vector_store.file_content.page` - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' - description: Parsed content of the file - has_more: - type: boolean - default: false - description: >- - Indicates if there are more content pages to fetch - next_page: - type: string - description: The token for the next page, if any - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreFileContentResponse - description: >- - Represents the parsed content of a vector store file. - OpenaiSearchVectorStoreRequest: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: VectorStoreModifyRequest type: object VectorStoreSearchRequest: description: Request to search a vector store. @@ -12382,6 +11847,41 @@ components: - query title: VectorStoreSearchRequest type: object + VectorStoreSearchResponse: + description: Response from searching a vector store. + 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 + title: string | number | boolean + type: object + - type: 'null' + nullable: true + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Content + type: array + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + type: object _safety_run_shield_Request: properties: shield_id: diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index e47f104e38..6b73435ec6 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -1825,6 +1825,8 @@ paths: description: Internal Server Error default: $ref: '#/components/responses/DefaultError' + description: Default Response + post: tags: - ScoringFunctions summary: List all scoring functions. @@ -1989,6 +1991,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + /v1alpha/inference/rerank: + post: tags: - Shields summary: List all shields. @@ -2049,15 +2053,53 @@ paths: /v1/health: get: tags: - - Shields - summary: Get a shield by its identifier. - description: Get a shield by its identifier. + - Inspect + summary: Health + description: |- + Get health status. + + Get the current health status of the service. + 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: + - Inspect + summary: List Routes + description: |- + List routes. + + List all available API routes with their methods and implementing providers. + operationId: list_routes_v1_inspect_routes_get parameters: - - name: identifier - in: path - description: The identifier of the shield to get. - required: true - schema: + - name: api_filter + in: query + required: false + schema: + anyOf: + - enum: + - v1 + - v1alpha + - v1beta + - deprecated type: string deprecated: false delete: @@ -2114,40 +2156,14 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: tool_group_id - in: query - description: >- - The ID of the tool group to list tools for. - required: false - schema: - type: string - - name: mcp_endpoint - in: query - description: >- - The MCP endpoint to use for the tool group. - required: false - schema: - $ref: '#/components/schemas/URL' - deprecated: false - /v1/toolgroups: + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' + /v1/batches: get: - responses: - '200': - description: A ListToolGroupsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListToolGroupsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - ToolGroups summary: List tool groups with optional provider. @@ -2241,65 +2257,87 @@ paths: get: responses: '200': - description: A ListToolDefsResponse. + description: A list of batch objects. content: application/json: schema: - $ref: '#/components/schemas/ListToolDefsResponse' + $ref: '#/components/schemas/ListBatchesResponse' '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' + description: Default Response + post: tags: - - ToolGroups - summary: List tools with optional tool group. - description: List tools with optional tool group. - parameters: - - name: toolgroup_id - in: query - description: >- - The ID of the tool group to list tools for. - required: false - schema: - type: string - deprecated: false - /v1/tools/{tool_name}: - get: + - Batches + summary: Create Batch + description: Create a new batch for processing multiple API requests. + operationId: create_batch_v1_batches_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_batches_Request' responses: '200': - description: A ToolDef. + description: The created batch object. content: application/json: schema: - $ref: '#/components/schemas/ToolDef' + $ref: '#/components/schemas/Batch' '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' + description: Default Response + /v1/batches/{batch_id}: + get: tags: - - ToolGroups - summary: Get a tool by its name. - description: Get a tool by its name. + - Batches + summary: Retrieve Batch + description: Retrieve information about a specific batch. + operationId: retrieve_batch_v1_batches__batch_id__get + responses: + '200': + description: The 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: tool_name - in: path - description: The name of the tool to get. - required: true - schema: - type: string - deprecated: false + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' /v1/vector-io/insert: post: tags: @@ -2981,26 +3019,25 @@ paths: summary: Openai Retrieve Vector Store File Contents description: Retrieves the contents of a vector store file. operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get - responses: - '200': - description: A list of InterleavedContent representing the file contents. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileContentsResponse' - '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: include_embeddings + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Include Embeddings + - name: include_metadata + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Include Metadata - name: vector_store_id in: path required: true @@ -3013,6 +3050,25 @@ paths: schema: type: string description: 'Path parameter: file_id' + responses: + '200': + description: File contents, optionally with embeddings and metadata based on query parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileContentResponse' + '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: @@ -3150,6 +3206,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - name: model_id in: path @@ -3217,6 +3274,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true /v1/moderations: post: tags: @@ -3344,6 +3402,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - name: identifier in: path @@ -3360,13 +3419,11 @@ paths: operationId: list_shields_v1_shields_get responses: '200': - description: >- - File contents, optionally with embeddings and metadata based on query - parameters. + description: A ListShieldsResponse. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileContentResponse' + $ref: '#/components/schemas/ListShieldsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3379,42 +3436,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: >- - Retrieves the contents of a vector store file. - description: >- - Retrieves the contents of a vector store file. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to retrieve. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to retrieve. - required: true - schema: - type: string - - name: include_embeddings - in: query - description: >- - Whether to include embedding vectors in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - - name: include_metadata - in: query - description: >- - Whether to include chunk metadata in the response. - required: false - schema: - $ref: '#/components/schemas/bool' - deprecated: false - /v1/vector_stores/{vector_store_id}/search: post: tags: - Shields @@ -3446,54 +3467,23 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true + /v1beta/datasetio/append-rows/{dataset_id}: post: tags: - - Shields - summary: Register Shield - description: Register a shield. - operationId: register_shield_v1_shields_post + - Datasetio + summary: Append Rows + description: Append rows to a dataset. + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__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' - deprecated: true - /v1beta/datasetio/append-rows/{dataset_id}: - post: - tags: - - Datasetio - summary: Append Rows - description: Append rows to a dataset. - operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post - requestBody: - content: - application/json: - schema: - items: - additionalProperties: true - type: object - type: array - title: Rows + items: + additionalProperties: true + type: object + type: array + title: Rows required: true responses: '200': @@ -3635,6 +3625,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - name: dataset_id in: path @@ -3680,9 +3671,6 @@ paths: schema: $ref: '#/components/schemas/_datasets_Request' required: true - deprecated: true - /v1beta/datasets/{dataset_id}: - get: responses: '200': description: A Dataset. @@ -3702,6 +3690,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true /v1/scoring/score: post: tags: @@ -3823,6 +3812,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - name: scoring_fn_id in: path @@ -3862,6 +3852,7 @@ paths: summary: Register Scoring Function description: Register a scoring function. operationId: register_scoring_function_v1_scoring_functions_post + deprecated: true requestBody: required: true content: @@ -3919,124 +3910,57 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: dataset_id - in: path - description: The ID of the dataset to unregister. - required: true - schema: - type: string - deprecated: true - /v1alpha/eval/benchmarks: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: get: tags: - - Benchmarks - summary: List Benchmarks - description: List all benchmarks. - operationId: list_benchmarks_v1alpha_eval_benchmarks_get + - Eval + summary: Job Status + description: Get the status of a job. + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': - description: A ListBenchmarksResponse. + description: The status of the evaluation job. content: application/json: schema: - $ref: '#/components/schemas/ListBenchmarksResponse' + $ref: '#/components/schemas/Job' '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: - - Benchmarks - summary: Register Benchmark - description: Register a benchmark. - operationId: register_benchmark_v1alpha_eval_benchmarks_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterBenchmarkRequest' - required: true - deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}: - get: - 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 + $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: - - Benchmarks - summary: Get a benchmark by its ID. - description: Get a benchmark by its ID. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to get. - required: true - schema: - type: string - 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. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to unregister. - required: true - schema: - type: string - deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: - post: - tags: - - Post Training - summary: Cancel Training Job - description: Cancel a training job. - operationId: cancel_training_job_v1alpha_post_training_job_cancel_post parameters: - - name: job_uuid - in: query + - name: benchmark_id + in: path required: true schema: type: string - title: Job Uuid + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + delete: + tags: + - Eval + summary: Job Cancel + description: Cancel a job. + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete responses: '200': description: Successful Response @@ -4044,97 +3968,122 @@ paths: application/json: schema: {} '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 - /v1alpha/post-training/job/artifacts: - get: - tags: - - Post Training - summary: Get Training Job Artifacts - description: Get the artifacts of a training job. - operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get + $ref: '#/components/responses/DefaultError' parameters: - - name: job_uuid - in: query + - name: benchmark_id + in: path required: true schema: type: string - title: Job Uuid + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: + get: + tags: + - Eval + summary: Job Result + description: Get the result of a job. + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get responses: '200': - description: A PostTrainingJobArtifactsResponse. + description: The result of the job. content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + $ref: '#/components/schemas/EvaluateResponse' '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 - /v1alpha/post-training/job/status: - get: - tags: - - Post Training - summary: Get Training Job Status - description: Get the status of a training job. - operationId: get_training_job_status_v1alpha_post_training_job_status_get + $ref: '#/components/responses/DefaultError' parameters: - - name: job_uuid - in: query + - name: benchmark_id + in: path required: true schema: type: string - title: Job Uuid + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs: + post: + tags: + - Eval + summary: Run Eval + description: Run an evaluation on a benchmark. + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BenchmarkConfig' + required: true responses: '200': - description: A PostTrainingJobStatusResponse. + description: The job that was created to run the evaluation. content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJobStatusResponse' + $ref: '#/components/schemas/Job' '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 - /v1alpha/post-training/jobs: + $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}: get: tags: - - Post Training - summary: Get Training Jobs - description: Get all training jobs. - operationId: get_training_jobs_v1alpha_post_training_jobs_get + - Benchmarks + summary: Get Benchmark + description: Get a benchmark by its ID. + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': - description: A ListPostTrainingJobsResponse. + description: A Benchmark. content: application/json: schema: - $ref: '#/components/schemas/ListPostTrainingJobsResponse' + $ref: '#/components/schemas/Benchmark' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -4147,26 +4096,246 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/preference-optimize: - post: - tags: - - Post Training - summary: Preference Optimize - description: Run preference optimization of a model. - operationId: preference_optimize_v1alpha_post_training_preference_optimize_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_post_training_preference_optimize_Request' + parameters: + - name: benchmark_id + in: path required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + delete: + tags: + - Benchmarks + summary: Unregister Benchmark + description: Unregister a benchmark. + operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete responses: '200': - description: A PostTrainingJob. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' + schema: {} + '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' + deprecated: true + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks: + get: + tags: + - Benchmarks + summary: List Benchmarks + description: List all benchmarks. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get + responses: + '200': + description: A ListBenchmarksResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListBenchmarksResponse' + '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: + - Benchmarks + summary: Register Benchmark + description: Register a benchmark. + operationId: register_benchmark_v1alpha_eval_benchmarks_post + deprecated: true + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_benchmark_v1alpha_eval_benchmarks_post' + 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 + /v1alpha/post-training/job/cancel: + post: + tags: + - Post Training + summary: Cancel Training Job + description: Cancel a training job. + operationId: cancel_training_job_v1alpha_post_training_job_cancel_post + parameters: + - name: job_uuid + in: query + required: true + schema: + type: string + title: Job Uuid + 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 + /v1alpha/post-training/job/artifacts: + get: + tags: + - Post Training + summary: Get Training Job Artifacts + description: Get the artifacts of a training job. + 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. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + '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 + /v1alpha/post-training/job/status: + get: + tags: + - Post Training + summary: Get Training Job Status + description: Get the status of a training job. + 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. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobStatusResponse' + '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 + /v1alpha/post-training/jobs: + get: + tags: + - Post Training + summary: Get Training Jobs + description: Get all training jobs. + operationId: get_training_jobs_v1alpha_post_training_jobs_get + responses: + '200': + description: A ListPostTrainingJobsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPostTrainingJobsResponse' + '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' + /v1alpha/post-training/preference-optimize: + post: + tags: + - Post Training + summary: Preference Optimize + description: Run preference optimization of a model. + operationId: preference_optimize_v1alpha_post_training_preference_optimize_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_post_training_preference_optimize_Request' + required: true + responses: + '200': + description: A PostTrainingJob. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJob' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -4301,6 +4470,7 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - name: toolgroup_id in: path @@ -4340,6 +4510,7 @@ paths: summary: Register Tool Group description: Register a tool group. operationId: register_tool_group_v1_toolgroups_post + deprecated: true requestBody: content: application/json: @@ -6400,48 +6571,218 @@ components: - judge_model title: LLMAsJudgeScoringFnParams description: Parameters for LLM-as-judge scoring function configuration. - ListBenchmarksResponse: + ListBatchesResponse: properties: + object: + type: string + const: list + title: Object + default: list data: items: - $ref: '#/components/schemas/Benchmark' + $ref: '#/components/schemas/Batch' type: array title: Data + description: List of batch objects + first_id: + anyOf: + - type: string + - type: 'null' + description: ID of the first batch in the list + last_id: + anyOf: + - type: string + - type: 'null' + description: ID of the last batch in the list + has_more: + type: boolean + title: Has More + description: Whether there are more batches available + default: false type: object required: - data - title: ListBenchmarksResponse - ListDatasetsResponse: + title: ListBatchesResponse + description: Response containing a list of batch objects. + ListBenchmarksResponse: properties: data: items: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/Benchmark' type: array title: Data type: object required: - data - title: ListDatasetsResponse - description: Response from listing datasets. - ListPostTrainingJobsResponse: + title: ListBenchmarksResponse + ListDatasetsResponse: properties: data: items: - $ref: '#/components/schemas/PostTrainingJob' + $ref: '#/components/schemas/Dataset' type: array title: Data type: object required: - data - title: ListPostTrainingJobsResponse - ListPromptsResponse: + title: ListDatasetsResponse + description: Response from listing datasets. + ListOpenAIChatCompletionResponse: properties: data: items: - $ref: '#/components/schemas/Prompt' + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' type: array title: Data - type: object + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse + description: Response from listing OpenAI-compatible chat completions. + ListOpenAIFileResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse + description: Response for listing files in OpenAI Files API. + ListOpenAIResponseInputItem: + properties: + data: + items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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' + title: OpenAIResponseMessage-Output | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + type: array + title: Data + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + title: ListOpenAIResponseInputItem + description: List container for OpenAI response input items. + ListOpenAIResponseObject: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput-Output' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject + description: Paginated list of OpenAI response objects with navigation metadata. + 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 @@ -6458,6 +6799,18 @@ components: - data title: ListProvidersResponse description: Response containing a list of all available providers. + 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. ListScoringFunctionsResponse: properties: data: @@ -6480,6 +6833,18 @@ components: required: - data title: ListShieldsResponse + ListToolDefsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ToolDef' + type: array + title: Data + type: object + required: + - data + title: ListToolDefsResponse + description: Response containing a list of tool definitions. ListToolGroupsResponse: properties: data: @@ -8433,7 +8798,10 @@ components: anyOf: - type: string - type: 'null' - title: Instructions + max_tool_calls: + anyOf: + - type: integer + - type: 'null' type: object required: - created_at @@ -10075,6 +10443,23 @@ components: text: type: string title: Text + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' type: object required: - type @@ -10136,31 +10521,31 @@ components: - file_counts title: VectorStoreFileBatchObject description: OpenAI Vector Store File Batch object. - VectorStoreFileContentsResponse: + VectorStoreFileContentResponse: properties: - file_id: - type: string - title: File Id - filename: + object: type: string - title: Filename - attributes: - additionalProperties: true - type: object - title: Attributes - content: + const: vector_store.file_content.page + title: Object + default: vector_store.file_content.page + data: items: $ref: '#/components/schemas/VectorStoreContent' type: array - title: Content + title: Data + has_more: + type: boolean + title: Has More + default: false + next_page: + anyOf: + - type: string + - type: 'null' type: object required: - - file_id - - filename - - attributes - - content - title: VectorStoreFileContentsResponse - description: Response from retrieving the contents of a vector store file. + - data + title: VectorStoreFileContentResponse + description: Represents the parsed content of a vector store file. VectorStoreFileCounts: properties: completed: @@ -10418,7 +10803,7 @@ components: - file_counts title: VectorStoreObject description: OpenAI Vector Store object. - VectorStoreSearchResponse: + VectorStoreSearchResponse-Output: properties: file_id: type: string @@ -10465,7 +10850,7 @@ components: title: Search Query data: items: - $ref: '#/components/schemas/VectorStoreSearchResponse' + $ref: '#/components/schemas/VectorStoreSearchResponse-Output' type: array title: Data has_more: @@ -11002,8 +11387,10 @@ components: - type: integer - type: 'null' default: 10 - guardrails: - title: Guardrails + max_tool_calls: + anyOf: + - type: integer + - type: 'null' type: object required: - input @@ -11435,37 +11822,8 @@ components: - $ref: '#/components/schemas/ImageDelta' title: ImageDelta - $ref: '#/components/schemas/ToolCallDelta' - ToolDefinition: - properties: - tool_name: - anyOf: - - $ref: '#/components/schemas/BuiltinTool' - - type: string - title: Tool Name - description: - anyOf: - - type: string - - type: 'null' - title: Description - nullable: true - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Input Schema - nullable: true - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Output Schema - nullable: true - required: - - tool_name - title: ToolDefinition - type: object + title: ToolCallDelta + title: TextDelta | ImageDelta | ToolCallDelta SamplingStrategy: discriminator: mapping: @@ -11479,173 +11837,15 @@ components: - $ref: '#/components/schemas/TopPSamplingStrategy' title: TopPSamplingStrategy - $ref: '#/components/schemas/TopKSamplingStrategy' - CompletionMessage: - description: A message containing the model's (assistant) response in a chat conversation. + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - title: Content - stop_reason: - $ref: '#/components/schemas/StopReason' - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/ToolCall' - type: array - - type: 'null' - title: Tool Calls - required: - - content - - stop_reason - title: CompletionMessage - type: object - StopReason: - enum: - - end_of_turn - - end_of_message - - out_of_tokens - title: StopReason - type: string - ToolResponseMessage: - description: A message representing the result of a tool invocation. - properties: - role: - const: tool - default: tool - title: Role - type: string - call_id: - title: Call Id - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - title: Content - required: - - call_id - - content - title: ToolResponseMessage - type: object - UserMessage: - description: A message from the user in a chat conversation. - properties: - role: - const: user - default: user - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - title: Content - context: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - type: array - - type: 'null' - title: Context - nullable: true - required: - - content - title: UserMessage - type: object - Message: - discriminator: - mapping: - assistant: '#/components/schemas/CompletionMessage' - system: '#/components/schemas/SystemMessage' - tool: '#/components/schemas/ToolResponseMessage' - user: '#/components/schemas/UserMessage' - propertyName: role - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type + type: + const: grammar + default: grammar + title: Type type: string bnf: additionalProperties: true @@ -13236,6207 +13436,125 @@ components: mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse' mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - OpenAIResponseAnnotationCitation: - type: object + message: '#/components/schemas/OpenAIResponseMessage' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + SpanEndPayload: + description: Payload for a span end event. properties: type: + const: span_end + default: span_end + title: 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 + status: + $ref: '#/components/schemas/SpanStatus' required: - - type - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation - description: >- - URL citation annotation for referencing external web resources. - "OpenAIResponseAnnotationContainerFileCitation": + - status + title: SpanEndPayload type: object + SpanStartPayload: + description: Payload for a span start event. properties: type: + const: span_start + default: span_start + title: 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: - 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: - type: object - 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 - items: - 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 - required: - - id - - queries - - status - - type - title: >- - OpenAIResponseOutputMessageFileSearchToolCall - description: >- - File search tool call output message for OpenAI responses. - "OpenAIResponseOutputMessageFunctionToolCall": - type: object - properties: - 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 - required: - - call_id - - name - - arguments - - type - title: >- - OpenAIResponseOutputMessageFunctionToolCall - description: >- - Function tool call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPCall: - type: object - 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 - properties: - items: - type: array - items: - $ref: '#/components/schemas/ConversationItem' - description: >- - Initial items to include in the conversation context. - metadata: - type: object - additionalProperties: - type: string - description: >- - Set of key-value pairs that can be attached to an object. - additionalProperties: false - title: CreateConversationRequest - Conversation: - type: object - properties: - id: - type: string - object: - type: string - const: conversation - default: conversation - created_at: - type: integer - metadata: - type: object - additionalProperties: - type: string - items: - type: array - items: - type: object - title: dict - description: >- - dict() -> new empty dictionary dict(mapping) -> new dictionary initialized - from a mapping object's (key, value) pairs dict(iterable) -> new - dictionary initialized as if via: d = {} for k, v in iterable: d[k] - = v dict(**kwargs) -> new dictionary initialized with the name=value - pairs in the keyword argument list. For example: dict(one=1, two=2) - additionalProperties: false - required: - - id - - object - - created_at - title: Conversation - description: OpenAI-compatible conversation object. - UpdateConversationRequest: - type: object - properties: - metadata: - type: object - additionalProperties: - type: string - description: >- - Set of key-value pairs that can be attached to an object. - additionalProperties: false - required: - - metadata - title: UpdateConversationRequest - ConversationDeletedResource: - type: object - properties: - id: - type: string - object: - type: string - default: conversation.deleted - deleted: - type: boolean - default: true - additionalProperties: false - required: - - id - - object - - deleted - title: ConversationDeletedResource - description: Response for deleted conversation. - ConversationItemList: - type: object - properties: - object: - type: string - default: list - data: - type: array - items: - $ref: '#/components/schemas/ConversationItem' - first_id: - type: string - last_id: - type: string - has_more: - type: boolean - default: false - additionalProperties: false - required: - - object - - data - - has_more - title: ConversationItemList - description: >- - List of conversation items with pagination. - AddItemsRequest: - type: object - properties: - items: - type: array - items: - $ref: '#/components/schemas/ConversationItem' - description: >- - Items to include in the conversation context. - additionalProperties: false - required: - - items - title: AddItemsRequest - ConversationItemDeletedResource: - type: object - properties: - id: - type: string - object: - type: string - default: conversation.item.deleted - deleted: - type: boolean - default: true - additionalProperties: false - required: - - id - - object - - deleted - title: ConversationItemDeletedResource - description: Response for deleted conversation item. - OpenAIEmbeddingsRequestWithExtraBody: - type: object - properties: - model: - type: string - description: >- - The identifier of the model to use. The model must be an embedding model - registered with Llama Stack and available via the /models endpoint. - input: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - 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. - encoding_format: - type: string - default: float - description: >- - (Optional) The format to return the embeddings in. Can be either "float" - or "base64". Defaults to "float". - dimensions: - type: integer - description: >- - (Optional) The number of dimensions the resulting output embeddings should - have. Only supported in text-embedding-3 and later models. - user: - type: string - description: >- - (Optional) A unique identifier representing your end-user, which can help - OpenAI to monitor and detect abuse. - additionalProperties: false - required: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody - description: >- - Request parameters for OpenAI-compatible embeddings endpoint. - OpenAIEmbeddingData: - type: object - properties: - object: - type: string - const: embedding - default: embedding - description: >- - The object type, which will be "embedding" - embedding: - oneOf: - - type: array - items: - type: number - - type: string - description: >- - The embedding vector as a list of floats (when encoding_format="float") - or as a base64-encoded string (when encoding_format="base64") - index: - type: integer - description: >- - The index of the embedding in the input list - additionalProperties: false - required: - - object - - embedding - - index - title: OpenAIEmbeddingData - description: >- - A single embedding data object from an OpenAI-compatible embeddings response. - OpenAIEmbeddingUsage: - type: object - properties: - prompt_tokens: - type: integer - description: The number of tokens in the input - total_tokens: - type: integer - description: The total number of tokens used - additionalProperties: false - required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage - description: >- - Usage information for an OpenAI-compatible embeddings response. - OpenAIEmbeddingsResponse: - type: object - properties: - object: - type: string - const: list - default: list - description: The object type, which will be "list" - data: - type: array - items: - $ref: '#/components/schemas/OpenAIEmbeddingData' - description: List of embedding data objects - model: - type: string - description: >- - The model that was used to generate the embeddings - usage: - $ref: '#/components/schemas/OpenAIEmbeddingUsage' - description: Usage information - additionalProperties: false - required: - - object - - data - - model - - usage - title: OpenAIEmbeddingsResponse - description: >- - Response from an OpenAI-compatible embeddings request. - OpenAIFilePurpose: - type: string - enum: - - assistants - - batch - title: OpenAIFilePurpose - description: >- - Valid purpose values for OpenAI Files API. - ListOpenAIFileResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIFileObject' - description: List of file objects - has_more: - type: boolean - description: >- - Whether there are more files available beyond this page - first_id: - type: string - description: >- - ID of the first file in the list for pagination - last_id: - type: string - description: >- - ID of the last file in the list for pagination - object: - type: string - const: list - default: list - description: The object type, which is always "list" - additionalProperties: false - required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIFileResponse - description: >- - Response for listing files in OpenAI Files API. - OpenAIFileObject: - type: object - properties: - object: - type: string - const: file - default: file - description: The object type, which is always "file" - id: - type: string - description: >- - The file identifier, which can be referenced in the API endpoints - bytes: - type: integer - description: The size of the file, in bytes - created_at: - type: integer - description: >- - The Unix timestamp (in seconds) for when the file was created - expires_at: - type: integer - description: >- - The Unix timestamp (in seconds) for when the file expires - filename: - type: string - description: The name of the file - purpose: - type: string - enum: - - assistants - - batch - description: The intended purpose of the file - additionalProperties: false - required: - - object - - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject - description: >- - OpenAI File object as defined in the OpenAI Files API. - ExpiresAfter: - type: object - properties: - anchor: - type: string - const: created_at - seconds: - type: integer - additionalProperties: false - required: - - anchor - - seconds - title: 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) - OpenAIFileDeleteResponse: - type: object - properties: - id: - type: string - description: The file identifier that was deleted - object: - type: string - const: file - default: file - description: The object type, which is always "file" - deleted: - type: boolean - description: >- - Whether the file was successfully deleted - additionalProperties: false - required: - - id - - object - - deleted - title: OpenAIFileDeleteResponse - description: >- - Response for deleting a file in OpenAI Files API. - Response: - type: object - title: Response - HealthInfo: - type: object - properties: - status: - type: string - enum: - - OK - - Error - - Not Implemented - description: Current health status of the service - additionalProperties: false - required: - - status - title: HealthInfo - description: >- - Health status information for the service. - RouteInfo: - type: object - properties: - route: - type: string - description: The API endpoint path - method: - type: string - description: HTTP method for the route - provider_types: - type: array - items: - type: string - description: >- - List of provider types that implement this route - additionalProperties: false - required: - - route - - method - - provider_types - title: RouteInfo - description: >- - Information about an API route including its path, method, and implementing - providers. - ListRoutesResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/RouteInfo' - description: >- - List of available route information objects - additionalProperties: false - required: - - data - title: ListRoutesResponse - description: >- - Response containing a list of all available API routes. - OpenAIModel: - type: object - properties: - id: - type: string - object: - type: string - const: model - default: model - created: - type: integer - owned_by: - type: string - custom_metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - additionalProperties: false - required: - - id - - object - - created - - owned_by - title: OpenAIModel - description: A model from OpenAI. - OpenAIListModelsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIModel' - additionalProperties: false - required: - - data - title: OpenAIListModelsResponse - Model: - type: object - properties: - identifier: - type: string - description: >- - Unique identifier for this resource in llama stack - provider_resource_id: - type: string - description: >- - Unique identifier for this resource in the provider - provider_id: - type: string - description: >- - ID of the provider that owns this resource - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: model - default: model - description: >- - The resource type, always 'model' for model resources - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Any additional metadata for this model - model_type: - $ref: '#/components/schemas/ModelType' - default: llm - description: >- - The type of model (LLM or embedding model) - additionalProperties: false - required: - - identifier - - provider_id - - type - - metadata - - model_type - title: Model - description: >- - A model resource representing an AI model registered in Llama Stack. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType - description: >- - Enumeration of supported model types in Llama Stack. - RunModerationRequest: - type: object - properties: - input: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - Input (or inputs) to classify. Can be a single string, an array of strings, - or an array of multi-modal input objects similar to other models. - model: - type: string - description: >- - (Optional) The content moderation model you would like to use. - additionalProperties: false - required: - - input - title: RunModerationRequest - ModerationObject: - type: object - properties: - id: - type: string - description: >- - The unique identifier for the moderation request. - model: - type: string - description: >- - The model used to generate the moderation results. - results: - type: array - items: - $ref: '#/components/schemas/ModerationObjectResults' - description: A list of moderation objects - additionalProperties: false - required: - - id - - model - - results - title: ModerationObject - description: A moderation object. - ModerationObjectResults: - type: object - properties: - flagged: - type: boolean - description: >- - Whether any of the below categories are flagged. - categories: - type: object - additionalProperties: - type: boolean - description: >- - A list of the categories, and whether they are flagged or not. - category_applied_input_types: - type: object - additionalProperties: - type: array - items: - type: string - description: >- - A list of the categories along with the input type(s) that the score applies - to. - category_scores: - type: object - additionalProperties: - type: number - description: >- - A list of the categories along with their scores as predicted by model. - user_message: - type: string - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - additionalProperties: false - required: - - flagged - - metadata - title: ModerationObjectResults - description: A moderation object. - Prompt: - type: object - properties: - prompt: - type: string - description: >- - The system prompt text with variable placeholders. Variables are only - supported when using the Responses API. - version: - type: integer - description: >- - Version (integer starting at 1, incremented on save) - prompt_id: - type: string - description: >- - Unique identifier formatted as 'pmpt_<48-digit-hash>' - variables: - type: array - items: - type: string - description: >- - List of prompt variable names that can be used in the prompt template - is_default: - type: boolean - default: false - description: >- - Boolean indicating whether this version is the default version for this - prompt - additionalProperties: false - required: - - version - - prompt_id - - variables - - is_default - title: Prompt - description: >- - A prompt resource representing a stored OpenAI Compatible prompt template - in Llama Stack. - ListPromptsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Prompt' - additionalProperties: false - required: - - data - title: ListPromptsResponse - description: Response model to list prompts. - CreatePromptRequest: - type: object - properties: - prompt: - type: string - description: >- - The prompt text content with variable placeholders. - variables: - type: array - items: - type: string - description: >- - List of variable names that can be used in the prompt template. - additionalProperties: false - required: - - prompt - title: CreatePromptRequest - UpdatePromptRequest: - type: object - properties: - prompt: - type: string - description: The updated prompt text content. - version: - type: integer - description: >- - The current version of the prompt being updated. - variables: - type: array - items: - type: string - description: >- - Updated list of variable names that can be used in the prompt template. - set_as_default: - type: boolean - description: >- - Set the new version as the default (default=True). - additionalProperties: false - required: - - prompt - - version - - set_as_default - title: UpdatePromptRequest - SetDefaultVersionRequest: - type: object - properties: - version: - type: integer - description: The version to set as default. - additionalProperties: false - required: - - version - title: SetDefaultVersionRequest - ProviderInfo: - type: object - properties: - api: - type: string - description: The API name this provider implements - provider_id: - type: string - description: Unique identifier for the provider - provider_type: - type: string - description: The type of provider implementation - config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Configuration parameters for the provider - health: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Current health status of the provider - additionalProperties: false - required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo - description: >- - Information about a registered provider including its configuration and health - status. - ListProvidersResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ProviderInfo' - description: List of provider information objects - additionalProperties: false - required: - - data - title: ListProvidersResponse - description: >- - Response containing a list of all available providers. - ListOpenAIResponseObject: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - description: >- - List of response objects with their input context - has_more: - type: boolean - description: >- - Whether there are more results available beyond this page - first_id: - type: string - description: >- - Identifier of the first item in this page - last_id: - type: string - description: Identifier of the last item in this page - object: - type: string - const: list - default: list - description: Object type identifier, always "list" - additionalProperties: false - required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIResponseObject - description: >- - Paginated list of OpenAI response objects with navigation metadata. - OpenAIResponseError: - type: object - properties: - code: - 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 - - type: string - const: web_search_2025_08_26 - 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 - max_tool_calls: - type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response - 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' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - DataSource: - discriminator: - 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 - max_tool_calls: - type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response. - additionalProperties: false - required: - - input - - model - title: CreateOpenaiResponseRequest - OpenAIResponseObject: - 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 - max_tool_calls: - type: integer - description: >- - (Optional) Max number of total calls to built-in tools that can be processed - in a response - additionalProperties: false - required: - - created_at - - id - - model - - object - - output - - parallel_tool_calls - - status - - text - title: OpenAIResponseObject - description: >- - Complete OpenAI response object containing generation results and metadata. - OpenAIResponseContentPartOutputText: - type: object - properties: - type: - type: string - const: output_text - default: output_text - description: >- - Content part type identifier, always "output_text" - text: - type: string - description: Text emitted for this content part - annotations: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseAnnotations' - description: >- - Structured annotations associated with the text - logprobs: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) Token log probability details - additionalProperties: false - required: - - type - - text - - annotations - title: OpenAIResponseContentPartOutputText - description: >- - Text content within a streamed response part. - "OpenAIResponseContentPartReasoningSummary": - type: object - properties: - type: - type: string - const: summary_text - default: summary_text - description: >- - Content part type identifier, always "summary_text" - text: - type: string - description: Summary text - additionalProperties: false - required: - - type - - text - title: >- - OpenAIResponseContentPartReasoningSummary - description: >- - Reasoning summary part in a streamed response. - OpenAIResponseContentPartReasoningText: - type: object - properties: - type: - type: string - const: reasoning_text - default: reasoning_text - description: >- - Content part type identifier, always "reasoning_text" - text: - type: string - description: Reasoning text supplied by the model - additionalProperties: false - required: - - type - - text - title: OpenAIResponseContentPartReasoningText - description: >- - Reasoning text emitted as part of a streamed response. - OpenAIResponseObjectStream: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - discriminator: - propertyName: type - mapping: - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - "OpenAIResponseObjectStreamResponseCompleted": - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Completed response object - type: - type: string - const: response.completed - default: response.completed - description: >- - Event type identifier, always "response.completed" - additionalProperties: false - required: - - response - - type - title: >- - OpenAIResponseObjectStreamResponseCompleted - description: >- - Streaming event indicating a response has been completed. - "OpenAIResponseObjectStreamResponseContentPartAdded": - type: object - properties: - content_index: - type: integer - description: >- - Index position of the part within the content array - response_id: - type: string - description: >- - Unique identifier of the response containing this content - item_id: - type: string - description: >- - Unique identifier of the output item containing this content part - output_index: - type: integer - description: >- - Index position of the output item in the response - part: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - description: The content part that was added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.content_part.added - default: response.content_part.added - description: >- - Event type identifier, always "response.content_part.added" - additionalProperties: false - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseContentPartAdded - description: >- - Streaming event for when a new content part is added to a response item. - "OpenAIResponseObjectStreamResponseContentPartDone": - type: object - properties: - content_index: - type: integer - description: >- - Index position of the part within the content array - response_id: - type: string - description: >- - Unique identifier of the response containing this content - item_id: - type: string - description: >- - Unique identifier of the output item containing this content part - output_index: - type: integer - description: >- - Index position of the output item in the response - part: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - description: The completed content part - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.content_part.done - default: response.content_part.done - description: >- - Event type identifier, always "response.content_part.done" - additionalProperties: false - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseContentPartDone - description: >- - Streaming event for when a content part is completed. - "OpenAIResponseObjectStreamResponseCreated": - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: The response object that was created - type: - type: string - const: response.created - default: response.created - description: >- - Event type identifier, always "response.created" - additionalProperties: false - required: - - response - - type - title: >- - OpenAIResponseObjectStreamResponseCreated - description: >- - Streaming event indicating a new response has been created. - OpenAIResponseObjectStreamResponseFailed: - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Response object describing the failure - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.failed - default: response.failed - description: >- - Event type identifier, always "response.failed" - additionalProperties: false - required: - - response - - sequence_number - - type - title: OpenAIResponseObjectStreamResponseFailed - description: >- - Streaming event emitted when a response fails. - "OpenAIResponseObjectStreamResponseFileSearchCallCompleted": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the completed file search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.file_search_call.completed - default: response.file_search_call.completed - description: >- - Event type identifier, always "response.file_search_call.completed" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFileSearchCallCompleted - description: >- - Streaming event for completed file search calls. - "OpenAIResponseObjectStreamResponseFileSearchCallInProgress": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the file search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - description: >- - Event type identifier, always "response.file_search_call.in_progress" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFileSearchCallInProgress - description: >- - Streaming event for file search calls in progress. - "OpenAIResponseObjectStreamResponseFileSearchCallSearching": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the file search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.file_search_call.searching - default: response.file_search_call.searching - description: >- - Event type identifier, always "response.file_search_call.searching" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFileSearchCallSearching - description: >- - Streaming event for file search currently searching. - "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta": - type: object - properties: - delta: - type: string - description: >- - Incremental function call arguments being added - item_id: - type: string - description: >- - Unique identifier of the function call being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - description: >- - Event type identifier, always "response.function_call_arguments.delta" - additionalProperties: false - required: - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - description: >- - Streaming event for incremental function call argument updates. - "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone": - type: object - properties: - arguments: - type: string - description: >- - Final complete arguments JSON string for the function call - item_id: - type: string - description: >- - Unique identifier of the completed function call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.function_call_arguments.done - default: response.function_call_arguments.done - description: >- - Event type identifier, always "response.function_call_arguments.done" - additionalProperties: false - required: - - arguments - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - description: >- - Streaming event for when function call arguments are completed. - "OpenAIResponseObjectStreamResponseInProgress": - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: Current response state while in progress - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.in_progress - default: response.in_progress - description: >- - Event type identifier, always "response.in_progress" - additionalProperties: false - required: - - response - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseInProgress - description: >- - Streaming event indicating the response remains in progress. - "OpenAIResponseObjectStreamResponseIncomplete": - type: object - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - description: >- - Response object describing the incomplete state - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.incomplete - default: response.incomplete - description: >- - Event type identifier, always "response.incomplete" - additionalProperties: false - required: - - response - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseIncomplete - description: >- - Streaming event emitted when a response ends in an incomplete state. - "OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta": - type: object - properties: - delta: - type: string - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer - type: - type: string - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - additionalProperties: false - required: - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - "OpenAIResponseObjectStreamResponseMcpCallArgumentsDone": - type: object - properties: - arguments: - type: string - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer - type: - type: string - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - additionalProperties: false - required: - - arguments - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - "OpenAIResponseObjectStreamResponseMcpCallCompleted": - type: object - properties: - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.mcp_call.completed - default: response.mcp_call.completed - description: >- - Event type identifier, always "response.mcp_call.completed" - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallCompleted - description: Streaming event for completed MCP calls. - "OpenAIResponseObjectStreamResponseMcpCallFailed": - type: object - properties: - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.mcp_call.failed - default: response.mcp_call.failed - description: >- - Event type identifier, always "response.mcp_call.failed" - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallFailed - description: Streaming event for failed MCP calls. - "OpenAIResponseObjectStreamResponseMcpCallInProgress": - type: object - properties: - item_id: - type: string - description: Unique identifier of the MCP call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - description: >- - Event type identifier, always "response.mcp_call.in_progress" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpCallInProgress - description: >- - Streaming event for MCP calls in progress. - "OpenAIResponseObjectStreamResponseMcpListToolsCompleted": - type: object - properties: - sequence_number: - type: integer - type: - type: string - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsCompleted - "OpenAIResponseObjectStreamResponseMcpListToolsFailed": - type: object - properties: - sequence_number: - type: integer - type: - type: string - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsFailed - "OpenAIResponseObjectStreamResponseMcpListToolsInProgress": - type: object - properties: - sequence_number: - type: integer - type: - type: string - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - additionalProperties: false - required: - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseMcpListToolsInProgress - "OpenAIResponseObjectStreamResponseOutputItemAdded": - type: object - properties: - response_id: - type: string - description: >- - Unique identifier of the response containing this output - item: - 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' - description: >- - The output item that was added (message, tool call, etc.) - output_index: - type: integer - description: >- - Index position of this item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_item.added - default: response.output_item.added - description: >- - Event type identifier, always "response.output_item.added" - additionalProperties: false - required: - - response_id - - item - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputItemAdded - description: >- - Streaming event for when a new output item is added to the response. - "OpenAIResponseObjectStreamResponseOutputItemDone": - type: object - properties: - response_id: - type: string - description: >- - Unique identifier of the response containing this output - item: - 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' - description: >- - The completed output item (message, tool call, etc.) - output_index: - type: integer - description: >- - Index position of this item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_item.done - default: response.output_item.done - description: >- - Event type identifier, always "response.output_item.done" - additionalProperties: false - required: - - response_id - - item - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputItemDone - description: >- - Streaming event for when an output item is completed. - "OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the item to which the annotation is being added - output_index: - type: integer - description: >- - Index position of the output item in the response's output array - content_index: - type: integer - description: >- - Index position of the content part within the output item - annotation_index: - type: integer - description: >- - Index of the annotation within the content part - annotation: - 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' - description: The annotation object being added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_text.annotation.added - default: response.output_text.annotation.added - description: >- - Event type identifier, always "response.output_text.annotation.added" - additionalProperties: false - required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - description: >- - Streaming event for when an annotation is added to output text. - "OpenAIResponseObjectStreamResponseOutputTextDelta": - type: object - properties: - content_index: - type: integer - description: Index position within the text content - delta: - type: string - description: Incremental text content being added - item_id: - type: string - description: >- - Unique identifier of the output item being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_text.delta - default: response.output_text.delta - description: >- - Event type identifier, always "response.output_text.delta" - additionalProperties: false - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextDelta - description: >- - Streaming event for incremental text content updates. - "OpenAIResponseObjectStreamResponseOutputTextDone": - type: object - properties: - content_index: - type: integer - description: Index position within the text content - text: - type: string - description: >- - Final complete text content of the output item - item_id: - type: string - description: >- - Unique identifier of the completed output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.output_text.done - default: response.output_text.done - description: >- - Event type identifier, always "response.output_text.done" - additionalProperties: false - required: - - content_index - - text - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseOutputTextDone - description: >- - Streaming event for when text output is completed. - "OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded": - type: object - properties: - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - description: The summary part that was added - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - description: >- - Event type identifier, always "response.reasoning_summary_part.added" - additionalProperties: false - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - description: >- - Streaming event for when a new reasoning summary part is added. - "OpenAIResponseObjectStreamResponseReasoningSummaryPartDone": - type: object - properties: - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - description: The completed summary part - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - description: >- - Event type identifier, always "response.reasoning_summary_part.done" - additionalProperties: false - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - description: >- - Streaming event for when a reasoning summary part is completed. - "OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta": - type: object - properties: - delta: - type: string - description: Incremental summary text being added - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - description: >- - Event type identifier, always "response.reasoning_summary_text.delta" - additionalProperties: false - required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - description: >- - Streaming event for incremental reasoning summary text updates. - "OpenAIResponseObjectStreamResponseReasoningSummaryTextDone": - type: object - properties: - text: - type: string - description: Final complete summary text - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: Index position of the output item - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - summary_index: - type: integer - description: >- - Index of the summary part within the reasoning summary - type: - type: string - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - description: >- - Event type identifier, always "response.reasoning_summary_text.done" - additionalProperties: false - required: - - text - - item_id - - output_index - - sequence_number - - summary_index - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - description: >- - Streaming event for when reasoning summary text is completed. - "OpenAIResponseObjectStreamResponseReasoningTextDelta": - type: object - properties: - content_index: - type: integer - description: >- - Index position of the reasoning content part - delta: - type: string - description: Incremental reasoning text being added - item_id: - type: string - description: >- - Unique identifier of the output item being updated - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.reasoning_text.delta - default: response.reasoning_text.delta - description: >- - Event type identifier, always "response.reasoning_text.delta" - additionalProperties: false - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningTextDelta - description: >- - Streaming event for incremental reasoning text updates. - "OpenAIResponseObjectStreamResponseReasoningTextDone": - type: object - properties: - content_index: - type: integer - description: >- - Index position of the reasoning content part - text: - type: string - description: Final complete reasoning text - item_id: - type: string - description: >- - Unique identifier of the completed output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.reasoning_text.done - default: response.reasoning_text.done - description: >- - Event type identifier, always "response.reasoning_text.done" - additionalProperties: false - required: - - content_index - - text - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseReasoningTextDone - description: >- - Streaming event for when reasoning text is completed. - "OpenAIResponseObjectStreamResponseRefusalDelta": - type: object - properties: - content_index: - type: integer - description: Index position of the content part - delta: - type: string - description: Incremental refusal text being added - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.refusal.delta - default: response.refusal.delta - description: >- - Event type identifier, always "response.refusal.delta" - additionalProperties: false - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseRefusalDelta - description: >- - Streaming event for incremental refusal text updates. - "OpenAIResponseObjectStreamResponseRefusalDone": - type: object - properties: - content_index: - type: integer - description: Index position of the content part - refusal: - type: string - description: Final complete refusal text - item_id: - type: string - description: Unique identifier of the output item - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.refusal.done - default: response.refusal.done - description: >- - Event type identifier, always "response.refusal.done" - additionalProperties: false - required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseRefusalDone - description: >- - Streaming event for when refusal text is completed. - "OpenAIResponseObjectStreamResponseWebSearchCallCompleted": - type: object - properties: - item_id: - type: string - description: >- - Unique identifier of the completed web search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.web_search_call.completed - default: response.web_search_call.completed - description: >- - Event type identifier, always "response.web_search_call.completed" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallCompleted - description: >- - Streaming event for completed web search calls. - "OpenAIResponseObjectStreamResponseWebSearchCallInProgress": - type: object - properties: - item_id: - type: string - description: Unique identifier of the web search call - output_index: - type: integer - description: >- - Index position of the item in the output list - sequence_number: - type: integer - description: >- - Sequential number for ordering streaming events - type: - type: string - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - description: >- - Event type identifier, always "response.web_search_call.in_progress" - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallInProgress - description: >- - Streaming event for web search calls in progress. - "OpenAIResponseObjectStreamResponseWebSearchCallSearching": - type: object - properties: - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer - type: - type: string - const: response.web_search_call.searching - default: response.web_search_call.searching - additionalProperties: false - required: - - item_id - - output_index - - sequence_number - - type - title: >- - OpenAIResponseObjectStreamResponseWebSearchCallSearching - OpenAIDeleteResponseObject: - type: object - properties: - id: - type: string - description: >- - Unique identifier of the deleted response - object: - type: string - const: response - default: response - description: >- - Object type identifier, always "response" - deleted: - type: boolean - default: true - description: Deletion confirmation flag, always True - additionalProperties: false - required: - - id - - object - - deleted - title: OpenAIDeleteResponseObject - description: >- - Response object confirming deletion of an OpenAI response. - ListOpenAIResponseInputItem: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: List of input items - object: - type: string - const: list - default: list - description: Object type identifier, always "list" - additionalProperties: false - required: - - data - - object - title: ListOpenAIResponseInputItem - description: >- - List container for OpenAI response input items. - RunShieldRequest: - type: object - properties: - shield_id: - type: string - description: The identifier of the shield to run. - messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - description: The messages to run the shield on. - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The parameters of the shield. - additionalProperties: false - required: - - shield_id - - messages - - params - title: RunShieldRequest - RunShieldResponse: - type: object - properties: - violation: - $ref: '#/components/schemas/SafetyViolation' - description: >- - (Optional) Safety violation detected by the shield, if any - additionalProperties: false - title: RunShieldResponse - description: Response from running a safety shield. - SafetyViolation: - type: object - properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - description: Severity level of the violation - user_message: - type: string - description: >- - (Optional) Message to convey to the user about the violation - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Additional metadata including specific violation codes for debugging and - telemetry - additionalProperties: false - required: - - violation_level - - metadata - title: SafetyViolation - description: >- - Details of a safety violation detected by content moderation. - ViolationLevel: - type: string - enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: >- - Types of aggregation functions for scoring results. - ArrayType: - type: object - properties: - type: - type: string - const: array - default: array - description: Discriminator type. Always "array" - additionalProperties: false - required: - - type - title: ArrayType - description: Parameter type for array values. - BasicScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: basic - default: basic - description: >- - The type of scoring function parameters, always basic - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - aggregation_functions - title: BasicScoringFnParams - description: >- - Parameters for basic scoring function configuration. - BooleanType: - type: object - properties: - type: - type: string - const: boolean - default: boolean - description: Discriminator type. Always "boolean" - additionalProperties: false - required: - - type - title: BooleanType - description: Parameter type for boolean values. - ChatCompletionInputType: - type: object - properties: - type: - type: string - const: chat_completion_input - default: chat_completion_input - description: >- - Discriminator type. Always "chat_completion_input" - additionalProperties: false - required: - - type - title: ChatCompletionInputType - description: >- - Parameter type for chat completion input. - CompletionInputType: - type: object - properties: - type: - type: string - const: completion_input - default: completion_input - description: >- - Discriminator type. Always "completion_input" - additionalProperties: false - required: - - type - title: CompletionInputType - description: Parameter type for completion input. - JsonType: - type: object - properties: - type: - type: string - const: json - default: json - description: Discriminator type. Always "json" - additionalProperties: false - required: - - type - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: llm_as_judge - default: llm_as_judge - description: >- - The type of scoring function parameters, always llm_as_judge - judge_model: - type: string - description: >- - Identifier of the LLM model to use as a judge for scoring - prompt_template: - type: string - description: >- - (Optional) Custom prompt template for the judge model - judge_score_regexes: - type: array - items: - type: string - description: >- - Regexes to extract the answer from generated response - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - judge_model - - judge_score_regexes - - aggregation_functions - title: LLMAsJudgeScoringFnParams - description: >- - Parameters for LLM-as-judge scoring function configuration. - NumberType: - type: object - properties: - type: - type: string - const: number - default: number - description: Discriminator type. Always "number" - additionalProperties: false - required: - - type - title: NumberType - description: Parameter type for numeric values. - ObjectType: - type: object - properties: - type: - type: string - const: object - default: object - description: Discriminator type. Always "object" - additionalProperties: false - required: - - type - title: ObjectType - description: Parameter type for object values. - RegexParserScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: regex_parser - default: regex_parser - description: >- - The type of scoring function parameters, always regex_parser - parsing_regexes: - type: array - items: - type: string - description: >- - Regex to extract the answer from generated response - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - parsing_regexes - - aggregation_functions - title: RegexParserScoringFnParams - description: >- - Parameters for regex parser scoring function configuration. - ScoringFn: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: scoring_function - default: scoring_function - description: >- - The resource type, always scoring_function - description: - type: string - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - 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' - discriminator: - propertyName: type - mapping: - string: '#/components/schemas/StringType' - number: '#/components/schemas/NumberType' - boolean: '#/components/schemas/BooleanType' - array: '#/components/schemas/ArrayType' - object: '#/components/schemas/ObjectType' - json: '#/components/schemas/JsonType' - union: '#/components/schemas/UnionType' - chat_completion_input: '#/components/schemas/ChatCompletionInputType' - completion_input: '#/components/schemas/CompletionInputType' - params: - $ref: '#/components/schemas/ScoringFnParams' - additionalProperties: false - required: - - identifier - - provider_id - - type - - metadata - - return_type - title: ScoringFn - description: >- - A scoring function resource for evaluating model outputs. - ScoringFnParams: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' - - $ref: '#/components/schemas/BasicScoringFnParams' - discriminator: - propertyName: type - mapping: - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - basic: '#/components/schemas/BasicScoringFnParams' - ScoringFnParamsType: - type: string - enum: - - llm_as_judge - - regex_parser - - basic - title: ScoringFnParamsType - description: >- - Types of scoring function parameter configurations. - StringType: - type: object - properties: - type: - type: string - const: string - default: string - description: Discriminator type. Always "string" - additionalProperties: false - required: - - type - title: StringType - description: Parameter type for string values. - UnionType: - type: object - properties: - type: - type: string - const: union - default: union - description: Discriminator type. Always "union" - additionalProperties: false - required: - - type - title: UnionType - description: Parameter type for union values. - ListScoringFunctionsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ScoringFn' - additionalProperties: false - required: - - data - title: ListScoringFunctionsResponse - ScoreRequest: - type: object - properties: - input_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to score. - scoring_functions: - type: object - additionalProperties: - oneOf: - - $ref: '#/components/schemas/ScoringFnParams' - - type: 'null' - description: >- - The scoring functions to use for the scoring. - additionalProperties: false - required: - - input_rows - - scoring_functions - title: ScoreRequest - ScoreResponse: - type: object - properties: - results: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: >- - A map of scoring function name to ScoringResult. - additionalProperties: false - required: - - results - title: ScoreResponse - description: The response from scoring. - ScoringResult: - type: object - properties: - score_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The scoring result for each row. Each row is a map of column name to value. - aggregated_results: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Map of metric name to aggregated value - additionalProperties: false - required: - - score_rows - - aggregated_results - title: ScoringResult - description: A scoring result for a single row. - ScoreBatchRequest: - type: object - properties: - dataset_id: - type: string - description: The ID of the dataset to score. - scoring_functions: - type: object - additionalProperties: - oneOf: - - $ref: '#/components/schemas/ScoringFnParams' - - type: 'null' - description: >- - The scoring functions to use for the scoring. - save_results_dataset: - type: boolean - description: >- - Whether to save the results to a dataset. - additionalProperties: false - required: - - dataset_id - - scoring_functions - - save_results_dataset - title: ScoreBatchRequest - ScoreBatchResponse: - type: object - properties: - dataset_id: - type: string - description: >- - (Optional) The identifier of the dataset that was scored - results: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: >- - A map of scoring function name to ScoringResult - additionalProperties: false - required: - - results - title: ScoreBatchResponse - description: >- - Response from batch scoring operations on datasets. - Shield: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: shield - default: shield - description: The resource type, always shield - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Configuration parameters for the shield - additionalProperties: false - required: - - identifier - - provider_id - - type - title: Shield - description: >- - A safety shield resource that can be used to check content. - ListShieldsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Shield' - additionalProperties: false - required: - - data - title: ListShieldsResponse - InvokeToolRequest: - type: object - properties: - tool_name: - type: string - description: The name of the tool to invoke. - kwargs: - 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. - additionalProperties: false - required: - - tool_name - - kwargs - title: InvokeToolRequest - ImageContentItem: - type: object - properties: - type: - type: string - const: image - default: image - description: >- - Discriminator type of the content item. Always "image" - image: - type: object - properties: - url: - $ref: '#/components/schemas/URL' - description: >- - A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - data: - type: string - contentEncoding: base64 - description: base64 encoded image data as string - additionalProperties: false - description: >- - Image as a base64 encoded string or an URL - additionalProperties: false - required: - - type - - image - title: ImageContentItem - description: A image content item - InterleavedContent: - oneOf: - - type: string - - $ref: '#/components/schemas/InterleavedContentItem' - - type: array - items: - $ref: '#/components/schemas/InterleavedContentItem' - InterleavedContentItem: - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - TextContentItem: - type: object - properties: - type: - type: string - const: text - default: text - description: >- - Discriminator type of the content item. Always "text" - text: - type: string - description: Text content - additionalProperties: false - required: - - type - - text - title: TextContentItem - description: A text content item - ToolInvocationResult: - type: object - properties: - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - (Optional) The output content from the tool execution - error_message: - type: string - description: >- - (Optional) Error message if the tool execution failed - error_code: - type: integer - description: >- - (Optional) Numeric error code if the tool execution failed - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional metadata about the tool execution - additionalProperties: false - title: ToolInvocationResult - description: Result of a tool invocation. - URL: - type: object - properties: - uri: - type: string - description: The URL string pointing to the resource - additionalProperties: false - required: - - uri - title: URL - description: A URL reference to external content. - ToolDef: - type: object - properties: - toolgroup_id: - type: string - description: >- - (Optional) ID of the tool group this tool belongs to - name: - type: string - description: Name of the tool - description: - type: string - description: >- - (Optional) Human-readable description of what the tool does - input_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) JSON Schema for tool inputs (MCP inputSchema) - output_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) JSON Schema for tool outputs (MCP outputSchema) - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional metadata about the tool - additionalProperties: false - required: - - name - title: ToolDef - description: >- - Tool definition used in runtime contexts. - ListToolDefsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ToolDef' - description: List of tool definitions - additionalProperties: false - required: - - data - title: ListToolDefsResponse - description: >- - Response containing a list of tool definitions. - ToolGroup: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: tool_group - default: tool_group - description: Type of resource, always 'tool_group' - mcp_endpoint: - $ref: '#/components/schemas/URL' - description: >- - (Optional) Model Context Protocol endpoint for remote tools - args: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional arguments for the tool group - additionalProperties: false - required: - - identifier - - provider_id - - type - title: ToolGroup - description: >- - A group of related tools managed together. - ListToolGroupsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ToolGroup' - description: List of tool groups - additionalProperties: false - required: - - data - title: ListToolGroupsResponse - description: >- - Response containing a list of tool groups. - 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 - properties: - chunk_id: - type: string - description: >- - The ID of the chunk. If not set, it will be generated based on the document - ID and content. - document_id: - type: string - description: >- - The ID of the document this chunk belongs to. - source: - type: string - description: >- - The source of the content, such as a URL, file path, or other identifier. - created_timestamp: - type: integer - description: >- - An optional timestamp indicating when the chunk was created. - updated_timestamp: - type: integer - description: >- - An optional timestamp indicating when the chunk was last updated. - chunk_window: - type: string - description: >- - The window of the chunk, which can be used to group related chunks together. - chunk_tokenizer: - type: string - description: >- - The tokenizer used to create the chunk. Default is Tiktoken. - chunk_embedding_model: - type: string - description: >- - The embedding model used to create the chunk's embedding. - chunk_embedding_dimension: - type: integer - description: >- - The dimension of the embedding vector for the chunk. - content_token_count: - type: integer - description: >- - The number of tokens in the content of the chunk. - metadata_token_count: - type: integer - description: >- - The number of tokens in the metadata of the chunk. - additionalProperties: false - title: 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. - InsertChunksRequest: - type: object - properties: - vector_store_id: - type: string - description: >- - The identifier of the vector database to insert the chunks into. - chunks: - type: array - items: - $ref: '#/components/schemas/Chunk' - description: >- - The chunks to insert. Each `Chunk` should contain content which can be - interleaved text, images, or other types. `metadata`: `dict[str, Any]` - and `embedding`: `List[float]` are optional. If `metadata` is provided, - you configure how Llama Stack formats the chunk during generation. If - `embedding` is not provided, it will be computed later. - ttl_seconds: - type: integer - description: The time to live of the chunks. - additionalProperties: false - required: - - vector_store_id - - chunks - title: InsertChunksRequest - QueryChunksRequest: - type: object - properties: - vector_store_id: - type: string - description: >- - The identifier of the vector database to query. - query: - $ref: '#/components/schemas/InterleavedContent' - description: The query to search for. - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The parameters of the query. - additionalProperties: false - required: - - vector_store_id - - query - title: QueryChunksRequest - QueryChunksResponse: - type: object - properties: - chunks: - type: array - items: - $ref: '#/components/schemas/Chunk' - description: >- - List of content chunks returned from the query - scores: - type: array - items: - type: number - description: >- - Relevance scores corresponding to each returned chunk - additionalProperties: false - required: - - chunks - - scores - title: QueryChunksResponse - description: >- - Response from querying chunks in a vector database. - VectorStoreFileCounts: - type: object - properties: - completed: - type: integer - description: >- - Number of files that have been successfully processed - cancelled: - type: integer - description: >- - Number of files that had their processing cancelled - failed: - type: integer - description: Number of files that failed to process - in_progress: - type: integer - description: >- - Number of files currently being processed - total: - type: integer - description: >- - Total number of files in the vector store - additionalProperties: false - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - description: >- - File processing status counts for a vector store. - VectorStoreListResponse: - type: object - properties: - object: - type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreObject' - description: List of vector store objects - first_id: - type: string - description: >- - (Optional) ID of the first vector store in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last vector store in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more vector stores available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreListResponse - description: Response from listing vector stores. - VectorStoreObject: - type: object - properties: - id: - type: string - description: Unique identifier for the vector store - object: - type: string - default: vector_store - description: >- - Object type identifier, always "vector_store" - created_at: - type: integer - description: >- - Timestamp when the vector store was created - name: - type: string - description: (Optional) Name of the vector store - usage_bytes: - type: integer - default: 0 - description: >- - Storage space used by the vector store in bytes - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the vector store - status: - type: string - default: completed - description: Current status of the vector store - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Expiration policy for the vector store - expires_at: - type: integer - description: >- - (Optional) Timestamp when the vector store will expire - last_active_at: - type: integer - description: >- - (Optional) Timestamp of last activity on the vector store - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of key-value pairs that can be attached to the vector store - additionalProperties: false - required: - - id - - object - - created_at - - usage_bytes - - file_counts - - status - - metadata - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreChunkingStrategy: - oneOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - ScoringFnParams: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - VectorStoreChunkingStrategyAuto: - type: object - properties: - type: - type: string - const: auto - default: auto - description: >- - Strategy type, always "auto" for automatic chunking - additionalProperties: false - required: - - type - title: VectorStoreChunkingStrategyAuto - description: >- - Automatic chunking strategy for vector store files. - VectorStoreChunkingStrategyStatic: - type: object - properties: - type: - type: string - const: static - default: static - description: >- - Strategy type, always "static" for static chunking - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' - description: >- - Configuration parameters for the static chunking strategy - additionalProperties: false - required: - - type - - static - title: VectorStoreChunkingStrategyStatic - description: >- - Static chunking strategy with configurable parameters. - VectorStoreChunkingStrategyStaticConfig: - type: object - properties: - chunk_overlap_tokens: - type: integer - default: 400 - description: >- - Number of tokens to overlap between adjacent chunks - max_chunk_size_tokens: - type: integer - default: 800 - description: >- - Maximum number of tokens per chunk, must be between 100 and 4096 - additionalProperties: false - required: - - chunk_overlap_tokens - - max_chunk_size_tokens - title: VectorStoreChunkingStrategyStaticConfig - description: >- - Configuration for static chunking strategy. - "OpenAICreateVectorStoreRequestWithExtraBody": - type: object - properties: - name: - type: string - description: (Optional) A name for the vector store - file_ids: - type: array - items: - type: string - description: >- - List of file IDs to include in the vector store - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Expiration policy for the vector store - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - (Optional) Strategy for splitting files into chunks - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of key-value pairs that can be attached to the vector store - additionalProperties: false - title: >- - OpenAICreateVectorStoreRequestWithExtraBody - description: >- - Request to create a vector store with extra_body support. - OpenaiUpdateVectorStoreRequest: - type: object - properties: - name: - type: string - description: The name of the vector store. - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The expiration policy for a vector store. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of 16 key-value pairs that can be attached to an object. - additionalProperties: false - title: OpenaiUpdateVectorStoreRequest - VectorStoreDeleteResponse: - type: object - properties: - id: - type: string - description: >- - Unique identifier of the deleted vector store - object: - type: string - default: vector_store.deleted - description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true - description: >- - Whether the deletion operation was successful - additionalProperties: false - required: - - id - - object - - deleted - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - "OpenAICreateVectorStoreFileBatchRequestWithExtraBody": - type: object - properties: - file_ids: - type: array - items: - type: string - description: >- - A list of File IDs that the vector store should use - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Key-value attributes to store with the files - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - (Optional) The chunking strategy used to chunk the file(s). Defaults to - auto - additionalProperties: false - required: - - file_ids - title: >- - OpenAICreateVectorStoreFileBatchRequestWithExtraBody - description: >- - Request to create a vector store file batch with extra_body support. - VectorStoreFileBatchObject: - type: object - properties: - id: - type: string - description: Unique identifier for the file batch - object: - type: string - default: vector_store.file_batch - description: >- - Object type identifier, always "vector_store.file_batch" - created_at: - type: integer - description: >- - Timestamp when the file batch was created - vector_store_id: - type: string - description: >- - ID of the vector store containing the file batch - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: >- - Current processing status of the file batch - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the batch - additionalProperties: false - required: - - id - - object - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject - description: OpenAI Vector Store File Batch object. - VectorStoreFileStatus: - oneOf: - - type: string - const: completed - - type: string - const: in_progress - - type: string - const: cancelled - - type: string - const: failed - VectorStoreFileLastError: - type: object - properties: - code: - oneOf: - - type: string - const: server_error - - type: string - const: rate_limit_exceeded - description: >- - Error code indicating the type of failure - message: - type: string - description: >- - Human-readable error message describing the failure - additionalProperties: false - required: - - code - - message - title: VectorStoreFileLastError - description: >- - Error information for failed vector store file processing. - VectorStoreFileObject: - type: object - properties: - id: - type: string - description: Unique identifier for the file - object: - type: string - default: vector_store.file - description: >- - Object type identifier, always "vector_store.file" - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Key-value attributes associated with the file - chunking_strategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - description: >- - Strategy used for splitting the file into chunks - created_at: - type: integer - description: >- - Timestamp when the file was added to the vector store - last_error: - $ref: '#/components/schemas/VectorStoreFileLastError' - description: >- - (Optional) Error information if file processing failed - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: Current processing status of the file - usage_bytes: - type: integer - default: 0 - description: Storage space used by this file in bytes - vector_store_id: - type: string - description: >- - ID of the vector store containing this file - additionalProperties: false - required: - - id - - object - - attributes - - chunking_strategy - - created_at - - status - - usage_bytes - - vector_store_id - title: VectorStoreFileObject - description: OpenAI Vector Store File object. - VectorStoreFilesListInBatchResponse: - type: object - properties: - object: - type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: >- - List of vector store file objects in the batch - first_id: - type: string - description: >- - (Optional) ID of the first file in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more files available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreFilesListInBatchResponse - description: >- - Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: - type: object - properties: - object: - type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: List of vector store file objects - first_id: - type: string - description: >- - (Optional) ID of the first file in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more files available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreListFilesResponse - description: >- - Response from listing files in a vector store. - OpenaiAttachFileToVectorStoreRequest: - type: object - properties: - file_id: - type: string - description: >- - The ID of the file to attach to the vector store. - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The key-value attributes stored with the file, which can be used for filtering. - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - The chunking strategy to use for the file. - additionalProperties: false - required: - - file_id - title: OpenaiAttachFileToVectorStoreRequest - OpenaiUpdateVectorStoreFileRequest: - type: object - properties: - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The updated key-value attributes to store with the file. - additionalProperties: false - required: - - attributes - title: OpenaiUpdateVectorStoreFileRequest - VectorStoreFileDeleteResponse: - type: object - properties: - id: - type: string - description: Unique identifier of the deleted file - object: - type: string - default: vector_store.file.deleted - description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true - description: >- - Whether the deletion operation was successful - additionalProperties: false - required: - - id - - object - - deleted - title: VectorStoreFileDeleteResponse - description: >- - Response from deleting a vector store file. - bool: - type: boolean - VectorStoreContent: - type: object - properties: - type: - type: string - const: text - description: >- - Content type, currently only "text" is supported - text: - type: string - description: The actual text content - embedding: - type: array - items: - type: number - description: >- - Optional embedding vector for this content chunk - chunk_metadata: - $ref: '#/components/schemas/ChunkMetadata' - description: Optional chunk metadata - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Optional user-defined metadata - additionalProperties: false - required: - - type - - text - title: VectorStoreContent - description: >- - Content item from a vector store file or search result. - VectorStoreFileContentResponse: - type: object - properties: - object: - type: string - const: vector_store.file_content.page - default: vector_store.file_content.page - description: >- - The object type, which is always `vector_store.file_content.page` - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' - description: Parsed content of the file - has_more: - type: boolean - default: false - description: >- - Indicates if there are more content pages to fetch - next_page: - type: string - description: The token for the next page, if any - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreFileContentResponse - description: >- - Represents the parsed content of a vector store file. - OpenaiSearchVectorStoreRequest: - type: object - properties: - query: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - The query string or array for performing the search. - filters: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Filters based on file attributes to narrow the search results. - max_num_results: - type: integer - description: >- - Maximum number of results to return (1 to 50 inclusive, default 10). - 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: >- - Ranking options for fine-tuning the search results. - rewrite_query: - type: boolean - description: >- - Whether to rewrite the natural language query for vector search (default - false) - search_mode: - type: string - description: >- - The search mode to use - "keyword", "vector", or "hybrid" (default "vector") - additionalProperties: false - required: - - query - title: OpenaiSearchVectorStoreRequest - VectorStoreSearchResponse: - type: object - properties: - 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 - attributes: - type: object - additionalProperties: - oneOf: - - type: string - - type: number - - type: boolean - description: >- - (Optional) Key-value attributes associated with the file - content: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' - description: >- - List of content items matching the search query - additionalProperties: false - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - description: Response from searching a vector store. - VectorStoreSearchResponsePage: - type: object - properties: - object: - type: string - default: vector_store.search_results.page - description: >- - Object type identifier for the search results page - search_query: - type: array - items: - type: string - description: >- - The original search query that was executed - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - description: List of search result objects - has_more: - type: boolean - default: false - description: >- - Whether there are more results available beyond this page - next_page: - type: string - description: >- - (Optional) Token for retrieving the next page of results - additionalProperties: false - required: - - object - - search_query - - data - - has_more - title: VectorStoreSearchResponsePage - description: >- - Paginated response from searching a vector store. - VersionInfo: - type: object - properties: - version: - type: string - description: Version number of the service - additionalProperties: false - required: - - version - title: VersionInfo - description: Version information for the service. - AppendRowsRequest: - type: object - properties: - rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to append to the dataset. - additionalProperties: false - required: - - rows - title: AppendRowsRequest - PaginatedResponse: - type: object - properties: - data: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The list of items for the current page - has_more: - type: boolean - description: >- - Whether there are more items available after this set - url: - type: string - description: The URL for accessing this list - additionalProperties: false - required: - - data - - has_more - title: PaginatedResponse - description: >- - A generic paginated response that follows a simple format. - Dataset: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: dataset - default: dataset - description: >- - Type of resource, always 'dataset' for datasets - purpose: - type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - description: >- - Purpose of the dataset indicating its intended use - source: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - description: >- - Data source configuration for the dataset - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Additional metadata for the dataset - additionalProperties: false - required: - - identifier - - provider_id - - type - - purpose - - source - - metadata - title: Dataset - description: >- - Dataset resource for storing and accessing training or evaluation data. - RowsDataSource: - type: object - properties: - type: - type: string - const: rows - default: rows - rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", - "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, - world!"}]} ] - additionalProperties: false - required: - - type - - rows - title: RowsDataSource - description: A dataset stored in rows. - URIDataSource: - type: object - properties: - type: - type: string - const: uri - default: uri - uri: - type: string - description: >- - The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" - - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" - additionalProperties: false - required: - - type - - uri - title: URIDataSource - description: >- - A dataset that can be obtained from a URI. - ListDatasetsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Dataset' - description: List of datasets - additionalProperties: false - required: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - Benchmark: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_store - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: benchmark - default: benchmark - description: The resource type, always benchmark - dataset_id: - type: string - description: >- - Identifier of the dataset to use for the benchmark evaluation - scoring_functions: - type: array - items: - type: string - description: >- - List of scoring function identifiers to apply during evaluation - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Metadata for this evaluation task - additionalProperties: false - required: - - identifier - - provider_id - - type - - dataset_id - - scoring_functions - - metadata - title: Benchmark - description: >- - A benchmark resource for evaluating model performance. - ListBenchmarksResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Benchmark' - additionalProperties: false - required: - - data - title: ListBenchmarksResponse - BenchmarkConfig: - type: object - properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - description: The candidate to evaluate. - scoring_params: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringFnParams' - description: >- - Map between scoring function id and parameters for each scoring function - you want to run - num_examples: - type: integer - description: >- - (Optional) The number of examples to evaluate. If not provided, all examples - in the dataset will be evaluated - additionalProperties: false - required: - - eval_candidate - - scoring_params - title: BenchmarkConfig - description: >- - A benchmark configuration for evaluation. - GreedySamplingStrategy: - type: object - properties: - type: - type: string - const: greedy - default: greedy - description: >- - Must be "greedy" to identify this sampling strategy - additionalProperties: false - required: - - type - title: GreedySamplingStrategy - description: >- - Greedy sampling strategy that selects the highest probability token at each - step. - ModelCandidate: - type: object - properties: - type: - type: string - const: model - default: model - model: - type: string - description: The model ID to evaluate. - sampling_params: - $ref: '#/components/schemas/SamplingParams' - description: The sampling parameters for the model. - system_message: - $ref: '#/components/schemas/SystemMessage' - description: >- - (Optional) The system message providing instructions or context to the - model. - additionalProperties: false - required: - - type - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - SamplingParams: - type: object - properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - - $ref: '#/components/schemas/TopPSamplingStrategy' - - $ref: '#/components/schemas/TopKSamplingStrategy' - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - description: The sampling strategy. - max_tokens: - type: integer - description: >- - 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. - repetition_penalty: - type: number - default: 1.0 - description: >- - 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. - stop: - type: array - items: - type: string - description: >- - Up to 4 sequences where the API will stop generating further tokens. The - returned text will not contain the stop sequence. - additionalProperties: false - required: - - strategy - title: SamplingParams - description: Sampling parameters. - SystemMessage: - type: object - properties: - role: - type: string - const: system - default: system - description: >- - Must be "system" to identify this as a system message - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - 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). - additionalProperties: false - required: - - role - - content - title: SystemMessage - description: >- - A system message providing instructions or context to the model. - TopKSamplingStrategy: - type: object - properties: - type: - type: string - const: top_k - default: top_k - description: >- - Must be "top_k" to identify this sampling strategy - top_k: - type: integer - description: >- - Number of top tokens to consider for sampling. Must be at least 1 - additionalProperties: false - required: - - type - - top_k - title: TopKSamplingStrategy - description: >- - Top-k sampling strategy that restricts sampling to the k most likely tokens. - TopPSamplingStrategy: - type: object - properties: - type: - type: string - const: top_p - default: top_p - description: >- - Must be "top_p" to identify this sampling strategy - temperature: - type: number - description: >- - Controls randomness in sampling. Higher values increase randomness - top_p: - type: number - default: 0.95 - description: >- - Cumulative probability threshold for nucleus sampling. Defaults to 0.95 - additionalProperties: false - required: - - type - title: TopPSamplingStrategy - description: >- - Top-p (nucleus) sampling strategy that samples from the smallest set of tokens - with cumulative probability >= p. - EvaluateRowsRequest: - type: object - properties: - input_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to evaluate. - scoring_functions: - type: array - items: - type: string - description: >- - The scoring functions to use for the evaluation. - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. - additionalProperties: false - required: - - input_rows - - scoring_functions - - benchmark_config - title: EvaluateRowsRequest - EvaluateResponse: - type: object - properties: - generations: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The generations from the evaluation. - scores: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: The scores from the evaluation. - additionalProperties: false - required: - - generations - - scores - title: EvaluateResponse - description: The response from an evaluation. - RunEvalRequest: - type: object - properties: - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. - additionalProperties: false - required: - - benchmark_config - title: RunEvalRequest - Job: - type: object - properties: - job_id: - type: string - description: Unique identifier for the job - status: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current execution status of the job - additionalProperties: false - required: - - job_id - - status - title: Job - description: >- - A job execution instance with status tracking. - RerankRequest: - type: object - properties: - model: - type: string - description: >- - The identifier of the reranking model to use. - query: - oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - description: >- - 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. - items: - type: array - items: - oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - description: >- - 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. - max_num_results: - type: integer - description: >- - (Optional) Maximum number of results to return. Default: returns all. - additionalProperties: false - required: - - model - - query - - items - title: RerankRequest - RerankData: - type: object - properties: - index: - type: integer - description: >- - The original index of the document in the input list - relevance_score: - type: number - description: >- - The relevance score from the model output. Values are inverted when applicable - so that higher scores indicate greater relevance. - additionalProperties: false - required: - - index - - relevance_score - title: RerankData - description: >- - A single rerank result from a reranking response. - RerankResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/RerankData' - description: >- - List of rerank result objects, sorted by relevance score (descending) - additionalProperties: false - required: - - data - title: RerankResponse - description: Response from a reranking request. - Checkpoint: - type: object - properties: - identifier: - type: string - description: Unique identifier for the checkpoint - created_at: - type: string - format: date-time - description: >- - Timestamp when the checkpoint was created - epoch: - type: integer - description: >- - Training epoch when the checkpoint was saved - post_training_job_id: - type: string - description: >- - Identifier of the training job that created this checkpoint - path: - type: string - description: >- - File system path where the checkpoint is stored - training_metrics: - $ref: '#/components/schemas/PostTrainingMetric' - description: >- - (Optional) Training metrics associated with this checkpoint - additionalProperties: false - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - PostTrainingJobArtifactsResponse: - type: object - properties: - job_uuid: - type: string - description: Unique identifier for the training job - checkpoints: - type: array - items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false - required: - - job_uuid - - checkpoints - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingMetric: - type: object - properties: - epoch: - type: integer - description: Training epoch number - train_loss: - type: number - description: Loss value on the training dataset - validation_loss: - type: number - description: Loss value on the validation dataset - perplexity: - type: number - description: >- - Perplexity metric indicating model confidence - additionalProperties: false - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: >- - Training metrics captured during post-training jobs. - CancelTrainingJobRequest: - type: object - properties: - job_uuid: - type: string - description: The UUID of the job to cancel. - additionalProperties: false - required: - - job_uuid - title: CancelTrainingJobRequest - PostTrainingJobStatusResponse: - type: object - properties: - job_uuid: - type: string - description: Unique identifier for the training job - status: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current status of the training job - scheduled_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the job was scheduled - started_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the job execution began - completed_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the job finished, if completed - resources_allocated: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Information about computational resources allocated to the - job - checkpoints: - type: array - items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false - required: - - job_uuid - - status - - checkpoints - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - ListPostTrainingJobsResponse: - type: object - properties: - data: - type: array - items: - type: object - properties: - job_uuid: - type: string - additionalProperties: false - required: - - job_uuid - title: PostTrainingJob - additionalProperties: false - required: - - data - title: ListPostTrainingJobsResponse - DPOAlignmentConfig: - type: object - properties: - beta: - type: number - description: Temperature parameter for the DPO loss - loss_type: - $ref: '#/components/schemas/DPOLossType' - default: sigmoid - description: The type of loss function to use for DPO - additionalProperties: false - required: - - beta - - loss_type - title: DPOAlignmentConfig - description: >- - Configuration for Direct Preference Optimization (DPO) alignment. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: - type: object - properties: - dataset_id: - type: string - description: >- - Unique identifier for the training dataset - batch_size: - type: integer - description: Number of samples per training batch - shuffle: - type: boolean - description: >- - Whether to shuffle the dataset during training - data_format: - $ref: '#/components/schemas/DatasetFormat' - description: >- - Format of the dataset (instruct or dialog) - validation_dataset_id: - type: string - description: >- - (Optional) Unique identifier for the validation dataset - packed: - type: boolean - default: false - description: >- - (Optional) Whether to pack multiple samples into a single sequence for - efficiency - train_on_input: - type: boolean - default: false - description: >- - (Optional) Whether to compute loss on input tokens as well as output tokens - additionalProperties: false - required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: >- - Configuration for training data and data loading. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - EfficiencyConfig: - type: object - properties: - enable_activation_checkpointing: - type: boolean - default: false - description: >- - (Optional) Whether to use activation checkpointing to reduce memory usage - enable_activation_offloading: - type: boolean - default: false - description: >- - (Optional) Whether to offload activations to CPU to save GPU memory - memory_efficient_fsdp_wrap: - type: boolean - default: false - description: >- - (Optional) Whether to use memory-efficient FSDP wrapping - fsdp_cpu_offload: - type: boolean - default: false - description: >- - (Optional) Whether to offload FSDP parameters to CPU - additionalProperties: false - title: EfficiencyConfig - description: >- - Configuration for memory and compute efficiency optimizations. - OptimizerConfig: - type: object - properties: - optimizer_type: - $ref: '#/components/schemas/OptimizerType' - description: >- - Type of optimizer to use (adam, adamw, or sgd) - lr: - type: number - description: Learning rate for the optimizer - weight_decay: - type: number - description: >- - Weight decay coefficient for regularization - num_warmup_steps: - type: integer - description: Number of steps for learning rate warmup - additionalProperties: false - required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: >- - Configuration parameters for the optimization algorithm. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: >- - Available optimizer algorithms for training. - TrainingConfig: - type: object - properties: - n_epochs: - type: integer - description: Number of training epochs to run - max_steps_per_epoch: - type: integer - default: 1 - description: Maximum number of steps to run per epoch - gradient_accumulation_steps: - type: integer - default: 1 - description: >- - Number of steps to accumulate gradients before updating - max_validation_steps: - type: integer - default: 1 - description: >- - (Optional) Maximum number of validation steps per epoch - data_config: - $ref: '#/components/schemas/DataConfig' - description: >- - (Optional) Configuration for data loading and formatting - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - description: >- - (Optional) Configuration for the optimization algorithm - efficiency_config: - $ref: '#/components/schemas/EfficiencyConfig' - description: >- - (Optional) Configuration for memory and compute optimizations - dtype: - type: string - default: bf16 - description: >- - (Optional) Data type for model parameters (bf16, fp16, fp32) - additionalProperties: false - required: - - n_epochs - - max_steps_per_epoch - - gradient_accumulation_steps - title: TrainingConfig - description: >- - Comprehensive configuration for the training process. - PreferenceOptimizeRequest: - type: object - properties: - job_uuid: - type: string - description: The UUID of the job to create. - finetuned_model: - type: string - description: The model to fine-tune. - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - description: The algorithm configuration. - training_config: - $ref: '#/components/schemas/TrainingConfig' - description: The training configuration. - hyperparam_search_config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The hyperparam search configuration. - logger_config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The logger configuration. - additionalProperties: false - required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: PreferenceOptimizeRequest - PostTrainingJob: - type: object - properties: - job_uuid: - type: string - additionalProperties: false - required: - - job_uuid - title: PostTrainingJob - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - SpanEndPayload: - description: Payload for a span end event. - properties: - type: - const: span_end - default: span_end - title: Type - type: string - status: - $ref: '#/components/schemas/SpanStatus' - required: - - status - title: SpanEndPayload - type: object - SpanStartPayload: - description: Payload for a span start event. - properties: - type: - const: span_start - default: span_start - title: Type - type: string - name: - title: Name + name: + title: Name type: string parent_span_id: anyOf: @@ -19775,6 +13893,11 @@ components: - type: string - type: 'null' nullable: true + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + nullable: true input: items: anyOf: @@ -19947,284 +14070,6 @@ components: type: string title: Bf16QuantizationConfig type: object - LogProbConfig: - description: '' - properties: - top_k: - anyOf: - - type: integer - - type: 'null' - default: 0 - title: Top K - title: LogProbConfig - type: object - SystemMessageBehavior: - description: Config for how to override the default system prompt. - enum: - - append - - replace - title: SystemMessageBehavior - 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. - enum: - - auto - - required - - none - title: ToolChoice - type: string - ToolConfig: - description: Configuration for tool use. - properties: - tool_choice: - anyOf: - - $ref: '#/components/schemas/ToolChoice' - - type: string - - type: 'null' - default: auto - title: Tool Choice - tool_prompt_format: - anyOf: - - $ref: '#/components/schemas/ToolPromptFormat' - - type: 'null' - nullable: true - system_message_behavior: - anyOf: - - $ref: '#/components/schemas/SystemMessageBehavior' - - type: 'null' - default: append - title: ToolConfig - type: object - ToolPromptFormat: - description: Prompt format for calling custom / zero shot tools. - enum: - - json - - function_tag - - python_list - title: ToolPromptFormat - type: string - ChatCompletionRequest: - properties: - model: - title: Model - type: string - messages: - items: - discriminator: - mapping: - assistant: '#/components/schemas/CompletionMessage' - system: '#/components/schemas/SystemMessage' - tool: '#/components/schemas/ToolResponseMessage' - user: '#/components/schemas/UserMessage' - propertyName: role - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' - title: Messages - type: array - sampling_params: - anyOf: - - $ref: '#/components/schemas/SamplingParams' - - type: 'null' - tools: - anyOf: - - items: - $ref: '#/components/schemas/ToolDefinition' - type: array - - type: 'null' - title: Tools - tool_config: - anyOf: - - $ref: '#/components/schemas/ToolConfig' - - type: 'null' - response_format: - anyOf: - - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - - $ref: '#/components/schemas/GrammarResponseFormat' - - type: 'null' - title: Response Format - nullable: true - stream: - anyOf: - - type: boolean - - type: 'null' - default: false - title: Stream - logprobs: - anyOf: - - $ref: '#/components/schemas/LogProbConfig' - - type: 'null' - nullable: true - required: - - model - - messages - title: ChatCompletionRequest - type: object - TokenLogProbs: - description: Log probabilities for generated tokens. - properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs - type: object - ChatCompletionResponse: - description: Response from a chat completion request. - properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - completion_message: - $ref: '#/components/schemas/CompletionMessage' - logprobs: - anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - - type: 'null' - title: Logprobs - nullable: true - required: - - completion_message - title: ChatCompletionResponse - type: object - ChatCompletionResponseEventType: - description: Types of events that can occur during chat completion. - enum: - - start - - complete - - progress - title: ChatCompletionResponseEventType - type: string - ChatCompletionResponseEvent: - description: An event during chat completion generation. - properties: - event_type: - $ref: '#/components/schemas/ChatCompletionResponseEventType' - delta: - discriminator: - mapping: - image: '#/components/schemas/ImageDelta' - text: '#/components/schemas/TextDelta' - tool_call: '#/components/schemas/ToolCallDelta' - propertyName: type - oneOf: - - $ref: '#/components/schemas/TextDelta' - - $ref: '#/components/schemas/ImageDelta' - - $ref: '#/components/schemas/ToolCallDelta' - title: Delta - logprobs: - anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - - type: 'null' - title: Logprobs - nullable: true - stop_reason: - anyOf: - - $ref: '#/components/schemas/StopReason' - - type: 'null' - nullable: true - required: - - event_type - - delta - title: ChatCompletionResponseEvent - type: object - ChatCompletionResponseStreamChunk: - description: A chunk of a streamed chat completion response. - properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - event: - $ref: '#/components/schemas/ChatCompletionResponseEvent' - required: - - event - title: ChatCompletionResponseStreamChunk - type: object - CompletionResponse: - description: Response from a completion request. - properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - content: - title: Content - type: string - stop_reason: - $ref: '#/components/schemas/StopReason' - logprobs: - anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - - type: 'null' - title: Logprobs - nullable: true - required: - - content - - stop_reason - title: CompletionResponse - type: object - CompletionResponseStreamChunk: - description: A chunk of a streamed completion response. - properties: - metrics: - anyOf: - - items: - $ref: '#/components/schemas/MetricInResponse' - type: array - - type: 'null' - title: Metrics - nullable: true - delta: - title: Delta - type: string - stop_reason: - anyOf: - - $ref: '#/components/schemas/StopReason' - - type: 'null' - nullable: true - logprobs: - anyOf: - - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - - type: 'null' - title: Logprobs - nullable: true - required: - - delta - title: CompletionResponseStreamChunk - type: object EmbeddingsResponse: description: Response containing generated embeddings. properties: @@ -20490,17 +14335,71 @@ components: nullable: true title: OpenAICompletionLogprobs type: object - ToolResponse: - description: Response from a tool invocation. + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object + required: + - logprobs_by_token + title: TokenLogProbs + type: object + ToolResponseMessage: + description: A message representing the result of a tool invocation. properties: + role: + const: tool + default: tool + title: Role + type: string call_id: title: Call Id type: string - tool_name: + content: anyOf: - - $ref: '#/components/schemas/BuiltinTool' - type: string - title: Tool Name + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + required: + - call_id + - content + title: ToolResponseMessage + type: object + UserMessage: + description: A message from the user in a chat conversation. + properties: + role: + const: user + default: user + title: Role + type: string content: anyOf: - type: string @@ -20528,19 +14427,42 @@ components: title: TextContentItem title: ImageContentItem | TextContentItem type: array - title: Content - metadata: - anyOf: - - additionalProperties: true - type: object + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] - type: 'null' - title: Metadata + title: string | list[ImageContentItem | TextContentItem] nullable: true required: - - call_id - - tool_name - content - title: ToolResponse + title: UserMessage type: object PostTrainingJobLogStream: description: Stream of logs from a finetuning job. @@ -20757,98 +14679,253 @@ components: rows: '#/components/schemas/RowsDataSource' RegisterDatasetRequest: type: object + ToolGroupInput: + description: Input data for registering a tool group. properties: - purpose: + toolgroup_id: + title: Toolgroup Id type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - description: >- - 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" } - source: - $ref: '#/components/schemas/DataSource' - description: >- - 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!"}, ] - } ] } - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The metadata for the dataset. - E.g. {"description": "My dataset"}. - dataset_id: + provider_id: + title: Provider Id type: string - description: >- - The ID of the dataset. If not provided, an ID will be generated. - additionalProperties: false + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL required: - - purpose - - source - title: RegisterDatasetRequest - RegisterBenchmarkRequest: + - toolgroup_id + - provider_id + title: ToolGroupInput type: object + Chunk: + description: A chunk of content that can be inserted into a vector database. properties: - benchmark_id: - type: string - description: The ID of the benchmark to register. - dataset_id: + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id type: string - description: >- - The ID of the dataset to use for the benchmark. - scoring_functions: - type: array + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + nullable: true + title: ChunkMetadata + required: + - content + - chunk_id + title: Chunk + type: object + VectorStoreCreateRequest: + description: Request to create a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + file_ids: items: type: string - description: >- - The scoring functions to use for the benchmark. - provider_benchmark_id: - type: string - description: >- - The ID of the provider benchmark to use for the benchmark. - provider_id: - type: string - description: >- - The ID of the provider to use for the benchmark. + title: File Ids + type: array + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true metadata: + additionalProperties: true + title: Metadata type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number + title: VectorStoreCreateRequest + type: object + VectorStoreModifyRequest: + description: Request to modify a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: VectorStoreModifyRequest + type: object + VectorStoreSearchRequest: + description: Request to search a vector store. + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + max_num_results: + default: 10 + title: Max Num Results + type: integer + ranking_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + rewrite_query: + default: false + title: Rewrite Query + type: boolean + required: + - query + title: VectorStoreSearchRequest + type: object + VectorStoreSearchResponse: + description: Response from searching a vector store. + 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: array - - type: object - description: The metadata to use for the benchmark. - additionalProperties: false + - type: number + - type: boolean + title: string | number | boolean + type: object + - type: 'null' + nullable: true + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Content + type: array + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + type: object + _safety_run_shield_Request: + properties: + shield_id: + title: Shield Id + type: string + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + title: Messages + type: array + params: + additionalProperties: true + title: Params + type: object required: - - benchmark_id - - dataset_id - - scoring_functions - title: RegisterBenchmarkRequest + - shield_id + - messages + - params + title: _safety_run_shield_Request + type: object responses: BadRequest400: description: The request was invalid or malformed diff --git a/src/llama_stack_api/vector_io.py b/src/llama_stack_api/vector_io.py index 899b077987..bfad644cc0 100644 --- a/src/llama_stack_api/vector_io.py +++ b/src/llama_stack_api/vector_io.py @@ -737,8 +737,8 @@ async def openai_retrieve_vector_store_file_contents( self, vector_store_id: str, file_id: str, - include_embeddings: Annotated[bool | None, Query(default=False)] = False, - include_metadata: Annotated[bool | None, Query(default=False)] = False, + include_embeddings: Annotated[bool | None, Query()] = False, + include_metadata: Annotated[bool | None, Query()] = False, ) -> VectorStoreFileContentResponse: """Retrieves the contents of a vector store file. From 01f441b3ac268d2af3ed29ddb39c3ee91a8990f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 13 Nov 2025 09:58:16 +0100 Subject: [PATCH 16/46] fix: duplicate union type declarations for Stainless codegen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extract duplicate union types to shared schema references and remove duplicate references within unions to fix Stainless duplicate declaration warnings. Fixes: https://www.stainless.com/docs/reference/diagnostics#Python/DuplicateDeclaration Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 179 ++++++++---------- docs/static/deprecated-llama-stack-spec.yaml | 179 ++++++++---------- .../static/experimental-llama-stack-spec.yaml | 105 ++++------ docs/static/llama-stack-spec.yaml | 179 ++++++++---------- docs/static/stainless-llama-stack-spec.yaml | 179 ++++++++---------- scripts/fastapi_generator.py | 139 ++++++++++++++ 6 files changed, 476 insertions(+), 484 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index 61543d325b..4a27dbcd19 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -6723,40 +6723,7 @@ components: properties: data: items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' type: array title: Data object: @@ -8972,40 +8939,7 @@ components: - type: 'null' input: items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' type: array title: Input type: object @@ -11307,43 +11241,10 @@ components: anyOf: - type: string - items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input + $ref: '#/components/schemas/OpenAIResponseMessageInputUnion' type: array - title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] - title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: list[OpenAIResponseMessageInputUnion] + title: string | list[OpenAIResponseMessageInputUnion] model: type: string title: Model @@ -14989,6 +14890,76 @@ components: - params title: _safety_run_shield_Request type: object + OpenAIResponseMessageOutputUnion: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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' + x-stainless-naming: OpenAIResponseMessageOutputOneOf + title: OpenAIResponseMessage-Output | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse + x-stainless-naming: OpenAIResponseMessageOutputUnion + OpenAIResponseMessageInputUnion: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + x-stainless-naming: OpenAIResponseMessageInputOneOf + title: OpenAIResponseMessage-Input | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse + x-stainless-naming: OpenAIResponseMessageInputUnion responses: BadRequest400: description: The request was invalid or malformed diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index ea2fac2535..aaf17b6fe8 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -1994,40 +1994,7 @@ components: properties: data: items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' type: array title: Data object: @@ -4505,40 +4472,7 @@ components: - type: 'null' input: items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' type: array title: Input type: object @@ -6874,43 +6808,10 @@ components: anyOf: - type: string - items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input + $ref: '#/components/schemas/OpenAIResponseMessageInputUnion' type: array - title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] - title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: list[OpenAIResponseMessageInputUnion] + title: string | list[OpenAIResponseMessageInputUnion] model: type: string title: Model @@ -10377,6 +10278,76 @@ components: - params title: _safety_run_shield_Request type: object + OpenAIResponseMessageOutputUnion: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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' + x-stainless-naming: OpenAIResponseMessageOutputOneOf + title: OpenAIResponseMessage-Output | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse + x-stainless-naming: OpenAIResponseMessageOutputUnion + OpenAIResponseMessageInputUnion: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + x-stainless-naming: OpenAIResponseMessageInputOneOf + title: OpenAIResponseMessage-Input | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse + x-stainless-naming: OpenAIResponseMessageInputUnion responses: BadRequest400: description: The request was invalid or malformed diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index 145e051972..4c01c13c1c 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -1719,40 +1719,7 @@ components: properties: data: items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' type: array title: Data object: @@ -3828,40 +3795,7 @@ components: - type: 'null' input: items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' type: array title: Input type: object @@ -9009,6 +8943,41 @@ components: - content title: VectorStoreSearchResponse type: object + OpenAIResponseMessageOutputUnion: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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' + x-stainless-naming: OpenAIResponseMessageOutputOneOf + title: OpenAIResponseMessage-Output | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse + x-stainless-naming: OpenAIResponseMessageOutputUnion 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 0e3c11c314..1d4ce4d79f 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -4049,40 +4049,7 @@ components: properties: data: items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' type: array title: Data object: @@ -6287,40 +6254,7 @@ components: - type: 'null' input: items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' type: array title: Input type: object @@ -8440,43 +8374,10 @@ components: anyOf: - type: string - items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input + $ref: '#/components/schemas/OpenAIResponseMessageInputUnion' type: array - title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] - title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: list[OpenAIResponseMessageInputUnion] + title: string | list[OpenAIResponseMessageInputUnion] model: type: string title: Model @@ -11921,6 +11822,76 @@ components: - params title: _safety_run_shield_Request type: object + OpenAIResponseMessageOutputUnion: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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' + x-stainless-naming: OpenAIResponseMessageOutputOneOf + title: OpenAIResponseMessage-Output | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse + x-stainless-naming: OpenAIResponseMessageOutputUnion + OpenAIResponseMessageInputUnion: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + x-stainless-naming: OpenAIResponseMessageInputOneOf + title: OpenAIResponseMessage-Input | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse + x-stainless-naming: OpenAIResponseMessageInputUnion 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 6b73435ec6..24c2d2e45e 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -6689,40 +6689,7 @@ components: properties: data: items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' type: array title: Data object: @@ -8938,40 +8905,7 @@ components: - type: 'null' input: items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' type: array title: Input type: object @@ -11273,43 +11207,10 @@ components: anyOf: - type: string - items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input + $ref: '#/components/schemas/OpenAIResponseMessageInputUnion' type: array - title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] - title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: list[OpenAIResponseMessageInputUnion] + title: string | list[OpenAIResponseMessageInputUnion] model: type: string title: Model @@ -14926,6 +14827,76 @@ components: - params title: _safety_run_shield_Request type: object + OpenAIResponseMessageOutputUnion: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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' + x-stainless-naming: OpenAIResponseMessageOutputOneOf + title: OpenAIResponseMessage-Output | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse + x-stainless-naming: OpenAIResponseMessageOutputUnion + OpenAIResponseMessageInputUnion: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + x-stainless-naming: OpenAIResponseMessageInputOneOf + title: OpenAIResponseMessage-Input | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse + x-stainless-naming: OpenAIResponseMessageInputUnion responses: BadRequest400: description: The request was invalid or malformed diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index 85cdd1f2ed..b6e2531586 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -1470,6 +1470,139 @@ def _remove_request_bodies_from_get_endpoints(openapi_schema: dict[str, Any]) -> return openapi_schema +def _extract_duplicate_union_types(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Extract duplicate union types to shared schema references. + + Stainless generates type names from union types based on their context, which can cause + duplicate names when the same union appears in different places. This function extracts + these duplicate unions to shared schema definitions and replaces inline definitions with + references to them. + + According to Stainless docs, when duplicate types are detected, they should be extracted + to the same ref and declared as a model. This ensures Stainless generates consistent + type names regardless of where the union is referenced. + + Fixes: https://www.stainless.com/docs/reference/diagnostics#Python/DuplicateDeclaration + """ + import copy + + if "components" not in openapi_schema or "schemas" not in openapi_schema["components"]: + return openapi_schema + + schemas = openapi_schema["components"]["schemas"] + + # Extract the Output union type (used in OpenAIResponseObjectWithInput-Output and ListOpenAIResponseInputItem) + output_union_schema_name = "OpenAIResponseMessageOutputUnion" + output_union_title = None + + # Get the union type from OpenAIResponseObjectWithInput-Output.input.items.anyOf + if "OpenAIResponseObjectWithInput-Output" in schemas: + schema = schemas["OpenAIResponseObjectWithInput-Output"] + if isinstance(schema, dict) and "properties" in schema: + input_prop = schema["properties"].get("input") + if isinstance(input_prop, dict) and "items" in input_prop: + items = input_prop["items"] + if isinstance(items, dict) and "anyOf" in items: + # Extract the union schema with deep copy + output_union_schema = copy.deepcopy(items["anyOf"]) + output_union_title = items.get("title", "OpenAIResponseMessageOutputUnion") + + # Collect all refs from the oneOf to detect duplicates + refs_in_oneof = set() + for item in output_union_schema: + if isinstance(item, dict) and "oneOf" in item: + oneof = item["oneOf"] + if isinstance(oneof, list): + for variant in oneof: + if isinstance(variant, dict) and "$ref" in variant: + refs_in_oneof.add(variant["$ref"]) + item["x-stainless-naming"] = "OpenAIResponseMessageOutputOneOf" + + # Remove duplicate refs from anyOf that are already in oneOf + deduplicated_schema = [] + for item in output_union_schema: + if isinstance(item, dict) and "$ref" in item: + if item["$ref"] not in refs_in_oneof: + deduplicated_schema.append(item) + else: + deduplicated_schema.append(item) + output_union_schema = deduplicated_schema + + # Create the shared schema with x-stainless-naming to ensure consistent naming + if output_union_schema_name not in schemas: + schemas[output_union_schema_name] = { + "anyOf": output_union_schema, + "title": output_union_title, + "x-stainless-naming": output_union_schema_name, + } + # Replace with reference + input_prop["items"] = {"$ref": f"#/components/schemas/{output_union_schema_name}"} + + # Replace the same union in ListOpenAIResponseInputItem.data.items.anyOf + if "ListOpenAIResponseInputItem" in schemas and output_union_schema_name in schemas: + schema = schemas["ListOpenAIResponseInputItem"] + if isinstance(schema, dict) and "properties" in schema: + data_prop = schema["properties"].get("data") + if isinstance(data_prop, dict) and "items" in data_prop: + items = data_prop["items"] + if isinstance(items, dict) and "anyOf" in items: + # Replace with reference + data_prop["items"] = {"$ref": f"#/components/schemas/{output_union_schema_name}"} + + # Extract the Input union type (used in _responses_Request.input.anyOf[1].items.anyOf) + input_union_schema_name = "OpenAIResponseMessageInputUnion" + + if "_responses_Request" in schemas: + schema = schemas["_responses_Request"] + if isinstance(schema, dict) and "properties" in schema: + input_prop = schema["properties"].get("input") + if isinstance(input_prop, dict) and "anyOf" in input_prop: + any_of = input_prop["anyOf"] + if isinstance(any_of, list) and len(any_of) > 1: + # Check the second item (index 1) which should be the array type + second_item = any_of[1] + if isinstance(second_item, dict) and "items" in second_item: + items = second_item["items"] + if isinstance(items, dict) and "anyOf" in items: + # Extract the union schema with deep copy + input_union_schema = copy.deepcopy(items["anyOf"]) + input_union_title = items.get("title", "OpenAIResponseMessageInputUnion") + + # Collect all refs from the oneOf to detect duplicates + refs_in_oneof = set() + for item in input_union_schema: + if isinstance(item, dict) and "oneOf" in item: + oneof = item["oneOf"] + if isinstance(oneof, list): + for variant in oneof: + if isinstance(variant, dict) and "$ref" in variant: + refs_in_oneof.add(variant["$ref"]) + item["x-stainless-naming"] = "OpenAIResponseMessageInputOneOf" + + # Remove duplicate refs from anyOf that are already in oneOf + deduplicated_schema = [] + for item in input_union_schema: + if isinstance(item, dict) and "$ref" in item: + if item["$ref"] not in refs_in_oneof: + deduplicated_schema.append(item) + else: + deduplicated_schema.append(item) + input_union_schema = deduplicated_schema + + # Create the shared schema with x-stainless-naming to ensure consistent naming + if input_union_schema_name not in schemas: + schemas[input_union_schema_name] = { + "anyOf": input_union_schema, + "title": input_union_title, + "x-stainless-naming": input_union_schema_name, + } + # Replace with reference + second_item["items"] = {"$ref": f"#/components/schemas/{input_union_schema_name}"} + + return openapi_schema + + def _convert_multiline_strings_to_literal(obj: Any) -> Any: """Recursively convert multi-line strings to LiteralScalarString for YAML block scalar formatting.""" try: @@ -1854,6 +1987,9 @@ def generate_openapi_spec(output_dir: str) -> dict[str, Any]: # that FastAPI incorrectly added to GET endpoints are removed openapi_schema = _remove_request_bodies_from_get_endpoints(openapi_schema) + # Extract duplicate union types to shared schema references + openapi_schema = _extract_duplicate_union_types(openapi_schema) + # 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 @@ -1865,6 +2001,9 @@ def generate_openapi_spec(output_dir: str) -> dict[str, Any]: deprecated_schema = _filter_deprecated_schema(copy.deepcopy(openapi_schema)) combined_schema = _filter_combined_schema(copy.deepcopy(openapi_schema)) + # Apply duplicate union extraction to combined schema (used by Stainless) + combined_schema = _extract_duplicate_union_types(combined_schema) + base_description = ( "This is the specification of the Llama Stack that provides\n" " a set of endpoints and their corresponding interfaces that are\n" From 24b275d0dd1068ee0e85c6b7efd56bf7779688bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 13 Nov 2025 10:13:43 +0100 Subject: [PATCH 17/46] fix: revert "chore: add deprecated to combined schema" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 53fc2a05812ebf24d5598a70972c86d72c50fd4e. Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 527 -------------------- docs/static/stainless-llama-stack-spec.yaml | 527 -------------------- scripts/fastapi_generator.py | 15 +- 3 files changed, 9 insertions(+), 1060 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index 4a27dbcd19..17fbc4789c 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -3213,41 +3213,6 @@ paths: schema: type: string description: 'Path parameter: model_id' - delete: - tags: - - Models - summary: Unregister Model - description: |- - Unregister model. - - Unregister a model. - operationId: unregister_model_v1_models__model_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' - deprecated: true - parameters: - - name: model_id - in: path - required: true - schema: - type: string - description: 'Path parameter: model_id' /v1/models: get: tags: @@ -3274,41 +3239,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: - tags: - - Models - summary: Register Model - description: |- - Register model. - - Register a model. - 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' - deprecated: true /v1/moderations: post: tags: @@ -3412,38 +3342,6 @@ paths: schema: type: string description: 'Path parameter: identifier' - delete: - tags: - - Shields - summary: Unregister Shield - description: Unregister a shield. - operationId: unregister_shield_v1_shields__identifier__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' - deprecated: true - parameters: - - name: identifier - in: path - required: true - schema: - type: string - description: 'Path parameter: identifier' /v1/shields: get: tags: @@ -3470,38 +3368,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: - tags: - - Shields - summary: Register Shield - description: Register a shield. - 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' - deprecated: true /v1beta/datasetio/append-rows/{dataset_id}: post: tags: @@ -3635,38 +3501,6 @@ paths: schema: type: string description: 'Path parameter: dataset_id' - delete: - tags: - - Datasets - summary: Unregister Dataset - description: Unregister a dataset by its ID. - operationId: unregister_dataset_v1beta_datasets__dataset_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' - deprecated: true - parameters: - - name: dataset_id - in: path - required: true - schema: - type: string - description: 'Path parameter: dataset_id' /v1beta/datasets: get: tags: @@ -3693,38 +3527,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: - tags: - - Datasets - summary: Register Dataset - description: Register a new dataset. - operationId: register_dataset_v1beta_datasets_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_datasets_Request' - required: true - 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' - deprecated: true /v1/scoring/score: post: tags: @@ -3822,38 +3624,6 @@ paths: schema: type: string description: 'Path parameter: scoring_fn_id' - delete: - tags: - - Scoring Functions - summary: Unregister Scoring Function - description: Unregister a scoring function. - operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' - deprecated: true - parameters: - - name: scoring_fn_id - in: path - required: true - schema: - type: string - description: 'Path parameter: scoring_fn_id' /v1/scoring-functions: get: tags: @@ -3880,37 +3650,6 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - post: - tags: - - Scoring Functions - summary: Register Scoring Function - description: Register a scoring function. - operationId: register_scoring_function_v1_scoring_functions_post - deprecated: true - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' - 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 /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: tags: @@ -4137,38 +3876,6 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' - delete: - tags: - - Benchmarks - summary: Unregister Benchmark - description: Unregister a benchmark. - operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' - deprecated: true - parameters: - - name: benchmark_id - in: path - required: true - schema: - type: string - description: 'Path parameter: benchmark_id' /v1alpha/eval/benchmarks: get: tags: @@ -4195,37 +3902,6 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - post: - tags: - - Benchmarks - summary: Register Benchmark - description: Register a benchmark. - operationId: register_benchmark_v1alpha_eval_benchmarks_post - deprecated: true - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Body_register_benchmark_v1alpha_eval_benchmarks_post' - 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 /v1alpha/post-training/job/cancel: post: tags: @@ -4480,38 +4156,6 @@ paths: schema: type: string description: 'Path parameter: toolgroup_id' - delete: - tags: - - Tool Groups - summary: Unregister Toolgroup - description: Unregister a tool group. - operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' - deprecated: true - parameters: - - name: toolgroup_id - in: path - required: true - schema: - type: string - description: 'Path parameter: toolgroup_id' /v1/toolgroups: get: tags: @@ -4538,36 +4182,6 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - post: - tags: - - Tool Groups - summary: Register Tool Group - description: Register a tool group. - operationId: register_tool_group_v1_toolgroups_post - deprecated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' - 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/tools: get: tags: @@ -5819,82 +5433,6 @@ components: - file - purpose title: Body_openai_upload_file_v1_files_post - Body_register_benchmark_v1alpha_eval_benchmarks_post: - properties: - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - scoring_functions - title: Body_register_benchmark_v1alpha_eval_benchmarks_post - Body_register_scoring_function_v1_scoring_functions_post: - properties: - return_type: - anyOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - params: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: Params - type: object - required: - - return_type - title: Body_register_scoring_function_v1_scoring_functions_post - Body_register_tool_group_v1_toolgroups_post: - properties: - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - title: Body_register_tool_group_v1_toolgroups_post BooleanType: properties: type: @@ -10997,21 +10535,6 @@ components: required: - items title: _conversations_conversation_id_items_Request - _datasets_Request: - properties: - purpose: - title: Purpose - source: - title: Source - metadata: - title: Metadata - dataset_id: - title: Dataset Id - type: object - required: - - purpose - - source - title: _datasets_Request _eval_benchmarks_benchmark_id_evaluations_Request: properties: input_rows: @@ -11067,34 +10590,6 @@ components: - query - items title: _inference_rerank_Request - _models_Request: - properties: - model_id: - type: string - title: Model Id - provider_model_id: - anyOf: - - type: string - - type: 'null' - provider_id: - anyOf: - - type: string - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - model_type: - anyOf: - - $ref: '#/components/schemas/ModelType' - title: ModelType - - type: 'null' - title: ModelType - type: object - required: - - model_id - title: _models_Request _moderations_Request: properties: input: @@ -11400,28 +10895,6 @@ components: - dataset_id - scoring_functions title: _scoring_score_batch_Request - _shields_Request: - properties: - shield_id: - type: string - title: Shield Id - provider_shield_id: - anyOf: - - type: string - - type: 'null' - provider_id: - anyOf: - - type: string - - type: 'null' - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - shield_id - title: _shields_Request _tool_runtime_invoke_Request: properties: tool_name: diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index 24c2d2e45e..d794ded030 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -3179,41 +3179,6 @@ paths: schema: type: string description: 'Path parameter: model_id' - delete: - tags: - - Models - summary: Unregister Model - description: |- - Unregister model. - - Unregister a model. - operationId: unregister_model_v1_models__model_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' - deprecated: true - parameters: - - name: model_id - in: path - required: true - schema: - type: string - description: 'Path parameter: model_id' /v1/models: get: tags: @@ -3240,41 +3205,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: - tags: - - Models - summary: Register Model - description: |- - Register model. - - Register a model. - 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' - deprecated: true /v1/moderations: post: tags: @@ -3378,38 +3308,6 @@ paths: schema: type: string description: 'Path parameter: identifier' - delete: - tags: - - Shields - summary: Unregister Shield - description: Unregister a shield. - operationId: unregister_shield_v1_shields__identifier__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' - deprecated: true - parameters: - - name: identifier - in: path - required: true - schema: - type: string - description: 'Path parameter: identifier' /v1/shields: get: tags: @@ -3436,38 +3334,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: - tags: - - Shields - summary: Register Shield - description: Register a shield. - 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' - deprecated: true /v1beta/datasetio/append-rows/{dataset_id}: post: tags: @@ -3601,38 +3467,6 @@ paths: schema: type: string description: 'Path parameter: dataset_id' - delete: - tags: - - Datasets - summary: Unregister Dataset - description: Unregister a dataset by its ID. - operationId: unregister_dataset_v1beta_datasets__dataset_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' - deprecated: true - parameters: - - name: dataset_id - in: path - required: true - schema: - type: string - description: 'Path parameter: dataset_id' /v1beta/datasets: get: tags: @@ -3659,38 +3493,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: - tags: - - Datasets - summary: Register Dataset - description: Register a new dataset. - operationId: register_dataset_v1beta_datasets_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_datasets_Request' - required: true - 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' - deprecated: true /v1/scoring/score: post: tags: @@ -3788,38 +3590,6 @@ paths: schema: type: string description: 'Path parameter: scoring_fn_id' - delete: - tags: - - Scoring Functions - summary: Unregister Scoring Function - description: Unregister a scoring function. - operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' - deprecated: true - parameters: - - name: scoring_fn_id - in: path - required: true - schema: - type: string - description: 'Path parameter: scoring_fn_id' /v1/scoring-functions: get: tags: @@ -3846,37 +3616,6 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - post: - tags: - - Scoring Functions - summary: Register Scoring Function - description: Register a scoring function. - operationId: register_scoring_function_v1_scoring_functions_post - deprecated: true - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' - 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 /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: tags: @@ -4103,38 +3842,6 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' - delete: - tags: - - Benchmarks - summary: Unregister Benchmark - description: Unregister a benchmark. - operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' - deprecated: true - parameters: - - name: benchmark_id - in: path - required: true - schema: - type: string - description: 'Path parameter: benchmark_id' /v1alpha/eval/benchmarks: get: tags: @@ -4161,37 +3868,6 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - post: - tags: - - Benchmarks - summary: Register Benchmark - description: Register a benchmark. - operationId: register_benchmark_v1alpha_eval_benchmarks_post - deprecated: true - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Body_register_benchmark_v1alpha_eval_benchmarks_post' - 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 /v1alpha/post-training/job/cancel: post: tags: @@ -4446,38 +4122,6 @@ paths: schema: type: string description: 'Path parameter: toolgroup_id' - delete: - tags: - - Tool Groups - summary: Unregister Toolgroup - description: Unregister a tool group. - operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' - deprecated: true - parameters: - - name: toolgroup_id - in: path - required: true - schema: - type: string - description: 'Path parameter: toolgroup_id' /v1/toolgroups: get: tags: @@ -4504,36 +4148,6 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response - post: - tags: - - Tool Groups - summary: Register Tool Group - description: Register a tool group. - operationId: register_tool_group_v1_toolgroups_post - deprecated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' - 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/tools: get: tags: @@ -5785,82 +5399,6 @@ components: - file - purpose title: Body_openai_upload_file_v1_files_post - Body_register_benchmark_v1alpha_eval_benchmarks_post: - properties: - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - scoring_functions - title: Body_register_benchmark_v1alpha_eval_benchmarks_post - Body_register_scoring_function_v1_scoring_functions_post: - properties: - return_type: - anyOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - params: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: Params - type: object - required: - - return_type - title: Body_register_scoring_function_v1_scoring_functions_post - Body_register_tool_group_v1_toolgroups_post: - properties: - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - title: Body_register_tool_group_v1_toolgroups_post BooleanType: properties: type: @@ -10963,21 +10501,6 @@ components: required: - items title: _conversations_conversation_id_items_Request - _datasets_Request: - properties: - purpose: - title: Purpose - source: - title: Source - metadata: - title: Metadata - dataset_id: - title: Dataset Id - type: object - required: - - purpose - - source - title: _datasets_Request _eval_benchmarks_benchmark_id_evaluations_Request: properties: input_rows: @@ -11033,34 +10556,6 @@ components: - query - items title: _inference_rerank_Request - _models_Request: - properties: - model_id: - type: string - title: Model Id - provider_model_id: - anyOf: - - type: string - - type: 'null' - provider_id: - anyOf: - - type: string - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - model_type: - anyOf: - - $ref: '#/components/schemas/ModelType' - title: ModelType - - type: 'null' - title: ModelType - type: object - required: - - model_id - title: _models_Request _moderations_Request: properties: input: @@ -11366,28 +10861,6 @@ components: - dataset_id - scoring_functions title: _scoring_score_batch_Request - _shields_Request: - properties: - shield_id: - type: string - title: Shield Id - provider_shield_id: - anyOf: - - type: string - - type: 'null' - provider_id: - anyOf: - - type: string - - type: 'null' - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - shield_id - title: _shields_Request _tool_runtime_invoke_Request: properties: tool_name: diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index b6e2531586..08bd80efdf 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -1895,21 +1895,21 @@ def _filter_deprecated_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: 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. - Includes deprecated endpoints. This is used for the combined "stainless" spec. + 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), including deprecated + # Filter paths to include stable (v1) and experimental (v1alpha, v1beta), excluding deprecated filtered_paths = {} for path, path_item in filtered_schema["paths"].items(): if not isinstance(path_item, dict): continue - # Include all operations (both deprecated and non-deprecated) for the combined spec - # Filter at operation level to preserve the structure + # Filter at operation level, not path level + # This allows paths with both deprecated and non-deprecated operations filtered_path_item = {} for method in ["get", "post", "put", "delete", "patch", "head", "options"]: if method not in path_item: @@ -1918,10 +1918,13 @@ def _filter_combined_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: if not isinstance(operation, dict): continue - # Include all operations, including deprecated ones + # Skip deprecated operations + if operation.get("deprecated", False): + continue + filtered_path_item[method] = operation - # Only include path if it has at least one operation + # Only include path if it has at least one operation after filtering if filtered_path_item: # Check if path matches version filter (stable or experimental) if _is_stable_path(path) or _is_experimental_path(path): From 06acbdab6f198bed962b7cd31c52fe1f27913a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 13 Nov 2025 10:32:25 +0100 Subject: [PATCH 18/46] fix: Exclude deprecated endpoints from stainless config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Filter out deprecated endpoints from the combined OpenAPI spec and remove their references from the Stainless config to fix Endpoint/NotFound errors. Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index c61b53654d..471e526548 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -422,7 +422,6 @@ resources: list: endpoint: get /v1alpha/eval/benchmarks paginated: false - register: post /v1alpha/eval/benchmarks models: benchmark: Benchmark list_benchmarks_response: ListBenchmarksResponse @@ -451,12 +450,10 @@ resources: models: list_datasets_response: ListDatasetsResponse methods: - register: post /v1beta/datasets retrieve: get /v1beta/datasets/{dataset_id} list: endpoint: get /v1beta/datasets paginated: false - unregister: delete /v1beta/datasets/{dataset_id} iterrows: get /v1beta/datasetio/iterrows/{dataset_id} appendrows: post /v1beta/datasetio/append-rows/{dataset_id} From 7bc9aeaf9c5512460a34266f84352ba09e1cf02b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 13 Nov 2025 10:39:53 +0100 Subject: [PATCH 19/46] fix: remove unused endpoint and outdate code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The register/unregister were removed in https://github.com/llamastack/llama-stack/pull/4099 Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index 471e526548..73ab4c5bcc 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -115,18 +115,13 @@ resources: sampling_params: SamplingParams scoring_result: ScoringResult system_message: SystemMessage - query_result: RAGQueryResult - document: RAGDocument - query_config: RAGQueryConfig toolgroups: models: tool_group: ToolGroup list_tool_groups_response: ListToolGroupsResponse methods: - register: post /v1/toolgroups get: get /v1/toolgroups/{toolgroup_id} list: get /v1/toolgroups - unregister: delete /v1/toolgroups/{toolgroup_id} tools: methods: get: get /v1/tools/{tool_name} @@ -314,8 +309,6 @@ resources: endpoint: get /v1/models paginated: false retrieve: get /v1/models/{model_id} - register: post /v1/models - unregister: delete /v1/models/{model_id} subresources: openai: methods: @@ -361,7 +354,6 @@ resources: list: endpoint: get /v1/shields paginated: false - register: post /v1/shields delete: delete /v1/shields/{identifier} scoring: @@ -374,7 +366,6 @@ resources: list: endpoint: get /v1/scoring-functions paginated: false - register: post /v1/scoring-functions models: scoring_fn: ScoringFn scoring_fn_params: ScoringFnParams From a58d9a65f10fe9999ff8f18bffb1a6b5fb5450b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 13 Nov 2025 10:46:58 +0100 Subject: [PATCH 20/46] chore: remove validation schema script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The generator validates the generated schemas already. Signed-off-by: Sébastien Han --- .pre-commit-config.yaml | 9 -- scripts/validate_openapi.py | 290 ------------------------------------ 2 files changed, 299 deletions(-) delete mode 100755 scripts/validate_openapi.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2d8fdf8a2c..2b32524ba9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -115,15 +115,6 @@ repos: 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/scripts/validate_openapi.py b/scripts/validate_openapi.py deleted file mode 100755 index ddc88f0f8d..0000000000 --- a/scripts/validate_openapi.py +++ /dev/null @@ -1,290 +0,0 @@ -#!/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()) From 827cc9b9b8e504a05faa8fdb6150fc154cf78ddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 13 Nov 2025 10:51:24 +0100 Subject: [PATCH 21/46] fix: deprecated endpoint in Stainless config example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace deprecated `post /v1/models` with `get /v1/models` in the headline example to fix Stainless Endpoint/NotFound error. Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index 73ab4c5bcc..d7c6f21281 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -507,7 +507,7 @@ readme: params: &ref_0 {} headline: type: request - endpoint: post /v1/models + endpoint: get /v1/models params: *ref_0 pagination: type: request From 84277988b86428be88ce670bf96b0c6d8f3adb48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 13 Nov 2025 11:04:09 +0100 Subject: [PATCH 22/46] fix: remove unregister shield MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/llamastack/llama-stack/pull/4099 Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index d7c6f21281..0363ec6d83 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -354,7 +354,6 @@ resources: list: endpoint: get /v1/shields paginated: false - delete: delete /v1/shields/{identifier} scoring: methods: From e0a69f270985e7c644ffa5eaf4371c254d288c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 13 Nov 2025 11:07:55 +0100 Subject: [PATCH 23/46] fix: remove unsused ressources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit removed in https://github.com/llamastack/llama-stack/pull/4067 Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index 0363ec6d83..62eada16c3 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -138,11 +138,6 @@ resources: endpoint: get /v1/tool-runtime/list-tools paginated: false invoke_tool: post /v1/tool-runtime/invoke - subresources: - rag_tool: - methods: - insert: post /v1/tool-runtime/rag-tool/insert - query: post /v1/tool-runtime/rag-tool/query responses: models: From f7d049492702894d28f18fb6b8b5896146698b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 13 Nov 2025 11:21:43 +0100 Subject: [PATCH 24/46] fix: Added the missing endpoints to the Stainless config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index 62eada16c3..4dc35f7e23 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -210,6 +210,9 @@ resources: create: type: http endpoint: post /v1/conversations/{conversation_id}/items + delete: + type: http + endpoint: delete /v1/conversations/{conversation_id}/items/{item_id} inspect: models: @@ -377,6 +380,13 @@ resources: list_files_response: ListOpenAIFileResponse delete_file_response: OpenAIFileDeleteResponse + batches: + methods: + create: post /v1/batches + list: get /v1/batches + retrieve: get /v1/batches/{batch_id} + cancel: post /v1/batches/{batch_id}/cancel + alpha: subresources: inference: From 769cfe46545b4733072de339ac9738a2ab93841a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 13 Nov 2025 11:35:41 +0100 Subject: [PATCH 25/46] fix: pagination config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit use paginated endpoint for example and mark input_items.list as non-paginated Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index 4dc35f7e23..fc5bcddcdc 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -163,6 +163,7 @@ resources: list: type: http endpoint: get /v1/responses/{response_id}/input_items + paginated: false prompts: models: @@ -515,5 +516,5 @@ readme: params: *ref_0 pagination: type: request - endpoint: post /v1/chat/completions + endpoint: get /v1/chat/completions params: {} From 912ee24bdf9189e731d215eac444565e6b8ec639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 13 Nov 2025 13:31:55 +0100 Subject: [PATCH 26/46] fix: convert anyOf with const values to enum types in OpenAPI schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a post-processing step that converts anyOf schemas containing multiple const string values into proper enum types. This fixes the Schema/EnumDescriptionNotValid error from Stainless by ensuring enum schemas are properly formatted instead of using anyOf with const values. Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 183 ++++++++---------- docs/static/deprecated-llama-stack-spec.yaml | 165 +++++++--------- .../static/experimental-llama-stack-spec.yaml | 147 +++++++------- docs/static/llama-stack-spec.yaml | 183 ++++++++---------- docs/static/stainless-llama-stack-spec.yaml | 183 ++++++++---------- scripts/fastapi_generator.py | 53 +++++ 6 files changed, 434 insertions(+), 480 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index 17fbc4789c..a3e1f39fd9 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -2434,17 +2434,15 @@ paths: in: query required: false schema: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - - type: 'null' title: Filter + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + nullable: true - name: limit in: query required: false @@ -7849,15 +7847,13 @@ components: OpenAIResponseInputMessageContentImage: properties: detail: - anyOf: - - type: string - const: low - - type: string - const: high - - type: string - const: auto - title: string + title: Detail default: auto + type: string + enum: + - low + - high + - auto type: type: string const: input_image @@ -8000,17 +7996,14 @@ components: OpenAIResponseInputToolWebSearch: properties: type: - anyOf: - - type: string - const: web_search - - type: string - const: web_search_preview - - type: string - const: web_search_preview_2025_03_11 - - type: string - const: web_search_2025_08_26 - title: string + title: Type default: web_search + type: string + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 search_context_size: anyOf: - type: string @@ -8112,16 +8105,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - type: string - const: system - - type: string - const: developer - - type: string - const: user - - type: string - const: assistant - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: type: string const: message @@ -8183,16 +8174,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - type: string - const: system - - type: string - const: developer - - type: string - const: user - - type: string - const: assistant - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: type: string const: message @@ -8740,14 +8729,13 @@ components: OpenAIResponseTextFormat: properties: type: - anyOf: - - type: string - const: text - - type: string - const: json_schema - - type: string - const: json_object - title: string + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text name: anyOf: - type: string @@ -10006,16 +9994,14 @@ components: 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: string + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' type: object @@ -10099,12 +10085,12 @@ components: VectorStoreFileLastError: properties: code: - anyOf: - - type: string - const: server_error - - type: string - const: rate_limit_exceeded - title: string + title: Code + type: string + enum: + - server_error + - rate_limit_exceeded + default: server_error message: type: string title: Message @@ -10149,16 +10135,14 @@ components: - type: 'null' title: VectorStoreFileLastError status: - anyOf: - - type: string - const: completed - - type: string - const: in_progress - - type: string - const: cancelled - - type: string - const: failed - title: string + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed usage_bytes: type: integer title: Usage Bytes @@ -11425,16 +11409,13 @@ components: title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreFileStatus: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - title: string + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed OpenAIResponseInputMessageContent: discriminator: mapping: @@ -11523,16 +11504,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - const: system - type: string - - const: developer - type: string - - const: user - type: string - - const: assistant - type: string - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: const: message default: message diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index aaf17b6fe8..e31c384829 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -3671,15 +3671,13 @@ components: OpenAIResponseInputMessageContentImage: properties: detail: - anyOf: - - type: string - const: low - - type: string - const: high - - type: string - const: auto - title: string + title: Detail default: auto + type: string + enum: + - low + - high + - auto type: type: string const: input_image @@ -3822,17 +3820,14 @@ components: OpenAIResponseInputToolWebSearch: properties: type: - anyOf: - - type: string - const: web_search - - type: string - const: web_search_preview - - type: string - const: web_search_preview_2025_03_11 - - type: string - const: web_search_2025_08_26 - title: string + title: Type default: web_search + type: string + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 search_context_size: anyOf: - type: string @@ -3934,16 +3929,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - type: string - const: system - - type: string - const: developer - - type: string - const: user - - type: string - const: assistant - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: type: string const: message @@ -4005,16 +3998,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - type: string - const: system - - type: string - const: developer - - type: string - const: user - - type: string - const: assistant - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: type: string const: message @@ -4735,14 +4726,13 @@ components: OpenAIResponseTextFormat: properties: type: - anyOf: - - type: string - const: text - - type: string - const: json_schema - - type: string - const: json_object - title: string + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text name: anyOf: - type: string @@ -6001,16 +5991,14 @@ components: 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: string + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' type: object @@ -6094,12 +6082,12 @@ components: VectorStoreFileLastError: properties: code: - anyOf: - - type: string - const: server_error - - type: string - const: rate_limit_exceeded - title: string + title: Code + type: string + enum: + - server_error + - rate_limit_exceeded + default: server_error message: type: string title: Message @@ -6144,16 +6132,14 @@ components: - type: 'null' title: VectorStoreFileLastError status: - anyOf: - - type: string - const: completed - - type: string - const: in_progress - - type: string - const: cancelled - - type: string - const: failed - title: string + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed usage_bytes: type: integer title: Usage Bytes @@ -7519,16 +7505,13 @@ components: title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreFileStatus: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - title: string + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed OpenAIResponseInputMessageContent: discriminator: mapping: @@ -7617,16 +7600,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - const: system - type: string - - const: developer - type: string - - const: user - type: string - - const: assistant - type: string - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: const: message default: message diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index 4c01c13c1c..d0ed2b6140 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -3238,15 +3238,13 @@ components: OpenAIResponseInputMessageContentImage: properties: detail: - anyOf: - - type: string - const: low - - type: string - const: high - - type: string - const: auto - title: string + title: Detail default: auto + type: string + enum: + - low + - high + - auto type: type: string const: input_image @@ -3389,17 +3387,14 @@ components: OpenAIResponseInputToolWebSearch: properties: type: - anyOf: - - type: string - const: web_search - - type: string - const: web_search_preview - - type: string - const: web_search_preview_2025_03_11 - - type: string - const: web_search_2025_08_26 - title: string + title: Type default: web_search + type: string + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 search_context_size: anyOf: - type: string @@ -3501,16 +3496,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - type: string - const: system - - type: string - const: developer - - type: string - const: user - - type: string - const: assistant - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: type: string const: message @@ -4058,14 +4051,13 @@ components: OpenAIResponseTextFormat: properties: type: - anyOf: - - type: string - const: text - - type: string - const: json_schema - - type: string - const: json_object - title: string + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text name: anyOf: - type: string @@ -5317,16 +5309,14 @@ components: 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: string + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' type: object @@ -5410,12 +5400,12 @@ components: VectorStoreFileLastError: properties: code: - anyOf: - - type: string - const: server_error - - type: string - const: rate_limit_exceeded - title: string + title: Code + type: string + enum: + - server_error + - rate_limit_exceeded + default: server_error message: type: string title: Message @@ -5460,16 +5450,14 @@ components: - type: 'null' title: VectorStoreFileLastError status: - anyOf: - - type: string - const: completed - - type: string - const: in_progress - - type: string - const: cancelled - - type: string - const: failed - title: string + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed usage_bytes: type: integer title: Usage Bytes @@ -6223,16 +6211,13 @@ components: title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreFileStatus: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - title: string + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed OpenAIResponseInputMessageContent: discriminator: mapping: @@ -6321,16 +6306,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - const: system - type: string - - const: developer - type: string - - const: user - type: string - - const: assistant - type: string - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: const: message default: message diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index 1d4ce4d79f..1dad5b55f3 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -844,17 +844,15 @@ paths: in: query required: false schema: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - - type: 'null' title: Filter + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + nullable: true - name: limit in: query required: false @@ -5626,15 +5624,13 @@ components: OpenAIResponseInputMessageContentImage: properties: detail: - anyOf: - - type: string - const: low - - type: string - const: high - - type: string - const: auto - title: string + title: Detail default: auto + type: string + enum: + - low + - high + - auto type: type: string const: input_image @@ -5777,17 +5773,14 @@ components: OpenAIResponseInputToolWebSearch: properties: type: - anyOf: - - type: string - const: web_search - - type: string - const: web_search_preview - - type: string - const: web_search_preview_2025_03_11 - - type: string - const: web_search_2025_08_26 - title: string + title: Type default: web_search + type: string + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 search_context_size: anyOf: - type: string @@ -5889,16 +5882,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - type: string - const: system - - type: string - const: developer - - type: string - const: user - - type: string - const: assistant - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: type: string const: message @@ -5960,16 +5951,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - type: string - const: system - - type: string - const: developer - - type: string - const: user - - type: string - const: assistant - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: type: string const: message @@ -6517,14 +6506,13 @@ components: OpenAIResponseTextFormat: properties: type: - anyOf: - - type: string - const: text - - type: string - const: json_schema - - type: string - const: json_object - title: string + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text name: anyOf: - type: string @@ -7774,16 +7762,14 @@ components: 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: string + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' type: object @@ -7867,12 +7853,12 @@ components: VectorStoreFileLastError: properties: code: - anyOf: - - type: string - const: server_error - - type: string - const: rate_limit_exceeded - title: string + title: Code + type: string + enum: + - server_error + - rate_limit_exceeded + default: server_error message: type: string title: Message @@ -7917,16 +7903,14 @@ components: - type: 'null' title: VectorStoreFileLastError status: - anyOf: - - type: string - const: completed - - type: string - const: in_progress - - type: string - const: cancelled - - type: string - const: failed - title: string + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed usage_bytes: type: integer title: Usage Bytes @@ -9063,16 +9047,13 @@ components: title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreFileStatus: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - title: string + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed OpenAIResponseInputMessageContent: discriminator: mapping: @@ -9161,16 +9142,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - const: system - type: string - - const: developer - type: string - - const: user - type: string - - const: assistant - type: string - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: const: message default: message diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index d794ded030..fc83404351 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -2400,17 +2400,15 @@ paths: in: query required: false schema: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - - type: 'null' title: Filter + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + nullable: true - name: limit in: query required: false @@ -7815,15 +7813,13 @@ components: OpenAIResponseInputMessageContentImage: properties: detail: - anyOf: - - type: string - const: low - - type: string - const: high - - type: string - const: auto - title: string + title: Detail default: auto + type: string + enum: + - low + - high + - auto type: type: string const: input_image @@ -7966,17 +7962,14 @@ components: OpenAIResponseInputToolWebSearch: properties: type: - anyOf: - - type: string - const: web_search - - type: string - const: web_search_preview - - type: string - const: web_search_preview_2025_03_11 - - type: string - const: web_search_2025_08_26 - title: string + title: Type default: web_search + type: string + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 search_context_size: anyOf: - type: string @@ -8078,16 +8071,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - type: string - const: system - - type: string - const: developer - - type: string - const: user - - type: string - const: assistant - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: type: string const: message @@ -8149,16 +8140,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - type: string - const: system - - type: string - const: developer - - type: string - const: user - - type: string - const: assistant - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: type: string const: message @@ -8706,14 +8695,13 @@ components: OpenAIResponseTextFormat: properties: type: - anyOf: - - type: string - const: text - - type: string - const: json_schema - - type: string - const: json_object - title: string + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text name: anyOf: - type: string @@ -9972,16 +9960,14 @@ components: 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: string + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' type: object @@ -10065,12 +10051,12 @@ components: VectorStoreFileLastError: properties: code: - anyOf: - - type: string - const: server_error - - type: string - const: rate_limit_exceeded - title: string + title: Code + type: string + enum: + - server_error + - rate_limit_exceeded + default: server_error message: type: string title: Message @@ -10115,16 +10101,14 @@ components: - type: 'null' title: VectorStoreFileLastError status: - anyOf: - - type: string - const: completed - - type: string - const: in_progress - - type: string - const: cancelled - - type: string - const: failed - title: string + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed usage_bytes: type: integer title: Usage Bytes @@ -11391,16 +11375,13 @@ components: title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreFileStatus: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - title: string + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed OpenAIResponseInputMessageContent: discriminator: mapping: @@ -11489,16 +11470,14 @@ components: title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - anyOf: - - const: system - type: string - - const: developer - type: string - - const: user - type: string - - const: assistant - type: string - title: string + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system type: const: message default: message diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index 08bd80efdf..5392646933 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -1031,6 +1031,10 @@ def _fix_path_parameters(openapi_schema: dict[str, Any]) -> dict[str, Any]: def _fix_schema_issues(openapi_schema: dict[str, Any]) -> dict[str, Any]: """Fix common schema issues: exclusiveMinimum, null defaults, and add titles to unions.""" + # Convert anyOf with const values to enums across the entire schema + _convert_anyof_const_to_enum(openapi_schema) + + # Fix other schema issues and add titles to unions if "components" in openapi_schema and "schemas" in openapi_schema["components"]: for schema_name, schema_def in openapi_schema["components"]["schemas"].items(): _fix_schema_recursive(schema_def) @@ -1189,6 +1193,55 @@ def _add_titles_to_unions(obj: Any, parent_key: str | None = None) -> None: _add_titles_to_unions(item, parent_key) +def _convert_anyof_const_to_enum(obj: Any) -> None: + """Convert anyOf with multiple const string values to a proper enum.""" + if isinstance(obj, dict): + if "anyOf" in obj: + any_of = obj["anyOf"] + if isinstance(any_of, list): + # Check if all items are const string values + const_values = [] + has_null = False + can_convert = True + for item in any_of: + if isinstance(item, dict): + if item.get("type") == "null": + has_null = True + elif item.get("type") == "string" and "const" in item: + const_values.append(item["const"]) + else: + # Not a simple const pattern, skip conversion for this anyOf + can_convert = False + break + + # If we have const values and they're all strings, convert to enum + if can_convert and const_values and len(const_values) == len(any_of) - (1 if has_null else 0): + # Convert to enum + obj["type"] = "string" + obj["enum"] = const_values + # Preserve default if present, otherwise try to get from first const item + if "default" not in obj: + for item in any_of: + if isinstance(item, dict) and "const" in item: + obj["default"] = item["const"] + break + # Remove anyOf + del obj["anyOf"] + # Handle nullable + if has_null: + obj["nullable"] = True + # Remove title if it's just "string" + if obj.get("title") == "string": + del obj["title"] + + # Recursively process all values + for value in obj.values(): + _convert_anyof_const_to_enum(value) + elif isinstance(obj, list): + for item in obj: + _convert_anyof_const_to_enum(item) + + def _fix_schema_recursive(obj: Any) -> None: """Recursively fix schema issues: exclusiveMinimum and null defaults.""" if isinstance(obj, dict): From e79a03b697220fe763621262724b5e58de5b032b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 13 Nov 2025 17:17:03 +0100 Subject: [PATCH 27/46] chore: chop fastapi_generator into its module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Decoupled the large script with distinct files and purpose. Signed-off-by: Sébastien Han --- scripts/fastapi_generator.py | 2205 ----------------- scripts/openapi_generator/__init__.py | 16 + scripts/openapi_generator/__main__.py | 14 + scripts/openapi_generator/app.py | 91 + scripts/openapi_generator/endpoints.py | 586 +++++ scripts/openapi_generator/main.py | 238 ++ .../openapi_generator/schema_collection.py | 183 ++ scripts/openapi_generator/schema_filtering.py | 316 +++ .../openapi_generator/schema_transforms.py | 851 +++++++ scripts/openapi_generator/state.py | 23 + scripts/run_openapi_generator.sh | 2 +- 11 files changed, 2319 insertions(+), 2206 deletions(-) delete mode 100755 scripts/fastapi_generator.py create mode 100644 scripts/openapi_generator/__init__.py create mode 100644 scripts/openapi_generator/__main__.py create mode 100644 scripts/openapi_generator/app.py create mode 100644 scripts/openapi_generator/endpoints.py create mode 100755 scripts/openapi_generator/main.py create mode 100644 scripts/openapi_generator/schema_collection.py create mode 100644 scripts/openapi_generator/schema_filtering.py create mode 100644 scripts/openapi_generator/schema_transforms.py create mode 100644 scripts/openapi_generator/state.py diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py deleted file mode 100755 index 5392646933..0000000000 --- a/scripts/fastapi_generator.py +++ /dev/null @@ -1,2205 +0,0 @@ -#!/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. - -""" -FastAPI-based OpenAPI generator for Llama Stack. -""" - -import importlib -import inspect -import pkgutil -import types -import typing -from pathlib import Path -from typing import Annotated, Any, 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.apis.version import ( - LLAMA_STACK_API_V1, - LLAMA_STACK_API_V1ALPHA, - LLAMA_STACK_API_V1BETA, -) -from llama_stack.core.resolver import api_protocol_map - -# Global list to store dynamic models created during endpoint generation -_dynamic_models = [] - - -# Cache for protocol methods to avoid repeated lookups -_protocol_methods_cache: dict[Api, dict[str, Any]] | None = None - -# Global dict to store extra body field information by endpoint -# Key: (path, method) tuple, Value: list of (param_name, param_type, description) tuples -_extra_body_fields: dict[tuple[str, str], list[tuple[str, type, str | None]]] = {} - - -def create_llama_stack_app() -> FastAPI: - """ - Create a FastAPI app that represents the Llama Stack API. - This uses the existing route discovery system to automatically find all routes. - """ - app = FastAPI( - title="Llama Stack API", - description="A comprehensive API for building and deploying AI applications", - version="1.0.0", - servers=[ - {"url": "http://any-hosted-llama-stack.com"}, - ], - ) - - # Get all API routes - from llama_stack.core.server.routes import get_all_api_routes - - api_routes = get_all_api_routes() - - # Create FastAPI routes from the discovered routes - for api, routes in api_routes.items(): - for route, webmethod in routes: - # Convert the route to a FastAPI endpoint - _create_fastapi_endpoint(app, route, webmethod, api) - - return app - - -def _get_protocol_method(api: Api, method_name: str) -> Any | None: - """ - Get a protocol method function by API and method name. - Uses caching to avoid repeated lookups. - - Args: - api: The API enum - method_name: The method name (function name) - - Returns: - The function object, or None if not found - """ - global _protocol_methods_cache - - if _protocol_methods_cache is None: - _protocol_methods_cache = {} - protocols = api_protocol_map() - from llama_stack.apis.tools import SpecialToolGroup, ToolRuntime - - toolgroup_protocols = { - SpecialToolGroup.rag_tool: ToolRuntime, - } - - for api_key, protocol in protocols.items(): - method_map: dict[str, Any] = {} - protocol_methods = inspect.getmembers(protocol, predicate=inspect.isfunction) - for name, method in protocol_methods: - method_map[name] = method - - # Handle tool_runtime special case - if api_key == Api.tool_runtime: - for tool_group, sub_protocol in toolgroup_protocols.items(): - sub_protocol_methods = inspect.getmembers(sub_protocol, predicate=inspect.isfunction) - for name, method in sub_protocol_methods: - if hasattr(method, "__webmethod__"): - method_map[f"{tool_group.value}.{name}"] = method - - _protocol_methods_cache[api_key] = method_map - - return _protocol_methods_cache.get(api, {}).get(method_name) - - -def _extract_path_parameters(path: str) -> list[dict[str, Any]]: - """Extract path parameters from a URL path and return them as OpenAPI parameter definitions.""" - import re - - matches = re.findall(r"\{([^}:]+)(?::[^}]+)?\}", path) - return [ - { - "name": param_name, - "in": "path", - "required": True, - "schema": {"type": "string"}, - "description": f"Path parameter: {param_name}", - } - for param_name in matches - ] - - -def _create_endpoint_with_request_model( - request_model: type, response_model: type | None, operation_description: str | None -): - """Create an endpoint function with a request body model.""" - - async def endpoint(request: request_model) -> response_model: - return response_model() if response_model else {} - - if operation_description: - endpoint.__doc__ = operation_description - return endpoint - - -def _build_field_definitions(query_parameters: list[tuple[str, type, Any]], use_any: bool = False) -> dict[str, tuple]: - """Build field definitions for a Pydantic model from query parameters.""" - from typing import Any - - from pydantic import Field - - field_definitions = {} - for param_name, param_type, default_value in query_parameters: - if use_any: - field_definitions[param_name] = (Any, ... if default_value is inspect.Parameter.empty else default_value) - continue - - base_type = param_type - extracted_field = None - if get_origin(param_type) is Annotated: - args = get_args(param_type) - if args: - base_type = args[0] - for arg in args[1:]: - if isinstance(arg, Field): - extracted_field = arg - break - - try: - if extracted_field: - field_definitions[param_name] = (base_type, extracted_field) - else: - field_definitions[param_name] = ( - base_type, - ... if default_value is inspect.Parameter.empty else default_value, - ) - except (TypeError, ValueError): - field_definitions[param_name] = (Any, ... if default_value is inspect.Parameter.empty else default_value) - - # Ensure all parameters are included - expected_params = {name for name, _, _ in query_parameters} - missing = expected_params - set(field_definitions.keys()) - if missing: - for param_name, _, default_value in query_parameters: - if param_name in missing: - field_definitions[param_name] = ( - Any, - ... if default_value is inspect.Parameter.empty else default_value, - ) - - return field_definitions - - -def _create_dynamic_request_model( - webmethod, query_parameters: list[tuple[str, type, Any]], use_any: bool = False, add_uuid: bool = False -) -> type | None: - """Create a dynamic Pydantic model for request body.""" - import uuid - - from pydantic import create_model - - try: - field_definitions = _build_field_definitions(query_parameters, use_any) - if not field_definitions: - return None - clean_route = webmethod.route.replace("/", "_").replace("{", "").replace("}", "").replace("-", "_") - model_name = f"{clean_route}_Request" - if add_uuid: - model_name = f"{model_name}_{uuid.uuid4().hex[:8]}" - - request_model = create_model(model_name, **field_definitions) - _dynamic_models.append(request_model) - return request_model - except Exception: - return None - - -def _build_signature_params( - query_parameters: list[tuple[str, type, Any]], -) -> tuple[list[inspect.Parameter], dict[str, type]]: - """Build signature parameters and annotations from query parameters.""" - signature_params = [] - param_annotations = {} - for param_name, param_type, default_value in query_parameters: - param_annotations[param_name] = param_type - signature_params.append( - inspect.Parameter( - param_name, - inspect.Parameter.POSITIONAL_OR_KEYWORD, - default=default_value if default_value is not inspect.Parameter.empty else inspect.Parameter.empty, - annotation=param_type, - ) - ) - return signature_params, param_annotations - - -def _create_fastapi_endpoint(app: FastAPI, route, webmethod, api: Api): - """Create a FastAPI endpoint from a discovered route and webmethod.""" - path = route.path - methods = route.methods - name = route.name - fastapi_path = path.replace("{", "{").replace("}", "}") - is_post_put = any(method.upper() in ["POST", "PUT", "PATCH"] for method in methods) - - request_model, response_model, query_parameters, file_form_params, streaming_response_model = ( - _find_models_for_endpoint(webmethod, api, name, is_post_put) - ) - operation_description = _extract_operation_description_from_docstring(api, name) - response_description = _extract_response_description_from_docstring(webmethod, response_model, api, name) - - # Retrieve and store extra body fields for this endpoint - func = _get_protocol_method(api, name) - extra_body_params = getattr(func, "_extra_body_params", []) if func else [] - if extra_body_params: - global _extra_body_fields - for method in methods: - key = (fastapi_path, method.upper()) - _extra_body_fields[key] = extra_body_params - - if file_form_params and is_post_put: - signature_params = list(file_form_params) - param_annotations = {param.name: param.annotation for param in file_form_params} - for param_name, param_type, default_value in query_parameters: - signature_params.append( - inspect.Parameter( - param_name, - inspect.Parameter.POSITIONAL_OR_KEYWORD, - default=default_value if default_value is not inspect.Parameter.empty else inspect.Parameter.empty, - annotation=param_type, - ) - ) - param_annotations[param_name] = param_type - - async def file_form_endpoint(): - return response_model() if response_model else {} - - if operation_description: - file_form_endpoint.__doc__ = operation_description - file_form_endpoint.__signature__ = inspect.Signature(signature_params) - file_form_endpoint.__annotations__ = param_annotations - endpoint_func = file_form_endpoint - elif request_model and response_model: - endpoint_func = _create_endpoint_with_request_model(request_model, response_model, operation_description) - elif response_model and query_parameters: - if is_post_put: - # Try creating request model with type preservation, fallback to Any, then minimal - request_model = _create_dynamic_request_model(webmethod, query_parameters, use_any=False) - if not request_model: - request_model = _create_dynamic_request_model(webmethod, query_parameters, use_any=True) - if not request_model: - request_model = _create_dynamic_request_model(webmethod, query_parameters, use_any=True, add_uuid=True) - - if request_model: - endpoint_func = _create_endpoint_with_request_model( - request_model, response_model, operation_description - ) - else: - - async def empty_endpoint() -> response_model: - return response_model() if response_model else {} - - if operation_description: - empty_endpoint.__doc__ = operation_description - endpoint_func = empty_endpoint - else: - sorted_params = sorted(query_parameters, key=lambda x: (x[2] is not inspect.Parameter.empty, x[0])) - signature_params, param_annotations = _build_signature_params(sorted_params) - - async def query_endpoint(): - return response_model() - - if operation_description: - query_endpoint.__doc__ = operation_description - query_endpoint.__signature__ = inspect.Signature(signature_params) - query_endpoint.__annotations__ = param_annotations - endpoint_func = query_endpoint - elif response_model: - - async def response_only_endpoint() -> response_model: - return response_model() - - if operation_description: - response_only_endpoint.__doc__ = operation_description - endpoint_func = response_only_endpoint - elif query_parameters: - signature_params, param_annotations = _build_signature_params(query_parameters) - - async def params_only_endpoint(): - return {} - - if operation_description: - params_only_endpoint.__doc__ = operation_description - params_only_endpoint.__signature__ = inspect.Signature(signature_params) - params_only_endpoint.__annotations__ = param_annotations - endpoint_func = params_only_endpoint - else: - # Endpoint with no parameters and no response model - # If we have a response_model from the function signature, use it even if _find_models_for_endpoint didn't find it - # This can happen if there was an exception during model finding - if response_model is None: - # Try to get response model directly from the function signature as a fallback - func = _get_protocol_method(api, name) - if func: - try: - sig = inspect.signature(func) - return_annotation = sig.return_annotation - if return_annotation != inspect.Signature.empty: - if hasattr(return_annotation, "model_json_schema"): - response_model = return_annotation - elif get_origin(return_annotation) is Annotated: - args = get_args(return_annotation) - if args and hasattr(args[0], "model_json_schema"): - response_model = args[0] - except Exception: - pass - - if response_model: - - async def no_params_endpoint() -> response_model: - return response_model() if response_model else {} - else: - - async def no_params_endpoint(): - return {} - - if operation_description: - no_params_endpoint.__doc__ = operation_description - endpoint_func = no_params_endpoint - - # Build response content with both application/json and text/event-stream if streaming - response_content = {} - if response_model: - response_content["application/json"] = {"schema": {"$ref": f"#/components/schemas/{response_model.__name__}"}} - if streaming_response_model: - # Get the schema name for the streaming model - # It might be a registered schema or a Pydantic model - streaming_schema_name = None - # Check if it's a registered schema first (before checking __name__) - # because registered schemas might be Annotated types - from llama_stack.schema_utils import _registered_schemas - - if streaming_response_model in _registered_schemas: - streaming_schema_name = _registered_schemas[streaming_response_model]["name"] - elif hasattr(streaming_response_model, "__name__"): - streaming_schema_name = streaming_response_model.__name__ - - if streaming_schema_name: - response_content["text/event-stream"] = { - "schema": {"$ref": f"#/components/schemas/{streaming_schema_name}"} - } - - # If no content types, use empty schema - if not response_content: - response_content["application/json"] = {"schema": {}} - - # Add the endpoint to the FastAPI app - is_deprecated = webmethod.deprecated or False - route_kwargs = { - "name": name, - "tags": [_get_tag_from_api(api)], - "deprecated": is_deprecated, - "responses": { - 200: { - "description": response_description, - "content": response_content, - }, - 400: {"$ref": "#/components/responses/BadRequest400"}, - 429: {"$ref": "#/components/responses/TooManyRequests429"}, - 500: {"$ref": "#/components/responses/InternalServerError500"}, - "default": {"$ref": "#/components/responses/DefaultError"}, - }, - } - - # FastAPI needs response_model parameter to properly generate OpenAPI spec - # Use the non-streaming response model if available - if response_model: - route_kwargs["response_model"] = response_model - - method_map = {"GET": app.get, "POST": app.post, "PUT": app.put, "DELETE": app.delete, "PATCH": app.patch} - for method in methods: - if handler := method_map.get(method.upper()): - handler(fastapi_path, **route_kwargs)(endpoint_func) - - -def _extract_operation_description_from_docstring(api: Api, method_name: str) -> str | None: - """Extract operation description from the actual function docstring.""" - func = _get_protocol_method(api, method_name) - if not func or not func.__doc__: - return None - - doc_lines = func.__doc__.split("\n") - description_lines = [] - metadata_markers = (":param", ":type", ":return", ":returns", ":raises", ":exception", ":yield", ":yields", ":cvar") - - for line in doc_lines: - if line.strip().startswith(metadata_markers): - break - description_lines.append(line) - - description = "\n".join(description_lines).strip() - return description if description else None - - -def _extract_response_description_from_docstring(webmethod, response_model, api: Api, method_name: str) -> str: - """Extract response description from the actual function docstring.""" - func = _get_protocol_method(api, method_name) - if not func or not func.__doc__: - return "Successful Response" - for line in func.__doc__.split("\n"): - if line.strip().startswith(":returns:"): - if desc := line.strip()[9:].strip(): - return desc - return "Successful Response" - - -def _get_tag_from_api(api: Api) -> str: - """Extract a tag name from the API enum for API grouping.""" - return api.value.replace("_", " ").title() - - -def _is_file_or_form_param(param_type: Any) -> bool: - """Check if a parameter type is annotated with File() or Form().""" - if get_origin(param_type) is Annotated: - args = get_args(param_type) - if len(args) > 1: - # Check metadata for File or Form - for metadata in args[1:]: - # Check if it's a File or Form instance - if hasattr(metadata, "__class__"): - class_name = metadata.__class__.__name__ - if class_name in ("File", "Form"): - return True - return False - - -def _is_extra_body_field(metadata_item: Any) -> bool: - """Check if a metadata item is an ExtraBodyField instance.""" - from llama_stack.schema_utils import ExtraBodyField - - return isinstance(metadata_item, ExtraBodyField) - - -def _is_async_iterator_type(type_obj: Any) -> bool: - """Check if a type is AsyncIterator or AsyncIterable.""" - from collections.abc import AsyncIterable, AsyncIterator - - origin = get_origin(type_obj) - if origin is None: - # Check if it's the class itself - return type_obj in (AsyncIterator, AsyncIterable) or ( - hasattr(type_obj, "__origin__") and type_obj.__origin__ in (AsyncIterator, AsyncIterable) - ) - return origin in (AsyncIterator, AsyncIterable) - - -def _extract_response_models_from_union(union_type: Any) -> tuple[type | None, type | None]: - """ - Extract non-streaming and streaming response models from a union type. - - Returns: - tuple: (non_streaming_model, streaming_model) - """ - non_streaming_model = None - streaming_model = None - - args = get_args(union_type) - for arg in args: - # Check if it's an AsyncIterator - if _is_async_iterator_type(arg): - # Extract the type argument from AsyncIterator[T] - iterator_args = get_args(arg) - if iterator_args: - inner_type = iterator_args[0] - # Check if the inner type is a registered schema (union type) - # or a Pydantic model - if hasattr(inner_type, "model_json_schema"): - streaming_model = inner_type - else: - # Might be a registered schema - check if it's registered - from llama_stack.schema_utils import _registered_schemas - - if inner_type in _registered_schemas: - # We'll need to look this up later, but for now store the type - streaming_model = inner_type - elif hasattr(arg, "model_json_schema"): - # Non-streaming Pydantic model - if non_streaming_model is None: - non_streaming_model = arg - - return non_streaming_model, streaming_model - - -def _find_models_for_endpoint( - webmethod, api: Api, method_name: str, is_post_put: bool = False -) -> tuple[type | None, type | None, list[tuple[str, type, Any]], list[inspect.Parameter], type | None]: - """ - Find appropriate request and response models for an endpoint by analyzing the actual function signature. - This uses the protocol function to determine the correct models dynamically. - - Args: - webmethod: The webmethod metadata - api: The API enum for looking up the function - method_name: The method name (function name) - is_post_put: Whether this is a POST, PUT, or PATCH request (GET requests should never have request bodies) - - Returns: - tuple: (request_model, response_model, query_parameters, file_form_params, streaming_response_model) - where query_parameters is a list of (name, type, default_value) tuples - and file_form_params is a list of inspect.Parameter objects for File()/Form() params - and streaming_response_model is the model for streaming responses (AsyncIterator content) - """ - try: - # Get the function from the protocol - func = _get_protocol_method(api, method_name) - if not func: - return None, None, [], [], None - - # Analyze the function signature - sig = inspect.signature(func) - - # Find request model and collect all body parameters - request_model = None - query_parameters = [] - file_form_params = [] - path_params = set() - extra_body_params = [] - - # Extract path parameters from the route - if webmethod and hasattr(webmethod, "route"): - import re - - path_matches = re.findall(r"\{([^}:]+)(?::[^}]+)?\}", webmethod.route) - path_params = set(path_matches) - - for param_name, param in sig.parameters.items(): - 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 this is a path parameter - if param_name in path_params: - # Path parameters are handled separately, skip them - continue - - # Check if it's a File() or Form() parameter - these need special handling - param_type = param.annotation - if _is_file_or_form_param(param_type): - # File() and Form() parameters must be in the function signature directly - # They cannot be part of a Pydantic model - file_form_params.append(param) - continue - - # Check for ExtraBodyField in Annotated types - is_extra_body = False - extra_body_description = None - if get_origin(param_type) is Annotated: - args = get_args(param_type) - base_type = args[0] if args else param_type - metadata = args[1:] if len(args) > 1 else [] - - # Check if any metadata item is an ExtraBodyField - for metadata_item in metadata: - if _is_extra_body_field(metadata_item): - is_extra_body = True - extra_body_description = metadata_item.description - break - - if is_extra_body: - # Store as extra body parameter - exclude from request model - extra_body_params.append((param_name, base_type, extra_body_description)) - continue - - # Check if it's a Pydantic model (for POST/PUT requests) - if hasattr(param_type, "model_json_schema"): - # Collect all body parameters including Pydantic models - # We'll decide later whether to use a single model or create a combined one - query_parameters.append((param_name, param_type, param.default)) - elif get_origin(param_type) is Annotated: - # Handle Annotated types - get the base type - args = get_args(param_type) - if args and hasattr(args[0], "model_json_schema"): - # Collect Pydantic models from Annotated types - query_parameters.append((param_name, args[0], param.default)) - else: - # Regular annotated parameter (but not File/Form, already handled above) - query_parameters.append((param_name, param_type, param.default)) - else: - # This is likely a body parameter for POST/PUT or query parameter for GET - # Store the parameter info for later use - # Preserve inspect.Parameter.empty to distinguish "no default" from "default=None" - default_value = param.default - - # Extract the base type from union types (e.g., str | None -> str) - # Also make it safe for FastAPI to avoid forward reference issues - query_parameters.append((param_name, param_type, default_value)) - - # Store extra body fields for later use in post-processing - # We'll store them when the endpoint is created, as we need the full path - # For now, attach to the function for later retrieval - if extra_body_params: - func._extra_body_params = extra_body_params # type: ignore - - # If there's exactly one body parameter and it's a Pydantic model, use it directly - # Otherwise, we'll create a combined request model from all parameters - # BUT: For GET requests, never create a request body - all parameters should be query parameters - if is_post_put and len(query_parameters) == 1: - param_name, param_type, default_value = query_parameters[0] - if hasattr(param_type, "model_json_schema"): - request_model = param_type - query_parameters = [] # Clear query_parameters so we use the single model - - # Find response model from return annotation - # Also detect streaming response models (AsyncIterator) - response_model = None - streaming_response_model = None - return_annotation = sig.return_annotation - if return_annotation != inspect.Signature.empty: - origin = get_origin(return_annotation) - if hasattr(return_annotation, "model_json_schema"): - response_model = return_annotation - elif origin is Annotated: - # Handle Annotated return types - args = get_args(return_annotation) - if args: - # Check if the first argument is a Pydantic model - if hasattr(args[0], "model_json_schema"): - response_model = args[0] - else: - # Check if the first argument is a union type - inner_origin = get_origin(args[0]) - if inner_origin is not None and ( - inner_origin is types.UnionType or inner_origin is typing.Union - ): - response_model, streaming_response_model = _extract_response_models_from_union(args[0]) - elif origin is not None and (origin is types.UnionType or origin is typing.Union): - # Handle union types - extract both non-streaming and streaming models - response_model, streaming_response_model = _extract_response_models_from_union(return_annotation) - - return request_model, response_model, query_parameters, file_form_params, streaming_response_model - - except Exception: - # If we can't analyze the function signature, return None - return None, None, [], [], None - - -def _ensure_components_schemas(openapi_schema: dict[str, Any]) -> None: - """Ensure components.schemas exists in the schema.""" - if "components" not in openapi_schema: - openapi_schema["components"] = {} - if "schemas" not in openapi_schema["components"]: - openapi_schema["components"]["schemas"] = {} - - -def _import_all_modules_in_package(package_name: str) -> list[Any]: - """ - Dynamically import all modules in a package to trigger register_schema calls. - - This walks through all modules in the package and imports them, ensuring - that any register_schema() calls at module level are executed. - - Args: - package_name: The fully qualified package name (e.g., 'llama_stack.apis') - - Returns: - List of imported module objects - """ - modules = [] - try: - package = importlib.import_module(package_name) - except ImportError: - return modules - - package_path = getattr(package, "__path__", None) - if not package_path: - return modules - - # Walk packages and modules recursively - for _, modname, ispkg in pkgutil.walk_packages(package_path, prefix=f"{package_name}."): - if not modname.startswith("_"): - try: - module = importlib.import_module(modname) - modules.append(module) - - # If this is a package, also try to import any .py files directly - # (e.g., llama_stack.apis.scoring_functions.scoring_functions) - if ispkg: - try: - # Try importing the module file with the same name as the package - # This handles cases like scoring_functions/scoring_functions.py - module_file_name = f"{modname}.{modname.split('.')[-1]}" - module_file = importlib.import_module(module_file_name) - if module_file not in modules: - modules.append(module_file) - except (ImportError, AttributeError, TypeError): - # It's okay if this fails - not all packages have a module file with the same name - pass - except (ImportError, AttributeError, TypeError): - # Skip modules that can't be imported (e.g., missing dependencies) - continue - - return modules - - -def _extract_and_fix_defs(schema: dict[str, Any], openapi_schema: dict[str, Any]) -> None: - """ - Extract $defs from a schema, move them to components/schemas, and fix references. - This handles both TypeAdapter-generated schemas and model_json_schema() schemas. - """ - if "$defs" in schema: - defs = schema.pop("$defs") - for def_name, def_schema in defs.items(): - if def_name not in openapi_schema["components"]["schemas"]: - openapi_schema["components"]["schemas"][def_name] = def_schema - # Recursively handle $defs in nested schemas - _extract_and_fix_defs(def_schema, openapi_schema) - - # Fix any references in the main schema that point to $defs - def fix_refs_in_schema(obj: Any) -> None: - if isinstance(obj, dict): - if "$ref" in obj and obj["$ref"].startswith("#/$defs/"): - obj["$ref"] = obj["$ref"].replace("#/$defs/", "#/components/schemas/") - for value in obj.values(): - fix_refs_in_schema(value) - elif isinstance(obj, list): - for item in obj: - fix_refs_in_schema(item) - - fix_refs_in_schema(schema) - - -def _ensure_json_schema_types_included(openapi_schema: dict[str, Any]) -> dict[str, Any]: - """ - Ensure all @json_schema_type decorated models and registered schemas are included in the OpenAPI schema. - This finds all models with the _llama_stack_schema_type attribute and schemas registered via register_schema. - """ - _ensure_components_schemas(openapi_schema) - - # Import TypeAdapter for handling union types and other non-model types - from pydantic import TypeAdapter - - # Dynamically import all modules in packages that might register schemas - # This ensures register_schema() calls execute and populate _registered_schemas - # Also collect the modules for later scanning of @json_schema_type decorated classes - apis_modules = _import_all_modules_in_package("llama_stack.apis") - _import_all_modules_in_package("llama_stack.core.telemetry") - - # First, handle registered schemas (union types, etc.) - from llama_stack.schema_utils import _registered_schemas - - for schema_type, registration_info in _registered_schemas.items(): - schema_name = registration_info["name"] - if schema_name not in openapi_schema["components"]["schemas"]: - try: - # Use TypeAdapter for union types and other non-model types - # Use ref_template to generate references in the format we need - adapter = TypeAdapter(schema_type) - schema = adapter.json_schema(ref_template="#/components/schemas/{model}") - - # Extract and fix $defs if present - _extract_and_fix_defs(schema, openapi_schema) - - openapi_schema["components"]["schemas"][schema_name] = schema - except Exception as e: - # Skip if we can't generate the schema - print(f"Warning: Failed to generate schema for registered type {schema_name}: {e}") - import traceback - - traceback.print_exc() - continue - - # Find all classes with the _llama_stack_schema_type attribute - # Use the modules we already imported above - 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: - # Use ref_template to ensure consistent reference format and $defs handling - schema = attr.model_json_schema(ref_template="#/components/schemas/{model}") - # Extract and fix $defs if present (model_json_schema can also generate $defs) - _extract_and_fix_defs(schema, openapi_schema) - openapi_schema["components"]["schemas"][schema_name] = schema - except Exception as e: - # Skip if we can't generate the schema - print(f"Warning: Failed to generate schema for {schema_name}: {e}") - 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(ref_template="#/components/schemas/{model}") - # Extract and fix $defs if present - _extract_and_fix_defs(schema, openapi_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 _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. - """ - _ensure_components_schemas(openapi_schema) - - # 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. - Uses the actual Error model from the codebase for consistency. - """ - if "components" not in openapi_schema: - openapi_schema["components"] = {} - if "responses" not in openapi_schema["components"]: - openapi_schema["components"]["responses"] = {} - - try: - from llama_stack.apis.datatypes import Error - - _ensure_components_schemas(openapi_schema) - if "Error" not in openapi_schema["components"]["schemas"]: - openapi_schema["components"]["schemas"]["Error"] = Error.model_json_schema() - except ImportError: - pass - - # Define standard HTTP error responses - error_responses = { - 400: { - "name": "BadRequest400", - "description": "The request was invalid or malformed", - "example": {"status": 400, "title": "Bad Request", "detail": "The request was invalid or malformed"}, - }, - 429: { - "name": "TooManyRequests429", - "description": "The client has sent too many requests in a given amount of time", - "example": { - "status": 429, - "title": "Too Many Requests", - "detail": "You have exceeded the rate limit. Please try again later.", - }, - }, - 500: { - "name": "InternalServerError500", - "description": "The server encountered an unexpected error", - "example": {"status": 500, "title": "Internal Server Error", "detail": "An unexpected error occurred"}, - }, - } - - # Add each error response to the schema - for _, error_info in error_responses.items(): - response_name = error_info["name"] - openapi_schema["components"]["responses"][response_name] = { - "description": error_info["description"], - "content": { - "application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "example": error_info["example"]} - }, - } - - # Add a default error response - openapi_schema["components"]["responses"]["DefaultError"] = { - "description": "An error occurred", - "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}, - } - - 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: exclusiveMinimum, null defaults, and add titles to unions.""" - # Convert anyOf with const values to enums across the entire schema - _convert_anyof_const_to_enum(openapi_schema) - - # Fix other schema issues and add titles to unions - if "components" in openapi_schema and "schemas" in openapi_schema["components"]: - for schema_name, schema_def in openapi_schema["components"]["schemas"].items(): - _fix_schema_recursive(schema_def) - _add_titles_to_unions(schema_def, schema_name) - 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 _get_schema_title(item: dict[str, Any]) -> str | None: - """Extract a title for a schema item to use in union variant names.""" - if "$ref" in item: - return item["$ref"].split("/")[-1] - elif "type" in item: - type_val = item["type"] - if type_val == "null": - return None - if type_val == "array" and "items" in item: - items = item["items"] - if isinstance(items, dict): - if "anyOf" in items or "oneOf" in items: - nested_union = items.get("anyOf") or items.get("oneOf") - if isinstance(nested_union, list) and len(nested_union) > 0: - nested_types = [] - for nested_item in nested_union: - if isinstance(nested_item, dict): - if "$ref" in nested_item: - nested_types.append(nested_item["$ref"].split("/")[-1]) - elif "oneOf" in nested_item: - one_of_items = nested_item.get("oneOf", []) - if one_of_items and isinstance(one_of_items[0], dict) and "$ref" in one_of_items[0]: - base_name = one_of_items[0]["$ref"].split("/")[-1].split("-")[0] - nested_types.append(f"{base_name}Union") - else: - nested_types.append("Union") - elif "type" in nested_item and nested_item["type"] != "null": - nested_types.append(nested_item["type"]) - if nested_types: - unique_nested = list(dict.fromkeys(nested_types)) - # Use more descriptive names for better code generation - if len(unique_nested) <= 3: - return f"list[{' | '.join(unique_nested)}]" - else: - # Include first few types for better naming - return f"list[{unique_nested[0]} | {unique_nested[1]} | ...]" - return "list[Union]" - elif "$ref" in items: - return f"list[{items['$ref'].split('/')[-1]}]" - elif "type" in items: - return f"list[{items['type']}]" - return "array" - return type_val - elif "title" in item: - return item["title"] - return None - - -def _add_titles_to_unions(obj: Any, parent_key: str | None = None) -> None: - """Recursively add titles to union schemas (anyOf/oneOf) to help code generators infer names.""" - if isinstance(obj, dict): - # Check if this is a union schema (anyOf or oneOf) - if "anyOf" in obj or "oneOf" in obj: - union_type = "anyOf" if "anyOf" in obj else "oneOf" - union_items = obj[union_type] - - if isinstance(union_items, list) and len(union_items) > 0: - # Skip simple nullable unions (type | null) - these don't need titles - is_simple_nullable = ( - len(union_items) == 2 - and any(isinstance(item, dict) and item.get("type") == "null" for item in union_items) - and any( - isinstance(item, dict) and "type" in item and item.get("type") != "null" for item in union_items - ) - and not any( - isinstance(item, dict) and ("$ref" in item or "anyOf" in item or "oneOf" in item) - for item in union_items - ) - ) - - if is_simple_nullable: - # Remove title from simple nullable unions if it exists - if "title" in obj: - del obj["title"] - else: - # Add titles to individual union variants that need them - for item in union_items: - if isinstance(item, dict): - # Skip null types - if item.get("type") == "null": - continue - # Add title to complex variants (arrays with unions, nested unions, etc.) - # Also add to simple types if they're part of a complex union - needs_title = ( - "items" in item - or "anyOf" in item - or "oneOf" in item - or ("$ref" in item and "title" not in item) - ) - if needs_title and "title" not in item: - variant_title = _get_schema_title(item) - if variant_title: - item["title"] = variant_title - - # Try to infer a meaningful title from the union items for the parent - titles = [] - for item in union_items: - if isinstance(item, dict): - title = _get_schema_title(item) - if title: - titles.append(title) - - if titles: - # Create a title from the union items - unique_titles = list(dict.fromkeys(titles)) # Preserve order, remove duplicates - if len(unique_titles) <= 3: - title = " | ".join(unique_titles) - else: - title = f"{unique_titles[0]} | ... ({len(unique_titles)} variants)" - # Always set the title for unions to help code generators - # This will replace generic property titles with union-specific ones - obj["title"] = title - elif "title" not in obj and parent_key: - # Use parent key as fallback only if no title exists - obj["title"] = f"{parent_key.title()}Union" - - # Recursively process all values - for key, value in obj.items(): - _add_titles_to_unions(value, key) - elif isinstance(obj, list): - for item in obj: - _add_titles_to_unions(item, parent_key) - - -def _convert_anyof_const_to_enum(obj: Any) -> None: - """Convert anyOf with multiple const string values to a proper enum.""" - if isinstance(obj, dict): - if "anyOf" in obj: - any_of = obj["anyOf"] - if isinstance(any_of, list): - # Check if all items are const string values - const_values = [] - has_null = False - can_convert = True - for item in any_of: - if isinstance(item, dict): - if item.get("type") == "null": - has_null = True - elif item.get("type") == "string" and "const" in item: - const_values.append(item["const"]) - else: - # Not a simple const pattern, skip conversion for this anyOf - can_convert = False - break - - # If we have const values and they're all strings, convert to enum - if can_convert and const_values and len(const_values) == len(any_of) - (1 if has_null else 0): - # Convert to enum - obj["type"] = "string" - obj["enum"] = const_values - # Preserve default if present, otherwise try to get from first const item - if "default" not in obj: - for item in any_of: - if isinstance(item, dict) and "const" in item: - obj["default"] = item["const"] - break - # Remove anyOf - del obj["anyOf"] - # Handle nullable - if has_null: - obj["nullable"] = True - # Remove title if it's just "string" - if obj.get("title") == "string": - del obj["title"] - - # Recursively process all values - for value in obj.values(): - _convert_anyof_const_to_enum(value) - elif isinstance(obj, list): - for item in obj: - _convert_anyof_const_to_enum(item) - - -def _fix_schema_recursive(obj: Any) -> None: - """Recursively fix schema issues: exclusiveMinimum and null defaults.""" - if isinstance(obj, dict): - if "exclusiveMinimum" in obj and isinstance(obj["exclusiveMinimum"], int | float): - obj["minimum"] = obj.pop("exclusiveMinimum") - if "default" in obj and obj["default"] is None: - del obj["default"] - obj["nullable"] = True - for value in obj.values(): - _fix_schema_recursive(value) - elif isinstance(obj, list): - for item in obj: - _fix_schema_recursive(item) - - -def _clean_description(description: str) -> str: - """Remove :param, :type, :returns, and other docstring metadata from description.""" - if not description: - return description - - lines = description.split("\n") - cleaned_lines = [] - skip_until_empty = False - - for line in lines: - stripped = line.strip() - # Skip lines that start with docstring metadata markers - if stripped.startswith( - (":param", ":type", ":return", ":returns", ":raises", ":exception", ":yield", ":yields", ":cvar") - ): - skip_until_empty = True - continue - # If we're skipping and hit an empty line, resume normal processing - if skip_until_empty: - if not stripped: - skip_until_empty = False - continue - # Include the line if we're not skipping - cleaned_lines.append(line) - - # Join and strip trailing whitespace - result = "\n".join(cleaned_lines).strip() - return result - - -def _clean_schema_descriptions(openapi_schema: dict[str, Any]) -> dict[str, Any]: - """Clean descriptions in schema definitions by removing docstring metadata.""" - if "components" not in openapi_schema or "schemas" not in openapi_schema["components"]: - return openapi_schema - - schemas = openapi_schema["components"]["schemas"] - for schema_def in schemas.values(): - if isinstance(schema_def, dict) and "description" in schema_def and isinstance(schema_def["description"], str): - schema_def["description"] = _clean_description(schema_def["description"]) - - return openapi_schema - - -def _add_extra_body_params_extension(openapi_schema: dict[str, Any]) -> dict[str, Any]: - """ - Add x-llama-stack-extra-body-params extension to requestBody for endpoints with ExtraBodyField parameters. - """ - if "paths" not in openapi_schema: - return openapi_schema - - global _extra_body_fields - - from pydantic import TypeAdapter - - for path, path_item in openapi_schema["paths"].items(): - if not isinstance(path_item, dict): - continue - - for method in ["get", "post", "put", "delete", "patch", "head", "options"]: - if method not in path_item: - continue - - operation = path_item[method] - if not isinstance(operation, dict): - continue - - # Check if we have extra body fields for this path/method - key = (path, method.upper()) - if key not in _extra_body_fields: - continue - - extra_body_params = _extra_body_fields[key] - - # Ensure requestBody exists - if "requestBody" not in operation: - continue - - request_body = operation["requestBody"] - if not isinstance(request_body, dict): - continue - - # Get the schema from requestBody - content = request_body.get("content", {}) - json_content = content.get("application/json", {}) - schema_ref = json_content.get("schema", {}) - - # Remove extra body fields from the schema if they exist as properties - # Handle both $ref schemas and inline schemas - if isinstance(schema_ref, dict): - if "$ref" in schema_ref: - # Schema is a reference - remove from the referenced schema - ref_path = schema_ref["$ref"] - if ref_path.startswith("#/components/schemas/"): - schema_name = ref_path.split("/")[-1] - if "components" in openapi_schema and "schemas" in openapi_schema["components"]: - schema_def = openapi_schema["components"]["schemas"].get(schema_name) - if isinstance(schema_def, dict) and "properties" in schema_def: - for param_name, _, _ in extra_body_params: - if param_name in schema_def["properties"]: - del schema_def["properties"][param_name] - # Also remove from required if present - if "required" in schema_def and param_name in schema_def["required"]: - schema_def["required"].remove(param_name) - elif "properties" in schema_ref: - # Schema is inline - remove directly from it - for param_name, _, _ in extra_body_params: - if param_name in schema_ref["properties"]: - del schema_ref["properties"][param_name] - # Also remove from required if present - if "required" in schema_ref and param_name in schema_ref["required"]: - schema_ref["required"].remove(param_name) - - # Build the extra body params schema - extra_params_schema = {} - for param_name, param_type, description in extra_body_params: - try: - # Generate JSON schema for the parameter type - adapter = TypeAdapter(param_type) - param_schema = adapter.json_schema(ref_template="#/components/schemas/{model}") - - # Add description if provided - if description: - param_schema["description"] = description - - extra_params_schema[param_name] = param_schema - except Exception: - # If we can't generate schema, skip this parameter - continue - - if extra_params_schema: - # Add the extension to requestBody - if "x-llama-stack-extra-body-params" not in request_body: - request_body["x-llama-stack-extra-body-params"] = extra_params_schema - - return openapi_schema - - -def _remove_query_params_from_body_endpoints(openapi_schema: dict[str, Any]) -> dict[str, Any]: - """ - Remove query parameters from POST/PUT/PATCH endpoints that have a request body. - FastAPI sometimes infers parameters as query params even when they should be in the request body. - """ - if "paths" not in openapi_schema: - return openapi_schema - - body_methods = {"post", "put", "patch"} - - for _path, path_item in openapi_schema["paths"].items(): - if not isinstance(path_item, dict): - continue - - for method in body_methods: - if method not in path_item: - continue - - operation = path_item[method] - if not isinstance(operation, dict): - continue - - # Check if this operation has a request body - has_request_body = "requestBody" in operation and operation["requestBody"] - - if has_request_body: - # Remove all query parameters (parameters with "in": "query") - if "parameters" in operation: - # Filter out query parameters, keep path and header parameters - operation["parameters"] = [ - param - for param in operation["parameters"] - if isinstance(param, dict) and param.get("in") != "query" - ] - # Remove the parameters key if it's now empty - if not operation["parameters"]: - del operation["parameters"] - - return openapi_schema - - -def _remove_request_bodies_from_get_endpoints(openapi_schema: dict[str, Any]) -> dict[str, Any]: - """ - Remove request bodies from GET endpoints and convert their parameters to query parameters. - - GET requests should never have request bodies - all parameters should be query parameters. - This function removes any requestBody that FastAPI may have incorrectly added to GET endpoints - and converts any parameters in the requestBody to query parameters. - """ - if "paths" not in openapi_schema: - return openapi_schema - - for _path, path_item in openapi_schema["paths"].items(): - if not isinstance(path_item, dict): - continue - - # Check GET method specifically - if "get" in path_item: - operation = path_item["get"] - if not isinstance(operation, dict): - continue - - if "requestBody" in operation: - request_body = operation["requestBody"] - # Extract parameters from requestBody and convert to query parameters - if isinstance(request_body, dict) and "content" in request_body: - content = request_body.get("content", {}) - json_content = content.get("application/json", {}) - schema = json_content.get("schema", {}) - - if "parameters" not in operation: - operation["parameters"] = [] - elif not isinstance(operation["parameters"], list): - operation["parameters"] = [] - - # If the schema has properties, convert each to a query parameter - if isinstance(schema, dict) and "properties" in schema: - for param_name, param_schema in schema["properties"].items(): - # Check if this parameter is already in the parameters list - existing_param = None - for existing in operation["parameters"]: - if isinstance(existing, dict) and existing.get("name") == param_name: - existing_param = existing - break - - if not existing_param: - # Create a new query parameter from the requestBody property - required = param_name in schema.get("required", []) - query_param = { - "name": param_name, - "in": "query", - "required": required, - "schema": param_schema, - } - # Add description if present - if "description" in param_schema: - query_param["description"] = param_schema["description"] - operation["parameters"].append(query_param) - elif isinstance(schema, dict): - # Handle direct schema (not a model with properties) - # Try to infer parameter name from schema title - param_name = schema.get("title", "").lower().replace(" ", "_") - if param_name: - # Check if this parameter is already in the parameters list - existing_param = None - for existing in operation["parameters"]: - if isinstance(existing, dict) and existing.get("name") == param_name: - existing_param = existing - break - - if not existing_param: - # Create a new query parameter from the requestBody schema - query_param = { - "name": param_name, - "in": "query", - "required": False, # Default to optional for GET requests - "schema": schema, - } - # Add description if present - if "description" in schema: - query_param["description"] = schema["description"] - operation["parameters"].append(query_param) - - # Remove request body from GET endpoint - del operation["requestBody"] - - return openapi_schema - - -def _extract_duplicate_union_types(openapi_schema: dict[str, Any]) -> dict[str, Any]: - """ - Extract duplicate union types to shared schema references. - - Stainless generates type names from union types based on their context, which can cause - duplicate names when the same union appears in different places. This function extracts - these duplicate unions to shared schema definitions and replaces inline definitions with - references to them. - - According to Stainless docs, when duplicate types are detected, they should be extracted - to the same ref and declared as a model. This ensures Stainless generates consistent - type names regardless of where the union is referenced. - - Fixes: https://www.stainless.com/docs/reference/diagnostics#Python/DuplicateDeclaration - """ - import copy - - if "components" not in openapi_schema or "schemas" not in openapi_schema["components"]: - return openapi_schema - - schemas = openapi_schema["components"]["schemas"] - - # Extract the Output union type (used in OpenAIResponseObjectWithInput-Output and ListOpenAIResponseInputItem) - output_union_schema_name = "OpenAIResponseMessageOutputUnion" - output_union_title = None - - # Get the union type from OpenAIResponseObjectWithInput-Output.input.items.anyOf - if "OpenAIResponseObjectWithInput-Output" in schemas: - schema = schemas["OpenAIResponseObjectWithInput-Output"] - if isinstance(schema, dict) and "properties" in schema: - input_prop = schema["properties"].get("input") - if isinstance(input_prop, dict) and "items" in input_prop: - items = input_prop["items"] - if isinstance(items, dict) and "anyOf" in items: - # Extract the union schema with deep copy - output_union_schema = copy.deepcopy(items["anyOf"]) - output_union_title = items.get("title", "OpenAIResponseMessageOutputUnion") - - # Collect all refs from the oneOf to detect duplicates - refs_in_oneof = set() - for item in output_union_schema: - if isinstance(item, dict) and "oneOf" in item: - oneof = item["oneOf"] - if isinstance(oneof, list): - for variant in oneof: - if isinstance(variant, dict) and "$ref" in variant: - refs_in_oneof.add(variant["$ref"]) - item["x-stainless-naming"] = "OpenAIResponseMessageOutputOneOf" - - # Remove duplicate refs from anyOf that are already in oneOf - deduplicated_schema = [] - for item in output_union_schema: - if isinstance(item, dict) and "$ref" in item: - if item["$ref"] not in refs_in_oneof: - deduplicated_schema.append(item) - else: - deduplicated_schema.append(item) - output_union_schema = deduplicated_schema - - # Create the shared schema with x-stainless-naming to ensure consistent naming - if output_union_schema_name not in schemas: - schemas[output_union_schema_name] = { - "anyOf": output_union_schema, - "title": output_union_title, - "x-stainless-naming": output_union_schema_name, - } - # Replace with reference - input_prop["items"] = {"$ref": f"#/components/schemas/{output_union_schema_name}"} - - # Replace the same union in ListOpenAIResponseInputItem.data.items.anyOf - if "ListOpenAIResponseInputItem" in schemas and output_union_schema_name in schemas: - schema = schemas["ListOpenAIResponseInputItem"] - if isinstance(schema, dict) and "properties" in schema: - data_prop = schema["properties"].get("data") - if isinstance(data_prop, dict) and "items" in data_prop: - items = data_prop["items"] - if isinstance(items, dict) and "anyOf" in items: - # Replace with reference - data_prop["items"] = {"$ref": f"#/components/schemas/{output_union_schema_name}"} - - # Extract the Input union type (used in _responses_Request.input.anyOf[1].items.anyOf) - input_union_schema_name = "OpenAIResponseMessageInputUnion" - - if "_responses_Request" in schemas: - schema = schemas["_responses_Request"] - if isinstance(schema, dict) and "properties" in schema: - input_prop = schema["properties"].get("input") - if isinstance(input_prop, dict) and "anyOf" in input_prop: - any_of = input_prop["anyOf"] - if isinstance(any_of, list) and len(any_of) > 1: - # Check the second item (index 1) which should be the array type - second_item = any_of[1] - if isinstance(second_item, dict) and "items" in second_item: - items = second_item["items"] - if isinstance(items, dict) and "anyOf" in items: - # Extract the union schema with deep copy - input_union_schema = copy.deepcopy(items["anyOf"]) - input_union_title = items.get("title", "OpenAIResponseMessageInputUnion") - - # Collect all refs from the oneOf to detect duplicates - refs_in_oneof = set() - for item in input_union_schema: - if isinstance(item, dict) and "oneOf" in item: - oneof = item["oneOf"] - if isinstance(oneof, list): - for variant in oneof: - if isinstance(variant, dict) and "$ref" in variant: - refs_in_oneof.add(variant["$ref"]) - item["x-stainless-naming"] = "OpenAIResponseMessageInputOneOf" - - # Remove duplicate refs from anyOf that are already in oneOf - deduplicated_schema = [] - for item in input_union_schema: - if isinstance(item, dict) and "$ref" in item: - if item["$ref"] not in refs_in_oneof: - deduplicated_schema.append(item) - else: - deduplicated_schema.append(item) - input_union_schema = deduplicated_schema - - # Create the shared schema with x-stainless-naming to ensure consistent naming - if input_union_schema_name not in schemas: - schemas[input_union_schema_name] = { - "anyOf": input_union_schema, - "title": input_union_title, - "x-stainless-naming": input_union_schema_name, - } - # Replace with reference - second_item["items"] = {"$ref": f"#/components/schemas/{input_union_schema_name}"} - - return openapi_schema - - -def _convert_multiline_strings_to_literal(obj: Any) -> Any: - """Recursively convert multi-line strings to LiteralScalarString for YAML block scalar formatting.""" - try: - from ruamel.yaml.scalarstring import LiteralScalarString - - if isinstance(obj, str) and "\n" in obj: - return LiteralScalarString(obj) - elif isinstance(obj, dict): - return {key: _convert_multiline_strings_to_literal(value) for key, value in obj.items()} - elif isinstance(obj, list): - return [_convert_multiline_strings_to_literal(item) for item in obj] - else: - return obj - except ImportError: - return obj - - -def _write_yaml_file(file_path: Path, schema: dict[str, Any]) -> None: - """Write schema to YAML file using ruamel.yaml if available, otherwise standard 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 - yaml_writer.allow_unicode = True - schema = _convert_multiline_strings_to_literal(schema) - with open(file_path, "w") as f: - yaml_writer.dump(schema, f) - except ImportError: - with open(file_path, "w") as f: - yaml.dump(schema, f, default_flow_style=False, sort_keys=False) - - -def _get_explicit_schema_names(openapi_schema: dict[str, Any]) -> set[str]: - """Get all registered schema names and @json_schema_type decorated model names.""" - from llama_stack.schema_utils import _registered_schemas - - registered_schema_names = {info["name"] for info in _registered_schemas.values()} - json_schema_type_names = _get_all_json_schema_type_names() - return registered_schema_names | json_schema_type_names - - -def _add_transitive_references( - referenced_schemas: set[str], all_schemas: dict[str, Any], initial_schemas: set[str] | None = None -) -> set[str]: - """Add transitive references for given schemas.""" - if initial_schemas: - referenced_schemas.update(initial_schemas) - additional_schemas = set() - for schema_name in initial_schemas: - if schema_name in all_schemas: - additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) - else: - additional_schemas = set() - for schema_name in referenced_schemas: - if schema_name in all_schemas: - additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) - - while additional_schemas: - new_schemas = additional_schemas - referenced_schemas - if not new_schemas: - break - referenced_schemas.update(new_schemas) - additional_schemas = set() - for schema_name in new_schemas: - if schema_name in all_schemas: - additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) - - return referenced_schemas - - -def _filter_schemas_by_references( - filtered_schema: dict[str, Any], filtered_paths: dict[str, Any], openapi_schema: dict[str, Any] -) -> dict[str, Any]: - """Filter schemas to only include ones referenced by filtered paths and explicit schemas.""" - if "components" not in filtered_schema or "schemas" not in filtered_schema["components"]: - return filtered_schema - - referenced_schemas = _find_schemas_referenced_by_paths(filtered_paths, openapi_schema) - all_schemas = openapi_schema.get("components", {}).get("schemas", {}) - explicit_schema_names = _get_explicit_schema_names(openapi_schema) - referenced_schemas = _add_transitive_references(referenced_schemas, all_schemas, explicit_schema_names) - - filtered_schemas = { - name: schema for name, schema in filtered_schema["components"]["schemas"].items() if name in referenced_schemas - } - filtered_schema["components"]["schemas"] = filtered_schemas - - 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"] - - return filtered_schema - - -def _filter_schema_by_version( - openapi_schema: dict[str, Any], stable_only: bool = True, exclude_deprecated: bool = True -) -> dict[str, Any]: - """ - Filter OpenAPI schema by API version. - - Args: - openapi_schema: The full OpenAPI schema - stable_only: If True, return only /v1/ paths (stable). If False, return only /v1alpha/ and /v1beta/ paths (experimental). - exclude_deprecated: If True, exclude deprecated endpoints from the result. - - Returns: - Filtered OpenAPI schema - """ - filtered_schema = openapi_schema.copy() - - if "paths" not in filtered_schema: - return filtered_schema - - filtered_paths = {} - for path, path_item in filtered_schema["paths"].items(): - if not isinstance(path_item, dict): - continue - - # Filter at operation level, not path level - # This allows paths with both deprecated and non-deprecated operations - filtered_path_item = {} - for method in ["get", "post", "put", "delete", "patch", "head", "options"]: - if method not in path_item: - continue - operation = path_item[method] - if not isinstance(operation, dict): - continue - - # Skip deprecated operations if exclude_deprecated is True - if exclude_deprecated and operation.get("deprecated", False): - continue - - filtered_path_item[method] = operation - - # Only include path if it has at least one operation after filtering - if filtered_path_item: - # Check if path matches version filter - if (stable_only and _is_stable_path(path)) or (not stable_only and _is_experimental_path(path)): - filtered_paths[path] = filtered_path_item - - filtered_schema["paths"] = filtered_paths - return _filter_schemas_by_references(filtered_schema, filtered_paths, openapi_schema) - - -def _find_schemas_referenced_by_paths(filtered_paths: dict[str, Any], openapi_schema: dict[str, Any]) -> set[str]: - """ - Find all schemas that are referenced by the filtered paths. - This recursively traverses the path definitions to find all $ref references. - """ - referenced_schemas = set() - - # Traverse all filtered paths - for _, path_item in filtered_paths.items(): - if not isinstance(path_item, dict): - continue - - # Check each HTTP method in the path - for method in ["get", "post", "put", "delete", "patch", "head", "options"]: - if method in path_item: - operation = path_item[method] - if isinstance(operation, dict): - # Find all schema references in this operation - referenced_schemas.update(_find_schema_refs_in_object(operation)) - - # Also check the responses section for schema references - if "components" in openapi_schema and "responses" in openapi_schema["components"]: - referenced_schemas.update(_find_schema_refs_in_object(openapi_schema["components"]["responses"])) - - # Also include schemas that are referenced by other schemas (transitive references) - # This ensures we include all dependencies - all_schemas = openapi_schema.get("components", {}).get("schemas", {}) - additional_schemas = set() - - for schema_name in referenced_schemas: - if schema_name in all_schemas: - additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) - - # Keep adding transitive references until no new ones are found - while additional_schemas: - new_schemas = additional_schemas - referenced_schemas - if not new_schemas: - break - referenced_schemas.update(new_schemas) - additional_schemas = set() - for schema_name in new_schemas: - if schema_name in all_schemas: - additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) - - return referenced_schemas - - -def _find_schema_refs_in_object(obj: Any) -> set[str]: - """ - Recursively find all schema references ($ref) in an object. - """ - refs = set() - - if isinstance(obj, dict): - for key, value in obj.items(): - if key == "$ref" and isinstance(value, str) and value.startswith("#/components/schemas/"): - schema_name = value.split("/")[-1] - refs.add(schema_name) - else: - refs.update(_find_schema_refs_in_object(value)) - elif isinstance(obj, list): - for item in obj: - refs.update(_find_schema_refs_in_object(item)) - - return refs - - -def _get_all_json_schema_type_names() -> set[str]: - """ - Get all schema names from @json_schema_type decorated models. - This ensures they are included in filtered schemas even if not directly referenced by paths. - """ - schema_names = set() - apis_modules = _import_all_modules_in_package("llama_stack.apis") - 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_names.add(attr.__name__) - except (AttributeError, TypeError): - continue - return schema_names - - -def _is_path_deprecated(path_item: dict[str, Any]) -> bool: - """Check if a path item has any deprecated operations.""" - if not isinstance(path_item, dict): - return False - for method in ["get", "post", "put", "delete", "patch", "head", "options"]: - if isinstance(path_item.get(method), dict) and path_item[method].get("deprecated", False): - return True - return False - - -def _path_starts_with_version(path: str, version: str) -> bool: - """Check if a path starts with a specific API version prefix.""" - return path.startswith(f"/{version}/") - - -def _is_stable_path(path: str) -> bool: - """Check if a path is a stable v1 path (not v1alpha or v1beta).""" - return ( - _path_starts_with_version(path, LLAMA_STACK_API_V1) - and not _path_starts_with_version(path, LLAMA_STACK_API_V1ALPHA) - and not _path_starts_with_version(path, LLAMA_STACK_API_V1BETA) - ) - - -def _is_experimental_path(path: str) -> bool: - """Check if a path is an experimental path (v1alpha or v1beta).""" - return _path_starts_with_version(path, LLAMA_STACK_API_V1ALPHA) or _path_starts_with_version( - path, LLAMA_STACK_API_V1BETA - ) - - -def _filter_deprecated_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: - """ - Filter OpenAPI schema to include only deprecated endpoints. - Includes all deprecated endpoints regardless of version (v1, v1alpha, v1beta). - """ - filtered_schema = openapi_schema.copy() - - if "paths" not in filtered_schema: - return filtered_schema - - # Filter paths to only include deprecated ones - filtered_paths = {} - for path, path_item in filtered_schema["paths"].items(): - if _is_path_deprecated(path_item): - filtered_paths[path] = path_item - - filtered_schema["paths"] = filtered_paths - - 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(): - if not isinstance(path_item, dict): - continue - - # Filter at operation level, not path level - # This allows paths with both deprecated and non-deprecated operations - filtered_path_item = {} - for method in ["get", "post", "put", "delete", "patch", "head", "options"]: - if method not in path_item: - continue - operation = path_item[method] - if not isinstance(operation, dict): - continue - - # Skip deprecated operations - if operation.get("deprecated", False): - continue - - filtered_path_item[method] = operation - - # Only include path if it has at least one operation after filtering - if filtered_path_item: - # Check if path matches version filter (stable or experimental) - if _is_stable_path(path) or _is_experimental_path(path): - filtered_paths[path] = filtered_path_item - - filtered_schema["paths"] = filtered_paths - - return _filter_schemas_by_references(filtered_schema, filtered_paths, openapi_schema) - - -def generate_openapi_spec(output_dir: str) -> dict[str, Any]: - """ - Generate OpenAPI specification using FastAPI's built-in method. - - Args: - output_dir: Directory to save the generated files - - Returns: - The generated OpenAPI specification as a dictionary - """ - # Create the FastAPI app - app = create_llama_stack_app() - - # Generate the OpenAPI schema - openapi_schema = get_openapi( - title=app.title, - version=app.version, - description=app.description, - routes=app.routes, - servers=app.servers, - ) - - # Set OpenAPI version to 3.1.0 - openapi_schema["openapi"] = "3.1.0" - - # 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) - - # 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) - - # Clean descriptions in schema definitions by removing docstring metadata - openapi_schema = _clean_schema_descriptions(openapi_schema) - - # Remove query parameters from POST/PUT/PATCH endpoints that have a request body - # FastAPI sometimes infers parameters as query params even when they should be in the request body - openapi_schema = _remove_query_params_from_body_endpoints(openapi_schema) - - # Add x-llama-stack-extra-body-params extension for ExtraBodyField parameters - openapi_schema = _add_extra_body_params_extension(openapi_schema) - - # Remove request bodies from GET endpoints (GET requests should never have request bodies) - # This must run AFTER _add_extra_body_params_extension to ensure any request bodies - # that FastAPI incorrectly added to GET endpoints are removed - openapi_schema = _remove_request_bodies_from_get_endpoints(openapi_schema) - - # Extract duplicate union types to shared schema references - openapi_schema = _extract_duplicate_union_types(openapi_schema) - - # 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 - - stable_schema = _filter_schema_by_version(copy.deepcopy(openapi_schema), stable_only=True, exclude_deprecated=True) - experimental_schema = _filter_schema_by_version( - 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)) - - # Apply duplicate union extraction to combined schema (used by Stainless) - combined_schema = _extract_duplicate_union_types(combined_schema) - - base_description = ( - "This is the specification of the Llama Stack that provides\n" - " a set of endpoints and their corresponding interfaces that are\n" - " tailored to\n" - " best leverage Llama Models." - ) - - schema_configs = [ - ( - stable_schema, - "Llama Stack Specification", - "**✅ STABLE**: Production-ready APIs with backward compatibility guarantees.", - ), - ( - experimental_schema, - "Llama Stack Specification - Experimental APIs", - "**🧪 EXPERIMENTAL**: Pre-release APIs (v1alpha, v1beta) that may change before\n becoming stable.", - ), - ( - deprecated_schema, - "Llama Stack Specification - Deprecated APIs", - "**⚠️ DEPRECATED**: Legacy APIs that may be removed in future versions. Use for\n migration reference only.", - ), - ( - combined_schema, - "Llama Stack Specification - Stable & Experimental APIs", - "**🔗 COMBINED**: This specification includes both stable production-ready APIs\n and experimental pre-release APIs. Use stable APIs for production deployments\n and experimental APIs for testing new features.", - ), - ] - - for schema, title, description_suffix in schema_configs: - if "info" not in schema: - schema["info"] = {} - schema["info"].update( - { - "title": title, - "version": "v1", - "description": f"{base_description}\n\n {description_suffix}", - } - ) - - schemas_to_validate = [ - (stable_schema, "Stable schema"), - (experimental_schema, "Experimental schema"), - (deprecated_schema, "Deprecated schema"), - (combined_schema, "Combined (stainless) schema"), - ] - - for schema, _ in schemas_to_validate: - _fix_schema_issues(schema) - - print("\n🔍 Validating generated schemas...") - failed_schemas = [name for schema, name in schemas_to_validate if not validate_openapi_schema(schema, name)] - if failed_schemas: - raise ValueError(f"Invalid schemas: {', '.join(failed_schemas)}") - - # Ensure output directory exists - output_path = Path(output_dir) - output_path.mkdir(parents=True, exist_ok=True) - - # Save the stable specification - yaml_path = output_path / "llama-stack-spec.yaml" - _write_yaml_file(yaml_path, stable_schema) - # 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: - # Use string replacement to fix references directly - if "#/$defs/" in yaml_content: - yaml_content = yaml_content.replace("#/$defs/", "#/components/schemas/") - - # Parse the YAML content - yaml_data = yaml.safe_load(yaml_content) - - # Move $defs to components/schemas if it exists - if "$defs" in yaml_data: - 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"] - - # Write the modified YAML back - _write_yaml_file(yaml_path, yaml_data) - - print(f"✅ Generated YAML (stable): {yaml_path}") - - experimental_yaml_path = output_path / "experimental-llama-stack-spec.yaml" - _write_yaml_file(experimental_yaml_path, experimental_schema) - print(f"✅ Generated YAML (experimental): {experimental_yaml_path}") - - deprecated_yaml_path = output_path / "deprecated-llama-stack-spec.yaml" - _write_yaml_file(deprecated_yaml_path, deprecated_schema) - print(f"✅ Generated YAML (deprecated): {deprecated_yaml_path}") - - # Generate combined (stainless) spec - stainless_yaml_path = output_path / "stainless-llama-stack-spec.yaml" - _write_yaml_file(stainless_yaml_path, combined_schema) - print(f"✅ Generated YAML (stainless/combined): {stainless_yaml_path}") - - return stable_schema - - -def main(): - """Main entry point for the FastAPI OpenAPI generator.""" - import argparse - - parser = argparse.ArgumentParser(description="Generate OpenAPI specification using FastAPI") - parser.add_argument("output_dir", help="Output directory for generated files") - - args = parser.parse_args() - - print("🚀 Generating OpenAPI specification using FastAPI...") - print(f"📁 Output directory: {args.output_dir}") - - try: - openapi_schema = generate_openapi_spec(output_dir=args.output_dir) - - print("\n✅ OpenAPI specification generated successfully!") - print(f"📊 Schemas: {len(openapi_schema.get('components', {}).get('schemas', {}))}") - print(f"🛣️ Paths: {len(openapi_schema.get('paths', {}))}") - operation_count = sum( - 1 - for path_info in openapi_schema.get("paths", {}).values() - for method in ["get", "post", "put", "delete", "patch"] - if method in path_info - ) - print(f"🔧 Operations: {operation_count}") - - except Exception as e: - print(f"❌ Error generating OpenAPI specification: {e}") - raise - - -if __name__ == "__main__": - main() diff --git a/scripts/openapi_generator/__init__.py b/scripts/openapi_generator/__init__.py new file mode 100644 index 0000000000..7f6aaa1d10 --- /dev/null +++ b/scripts/openapi_generator/__init__.py @@ -0,0 +1,16 @@ +# 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 generator module for Llama Stack. + +This module provides functionality to generate OpenAPI specifications +from FastAPI applications. +""" + +from .main import generate_openapi_spec, main + +__all__ = ["generate_openapi_spec", "main"] diff --git a/scripts/openapi_generator/__main__.py b/scripts/openapi_generator/__main__.py new file mode 100644 index 0000000000..d857e5e7e4 --- /dev/null +++ b/scripts/openapi_generator/__main__.py @@ -0,0 +1,14 @@ +# 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. + +""" +Entry point for running the openapi_generator module as a package. +""" + +from .main import main + +if __name__ == "__main__": + main() diff --git a/scripts/openapi_generator/app.py b/scripts/openapi_generator/app.py new file mode 100644 index 0000000000..2f3314b94a --- /dev/null +++ b/scripts/openapi_generator/app.py @@ -0,0 +1,91 @@ +# 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. + +""" +FastAPI app creation for OpenAPI generation. +""" + +import inspect +from typing import Any + +from fastapi import FastAPI + +from llama_stack.apis.datatypes import Api +from llama_stack.core.resolver import api_protocol_map + +from .state import _protocol_methods_cache + + +def _get_protocol_method(api: Api, method_name: str) -> Any | None: + """ + Get a protocol method function by API and method name. + Uses caching to avoid repeated lookups. + + Args: + api: The API enum + method_name: The method name (function name) + + Returns: + The function object, or None if not found + """ + global _protocol_methods_cache + + if _protocol_methods_cache is None: + _protocol_methods_cache = {} + protocols = api_protocol_map() + from llama_stack.apis.tools import SpecialToolGroup, ToolRuntime + + toolgroup_protocols = { + SpecialToolGroup.rag_tool: ToolRuntime, + } + + for api_key, protocol in protocols.items(): + method_map: dict[str, Any] = {} + protocol_methods = inspect.getmembers(protocol, predicate=inspect.isfunction) + for name, method in protocol_methods: + method_map[name] = method + + # Handle tool_runtime special case + if api_key == Api.tool_runtime: + for tool_group, sub_protocol in toolgroup_protocols.items(): + sub_protocol_methods = inspect.getmembers(sub_protocol, predicate=inspect.isfunction) + for name, method in sub_protocol_methods: + if hasattr(method, "__webmethod__"): + method_map[f"{tool_group.value}.{name}"] = method + + _protocol_methods_cache[api_key] = method_map + + return _protocol_methods_cache.get(api, {}).get(method_name) + + +def create_llama_stack_app() -> FastAPI: + """ + Create a FastAPI app that represents the Llama Stack API. + This uses the existing route discovery system to automatically find all routes. + """ + app = FastAPI( + title="Llama Stack API", + description="A comprehensive API for building and deploying AI applications", + version="1.0.0", + servers=[ + {"url": "http://any-hosted-llama-stack.com"}, + ], + ) + + # Get all API routes + from llama_stack.core.server.routes import get_all_api_routes + + api_routes = get_all_api_routes() + + # Create FastAPI routes from the discovered routes + from . import endpoints + + for api, routes in api_routes.items(): + for route, webmethod in routes: + # Convert the route to a FastAPI endpoint + endpoints._create_fastapi_endpoint(app, route, webmethod, api) + + return app diff --git a/scripts/openapi_generator/endpoints.py b/scripts/openapi_generator/endpoints.py new file mode 100644 index 0000000000..2ccf073e8c --- /dev/null +++ b/scripts/openapi_generator/endpoints.py @@ -0,0 +1,586 @@ +# 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. + +""" +Endpoint generation logic for FastAPI OpenAPI generation. +""" + +import inspect +import re +import types +import typing +import uuid +from typing import Annotated, Any, get_args, get_origin + +from fastapi import FastAPI +from pydantic import Field, create_model + +from llama_stack.apis.datatypes import Api + +from . import app as app_module +from .state import _dynamic_models, _extra_body_fields + + +def _extract_path_parameters(path: str) -> list[dict[str, Any]]: + """Extract path parameters from a URL path and return them as OpenAPI parameter definitions.""" + matches = re.findall(r"\{([^}:]+)(?::[^}]+)?\}", path) + return [ + { + "name": param_name, + "in": "path", + "required": True, + "schema": {"type": "string"}, + "description": f"Path parameter: {param_name}", + } + for param_name in matches + ] + + +def _create_endpoint_with_request_model( + request_model: type, response_model: type | None, operation_description: str | None +): + """Create an endpoint function with a request body model.""" + + async def endpoint(request: request_model) -> response_model: + return response_model() if response_model else {} + + if operation_description: + endpoint.__doc__ = operation_description + return endpoint + + +def _build_field_definitions(query_parameters: list[tuple[str, type, Any]], use_any: bool = False) -> dict[str, tuple]: + """Build field definitions for a Pydantic model from query parameters.""" + from typing import Any + + field_definitions = {} + for param_name, param_type, default_value in query_parameters: + if use_any: + field_definitions[param_name] = (Any, ... if default_value is inspect.Parameter.empty else default_value) + continue + + base_type = param_type + extracted_field = None + if get_origin(param_type) is Annotated: + args = get_args(param_type) + if args: + base_type = args[0] + for arg in args[1:]: + if isinstance(arg, Field): + extracted_field = arg + break + + try: + if extracted_field: + field_definitions[param_name] = (base_type, extracted_field) + else: + field_definitions[param_name] = ( + base_type, + ... if default_value is inspect.Parameter.empty else default_value, + ) + except (TypeError, ValueError): + field_definitions[param_name] = (Any, ... if default_value is inspect.Parameter.empty else default_value) + + # Ensure all parameters are included + expected_params = {name for name, _, _ in query_parameters} + missing = expected_params - set(field_definitions.keys()) + if missing: + for param_name, _, default_value in query_parameters: + if param_name in missing: + field_definitions[param_name] = ( + Any, + ... if default_value is inspect.Parameter.empty else default_value, + ) + + return field_definitions + + +def _create_dynamic_request_model( + webmethod, query_parameters: list[tuple[str, type, Any]], use_any: bool = False, add_uuid: bool = False +) -> type | None: + """Create a dynamic Pydantic model for request body.""" + try: + field_definitions = _build_field_definitions(query_parameters, use_any) + if not field_definitions: + return None + clean_route = webmethod.route.replace("/", "_").replace("{", "").replace("}", "").replace("-", "_") + model_name = f"{clean_route}_Request" + if add_uuid: + model_name = f"{model_name}_{uuid.uuid4().hex[:8]}" + + request_model = create_model(model_name, **field_definitions) + _dynamic_models.append(request_model) + return request_model + except Exception: + return None + + +def _build_signature_params( + query_parameters: list[tuple[str, type, Any]], +) -> tuple[list[inspect.Parameter], dict[str, type]]: + """Build signature parameters and annotations from query parameters.""" + signature_params = [] + param_annotations = {} + for param_name, param_type, default_value in query_parameters: + param_annotations[param_name] = param_type + signature_params.append( + inspect.Parameter( + param_name, + inspect.Parameter.POSITIONAL_OR_KEYWORD, + default=default_value if default_value is not inspect.Parameter.empty else inspect.Parameter.empty, + annotation=param_type, + ) + ) + return signature_params, param_annotations + + +def _extract_operation_description_from_docstring(api: Api, method_name: str) -> str | None: + """Extract operation description from the actual function docstring.""" + func = app_module._get_protocol_method(api, method_name) + if not func or not func.__doc__: + return None + + doc_lines = func.__doc__.split("\n") + description_lines = [] + metadata_markers = (":param", ":type", ":return", ":returns", ":raises", ":exception", ":yield", ":yields", ":cvar") + + for line in doc_lines: + if line.strip().startswith(metadata_markers): + break + description_lines.append(line) + + description = "\n".join(description_lines).strip() + return description if description else None + + +def _extract_response_description_from_docstring(webmethod, response_model, api: Api, method_name: str) -> str: + """Extract response description from the actual function docstring.""" + func = app_module._get_protocol_method(api, method_name) + if not func or not func.__doc__: + return "Successful Response" + for line in func.__doc__.split("\n"): + if line.strip().startswith(":returns:"): + if desc := line.strip()[9:].strip(): + return desc + return "Successful Response" + + +def _get_tag_from_api(api: Api) -> str: + """Extract a tag name from the API enum for API grouping.""" + return api.value.replace("_", " ").title() + + +def _is_file_or_form_param(param_type: Any) -> bool: + """Check if a parameter type is annotated with File() or Form().""" + if get_origin(param_type) is Annotated: + args = get_args(param_type) + if len(args) > 1: + # Check metadata for File or Form + for metadata in args[1:]: + # Check if it's a File or Form instance + if hasattr(metadata, "__class__"): + class_name = metadata.__class__.__name__ + if class_name in ("File", "Form"): + return True + return False + + +def _is_extra_body_field(metadata_item: Any) -> bool: + """Check if a metadata item is an ExtraBodyField instance.""" + from llama_stack.schema_utils import ExtraBodyField + + return isinstance(metadata_item, ExtraBodyField) + + +def _is_async_iterator_type(type_obj: Any) -> bool: + """Check if a type is AsyncIterator or AsyncIterable.""" + from collections.abc import AsyncIterable, AsyncIterator + + origin = get_origin(type_obj) + if origin is None: + # Check if it's the class itself + return type_obj in (AsyncIterator, AsyncIterable) or ( + hasattr(type_obj, "__origin__") and type_obj.__origin__ in (AsyncIterator, AsyncIterable) + ) + return origin in (AsyncIterator, AsyncIterable) + + +def _extract_response_models_from_union(union_type: Any) -> tuple[type | None, type | None]: + """ + Extract non-streaming and streaming response models from a union type. + + Returns: + tuple: (non_streaming_model, streaming_model) + """ + non_streaming_model = None + streaming_model = None + + args = get_args(union_type) + for arg in args: + # Check if it's an AsyncIterator + if _is_async_iterator_type(arg): + # Extract the type argument from AsyncIterator[T] + iterator_args = get_args(arg) + if iterator_args: + inner_type = iterator_args[0] + # Check if the inner type is a registered schema (union type) + # or a Pydantic model + if hasattr(inner_type, "model_json_schema"): + streaming_model = inner_type + else: + # Might be a registered schema - check if it's registered + from llama_stack.schema_utils import _registered_schemas + + if inner_type in _registered_schemas: + # We'll need to look this up later, but for now store the type + streaming_model = inner_type + elif hasattr(arg, "model_json_schema"): + # Non-streaming Pydantic model + if non_streaming_model is None: + non_streaming_model = arg + + return non_streaming_model, streaming_model + + +def _find_models_for_endpoint( + webmethod, api: Api, method_name: str, is_post_put: bool = False +) -> tuple[type | None, type | None, list[tuple[str, type, Any]], list[inspect.Parameter], type | None]: + """ + Find appropriate request and response models for an endpoint by analyzing the actual function signature. + This uses the protocol function to determine the correct models dynamically. + + Args: + webmethod: The webmethod metadata + api: The API enum for looking up the function + method_name: The method name (function name) + is_post_put: Whether this is a POST, PUT, or PATCH request (GET requests should never have request bodies) + + Returns: + tuple: (request_model, response_model, query_parameters, file_form_params, streaming_response_model) + where query_parameters is a list of (name, type, default_value) tuples + and file_form_params is a list of inspect.Parameter objects for File()/Form() params + and streaming_response_model is the model for streaming responses (AsyncIterator content) + """ + try: + # Get the function from the protocol + func = app_module._get_protocol_method(api, method_name) + if not func: + return None, None, [], [], None + + # Analyze the function signature + sig = inspect.signature(func) + + # Find request model and collect all body parameters + request_model = None + query_parameters = [] + file_form_params = [] + path_params = set() + extra_body_params = [] + + # Extract path parameters from the route + if webmethod and hasattr(webmethod, "route"): + path_matches = re.findall(r"\{([^}:]+)(?::[^}]+)?\}", webmethod.route) + path_params = set(path_matches) + + for param_name, param in sig.parameters.items(): + 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 this is a path parameter + if param_name in path_params: + # Path parameters are handled separately, skip them + continue + + # Check if it's a File() or Form() parameter - these need special handling + param_type = param.annotation + if _is_file_or_form_param(param_type): + # File() and Form() parameters must be in the function signature directly + # They cannot be part of a Pydantic model + file_form_params.append(param) + continue + + # Check for ExtraBodyField in Annotated types + is_extra_body = False + extra_body_description = None + if get_origin(param_type) is Annotated: + args = get_args(param_type) + base_type = args[0] if args else param_type + metadata = args[1:] if len(args) > 1 else [] + + # Check if any metadata item is an ExtraBodyField + for metadata_item in metadata: + if _is_extra_body_field(metadata_item): + is_extra_body = True + extra_body_description = metadata_item.description + break + + if is_extra_body: + # Store as extra body parameter - exclude from request model + extra_body_params.append((param_name, base_type, extra_body_description)) + continue + + # Check if it's a Pydantic model (for POST/PUT requests) + if hasattr(param_type, "model_json_schema"): + # Collect all body parameters including Pydantic models + # We'll decide later whether to use a single model or create a combined one + query_parameters.append((param_name, param_type, param.default)) + elif get_origin(param_type) is Annotated: + # Handle Annotated types - get the base type + args = get_args(param_type) + if args and hasattr(args[0], "model_json_schema"): + # Collect Pydantic models from Annotated types + query_parameters.append((param_name, args[0], param.default)) + else: + # Regular annotated parameter (but not File/Form, already handled above) + query_parameters.append((param_name, param_type, param.default)) + else: + # This is likely a body parameter for POST/PUT or query parameter for GET + # Store the parameter info for later use + # Preserve inspect.Parameter.empty to distinguish "no default" from "default=None" + default_value = param.default + + # Extract the base type from union types (e.g., str | None -> str) + # Also make it safe for FastAPI to avoid forward reference issues + query_parameters.append((param_name, param_type, default_value)) + + # Store extra body fields for later use in post-processing + # We'll store them when the endpoint is created, as we need the full path + # For now, attach to the function for later retrieval + if extra_body_params: + func._extra_body_params = extra_body_params # type: ignore + + # If there's exactly one body parameter and it's a Pydantic model, use it directly + # Otherwise, we'll create a combined request model from all parameters + # BUT: For GET requests, never create a request body - all parameters should be query parameters + if is_post_put and len(query_parameters) == 1: + param_name, param_type, default_value = query_parameters[0] + if hasattr(param_type, "model_json_schema"): + request_model = param_type + query_parameters = [] # Clear query_parameters so we use the single model + + # Find response model from return annotation + # Also detect streaming response models (AsyncIterator) + response_model = None + streaming_response_model = None + return_annotation = sig.return_annotation + if return_annotation != inspect.Signature.empty: + origin = get_origin(return_annotation) + if hasattr(return_annotation, "model_json_schema"): + response_model = return_annotation + elif origin is Annotated: + # Handle Annotated return types + args = get_args(return_annotation) + if args: + # Check if the first argument is a Pydantic model + if hasattr(args[0], "model_json_schema"): + response_model = args[0] + else: + # Check if the first argument is a union type + inner_origin = get_origin(args[0]) + if inner_origin is not None and ( + inner_origin is types.UnionType or inner_origin is typing.Union + ): + response_model, streaming_response_model = _extract_response_models_from_union(args[0]) + elif origin is not None and (origin is types.UnionType or origin is typing.Union): + # Handle union types - extract both non-streaming and streaming models + response_model, streaming_response_model = _extract_response_models_from_union(return_annotation) + + return request_model, response_model, query_parameters, file_form_params, streaming_response_model + + except Exception: + # If we can't analyze the function signature, return None + return None, None, [], [], None + + +def _create_fastapi_endpoint(app: FastAPI, route, webmethod, api: Api): + """Create a FastAPI endpoint from a discovered route and webmethod.""" + path = route.path + methods = route.methods + name = route.name + fastapi_path = path.replace("{", "{").replace("}", "}") + is_post_put = any(method.upper() in ["POST", "PUT", "PATCH"] for method in methods) + + request_model, response_model, query_parameters, file_form_params, streaming_response_model = ( + _find_models_for_endpoint(webmethod, api, name, is_post_put) + ) + operation_description = _extract_operation_description_from_docstring(api, name) + response_description = _extract_response_description_from_docstring(webmethod, response_model, api, name) + + # Retrieve and store extra body fields for this endpoint + func = app_module._get_protocol_method(api, name) + extra_body_params = getattr(func, "_extra_body_params", []) if func else [] + if extra_body_params: + for method in methods: + key = (fastapi_path, method.upper()) + _extra_body_fields[key] = extra_body_params + + if file_form_params and is_post_put: + signature_params = list(file_form_params) + param_annotations = {param.name: param.annotation for param in file_form_params} + for param_name, param_type, default_value in query_parameters: + signature_params.append( + inspect.Parameter( + param_name, + inspect.Parameter.POSITIONAL_OR_KEYWORD, + default=default_value if default_value is not inspect.Parameter.empty else inspect.Parameter.empty, + annotation=param_type, + ) + ) + param_annotations[param_name] = param_type + + async def file_form_endpoint(): + return response_model() if response_model else {} + + if operation_description: + file_form_endpoint.__doc__ = operation_description + file_form_endpoint.__signature__ = inspect.Signature(signature_params) + file_form_endpoint.__annotations__ = param_annotations + endpoint_func = file_form_endpoint + elif request_model and response_model: + endpoint_func = _create_endpoint_with_request_model(request_model, response_model, operation_description) + elif response_model and query_parameters: + if is_post_put: + # Try creating request model with type preservation, fallback to Any, then minimal + request_model = _create_dynamic_request_model(webmethod, query_parameters, use_any=False) + if not request_model: + request_model = _create_dynamic_request_model(webmethod, query_parameters, use_any=True) + if not request_model: + request_model = _create_dynamic_request_model(webmethod, query_parameters, use_any=True, add_uuid=True) + + if request_model: + endpoint_func = _create_endpoint_with_request_model( + request_model, response_model, operation_description + ) + else: + + async def empty_endpoint() -> response_model: + return response_model() if response_model else {} + + if operation_description: + empty_endpoint.__doc__ = operation_description + endpoint_func = empty_endpoint + else: + sorted_params = sorted(query_parameters, key=lambda x: (x[2] is not inspect.Parameter.empty, x[0])) + signature_params, param_annotations = _build_signature_params(sorted_params) + + async def query_endpoint(): + return response_model() + + if operation_description: + query_endpoint.__doc__ = operation_description + query_endpoint.__signature__ = inspect.Signature(signature_params) + query_endpoint.__annotations__ = param_annotations + endpoint_func = query_endpoint + elif response_model: + + async def response_only_endpoint() -> response_model: + return response_model() + + if operation_description: + response_only_endpoint.__doc__ = operation_description + endpoint_func = response_only_endpoint + elif query_parameters: + signature_params, param_annotations = _build_signature_params(query_parameters) + + async def params_only_endpoint(): + return {} + + if operation_description: + params_only_endpoint.__doc__ = operation_description + params_only_endpoint.__signature__ = inspect.Signature(signature_params) + params_only_endpoint.__annotations__ = param_annotations + endpoint_func = params_only_endpoint + else: + # Endpoint with no parameters and no response model + # If we have a response_model from the function signature, use it even if _find_models_for_endpoint didn't find it + # This can happen if there was an exception during model finding + if response_model is None: + # Try to get response model directly from the function signature as a fallback + func = app_module._get_protocol_method(api, name) + if func: + try: + sig = inspect.signature(func) + return_annotation = sig.return_annotation + if return_annotation != inspect.Signature.empty: + if hasattr(return_annotation, "model_json_schema"): + response_model = return_annotation + elif get_origin(return_annotation) is Annotated: + args = get_args(return_annotation) + if args and hasattr(args[0], "model_json_schema"): + response_model = args[0] + except Exception: + pass + + if response_model: + + async def no_params_endpoint() -> response_model: + return response_model() if response_model else {} + else: + + async def no_params_endpoint(): + return {} + + if operation_description: + no_params_endpoint.__doc__ = operation_description + endpoint_func = no_params_endpoint + + # Build response content with both application/json and text/event-stream if streaming + response_content = {} + if response_model: + response_content["application/json"] = {"schema": {"$ref": f"#/components/schemas/{response_model.__name__}"}} + if streaming_response_model: + # Get the schema name for the streaming model + # It might be a registered schema or a Pydantic model + streaming_schema_name = None + # Check if it's a registered schema first (before checking __name__) + # because registered schemas might be Annotated types + from llama_stack.schema_utils import _registered_schemas + + if streaming_response_model in _registered_schemas: + streaming_schema_name = _registered_schemas[streaming_response_model]["name"] + elif hasattr(streaming_response_model, "__name__"): + streaming_schema_name = streaming_response_model.__name__ + + if streaming_schema_name: + response_content["text/event-stream"] = { + "schema": {"$ref": f"#/components/schemas/{streaming_schema_name}"} + } + + # If no content types, use empty schema + if not response_content: + response_content["application/json"] = {"schema": {}} + + # Add the endpoint to the FastAPI app + is_deprecated = webmethod.deprecated or False + route_kwargs = { + "name": name, + "tags": [_get_tag_from_api(api)], + "deprecated": is_deprecated, + "responses": { + 200: { + "description": response_description, + "content": response_content, + }, + 400: {"$ref": "#/components/responses/BadRequest400"}, + 429: {"$ref": "#/components/responses/TooManyRequests429"}, + 500: {"$ref": "#/components/responses/InternalServerError500"}, + "default": {"$ref": "#/components/responses/DefaultError"}, + }, + } + + # FastAPI needs response_model parameter to properly generate OpenAPI spec + # Use the non-streaming response model if available + if response_model: + route_kwargs["response_model"] = response_model + + method_map = {"GET": app.get, "POST": app.post, "PUT": app.put, "DELETE": app.delete, "PATCH": app.patch} + for method in methods: + if handler := method_map.get(method.upper()): + handler(fastapi_path, **route_kwargs)(endpoint_func) diff --git a/scripts/openapi_generator/main.py b/scripts/openapi_generator/main.py new file mode 100755 index 0000000000..e5949933d8 --- /dev/null +++ b/scripts/openapi_generator/main.py @@ -0,0 +1,238 @@ +#!/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. + +""" +Main entry point for the FastAPI OpenAPI generator. +""" + +import copy +from pathlib import Path +from typing import Any + +import yaml +from fastapi.openapi.utils import get_openapi + +from . import app, schema_collection, schema_filtering, schema_transforms + + +def generate_openapi_spec(output_dir: str) -> dict[str, Any]: + """ + Generate OpenAPI specification using FastAPI's built-in method. + + Args: + output_dir: Directory to save the generated files + + Returns: + The generated OpenAPI specification as a dictionary + """ + # Create the FastAPI app + fastapi_app = app.create_llama_stack_app() + + # Generate the OpenAPI schema + openapi_schema = get_openapi( + title=fastapi_app.title, + version=fastapi_app.version, + description=fastapi_app.description, + routes=fastapi_app.routes, + servers=fastapi_app.servers, + ) + + # Set OpenAPI version to 3.1.0 + openapi_schema["openapi"] = "3.1.0" + + # Add standard error responses + openapi_schema = schema_transforms._add_error_responses(openapi_schema) + + # Ensure all @json_schema_type decorated models are included + openapi_schema = schema_collection._ensure_json_schema_types_included(openapi_schema) + + # Fix $ref references to point to components/schemas instead of $defs + openapi_schema = schema_transforms._fix_ref_references(openapi_schema) + + # Fix path parameter resolution issues + openapi_schema = schema_transforms._fix_path_parameters(openapi_schema) + + # Eliminate $defs section entirely for oasdiff compatibility + openapi_schema = schema_transforms._eliminate_defs_section(openapi_schema) + + # Clean descriptions in schema definitions by removing docstring metadata + openapi_schema = schema_transforms._clean_schema_descriptions(openapi_schema) + + # Remove query parameters from POST/PUT/PATCH endpoints that have a request body + # FastAPI sometimes infers parameters as query params even when they should be in the request body + openapi_schema = schema_transforms._remove_query_params_from_body_endpoints(openapi_schema) + + # Add x-llama-stack-extra-body-params extension for ExtraBodyField parameters + openapi_schema = schema_transforms._add_extra_body_params_extension(openapi_schema) + + # Remove request bodies from GET endpoints (GET requests should never have request bodies) + # This must run AFTER _add_extra_body_params_extension to ensure any request bodies + # that FastAPI incorrectly added to GET endpoints are removed + openapi_schema = schema_transforms._remove_request_bodies_from_get_endpoints(openapi_schema) + + # Extract duplicate union types to shared schema references + openapi_schema = schema_transforms._extract_duplicate_union_types(openapi_schema) + + # 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 + stable_schema = schema_filtering._filter_schema_by_version( + copy.deepcopy(openapi_schema), stable_only=True, exclude_deprecated=True + ) + experimental_schema = schema_filtering._filter_schema_by_version( + copy.deepcopy(openapi_schema), stable_only=False, exclude_deprecated=True + ) + deprecated_schema = schema_filtering._filter_deprecated_schema(copy.deepcopy(openapi_schema)) + combined_schema = schema_filtering._filter_combined_schema(copy.deepcopy(openapi_schema)) + + # Apply duplicate union extraction to combined schema (used by Stainless) + combined_schema = schema_transforms._extract_duplicate_union_types(combined_schema) + + base_description = ( + "This is the specification of the Llama Stack that provides\n" + " a set of endpoints and their corresponding interfaces that are\n" + " tailored to\n" + " best leverage Llama Models." + ) + + schema_configs = [ + ( + stable_schema, + "Llama Stack Specification", + "**✅ STABLE**: Production-ready APIs with backward compatibility guarantees.", + ), + ( + experimental_schema, + "Llama Stack Specification - Experimental APIs", + "**🧪 EXPERIMENTAL**: Pre-release APIs (v1alpha, v1beta) that may change before\n becoming stable.", + ), + ( + deprecated_schema, + "Llama Stack Specification - Deprecated APIs", + "**⚠️ DEPRECATED**: Legacy APIs that may be removed in future versions. Use for\n migration reference only.", + ), + ( + combined_schema, + "Llama Stack Specification - Stable & Experimental APIs", + "**🔗 COMBINED**: This specification includes both stable production-ready APIs\n and experimental pre-release APIs. Use stable APIs for production deployments\n and experimental APIs for testing new features.", + ), + ] + + for schema, title, description_suffix in schema_configs: + if "info" not in schema: + schema["info"] = {} + schema["info"].update( + { + "title": title, + "version": "v1", + "description": f"{base_description}\n\n {description_suffix}", + } + ) + + schemas_to_validate = [ + (stable_schema, "Stable schema"), + (experimental_schema, "Experimental schema"), + (deprecated_schema, "Deprecated schema"), + (combined_schema, "Combined (stainless) schema"), + ] + + for schema, _ in schemas_to_validate: + schema_transforms._fix_schema_issues(schema) + + print("\n🔍 Validating generated schemas...") + failed_schemas = [ + name for schema, name in schemas_to_validate if not schema_transforms.validate_openapi_schema(schema, name) + ] + if failed_schemas: + raise ValueError(f"Invalid schemas: {', '.join(failed_schemas)}") + + # Ensure output directory exists + output_path = Path(output_dir) + output_path.mkdir(parents=True, exist_ok=True) + + # Save the stable specification + yaml_path = output_path / "llama-stack-spec.yaml" + schema_transforms._write_yaml_file(yaml_path, stable_schema) + # 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: + # Use string replacement to fix references directly + if "#/$defs/" in yaml_content: + yaml_content = yaml_content.replace("#/$defs/", "#/components/schemas/") + + # Parse the YAML content + yaml_data = yaml.safe_load(yaml_content) + + # Move $defs to components/schemas if it exists + if "$defs" in yaml_data: + 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"] + + # Write the modified YAML back + schema_transforms._write_yaml_file(yaml_path, yaml_data) + + print(f"✅ Generated YAML (stable): {yaml_path}") + + experimental_yaml_path = output_path / "experimental-llama-stack-spec.yaml" + schema_transforms._write_yaml_file(experimental_yaml_path, experimental_schema) + print(f"✅ Generated YAML (experimental): {experimental_yaml_path}") + + deprecated_yaml_path = output_path / "deprecated-llama-stack-spec.yaml" + schema_transforms._write_yaml_file(deprecated_yaml_path, deprecated_schema) + print(f"✅ Generated YAML (deprecated): {deprecated_yaml_path}") + + # Generate combined (stainless) spec + stainless_yaml_path = output_path / "stainless-llama-stack-spec.yaml" + schema_transforms._write_yaml_file(stainless_yaml_path, combined_schema) + print(f"✅ Generated YAML (stainless/combined): {stainless_yaml_path}") + + return stable_schema + + +def main(): + """Main entry point for the FastAPI OpenAPI generator.""" + import argparse + + parser = argparse.ArgumentParser(description="Generate OpenAPI specification using FastAPI") + parser.add_argument("output_dir", help="Output directory for generated files") + + args = parser.parse_args() + + print("🚀 Generating OpenAPI specification using FastAPI...") + print(f"📁 Output directory: {args.output_dir}") + + try: + openapi_schema = generate_openapi_spec(output_dir=args.output_dir) + + print("\n✅ OpenAPI specification generated successfully!") + print(f"📊 Schemas: {len(openapi_schema.get('components', {}).get('schemas', {}))}") + print(f"🛣️ Paths: {len(openapi_schema.get('paths', {}))}") + operation_count = sum( + 1 + for path_info in openapi_schema.get("paths", {}).values() + for method in ["get", "post", "put", "delete", "patch"] + if method in path_info + ) + print(f"🔧 Operations: {operation_count}") + + except Exception as e: + print(f"❌ Error generating OpenAPI specification: {e}") + raise + + +if __name__ == "__main__": + main() diff --git a/scripts/openapi_generator/schema_collection.py b/scripts/openapi_generator/schema_collection.py new file mode 100644 index 0000000000..1cf6935f2e --- /dev/null +++ b/scripts/openapi_generator/schema_collection.py @@ -0,0 +1,183 @@ +# 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. + +""" +Schema discovery and collection for OpenAPI generation. +""" + +import importlib +import pkgutil +from typing import Any + +from .state import _dynamic_models + + +def _ensure_components_schemas(openapi_schema: dict[str, Any]) -> None: + """Ensure components.schemas exists in the schema.""" + if "components" not in openapi_schema: + openapi_schema["components"] = {} + if "schemas" not in openapi_schema["components"]: + openapi_schema["components"]["schemas"] = {} + + +def _import_all_modules_in_package(package_name: str) -> list[Any]: + """ + Dynamically import all modules in a package to trigger register_schema calls. + + This walks through all modules in the package and imports them, ensuring + that any register_schema() calls at module level are executed. + + Args: + package_name: The fully qualified package name (e.g., 'llama_stack.apis') + + Returns: + List of imported module objects + """ + modules = [] + try: + package = importlib.import_module(package_name) + except ImportError: + return modules + + package_path = getattr(package, "__path__", None) + if not package_path: + return modules + + # Walk packages and modules recursively + for _, modname, ispkg in pkgutil.walk_packages(package_path, prefix=f"{package_name}."): + if not modname.startswith("_"): + try: + module = importlib.import_module(modname) + modules.append(module) + + # If this is a package, also try to import any .py files directly + # (e.g., llama_stack.apis.scoring_functions.scoring_functions) + if ispkg: + try: + # Try importing the module file with the same name as the package + # This handles cases like scoring_functions/scoring_functions.py + module_file_name = f"{modname}.{modname.split('.')[-1]}" + module_file = importlib.import_module(module_file_name) + if module_file not in modules: + modules.append(module_file) + except (ImportError, AttributeError, TypeError): + # It's okay if this fails - not all packages have a module file with the same name + pass + except (ImportError, AttributeError, TypeError): + # Skip modules that can't be imported (e.g., missing dependencies) + continue + + return modules + + +def _extract_and_fix_defs(schema: dict[str, Any], openapi_schema: dict[str, Any]) -> None: + """ + Extract $defs from a schema, move them to components/schemas, and fix references. + This handles both TypeAdapter-generated schemas and model_json_schema() schemas. + """ + if "$defs" in schema: + defs = schema.pop("$defs") + for def_name, def_schema in defs.items(): + if def_name not in openapi_schema["components"]["schemas"]: + openapi_schema["components"]["schemas"][def_name] = def_schema + # Recursively handle $defs in nested schemas + _extract_and_fix_defs(def_schema, openapi_schema) + + # Fix any references in the main schema that point to $defs + def fix_refs_in_schema(obj: Any) -> None: + if isinstance(obj, dict): + if "$ref" in obj and obj["$ref"].startswith("#/$defs/"): + obj["$ref"] = obj["$ref"].replace("#/$defs/", "#/components/schemas/") + for value in obj.values(): + fix_refs_in_schema(value) + elif isinstance(obj, list): + for item in obj: + fix_refs_in_schema(item) + + fix_refs_in_schema(schema) + + +def _ensure_json_schema_types_included(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Ensure all @json_schema_type decorated models and registered schemas are included in the OpenAPI schema. + This finds all models with the _llama_stack_schema_type attribute and schemas registered via register_schema. + """ + _ensure_components_schemas(openapi_schema) + + # Import TypeAdapter for handling union types and other non-model types + from pydantic import TypeAdapter + + # Dynamically import all modules in packages that might register schemas + # This ensures register_schema() calls execute and populate _registered_schemas + # Also collect the modules for later scanning of @json_schema_type decorated classes + apis_modules = _import_all_modules_in_package("llama_stack.apis") + _import_all_modules_in_package("llama_stack.core.telemetry") + + # First, handle registered schemas (union types, etc.) + from llama_stack.schema_utils import _registered_schemas + + for schema_type, registration_info in _registered_schemas.items(): + schema_name = registration_info["name"] + if schema_name not in openapi_schema["components"]["schemas"]: + try: + # Use TypeAdapter for union types and other non-model types + # Use ref_template to generate references in the format we need + adapter = TypeAdapter(schema_type) + schema = adapter.json_schema(ref_template="#/components/schemas/{model}") + + # Extract and fix $defs if present + _extract_and_fix_defs(schema, openapi_schema) + + openapi_schema["components"]["schemas"][schema_name] = schema + except Exception as e: + # Skip if we can't generate the schema + print(f"Warning: Failed to generate schema for registered type {schema_name}: {e}") + import traceback + + traceback.print_exc() + continue + + # Find all classes with the _llama_stack_schema_type attribute + # Use the modules we already imported above + 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: + # Use ref_template to ensure consistent reference format and $defs handling + schema = attr.model_json_schema(ref_template="#/components/schemas/{model}") + # Extract and fix $defs if present (model_json_schema can also generate $defs) + _extract_and_fix_defs(schema, openapi_schema) + openapi_schema["components"]["schemas"][schema_name] = schema + except Exception as e: + # Skip if we can't generate the schema + print(f"Warning: Failed to generate schema for {schema_name}: {e}") + 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 + for model in _dynamic_models: + try: + schema_name = model.__name__ + if schema_name not in openapi_schema["components"]["schemas"]: + schema = model.model_json_schema(ref_template="#/components/schemas/{model}") + # Extract and fix $defs if present + _extract_and_fix_defs(schema, openapi_schema) + openapi_schema["components"]["schemas"][schema_name] = schema + except Exception: + # Skip if we can't generate the schema + continue + + return openapi_schema diff --git a/scripts/openapi_generator/schema_filtering.py b/scripts/openapi_generator/schema_filtering.py new file mode 100644 index 0000000000..9426d7a21e --- /dev/null +++ b/scripts/openapi_generator/schema_filtering.py @@ -0,0 +1,316 @@ +# 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. + +""" +Schema filtering and version filtering for OpenAPI generation. +""" + +from typing import Any + +from llama_stack.apis.version import ( + LLAMA_STACK_API_V1, + LLAMA_STACK_API_V1ALPHA, + LLAMA_STACK_API_V1BETA, +) + +from . import schema_collection + + +def _get_all_json_schema_type_names() -> set[str]: + """ + Get all schema names from @json_schema_type decorated models. + This ensures they are included in filtered schemas even if not directly referenced by paths. + """ + schema_names = set() + apis_modules = schema_collection._import_all_modules_in_package("llama_stack.apis") + 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_names.add(attr.__name__) + except (AttributeError, TypeError): + continue + return schema_names + + +def _get_explicit_schema_names(openapi_schema: dict[str, Any]) -> set[str]: + """Get all registered schema names and @json_schema_type decorated model names.""" + from llama_stack.schema_utils import _registered_schemas + + registered_schema_names = {info["name"] for info in _registered_schemas.values()} + json_schema_type_names = _get_all_json_schema_type_names() + return registered_schema_names | json_schema_type_names + + +def _find_schema_refs_in_object(obj: Any) -> set[str]: + """ + Recursively find all schema references ($ref) in an object. + """ + refs = set() + + if isinstance(obj, dict): + for key, value in obj.items(): + if key == "$ref" and isinstance(value, str) and value.startswith("#/components/schemas/"): + schema_name = value.split("/")[-1] + refs.add(schema_name) + else: + refs.update(_find_schema_refs_in_object(value)) + elif isinstance(obj, list): + for item in obj: + refs.update(_find_schema_refs_in_object(item)) + + return refs + + +def _add_transitive_references( + referenced_schemas: set[str], all_schemas: dict[str, Any], initial_schemas: set[str] | None = None +) -> set[str]: + """Add transitive references for given schemas.""" + if initial_schemas: + referenced_schemas.update(initial_schemas) + additional_schemas = set() + for schema_name in initial_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + else: + additional_schemas = set() + for schema_name in referenced_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + + while additional_schemas: + new_schemas = additional_schemas - referenced_schemas + if not new_schemas: + break + referenced_schemas.update(new_schemas) + additional_schemas = set() + for schema_name in new_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + + return referenced_schemas + + +def _find_schemas_referenced_by_paths(filtered_paths: dict[str, Any], openapi_schema: dict[str, Any]) -> set[str]: + """ + Find all schemas that are referenced by the filtered paths. + This recursively traverses the path definitions to find all $ref references. + """ + referenced_schemas = set() + + # Traverse all filtered paths + for _, path_item in filtered_paths.items(): + if not isinstance(path_item, dict): + continue + + # Check each HTTP method in the path + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + if method in path_item: + operation = path_item[method] + if isinstance(operation, dict): + # Find all schema references in this operation + referenced_schemas.update(_find_schema_refs_in_object(operation)) + + # Also check the responses section for schema references + if "components" in openapi_schema and "responses" in openapi_schema["components"]: + referenced_schemas.update(_find_schema_refs_in_object(openapi_schema["components"]["responses"])) + + # Also include schemas that are referenced by other schemas (transitive references) + # This ensures we include all dependencies + all_schemas = openapi_schema.get("components", {}).get("schemas", {}) + additional_schemas = set() + + for schema_name in referenced_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + + # Keep adding transitive references until no new ones are found + while additional_schemas: + new_schemas = additional_schemas - referenced_schemas + if not new_schemas: + break + referenced_schemas.update(new_schemas) + additional_schemas = set() + for schema_name in new_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + + return referenced_schemas + + +def _filter_schemas_by_references( + filtered_schema: dict[str, Any], filtered_paths: dict[str, Any], openapi_schema: dict[str, Any] +) -> dict[str, Any]: + """Filter schemas to only include ones referenced by filtered paths and explicit schemas.""" + if "components" not in filtered_schema or "schemas" not in filtered_schema["components"]: + return filtered_schema + + referenced_schemas = _find_schemas_referenced_by_paths(filtered_paths, openapi_schema) + all_schemas = openapi_schema.get("components", {}).get("schemas", {}) + explicit_schema_names = _get_explicit_schema_names(openapi_schema) + referenced_schemas = _add_transitive_references(referenced_schemas, all_schemas, explicit_schema_names) + + filtered_schemas = { + name: schema for name, schema in filtered_schema["components"]["schemas"].items() if name in referenced_schemas + } + filtered_schema["components"]["schemas"] = filtered_schemas + + 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"] + + return filtered_schema + + +def _path_starts_with_version(path: str, version: str) -> bool: + """Check if a path starts with a specific API version prefix.""" + return path.startswith(f"/{version}/") + + +def _is_stable_path(path: str) -> bool: + """Check if a path is a stable v1 path (not v1alpha or v1beta).""" + return ( + _path_starts_with_version(path, LLAMA_STACK_API_V1) + and not _path_starts_with_version(path, LLAMA_STACK_API_V1ALPHA) + and not _path_starts_with_version(path, LLAMA_STACK_API_V1BETA) + ) + + +def _is_experimental_path(path: str) -> bool: + """Check if a path is an experimental path (v1alpha or v1beta).""" + return _path_starts_with_version(path, LLAMA_STACK_API_V1ALPHA) or _path_starts_with_version( + path, LLAMA_STACK_API_V1BETA + ) + + +def _is_path_deprecated(path_item: dict[str, Any]) -> bool: + """Check if a path item has any deprecated operations.""" + if not isinstance(path_item, dict): + return False + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + if isinstance(path_item.get(method), dict) and path_item[method].get("deprecated", False): + return True + return False + + +def _filter_schema_by_version( + openapi_schema: dict[str, Any], stable_only: bool = True, exclude_deprecated: bool = True +) -> dict[str, Any]: + """ + Filter OpenAPI schema by API version. + + Args: + openapi_schema: The full OpenAPI schema + stable_only: If True, return only /v1/ paths (stable). If False, return only /v1alpha/ and /v1beta/ paths (experimental). + exclude_deprecated: If True, exclude deprecated endpoints from the result. + + Returns: + Filtered OpenAPI schema + """ + filtered_schema = openapi_schema.copy() + + if "paths" not in filtered_schema: + return filtered_schema + + filtered_paths = {} + for path, path_item in filtered_schema["paths"].items(): + if not isinstance(path_item, dict): + continue + + # Filter at operation level, not path level + # This allows paths with both deprecated and non-deprecated operations + filtered_path_item = {} + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + if method not in path_item: + continue + operation = path_item[method] + if not isinstance(operation, dict): + continue + + # Skip deprecated operations if exclude_deprecated is True + if exclude_deprecated and operation.get("deprecated", False): + continue + + filtered_path_item[method] = operation + + # Only include path if it has at least one operation after filtering + if filtered_path_item: + # Check if path matches version filter + if (stable_only and _is_stable_path(path)) or (not stable_only and _is_experimental_path(path)): + filtered_paths[path] = filtered_path_item + + filtered_schema["paths"] = filtered_paths + return _filter_schemas_by_references(filtered_schema, filtered_paths, openapi_schema) + + +def _filter_deprecated_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Filter OpenAPI schema to include only deprecated endpoints. + Includes all deprecated endpoints regardless of version (v1, v1alpha, v1beta). + """ + filtered_schema = openapi_schema.copy() + + if "paths" not in filtered_schema: + return filtered_schema + + # Filter paths to only include deprecated ones + filtered_paths = {} + for path, path_item in filtered_schema["paths"].items(): + if _is_path_deprecated(path_item): + filtered_paths[path] = path_item + + filtered_schema["paths"] = filtered_paths + + 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(): + if not isinstance(path_item, dict): + continue + + # Filter at operation level, not path level + # This allows paths with both deprecated and non-deprecated operations + filtered_path_item = {} + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + if method not in path_item: + continue + operation = path_item[method] + if not isinstance(operation, dict): + continue + + # Skip deprecated operations + if operation.get("deprecated", False): + continue + + filtered_path_item[method] = operation + + # Only include path if it has at least one operation after filtering + if filtered_path_item: + # Check if path matches version filter (stable or experimental) + if _is_stable_path(path) or _is_experimental_path(path): + filtered_paths[path] = filtered_path_item + + filtered_schema["paths"] = filtered_paths + + return _filter_schemas_by_references(filtered_schema, filtered_paths, openapi_schema) diff --git a/scripts/openapi_generator/schema_transforms.py b/scripts/openapi_generator/schema_transforms.py new file mode 100644 index 0000000000..165d6af956 --- /dev/null +++ b/scripts/openapi_generator/schema_transforms.py @@ -0,0 +1,851 @@ +# 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. + +""" +Schema transformations and fixes for OpenAPI generation. +""" + +import copy +from pathlib import Path +from typing import Any + +import yaml +from openapi_spec_validator import validate_spec +from openapi_spec_validator.exceptions import OpenAPISpecValidatorError + +from . import endpoints, schema_collection +from .state import _extra_body_fields + + +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 _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. + """ + schema_collection._ensure_components_schemas(openapi_schema) + + # 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. + Uses the actual Error model from the codebase for consistency. + """ + if "components" not in openapi_schema: + openapi_schema["components"] = {} + if "responses" not in openapi_schema["components"]: + openapi_schema["components"]["responses"] = {} + + try: + from llama_stack.apis.datatypes import Error + + schema_collection._ensure_components_schemas(openapi_schema) + if "Error" not in openapi_schema["components"]["schemas"]: + openapi_schema["components"]["schemas"]["Error"] = Error.model_json_schema() + except ImportError: + pass + + # Define standard HTTP error responses + error_responses = { + 400: { + "name": "BadRequest400", + "description": "The request was invalid or malformed", + "example": {"status": 400, "title": "Bad Request", "detail": "The request was invalid or malformed"}, + }, + 429: { + "name": "TooManyRequests429", + "description": "The client has sent too many requests in a given amount of time", + "example": { + "status": 429, + "title": "Too Many Requests", + "detail": "You have exceeded the rate limit. Please try again later.", + }, + }, + 500: { + "name": "InternalServerError500", + "description": "The server encountered an unexpected error", + "example": {"status": 500, "title": "Internal Server Error", "detail": "An unexpected error occurred"}, + }, + } + + # Add each error response to the schema + for _, error_info in error_responses.items(): + response_name = error_info["name"] + openapi_schema["components"]["responses"][response_name] = { + "description": error_info["description"], + "content": { + "application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "example": error_info["example"]} + }, + } + + # Add a default error response + openapi_schema["components"]["responses"]["DefaultError"] = { + "description": "An error occurred", + "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}, + } + + 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 = endpoints._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 _get_schema_title(item: dict[str, Any]) -> str | None: + """Extract a title for a schema item to use in union variant names.""" + if "$ref" in item: + return item["$ref"].split("/")[-1] + elif "type" in item: + type_val = item["type"] + if type_val == "null": + return None + if type_val == "array" and "items" in item: + items = item["items"] + if isinstance(items, dict): + if "anyOf" in items or "oneOf" in items: + nested_union = items.get("anyOf") or items.get("oneOf") + if isinstance(nested_union, list) and len(nested_union) > 0: + nested_types = [] + for nested_item in nested_union: + if isinstance(nested_item, dict): + if "$ref" in nested_item: + nested_types.append(nested_item["$ref"].split("/")[-1]) + elif "oneOf" in nested_item: + one_of_items = nested_item.get("oneOf", []) + if one_of_items and isinstance(one_of_items[0], dict) and "$ref" in one_of_items[0]: + base_name = one_of_items[0]["$ref"].split("/")[-1].split("-")[0] + nested_types.append(f"{base_name}Union") + else: + nested_types.append("Union") + elif "type" in nested_item and nested_item["type"] != "null": + nested_types.append(nested_item["type"]) + if nested_types: + unique_nested = list(dict.fromkeys(nested_types)) + # Use more descriptive names for better code generation + if len(unique_nested) <= 3: + return f"list[{' | '.join(unique_nested)}]" + else: + # Include first few types for better naming + return f"list[{unique_nested[0]} | {unique_nested[1]} | ...]" + return "list[Union]" + elif "$ref" in items: + return f"list[{items['$ref'].split('/')[-1]}]" + elif "type" in items: + return f"list[{items['type']}]" + return "array" + return type_val + elif "title" in item: + return item["title"] + return None + + +def _add_titles_to_unions(obj: Any, parent_key: str | None = None) -> None: + """Recursively add titles to union schemas (anyOf/oneOf) to help code generators infer names.""" + if isinstance(obj, dict): + # Check if this is a union schema (anyOf or oneOf) + if "anyOf" in obj or "oneOf" in obj: + union_type = "anyOf" if "anyOf" in obj else "oneOf" + union_items = obj[union_type] + + if isinstance(union_items, list) and len(union_items) > 0: + # Skip simple nullable unions (type | null) - these don't need titles + is_simple_nullable = ( + len(union_items) == 2 + and any(isinstance(item, dict) and item.get("type") == "null" for item in union_items) + and any( + isinstance(item, dict) and "type" in item and item.get("type") != "null" for item in union_items + ) + and not any( + isinstance(item, dict) and ("$ref" in item or "anyOf" in item or "oneOf" in item) + for item in union_items + ) + ) + + if is_simple_nullable: + # Remove title from simple nullable unions if it exists + if "title" in obj: + del obj["title"] + else: + # Add titles to individual union variants that need them + for item in union_items: + if isinstance(item, dict): + # Skip null types + if item.get("type") == "null": + continue + # Add title to complex variants (arrays with unions, nested unions, etc.) + # Also add to simple types if they're part of a complex union + needs_title = ( + "items" in item + or "anyOf" in item + or "oneOf" in item + or ("$ref" in item and "title" not in item) + ) + if needs_title and "title" not in item: + variant_title = _get_schema_title(item) + if variant_title: + item["title"] = variant_title + + # Try to infer a meaningful title from the union items for the parent + titles = [] + for item in union_items: + if isinstance(item, dict): + title = _get_schema_title(item) + if title: + titles.append(title) + + if titles: + # Create a title from the union items + unique_titles = list(dict.fromkeys(titles)) # Preserve order, remove duplicates + if len(unique_titles) <= 3: + title = " | ".join(unique_titles) + else: + title = f"{unique_titles[0]} | ... ({len(unique_titles)} variants)" + # Always set the title for unions to help code generators + # This will replace generic property titles with union-specific ones + obj["title"] = title + elif "title" not in obj and parent_key: + # Use parent key as fallback only if no title exists + obj["title"] = f"{parent_key.title()}Union" + + # Recursively process all values + for key, value in obj.items(): + _add_titles_to_unions(value, key) + elif isinstance(obj, list): + for item in obj: + _add_titles_to_unions(item, parent_key) + + +def _convert_anyof_const_to_enum(obj: Any) -> None: + """Convert anyOf with multiple const string values to a proper enum.""" + if isinstance(obj, dict): + if "anyOf" in obj: + any_of = obj["anyOf"] + if isinstance(any_of, list): + # Check if all items are const string values + const_values = [] + has_null = False + can_convert = True + for item in any_of: + if isinstance(item, dict): + if item.get("type") == "null": + has_null = True + elif item.get("type") == "string" and "const" in item: + const_values.append(item["const"]) + else: + # Not a simple const pattern, skip conversion for this anyOf + can_convert = False + break + + # If we have const values and they're all strings, convert to enum + if can_convert and const_values and len(const_values) == len(any_of) - (1 if has_null else 0): + # Convert to enum + obj["type"] = "string" + obj["enum"] = const_values + # Preserve default if present, otherwise try to get from first const item + if "default" not in obj: + for item in any_of: + if isinstance(item, dict) and "const" in item: + obj["default"] = item["const"] + break + # Remove anyOf + del obj["anyOf"] + # Handle nullable + if has_null: + obj["nullable"] = True + # Remove title if it's just "string" + if obj.get("title") == "string": + del obj["title"] + + # Recursively process all values + for value in obj.values(): + _convert_anyof_const_to_enum(value) + elif isinstance(obj, list): + for item in obj: + _convert_anyof_const_to_enum(item) + + +def _fix_schema_recursive(obj: Any) -> None: + """Recursively fix schema issues: exclusiveMinimum and null defaults.""" + if isinstance(obj, dict): + if "exclusiveMinimum" in obj and isinstance(obj["exclusiveMinimum"], int | float): + obj["minimum"] = obj.pop("exclusiveMinimum") + if "default" in obj and obj["default"] is None: + del obj["default"] + obj["nullable"] = True + for value in obj.values(): + _fix_schema_recursive(value) + elif isinstance(obj, list): + for item in obj: + _fix_schema_recursive(item) + + +def _clean_description(description: str) -> str: + """Remove :param, :type, :returns, and other docstring metadata from description.""" + if not description: + return description + + lines = description.split("\n") + cleaned_lines = [] + skip_until_empty = False + + for line in lines: + stripped = line.strip() + # Skip lines that start with docstring metadata markers + if stripped.startswith( + (":param", ":type", ":return", ":returns", ":raises", ":exception", ":yield", ":yields", ":cvar") + ): + skip_until_empty = True + continue + # If we're skipping and hit an empty line, resume normal processing + if skip_until_empty: + if not stripped: + skip_until_empty = False + continue + # Include the line if we're not skipping + cleaned_lines.append(line) + + # Join and strip trailing whitespace + result = "\n".join(cleaned_lines).strip() + return result + + +def _clean_schema_descriptions(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """Clean descriptions in schema definitions by removing docstring metadata.""" + if "components" not in openapi_schema or "schemas" not in openapi_schema["components"]: + return openapi_schema + + schemas = openapi_schema["components"]["schemas"] + for schema_def in schemas.values(): + if isinstance(schema_def, dict) and "description" in schema_def and isinstance(schema_def["description"], str): + schema_def["description"] = _clean_description(schema_def["description"]) + + return openapi_schema + + +def _add_extra_body_params_extension(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Add x-llama-stack-extra-body-params extension to requestBody for endpoints with ExtraBodyField parameters. + """ + if "paths" not in openapi_schema: + return openapi_schema + + from pydantic import TypeAdapter + + for path, path_item in openapi_schema["paths"].items(): + if not isinstance(path_item, dict): + continue + + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + if method not in path_item: + continue + + operation = path_item[method] + if not isinstance(operation, dict): + continue + + # Check if we have extra body fields for this path/method + key = (path, method.upper()) + if key not in _extra_body_fields: + continue + + extra_body_params = _extra_body_fields[key] + + # Ensure requestBody exists + if "requestBody" not in operation: + continue + + request_body = operation["requestBody"] + if not isinstance(request_body, dict): + continue + + # Get the schema from requestBody + content = request_body.get("content", {}) + json_content = content.get("application/json", {}) + schema_ref = json_content.get("schema", {}) + + # Remove extra body fields from the schema if they exist as properties + # Handle both $ref schemas and inline schemas + if isinstance(schema_ref, dict): + if "$ref" in schema_ref: + # Schema is a reference - remove from the referenced schema + ref_path = schema_ref["$ref"] + if ref_path.startswith("#/components/schemas/"): + schema_name = ref_path.split("/")[-1] + if "components" in openapi_schema and "schemas" in openapi_schema["components"]: + schema_def = openapi_schema["components"]["schemas"].get(schema_name) + if isinstance(schema_def, dict) and "properties" in schema_def: + for param_name, _, _ in extra_body_params: + if param_name in schema_def["properties"]: + del schema_def["properties"][param_name] + # Also remove from required if present + if "required" in schema_def and param_name in schema_def["required"]: + schema_def["required"].remove(param_name) + elif "properties" in schema_ref: + # Schema is inline - remove directly from it + for param_name, _, _ in extra_body_params: + if param_name in schema_ref["properties"]: + del schema_ref["properties"][param_name] + # Also remove from required if present + if "required" in schema_ref and param_name in schema_ref["required"]: + schema_ref["required"].remove(param_name) + + # Build the extra body params schema + extra_params_schema = {} + for param_name, param_type, description in extra_body_params: + try: + # Generate JSON schema for the parameter type + adapter = TypeAdapter(param_type) + param_schema = adapter.json_schema(ref_template="#/components/schemas/{model}") + + # Add description if provided + if description: + param_schema["description"] = description + + extra_params_schema[param_name] = param_schema + except Exception: + # If we can't generate schema, skip this parameter + continue + + if extra_params_schema: + # Add the extension to requestBody + if "x-llama-stack-extra-body-params" not in request_body: + request_body["x-llama-stack-extra-body-params"] = extra_params_schema + + return openapi_schema + + +def _remove_query_params_from_body_endpoints(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Remove query parameters from POST/PUT/PATCH endpoints that have a request body. + FastAPI sometimes infers parameters as query params even when they should be in the request body. + """ + if "paths" not in openapi_schema: + return openapi_schema + + body_methods = {"post", "put", "patch"} + + for _path, path_item in openapi_schema["paths"].items(): + if not isinstance(path_item, dict): + continue + + for method in body_methods: + if method not in path_item: + continue + + operation = path_item[method] + if not isinstance(operation, dict): + continue + + # Check if this operation has a request body + has_request_body = "requestBody" in operation and operation["requestBody"] + + if has_request_body: + # Remove all query parameters (parameters with "in": "query") + if "parameters" in operation: + # Filter out query parameters, keep path and header parameters + operation["parameters"] = [ + param + for param in operation["parameters"] + if isinstance(param, dict) and param.get("in") != "query" + ] + # Remove the parameters key if it's now empty + if not operation["parameters"]: + del operation["parameters"] + + return openapi_schema + + +def _remove_request_bodies_from_get_endpoints(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Remove request bodies from GET endpoints and convert their parameters to query parameters. + + GET requests should never have request bodies - all parameters should be query parameters. + This function removes any requestBody that FastAPI may have incorrectly added to GET endpoints + and converts any parameters in the requestBody to query parameters. + """ + if "paths" not in openapi_schema: + return openapi_schema + + for _path, path_item in openapi_schema["paths"].items(): + if not isinstance(path_item, dict): + continue + + # Check GET method specifically + if "get" in path_item: + operation = path_item["get"] + if not isinstance(operation, dict): + continue + + if "requestBody" in operation: + request_body = operation["requestBody"] + # Extract parameters from requestBody and convert to query parameters + if isinstance(request_body, dict) and "content" in request_body: + content = request_body.get("content", {}) + json_content = content.get("application/json", {}) + schema = json_content.get("schema", {}) + + if "parameters" not in operation: + operation["parameters"] = [] + elif not isinstance(operation["parameters"], list): + operation["parameters"] = [] + + # If the schema has properties, convert each to a query parameter + if isinstance(schema, dict) and "properties" in schema: + for param_name, param_schema in schema["properties"].items(): + # Check if this parameter is already in the parameters list + existing_param = None + for existing in operation["parameters"]: + if isinstance(existing, dict) and existing.get("name") == param_name: + existing_param = existing + break + + if not existing_param: + # Create a new query parameter from the requestBody property + required = param_name in schema.get("required", []) + query_param = { + "name": param_name, + "in": "query", + "required": required, + "schema": param_schema, + } + # Add description if present + if "description" in param_schema: + query_param["description"] = param_schema["description"] + operation["parameters"].append(query_param) + elif isinstance(schema, dict): + # Handle direct schema (not a model with properties) + # Try to infer parameter name from schema title + param_name = schema.get("title", "").lower().replace(" ", "_") + if param_name: + # Check if this parameter is already in the parameters list + existing_param = None + for existing in operation["parameters"]: + if isinstance(existing, dict) and existing.get("name") == param_name: + existing_param = existing + break + + if not existing_param: + # Create a new query parameter from the requestBody schema + query_param = { + "name": param_name, + "in": "query", + "required": False, # Default to optional for GET requests + "schema": schema, + } + # Add description if present + if "description" in schema: + query_param["description"] = schema["description"] + operation["parameters"].append(query_param) + + # Remove request body from GET endpoint + del operation["requestBody"] + + return openapi_schema + + +def _extract_duplicate_union_types(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Extract duplicate union types to shared schema references. + + Stainless generates type names from union types based on their context, which can cause + duplicate names when the same union appears in different places. This function extracts + these duplicate unions to shared schema definitions and replaces inline definitions with + references to them. + + According to Stainless docs, when duplicate types are detected, they should be extracted + to the same ref and declared as a model. This ensures Stainless generates consistent + type names regardless of where the union is referenced. + + Fixes: https://www.stainless.com/docs/reference/diagnostics#Python/DuplicateDeclaration + """ + if "components" not in openapi_schema or "schemas" not in openapi_schema["components"]: + return openapi_schema + + schemas = openapi_schema["components"]["schemas"] + + # Extract the Output union type (used in OpenAIResponseObjectWithInput-Output and ListOpenAIResponseInputItem) + output_union_schema_name = "OpenAIResponseMessageOutputUnion" + output_union_title = None + + # Get the union type from OpenAIResponseObjectWithInput-Output.input.items.anyOf + if "OpenAIResponseObjectWithInput-Output" in schemas: + schema = schemas["OpenAIResponseObjectWithInput-Output"] + if isinstance(schema, dict) and "properties" in schema: + input_prop = schema["properties"].get("input") + if isinstance(input_prop, dict) and "items" in input_prop: + items = input_prop["items"] + if isinstance(items, dict) and "anyOf" in items: + # Extract the union schema with deep copy + output_union_schema = copy.deepcopy(items["anyOf"]) + output_union_title = items.get("title", "OpenAIResponseMessageOutputUnion") + + # Collect all refs from the oneOf to detect duplicates + refs_in_oneof = set() + for item in output_union_schema: + if isinstance(item, dict) and "oneOf" in item: + oneof = item["oneOf"] + if isinstance(oneof, list): + for variant in oneof: + if isinstance(variant, dict) and "$ref" in variant: + refs_in_oneof.add(variant["$ref"]) + item["x-stainless-naming"] = "OpenAIResponseMessageOutputOneOf" + + # Remove duplicate refs from anyOf that are already in oneOf + deduplicated_schema = [] + for item in output_union_schema: + if isinstance(item, dict) and "$ref" in item: + if item["$ref"] not in refs_in_oneof: + deduplicated_schema.append(item) + else: + deduplicated_schema.append(item) + output_union_schema = deduplicated_schema + + # Create the shared schema with x-stainless-naming to ensure consistent naming + if output_union_schema_name not in schemas: + schemas[output_union_schema_name] = { + "anyOf": output_union_schema, + "title": output_union_title, + "x-stainless-naming": output_union_schema_name, + } + # Replace with reference + input_prop["items"] = {"$ref": f"#/components/schemas/{output_union_schema_name}"} + + # Replace the same union in ListOpenAIResponseInputItem.data.items.anyOf + if "ListOpenAIResponseInputItem" in schemas and output_union_schema_name in schemas: + schema = schemas["ListOpenAIResponseInputItem"] + if isinstance(schema, dict) and "properties" in schema: + data_prop = schema["properties"].get("data") + if isinstance(data_prop, dict) and "items" in data_prop: + items = data_prop["items"] + if isinstance(items, dict) and "anyOf" in items: + # Replace with reference + data_prop["items"] = {"$ref": f"#/components/schemas/{output_union_schema_name}"} + + # Extract the Input union type (used in _responses_Request.input.anyOf[1].items.anyOf) + input_union_schema_name = "OpenAIResponseMessageInputUnion" + + if "_responses_Request" in schemas: + schema = schemas["_responses_Request"] + if isinstance(schema, dict) and "properties" in schema: + input_prop = schema["properties"].get("input") + if isinstance(input_prop, dict) and "anyOf" in input_prop: + any_of = input_prop["anyOf"] + if isinstance(any_of, list) and len(any_of) > 1: + # Check the second item (index 1) which should be the array type + second_item = any_of[1] + if isinstance(second_item, dict) and "items" in second_item: + items = second_item["items"] + if isinstance(items, dict) and "anyOf" in items: + # Extract the union schema with deep copy + input_union_schema = copy.deepcopy(items["anyOf"]) + input_union_title = items.get("title", "OpenAIResponseMessageInputUnion") + + # Collect all refs from the oneOf to detect duplicates + refs_in_oneof = set() + for item in input_union_schema: + if isinstance(item, dict) and "oneOf" in item: + oneof = item["oneOf"] + if isinstance(oneof, list): + for variant in oneof: + if isinstance(variant, dict) and "$ref" in variant: + refs_in_oneof.add(variant["$ref"]) + item["x-stainless-naming"] = "OpenAIResponseMessageInputOneOf" + + # Remove duplicate refs from anyOf that are already in oneOf + deduplicated_schema = [] + for item in input_union_schema: + if isinstance(item, dict) and "$ref" in item: + if item["$ref"] not in refs_in_oneof: + deduplicated_schema.append(item) + else: + deduplicated_schema.append(item) + input_union_schema = deduplicated_schema + + # Create the shared schema with x-stainless-naming to ensure consistent naming + if input_union_schema_name not in schemas: + schemas[input_union_schema_name] = { + "anyOf": input_union_schema, + "title": input_union_title, + "x-stainless-naming": input_union_schema_name, + } + # Replace with reference + second_item["items"] = {"$ref": f"#/components/schemas/{input_union_schema_name}"} + + return openapi_schema + + +def _convert_multiline_strings_to_literal(obj: Any) -> Any: + """Recursively convert multi-line strings to LiteralScalarString for YAML block scalar formatting.""" + try: + from ruamel.yaml.scalarstring import LiteralScalarString + + if isinstance(obj, str) and "\n" in obj: + return LiteralScalarString(obj) + elif isinstance(obj, dict): + return {key: _convert_multiline_strings_to_literal(value) for key, value in obj.items()} + elif isinstance(obj, list): + return [_convert_multiline_strings_to_literal(item) for item in obj] + else: + return obj + except ImportError: + return obj + + +def _write_yaml_file(file_path: Path, schema: dict[str, Any]) -> None: + """Write schema to YAML file using ruamel.yaml if available, otherwise standard 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 + yaml_writer.allow_unicode = True + schema = _convert_multiline_strings_to_literal(schema) + with open(file_path, "w") as f: + yaml_writer.dump(schema, f) + except ImportError: + with open(file_path, "w") as f: + yaml.dump(schema, f, default_flow_style=False, sort_keys=False) + + +def _fix_schema_issues(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """Fix common schema issues: exclusiveMinimum, null defaults, and add titles to unions.""" + # Convert anyOf with const values to enums across the entire schema + _convert_anyof_const_to_enum(openapi_schema) + + # Fix other schema issues and add titles to unions + if "components" in openapi_schema and "schemas" in openapi_schema["components"]: + for schema_name, schema_def in openapi_schema["components"]["schemas"].items(): + _fix_schema_recursive(schema_def) + _add_titles_to_unions(schema_def, schema_name) + 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 diff --git a/scripts/openapi_generator/state.py b/scripts/openapi_generator/state.py new file mode 100644 index 0000000000..b7389f07bf --- /dev/null +++ b/scripts/openapi_generator/state.py @@ -0,0 +1,23 @@ +# 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. + +""" +Shared state for the OpenAPI generator module. +""" + +from typing import Any + +from llama_stack.apis.datatypes import Api + +# Global list to store dynamic models created during endpoint generation +_dynamic_models: list[Any] = [] + +# Cache for protocol methods to avoid repeated lookups +_protocol_methods_cache: dict[Api, dict[str, Any]] | None = None + +# Global dict to store extra body field information by endpoint +# Key: (path, method) tuple, Value: list of (param_name, param_type, description) tuples +_extra_body_fields: dict[tuple[str, str], list[tuple[str, type, str | None]]] = {} diff --git a/scripts/run_openapi_generator.sh b/scripts/run_openapi_generator.sh index c6c61453df..946b2886fe 100755 --- a/scripts/run_openapi_generator.sh +++ b/scripts/run_openapi_generator.sh @@ -14,6 +14,6 @@ set -euo pipefail stack_dir=$(dirname "$THIS_DIR") PYTHONPATH=$PYTHONPATH:$stack_dir \ - python3 -m scripts.fastapi_generator "$stack_dir"/docs/static + python3 -m scripts.openapi_generator "$stack_dir"/docs/static cp "$stack_dir"/docs/static/stainless-llama-stack-spec.yaml "$stack_dir"/client-sdks/stainless/openapi.yml From 2a257dbdea1df22d18a162f70b9f5b32841831eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Nov 2025 10:03:44 +0100 Subject: [PATCH 28/46] chore: rebase on main 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 | 2 +- client-sdks/stainless/openapi.yml | 19597 +++++++--------- docs/static/deprecated-llama-stack-spec.yaml | 14917 ++++++------ .../static/experimental-llama-stack-spec.yaml | 13727 ++++++----- docs/static/llama-stack-spec.yaml | 15636 ++++++------ docs/static/stainless-llama-stack-spec.yaml | 19520 +++++++-------- scripts/openapi_generator/app.py | 2 +- scripts/openapi_generator/endpoints.py | 2 +- .../openapi_generator/schema_collection.py | 8 +- scripts/openapi_generator/schema_filtering.py | 6 +- scripts/openapi_generator/state.py | 2 +- src/llama_stack/core/library_client.py | 3 +- src/llama_stack_api/__init__.py | 21 - uv.lock | 3 +- 14 files changed, 36016 insertions(+), 47430 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2b32524ba9..c31a394062 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -114,7 +114,7 @@ repos: language: python pass_filenames: false require_serial: true - files: ^src/llama_stack/apis/ + files: ^src/llama_stack_api/.*$ - 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 a3e1f39fd9..cc0533382a 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -14,1412 +14,980 @@ info: servers: - url: http://any-hosted-llama-stack.com paths: - /v1/batches: + /v1/providers/{provider_id}: get: + tags: + - Providers + summary: Inspect Provider + operationId: inspect_provider_v1_providers__provider_id__get responses: '200': - description: A list of batch objects. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListBatchesResponse' + schema: {} '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: - - Batches - summary: List all batches for the current user. - description: List all batches for the current user. parameters: - - name: after - in: query - description: >- - A cursor for pagination; returns batches after this batch ID. - required: false - schema: - type: string - - name: limit - in: query - description: >- - Number of batches to return (default 20, max 100). - required: true - schema: - type: integer - deprecated: false - post: + - name: provider_id + in: path + required: true + schema: + type: string + description: 'Path parameter: provider_id' + /v1/providers: + get: + tags: + - Providers + summary: List Providers + operationId: list_providers_v1_providers_get responses: '200': - description: The created batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '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: - - Batches - summary: >- - Create a new batch for processing multiple API requests. - description: >- - Create a new batch for processing multiple API requests. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateBatchRequest' - required: true - deprecated: false - /v1/batches/{batch_id}: + /v1/responses: get: + tags: + - Agents + summary: List Openai Responses + operationId: list_openai_responses_v1_responses_get responses: '200': - description: The batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '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: - - Batches - summary: >- - Retrieve information about a specific batch. - description: >- - Retrieve information about a specific batch. - parameters: - - name: batch_id - in: path - description: The ID of the batch to retrieve. - required: true - schema: - type: string - deprecated: false - /v1/batches/{batch_id}/cancel: post: + tags: + - Agents + summary: Create Openai Response + operationId: create_openai_response_v1_responses_post responses: '200': - description: The updated batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '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: - - Batches - summary: Cancel a batch that is in progress. - description: Cancel a batch that is in progress. - parameters: - - name: batch_id - in: path - description: The ID of the batch to cancel. - required: true - schema: - type: string - deprecated: false - /v1/chat/completions: + /v1/responses/{response_id}: get: + tags: + - Agents + summary: Get Openai Response + operationId: get_openai_response_v1_responses__response_id__get responses: '200': - description: A ListOpenAIChatCompletionResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' + schema: {} '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: List chat completions. - description: List chat completions. parameters: - - name: after - in: query - description: >- - The ID of the last chat completion to return. - required: false - schema: - type: string - - name: limit - in: query - description: >- - The maximum number of chat completions to return. - required: false - schema: - type: integer - - name: model - in: query - description: The model to filter by. - required: false - schema: - type: string - - name: order - in: query - description: >- - The order to sort the chat completions by: "asc" or "desc". Defaults to - "desc". - required: false - schema: - $ref: '#/components/schemas/Order' - deprecated: false - post: + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + delete: + tags: + - Agents + summary: Delete Openai Response + operationId: delete_openai_response_v1_responses__response_id__delete responses: '200': - description: An OpenAIChatCompletion. + description: Successful Response content: application/json: - schema: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletion' - - $ref: '#/components/schemas/OpenAIChatCompletionChunk' + schema: {} '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: Create chat completions. - description: >- - Create chat completions. - - Generate an OpenAI-compatible chat completion for the given messages using - the specified model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody' + parameters: + - name: response_id + in: path required: true - deprecated: false - /v1/chat/completions/{completion_id}: + schema: + type: string + description: 'Path parameter: response_id' + /v1/responses/{response_id}/input_items: get: + tags: + - Agents + summary: List Openai Response Input Items + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get responses: '200': - description: A OpenAICompletionWithInputMessages. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + schema: {} '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: Get chat completion. - description: >- - Get chat completion. - - Describe a chat completion by its ID. parameters: - - name: completion_id - in: path - description: ID of the chat completion. - required: true - schema: - type: string - deprecated: false - /v1/completions: - post: + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + /v1/chat/completions/{completion_id}: + get: + tags: + - Inference + summary: Get Chat Completion + operationId: get_chat_completion_v1_chat_completions__completion_id__get responses: '200': - description: An OpenAICompletion. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAICompletion' + schema: {} '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: Create completion. - description: >- - Create completion. - - Generate an OpenAI-compatible completion for the given prompt using the specified - model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' + parameters: + - name: completion_id + in: path required: true - deprecated: false - /v1/conversations: - post: + schema: + type: string + description: 'Path parameter: completion_id' + /v1/chat/completions: + get: + tags: + - Inference + summary: List Chat Completions + operationId: list_chat_completions_v1_chat_completions_get responses: '200': - description: The created conversation object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Conversation' + schema: {} '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' + post: tags: - - Conversations - summary: Create a conversation. - description: >- - Create a conversation. - - Create a conversation. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateConversationRequest' - required: true - deprecated: false - /v1/conversations/{conversation_id}: - get: + - Inference + summary: Openai Chat Completion + operationId: openai_chat_completion_v1_chat_completions_post responses: '200': - description: The conversation object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Conversation' + schema: {} '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: - - Conversations - summary: Retrieve a conversation. - description: >- - Retrieve a conversation. - - Get a conversation with the given ID. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - deprecated: false + /v1/completions: post: + tags: + - Inference + summary: Openai Completion + operationId: openai_completion_v1_completions_post responses: '200': - description: The updated conversation object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Conversation' + schema: {} '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/embeddings: + post: tags: - - Conversations - summary: Update a conversation. - description: >- - Update a conversation. - - Update a conversation's metadata with the given ID. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateConversationRequest' - required: true - deprecated: false - delete: + - Inference + summary: Openai Embeddings + operationId: openai_embeddings_v1_embeddings_post responses: '200': - description: The deleted conversation resource. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationDeletedResource' + schema: {} '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' + /v1alpha/inference/rerank: + post: tags: - - Conversations - summary: Delete a conversation. - description: >- - Delete a conversation. - - Delete a conversation with the given ID. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - deprecated: false - /v1/conversations/{conversation_id}/items: - get: + - Inference + summary: Rerank + operationId: rerank_v1alpha_inference_rerank_post responses: '200': - description: List of conversation items. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationItemList' + schema: {} '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/health: + get: tags: - - Conversations - summary: List items. - description: >- - List items. - - List items in the conversation. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - - name: after - in: query - description: >- - An item ID to list items after, used in pagination. - required: false - schema: - type: string - - name: include - in: query - description: >- - Specify additional output data to include in the response. - required: false - schema: - type: array - items: - 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. - - name: limit - in: query - description: >- - A limit on the number of objects to be returned (1-100, default 20). - required: false - schema: - type: integer - - name: order - in: query - description: >- - The order to return items in (asc or desc, default desc). - required: false - schema: - type: string - enum: - - asc - - desc - deprecated: false - post: + - Inspect + summary: Health + operationId: health_v1_health_get responses: '200': - description: List of created items. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationItemList' + schema: {} '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: - - Conversations - summary: Create items. - description: >- - Create items. - - Create items in the conversation. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AddItemsRequest' - required: true - deprecated: false - /v1/conversations/{conversation_id}/items/{item_id}: + /v1/inspect/routes: get: + tags: + - Inspect + summary: List Routes + operationId: list_routes_v1_inspect_routes_get responses: '200': - description: The conversation item. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationItem' + schema: {} '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/version: + get: tags: - - Conversations - summary: Retrieve an item. - description: >- - Retrieve an item. - - Retrieve a conversation item. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - - name: item_id - in: path - description: The item identifier. - required: true - schema: - type: string - deprecated: false - delete: + - Inspect + summary: Version + operationId: version_v1_version_get responses: '200': - description: The deleted item resource. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationItemDeletedResource' + schema: {} '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: - - Conversations - summary: Delete an item. - description: >- - Delete an item. - - Delete a conversation item. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - - name: item_id - in: path - description: The item identifier. - required: true - schema: - type: string - deprecated: false - /v1/embeddings: + /v1/batches/{batch_id}/cancel: post: + tags: + - Batches + summary: Cancel Batch + operationId: cancel_batch_v1_batches__batch_id__cancel_post responses: '200': - description: >- - An OpenAIEmbeddingsResponse containing the embeddings. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIEmbeddingsResponse' + schema: {} '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: Create embeddings. - description: >- - Create embeddings. - - Generate OpenAI-compatible embeddings for the given input using the specified - model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' + parameters: + - name: batch_id + in: path required: true - deprecated: false - /v1/files: + schema: + type: string + description: 'Path parameter: batch_id' + /v1/batches: get: + tags: + - Batches + summary: List Batches + operationId: list_batches_v1_batches_get responses: '200': - description: >- - An ListOpenAIFileResponse containing the list of files. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIFileResponse' + schema: {} '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: - - Files - summary: List files. - description: >- - List files. - - Returns a list of files that belong to the user's organization. - parameters: - - name: after - in: query - description: >- - A cursor for use in pagination. `after` is an object ID that defines your - place in the list. For instance, if you make a list request and receive - 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo - in order to fetch the next page of the list. - required: false - schema: - type: string - - name: limit - in: query - description: >- - A limit on the number of objects to be returned. Limit can range between - 1 and 10,000, and the default is 10,000. - required: false - schema: - type: integer - - name: order - in: query - description: >- - Sort order by the `created_at` timestamp of the objects. `asc` for ascending - order and `desc` for descending order. - required: false - schema: - $ref: '#/components/schemas/Order' - - name: purpose - in: query - description: >- - Only return files with the given purpose. - required: false - schema: - $ref: '#/components/schemas/OpenAIFilePurpose' - deprecated: false post: + tags: + - Batches + summary: Create Batch + operationId: create_batch_v1_batches_post responses: '200': - description: >- - An OpenAIFileObject representing the uploaded file. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIFileObject' + schema: {} '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: - - Files - summary: Upload file. - description: >- - Upload file. - - Upload a file that can be used across various endpoints. - - - The file upload should be a multipart form request with: - - - file: The File object (not file name) to be uploaded. - - - purpose: The intended purpose of the uploaded file. - - - expires_after: Optional form values describing expiration for the file. - parameters: [] - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - file: - type: string - format: binary - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' - expires_after: - $ref: '#/components/schemas/ExpiresAfter' - required: - - file - - purpose - required: true - deprecated: false - /v1/files/{file_id}: + /v1/batches/{batch_id}: get: + tags: + - Batches + summary: Retrieve Batch + operationId: retrieve_batch_v1_batches__batch_id__get responses: '200': - description: >- - An OpenAIFileObject containing file information. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIFileObject' + schema: {} '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: - - Files - summary: Retrieve file. - description: >- - Retrieve file. - - Returns information about a specific file. parameters: - - name: file_id - in: path - description: >- - The ID of the file to use for this request. - required: true - schema: - type: string - deprecated: false - delete: + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' + /v1/vector-io/insert: + post: + tags: + - Vector Io + summary: Insert Chunks + operationId: insert_chunks_v1_vector_io_insert_post responses: '200': - description: >- - An OpenAIFileDeleteResponse indicating successful deletion. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIFileDeleteResponse' + schema: {} '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: - - Files - summary: Delete file. - description: Delete file. - parameters: - - name: file_id - in: path - description: >- - The ID of the file to use for this request. - required: true - schema: - type: string - deprecated: false - /v1/files/{file_id}/content: + /v1/vector_stores/{vector_store_id}/files: get: + tags: + - Vector Io + summary: Openai List Files In Vector Store + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get responses: '200': - description: >- - The raw file content as a binary response. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Response' + schema: {} '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: - - Files - summary: Retrieve file content. - description: >- - Retrieve file content. - - Returns the contents of the specified file. parameters: - - name: file_id - in: path - description: >- - The ID of the file to use for this request. - required: true - schema: - type: string - deprecated: false - /v1/health: - get: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + post: + tags: + - Vector Io + summary: Openai Attach File To Vector Store + operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post responses: '200': - description: >- - Health information indicating if the service is operational. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/HealthInfo' + schema: {} '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: 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}/cancel: + post: tags: - - Inspect - summary: Get health status. - description: >- - Get health status. - - Get the current health status of the service. - parameters: [] - deprecated: false - /v1/inspect/routes: - get: + - Vector Io + summary: Openai Cancel Vector Store File Batch + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post responses: '200': - description: >- - Response containing information about all available routes. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListRoutesResponse' + schema: {} '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: - - Inspect - summary: List routes. - description: >- - List routes. - - List all available API routes with their methods and implementing providers. parameters: - - name: api_filter - in: query - description: >- - Optional filter to control which routes are returned. Can be an API level - ('v1', 'v1alpha', 'v1beta') to show non-deprecated routes at that level, - or 'deprecated' to show deprecated routes across all levels. If not specified, - returns all non-deprecated routes. - required: false - schema: - type: string - enum: - - v1 - - v1alpha - - v1beta - - deprecated - deprecated: false - /v1/models: + - 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: get: + tags: + - Vector Io + summary: Openai List Vector Stores + operationId: openai_list_vector_stores_v1_vector_stores_get responses: '200': - description: A OpenAIListModelsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIListModelsResponse' + schema: {} '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: - - Models - summary: List models using the OpenAI API. - description: List models using the OpenAI API. - parameters: [] - deprecated: false post: + tags: + - Vector Io + summary: Openai Create Vector Store + operationId: openai_create_vector_store_v1_vector_stores_post responses: '200': - description: A Model. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Model' + schema: {} '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/vector_stores/{vector_store_id}/file_batches: + post: tags: - - Models - summary: Register model. - description: >- - Register model. - - Register a model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterModelRequest' - required: true - deprecated: true - /v1/models/{model_id}: - get: + - Vector Io + summary: Openai Create Vector Store File Batch + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post responses: '200': - description: A Model. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Model' + schema: {} '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: - - Models - summary: Get model. - description: >- - Get model. - - Get a model by its identifier. parameters: - - name: model_id - in: path - description: The identifier of the model to get. - required: true - schema: - type: string - 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' + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}: + get: tags: - - Models - summary: Unregister model. - description: >- - Unregister model. - - Unregister a model. - parameters: - - name: model_id - in: path - description: >- - The identifier of the model to unregister. - required: true - schema: - type: string - deprecated: true - /v1/moderations: - post: + - Vector Io + summary: Openai Retrieve Vector Store + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get responses: '200': - description: A moderation object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ModerationObject' + schema: {} '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: - - Safety - summary: Create moderation. - description: >- - Create moderation. - - Classifies if text and/or image inputs are potentially harmful. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunModerationRequest' + parameters: + - name: vector_store_id + in: path required: true - deprecated: false - /v1/prompts: - get: + schema: + type: string + description: 'Path parameter: vector_store_id' + post: + tags: + - Vector Io + summary: Openai Update Vector Store + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post responses: '200': - description: >- - A ListPromptsResponse containing all prompts. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListPromptsResponse' + schema: {} '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: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + delete: tags: - - Prompts - summary: List all prompts. - description: List all prompts. - parameters: [] - deprecated: false - post: + - Vector Io + summary: Openai Delete Vector Store + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete responses: '200': - description: The created Prompt resource. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Prompt' + schema: {} '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: - - Prompts - summary: Create prompt. - description: >- - Create prompt. - - Create a new prompt. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreatePromptRequest' + parameters: + - name: vector_store_id + in: path required: true - deprecated: false - /v1/prompts/{prompt_id}: + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}/files/{file_id}: get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store File + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get responses: '200': - description: A Prompt resource. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Prompt' + schema: {} '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: - - Prompts - summary: Get prompt. - description: >- - Get prompt. - - Get a prompt by its identifier and optional version. parameters: - - name: prompt_id - in: path - description: The identifier of the prompt to get. - required: true - schema: - type: string - - name: version - in: query - description: >- - The version of the prompt to get (defaults to latest). - required: false - schema: - type: integer - deprecated: false + - 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' post: + tags: + - Vector Io + summary: Openai Update Vector Store File + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post responses: '200': - description: >- - The updated Prompt resource with incremented version. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Prompt' + schema: {} '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: - - Prompts - summary: Update prompt. - description: >- - Update prompt. - - Update an existing prompt (increments version). parameters: - - name: prompt_id - in: path - description: The identifier of the prompt to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdatePromptRequest' + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + - name: file_id + in: path required: true - deprecated: false + schema: + type: string + description: 'Path parameter: file_id' delete: + tags: + - Vector Io + summary: Openai Delete Vector Store File + operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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: - - Prompts - summary: Delete prompt. - description: >- - Delete prompt. - - Delete a prompt. parameters: - - name: prompt_id - in: path - description: The identifier of the prompt to delete. - required: true - schema: - type: string - deprecated: false - /v1/prompts/{prompt_id}/set-default-version: - post: + - 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}/file_batches/{batch_id}/files: + get: + tags: + - Vector Io + summary: Openai List Files In Vector Store File Batch + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get responses: '200': - description: >- - The prompt with the specified version now set as default. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Prompt' + schema: {} '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: - - Prompts - summary: Set prompt version. - description: >- - Set prompt version. - - Set which version of a prompt should be the default in get_prompt (latest). parameters: - - name: prompt_id - in: path - description: The identifier of the prompt. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SetDefaultVersionRequest' + - name: vector_store_id + in: path required: true - deprecated: false - /v1/prompts/{prompt_id}/versions: - get: - responses: - '200': - description: >- - A ListPromptsResponse containing all versions of the prompt. - content: - application/json: - schema: - $ref: '#/components/schemas/ListPromptsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Prompts - summary: List prompt versions. - description: >- - List prompt versions. - - List all versions of a specific prompt. - parameters: - - name: prompt_id - in: path - description: >- - The identifier of the prompt to list versions for. - required: true - schema: - type: string - deprecated: false - /v1/providers: - get: - responses: - '200': - description: >- - A ListProvidersResponse containing information about all providers. - content: - application/json: - schema: - $ref: '#/components/schemas/ListProvidersResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Providers - summary: List providers. - description: >- - List providers. - - List all available providers. - parameters: [] - deprecated: false - /v1/providers/{provider_id}: + 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}: get: tags: - - Providers - summary: Inspect Provider - description: |- - Get provider. - - Get detailed information about a specific provider. - operationId: inspect_provider_v1_providers__provider_id__get + - Vector Io + summary: Openai Retrieve Vector Store File Batch + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get responses: '200': - description: A ProviderInfo object containing the provider's details. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ProviderInfo' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1433,29 +1001,30 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: provider_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: provider_id' - /v1/providers: + 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}/files/{file_id}/content: get: tags: - - Providers - summary: List Providers - description: |- - List providers. - - List all available providers. - operationId: list_providers_v1_providers_get + - Vector Io + summary: Openai Retrieve Vector Store File Contents + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get responses: '200': - description: A ListProvidersResponse containing information about all providers. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListProvidersResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1468,139 +1037,86 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/responses: - get: - tags: - - Agents - summary: List Openai Responses - description: List all responses. - operationId: list_openai_responses_v1_responses_get parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 50 - title: Limit - - name: model - in: query - required: false + - name: vector_store_id + in: path + required: true schema: - anyOf: - - type: string - - type: 'null' - title: Model - - name: order - in: query - required: false + type: string + description: 'Path parameter: vector_store_id' + - name: file_id + in: path + required: true schema: - anyOf: - - $ref: '#/components/schemas/Order' - - type: 'null' - default: desc - title: Order + type: string + description: 'Path parameter: file_id' + /v1/vector_stores/{vector_store_id}/search: + post: + tags: + - Vector Io + summary: Openai Search Vector Store + operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post responses: '200': - description: A ListOpenAIResponseObject. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIResponseObject' + schema: {} '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/vector-io/query: post: tags: - - Agents - summary: Create Openai Response - description: Create a model response. - operationId: create_openai_response_v1_responses_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/_responses_Request' - x-llama-stack-extra-body-params: - guardrails: - $defs: - ResponseGuardrailSpec: - description: |- - Specification for a guardrail to apply during response generation. - - :param type: The type/identifier of the guardrail. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - type: object - anyOf: - - items: - anyOf: - - type: string - - $ref: '#/components/schemas/ResponseGuardrailSpec' - type: array - - type: 'null' - description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. + - Vector Io + summary: Query Chunks + operationId: query_chunks_v1_vector_io_query_post responses: '200': - description: An OpenAIResponseObject. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseObject' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIResponseObjectStream' + schema: {} '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 - /v1/responses/{response_id}: + $ref: '#/components/responses/DefaultError' + /v1/models/{model_id}: get: tags: - - Agents - summary: Get Openai Response - description: Get a model response. - operationId: get_openai_response_v1_responses__response_id__get + - Models + summary: Get Model + operationId: get_model_v1_models__model_id__get responses: '200': - description: An OpenAIResponseObject. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1614,25 +1130,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: response_id + - name: model_id in: path required: true schema: type: string - description: 'Path parameter: response_id' - delete: + description: 'Path parameter: model_id' + /v1/models: + get: tags: - - Agents - summary: Delete Openai Response - description: Delete a response. - operationId: delete_openai_response_v1_responses__response_id__delete + - Models + summary: Openai List Models + operationId: openai_list_models_v1_models_get responses: '200': - description: An OpenAIDeleteResponseObject + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIDeleteResponseObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1645,107 +1160,42 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: response_id - in: path - required: true - schema: - type: string - description: 'Path parameter: response_id' - /v1/responses/{response_id}/input_items: - get: + /v1/moderations: + post: tags: - - Agents - summary: List Openai Response Input Items - description: List input items. - operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/Order' - - type: 'null' - default: desc - title: Order - - name: response_id - in: path - required: true - schema: - type: string - description: 'Path parameter: response_id' - - name: include - in: query - required: false - schema: - anyOf: - - type: array - items: - type: string - - type: 'null' - title: Include + - Safety + summary: Run Moderation + operationId: run_moderation_v1_moderations_post responses: '200': - description: An ListOpenAIResponseInputItem. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIResponseInputItem' + schema: {} '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 - /v1/chat/completions/{completion_id}: - get: + $ref: '#/components/responses/DefaultError' + /v1/safety/run-shield: + post: tags: - - Inference - summary: Get Chat Completion - description: |- - Get chat completion. - - Describe a chat completion by its ID. - operationId: get_chat_completion_v1_chat_completions__completion_id__get + - Safety + summary: Run Shield + operationId: run_shield_v1_safety_run_shield_post responses: '200': - description: A OpenAICompletionWithInputMessages. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1758,192 +1208,135 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: completion_id - in: path - required: true - schema: - type: string - description: 'Path parameter: completion_id' - /v1/chat/completions: + /v1/shields/{identifier}: get: tags: - - Inference - summary: List Chat Completions - description: List chat completions. - operationId: list_chat_completions_v1_chat_completions_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: model - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Model - - name: order - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/Order' - - type: 'null' - default: desc - title: Order + - Shields + summary: Get Shield + operationId: get_shield_v1_shields__identifier__get responses: '200': - description: A ListOpenAIChatCompletionResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' + schema: {} '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 - post: + $ref: '#/components/responses/DefaultError' + parameters: + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + /v1/shields: + get: tags: - - ScoringFunctions - summary: List all scoring functions. - description: List all scoring functions. - parameters: [] - deprecated: false - post: + - Shields + summary: List Shields + operationId: list_shields_v1_shields_get responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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' + /v1beta/datasetio/append-rows/{dataset_id}: + post: tags: - - ScoringFunctions - summary: Register a scoring function. - description: Register a scoring function. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterScoringFunctionRequest' - required: true - deprecated: true - /v1/scoring-functions/{scoring_fn_id}: - get: + - Datasetio + summary: Append Rows + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post responses: '200': - description: An OpenAIChatCompletion. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIChatCompletion' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIChatCompletionChunk' + schema: {} '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: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - ScoringFunctions - summary: Get a scoring function by its ID. - description: Get a scoring function by its ID. parameters: - - name: scoring_fn_id - in: path - description: The ID of the scoring function to get. - required: true - schema: - type: string - deprecated: false - delete: + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasetio/iterrows/{dataset_id}: + get: + tags: + - Datasetio + summary: Iterrows + operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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: - - ScoringFunctions - summary: Unregister a scoring function. - description: Unregister a scoring function. parameters: - - name: scoring_fn_id - in: path - description: >- - The ID of the scoring function to unregister. - required: true - schema: - type: string - deprecated: true - /v1/scoring/score: - post: - tags: - - Inference - summary: Openai Completion - description: |- - Create completion. - - Generate an OpenAI-compatible completion for the given prompt using the specified model. - operationId: openai_completion_v1_completions_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' + - name: dataset_id + in: path required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasets/{dataset_id}: + get: + tags: + - Datasets + summary: Get Dataset + operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': - description: An OpenAICompletion. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAICompletion' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1956,29 +1349,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/embeddings: - post: - tags: - - Inference - summary: Openai Embeddings - description: |- - Create embeddings. - - Generate OpenAI-compatible embeddings for the given input using the specified model. - operationId: openai_embeddings_v1_embeddings_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' + parameters: + - name: dataset_id + in: path required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasets: + get: + tags: + - Datasets + summary: List Datasets + operationId: list_datasets_v1beta_datasets_get responses: '200': - description: An OpenAIEmbeddingsResponse containing the embeddings. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIEmbeddingsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1991,53 +1380,42 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/inference/rerank: + /v1/scoring/score: post: tags: - - Shields - summary: List all shields. - description: List all shields. - parameters: [] - deprecated: false - post: + - Scoring + summary: Score + operationId: score_v1_scoring_score_post responses: '200': - description: A Shield. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Shield' + schema: {} '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/scoring/score-batch: + post: tags: - - Shields - summary: Register a shield. - description: Register a shield. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterShieldRequest' - required: true - deprecated: true - /v1/shields/{identifier}: - get: + - Scoring + summary: Score Batch + operationId: score_batch_v1_scoring_score_batch_post responses: '200': - description: RerankResponse with indices sorted by relevance score (descending). + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/RerankResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2050,23 +1428,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/health: + /v1/scoring-functions/{scoring_fn_id}: get: tags: - - Inspect - summary: Health - description: |- - Get health status. - - Get the current health status of the service. - operationId: health_v1_health_get + - Scoring Functions + summary: Get Scoring Function + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': - description: Health information indicating if the service is operational. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/HealthInfo' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2079,70 +1452,49 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/inspect/routes: - get: - tags: - - Inspect - summary: List Routes - description: |- - List routes. - - List all available API routes with their methods and implementing providers. - operationId: list_routes_v1_inspect_routes_get parameters: - - name: api_filter - in: query - required: false + - name: scoring_fn_id + in: path + required: true schema: - anyOf: - - enum: - - v1 - - v1alpha - - v1beta - - deprecated - type: string - deprecated: false - delete: + type: string + description: 'Path parameter: scoring_fn_id' + /v1/scoring-functions: + get: + tags: + - Scoring Functions + summary: List Scoring Functions + operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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: - - Shields - summary: Unregister a shield. - description: Unregister a shield. - parameters: - - name: identifier - in: path - description: >- - The identifier of the shield to unregister. - required: true - schema: - type: string - deprecated: true - /v1/tool-runtime/invoke: + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: tags: - - Batches - summary: Cancel Batch - description: Cancel a batch that is in progress. - operationId: cancel_batch_v1_batches__batch_id__cancel_post + - Eval + summary: Evaluate Rows + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post responses: '200': - description: The updated batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2156,203 +1508,134 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: batch_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/batches: - post: + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: + get: tags: - - Batches - summary: Create Batch - description: Create a new batch for processing multiple API requests. - operationId: create_batch_v1_batches_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/_batches_Request' + - Eval + summary: Job Status + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': - description: The created batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '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: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - ToolGroups - summary: List tool groups with optional provider. - description: List tool groups with optional provider. - parameters: [] - deprecated: false - post: - 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: - - ToolGroups - summary: Register a tool group. - description: Register a tool group. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterToolGroupRequest' - required: true - deprecated: true - /v1/toolgroups/{toolgroup_id}: - get: - tags: - - Batches - summary: List Batches - description: List all batches for the current user. - operationId: list_batches_v1_batches_get - parameters: - - name: toolgroup_id - in: path - description: The ID of the tool group to get. - required: true - schema: - type: string - 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: - - ToolGroups - summary: Unregister a tool group. - description: Unregister a tool group. - parameters: - - name: toolgroup_id - in: path - description: The ID of the tool group to unregister. - required: true - schema: - type: string - deprecated: true - /v1/tools: - get: - tags: - - Batches - summary: List Batches - description: List all batches for the current user. - operationId: list_batches_v1_batches_get parameters: - - name: after - in: query - required: false + - name: benchmark_id + in: path + required: true schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: limit - in: query - required: false + type: string + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true schema: - type: integer - default: 20 - title: Limit + type: string + description: 'Path parameter: job_id' + delete: + tags: + - Eval + summary: Job Cancel + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete responses: '200': - description: A list of batch objects. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListBatchesResponse' + schema: {} '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 - post: - tags: - - Batches - summary: Create Batch - description: Create a new batch for processing multiple API requests. - operationId: create_batch_v1_batches_post - requestBody: + $ref: '#/components/responses/DefaultError' + parameters: + - name: benchmark_id + in: path required: true - content: - application/json: - schema: - $ref: '#/components/schemas/_batches_Request' + schema: + type: string + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: + get: + tags: + - Eval + summary: Job Result + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get responses: '200': - description: The created batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '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 - /v1/batches/{batch_id}: - get: + $ref: '#/components/responses/DefaultError' + parameters: + - 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' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs: + post: tags: - - Batches - summary: Retrieve Batch - description: Retrieve information about a specific batch. - operationId: retrieve_batch_v1_batches__batch_id__get + - Eval + summary: Run Eval + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post responses: '200': - description: The batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2366,28 +1649,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: batch_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/vector-io/insert: - post: + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}: + get: tags: - - Vector Io - summary: Insert Chunks - description: Insert chunks into a vector database. - operationId: insert_chunks_v1_vector_io_insert_post - requestBody: - required: true - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Chunk-Input' - title: Chunks + - Benchmarks + summary: Get Benchmark + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': description: Successful Response @@ -2395,149 +1668,84 @@ paths: application/json: schema: {} '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 - /v1/vector_stores/{vector_store_id}/files: - get: - tags: - - Vector Io - summary: Openai List Files In Vector Store - description: List files in a vector store. - operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get + $ref: '#/components/responses/DefaultError' parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: filter - in: query - required: false - schema: - title: Filter - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - nullable: true - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - default: desc - title: Order - - name: vector_store_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks: + get: + tags: + - Benchmarks + summary: List Benchmarks + operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': - description: A VectorStoreListFilesResponse containing the list of files. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreListFilesResponse' + schema: {} '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/cancel: post: tags: - - Vector Io - summary: Openai Attach File To Vector Store - description: Attach a file to a vector store. - 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' + - Post Training + summary: Cancel Training Job + operationId: cancel_training_job_v1alpha_post_training_job_cancel_post responses: '200': - description: A VectorStoreFileObject representing the attached file. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileObject' + schema: {} '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 - 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}/cancel: - post: + $ref: '#/components/responses/DefaultError' + /v1alpha/post-training/job/artifacts: + get: tags: - - Vector Io - summary: Openai Cancel Vector Store File Batch - description: Cancels a vector store file batch. - operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post + - Post Training + summary: Get Training Job Artifacts + operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get responses: '200': - description: A VectorStoreFileBatchObject representing the cancelled file batch. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2550,137 +1758,90 @@ 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' - - name: batch_id - in: path - required: true - schema: - type: string - description: 'Path parameter: batch_id' - /v1/vector_stores: + /v1alpha/post-training/job/status: get: tags: - - Vector Io - summary: Openai List Vector Stores - description: Returns a list of vector stores. - operationId: openai_list_vector_stores_v1_vector_stores_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - default: desc - title: Order + - Post Training + summary: Get Training Job Status + operationId: get_training_job_status_v1alpha_post_training_job_status_get responses: '200': - description: A VectorStoreListResponse containing the list of vector stores. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreListResponse' + schema: {} '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: + description: Default Response $ref: '#/components/responses/DefaultError' + /v1alpha/post-training/jobs: + get: + tags: + - Post Training + summary: Get Training Jobs + operationId: get_training_jobs_v1alpha_post_training_jobs_get + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + /v1alpha/post-training/preference-optimize: post: tags: - - Vector Io - summary: Openai Create Vector Store - description: |- - Creates a vector store. - - Generate an OpenAI-compatible vector store with the given parameters. - operationId: openai_create_vector_store_v1_vector_stores_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAICreateVectorStoreRequestWithExtraBody' + - Post Training + summary: Preference Optimize + operationId: preference_optimize_v1alpha_post_training_preference_optimize_post responses: '200': - description: A VectorStoreObject representing the created vector store. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreObject' + schema: {} '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 - /v1/vector_stores/{vector_store_id}/file_batches: + $ref: '#/components/responses/DefaultError' + /v1alpha/post-training/supervised-fine-tune: post: tags: - - Vector Io - summary: Openai Create Vector Store File Batch - description: |- - Create a vector store file batch. - - Generate an OpenAI-compatible vector store file batch for the given vector store. - 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 + - Post Training + summary: Supervised Fine Tune + operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post responses: '200': - description: A VectorStoreFileBatchObject representing the created file batch. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2693,27 +1854,18 @@ 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}: + /v1/tools/{tool_name}: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store - description: Retrieves a vector store. - operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get + - Tool Groups + summary: Get Tool + operationId: get_tool_v1_tools__tool_name__get responses: '200': - description: A VectorStoreObject representing the vector store. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2727,31 +1879,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: tool_name in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - post: + description: 'Path parameter: tool_name' + /v1/toolgroups/{toolgroup_id}: + get: tags: - - Vector Io - summary: Openai Update Vector Store - description: Updates a vector store. - operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_vector_stores_vector_store_id_Request' - required: true + - Tool Groups + summary: Get Tool Group + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get responses: '200': - description: A VectorStoreObject representing the updated vector store. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2765,25 +1910,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: toolgroup_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - delete: + description: 'Path parameter: toolgroup_id' + /v1/toolgroups: + get: tags: - - Vector Io - summary: Openai Delete Vector Store - description: Delete a vector store. - operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete + - Tool Groups + summary: List Tool Groups + operationId: list_tool_groups_v1_toolgroups_get responses: '200': - description: A VectorStoreDeleteResponse indicating the deletion status. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreDeleteResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2796,27 +1940,18 @@ 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}/files/{file_id}: + /v1/tools: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store File - description: Retrieves a vector store file. - operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get + - Tool Groups + summary: List Tools + operationId: list_tools_v1_tools_get responses: '200': - description: A VectorStoreFileObject representing the file. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2829,38 +1964,66 @@ 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' - - name: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' + /v1/tool-runtime/invoke: post: tags: - - Vector Io - summary: Openai Update Vector Store File - description: Updates a vector store file. - operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_vector_stores_vector_store_id_files_file_id_Request' - required: true + - Tool Runtime + summary: Invoke Tool + operationId: invoke_tool_v1_tool_runtime_invoke_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: + - Tool Runtime + summary: List Runtime Tools + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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/{file_id}: + get: + tags: + - Files + summary: Openai Retrieve File + operationId: openai_retrieve_file_v1_files__file_id__get responses: '200': - description: A VectorStoreFileObject representing the updated file. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2874,12 +2037,6 @@ paths: 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: file_id in: path required: true @@ -2888,17 +2045,15 @@ paths: description: 'Path parameter: file_id' delete: tags: - - Vector Io - summary: Openai Delete Vector Store File - description: Delete a vector store file. - operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete + - Files + summary: Openai Delete File + operationId: openai_delete_file_v1_files__file_id__delete responses: '200': - description: A VectorStoreFileDeleteResponse indicating the deletion status. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileDeleteResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2912,113 +2067,47 @@ paths: 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: file_id in: path required: true schema: type: string description: 'Path parameter: file_id' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: + /v1/files: get: tags: - - Vector Io - summary: Openai List Files In Vector Store File Batch - description: Returns a list of vector store files in a batch. - operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: filter - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Filter - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - default: desc - title: Order - - 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' + - Files + summary: Openai List Files + operationId: openai_list_files_v1_files_get responses: '200': - description: A VectorStoreFilesListInBatchResponse containing the list of files in the batch. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' + schema: {} '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 - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: - get: + $ref: '#/components/responses/DefaultError' + post: tags: - - Vector Io - summary: Openai Retrieve Vector Store File Batch - description: Retrieve a vector store file batch. - operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get + - Files + summary: Openai Upload File + operationId: openai_upload_file_v1_files_post responses: '200': - description: A VectorStoreFileBatchObject representing the file batch. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3031,99 +2120,18 @@ 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' - - name: batch_id - in: path - required: true - schema: - type: string - description: 'Path parameter: batch_id' - /v1/vector_stores/{vector_store_id}/files/{file_id}/content: + /v1/files/{file_id}/content: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store File Contents - description: Retrieves the contents of a vector store file. - operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get - parameters: - - name: include_embeddings - in: query - required: false - schema: - anyOf: - - type: boolean - - type: 'null' - default: false - title: Include Embeddings - - name: include_metadata - in: query - required: false - schema: - anyOf: - - type: boolean - - type: 'null' - default: false - title: Include Metadata - - 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' - responses: - '200': - description: File contents, optionally with embeddings and metadata based on query parameters. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileContentResponse' - '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: - - Vector Io - summary: Openai Search Vector Store - description: |- - Search for chunks in a vector store. - - Searches a vector store for relevant chunks based on a query and optional file attribute filters. - 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 + - Files + summary: Openai Retrieve File Content + operationId: openai_retrieve_file_content_v1_files__file_id__content_get responses: '200': - description: A VectorStoreSearchResponse containing the search results. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreSearchResponsePage' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3137,32 +2145,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: file_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - /v1/vector-io/query: - post: + description: 'Path parameter: file_id' + /v1/prompts: + get: tags: - - Vector Io - summary: Query Chunks - description: Query chunks from a vector database. - operationId: query_chunks_v1_vector_io_query_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_vector_io_query_Request' - required: true + - Prompts + summary: List Prompts + operationId: list_prompts_v1_prompts_get responses: '200': - description: A QueryChunksResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/QueryChunksResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3175,23 +2175,17 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/models/{model_id}: - get: + post: tags: - - Models - summary: Get Model - description: |- - Get model. - - Get a model by its identifier. - operationId: get_model_v1_models__model_id__get + - Prompts + summary: Create Prompt + operationId: create_prompt_v1_prompts_post responses: '200': - description: A Model. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Model' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3204,27 +2198,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: model_id - in: path - required: true - schema: - type: string - description: 'Path parameter: model_id' - /v1/models: + /v1/prompts/{prompt_id}: get: tags: - - Models - summary: Openai List Models - description: List models using the OpenAI API. - operationId: openai_list_models_v1_models_get + - Prompts + summary: Get Prompt + operationId: get_prompt_v1_prompts__prompt_id__get responses: '200': - description: A OpenAIListModelsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIListModelsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3237,29 +2222,24 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/moderations: + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' post: tags: - - Safety - summary: Run Moderation - description: |- - Create moderation. - - Classifies if text and/or image inputs are potentially harmful. - operationId: run_moderation_v1_moderations_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_moderations_Request' - required: true + - Prompts + summary: Update Prompt + operationId: update_prompt_v1_prompts__prompt_id__post responses: '200': - description: A moderation object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ModerationObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3272,29 +2252,24 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/safety/run-shield: - post: - tags: - - Safety - summary: Run Shield - description: |- - Run shield. - - Run a shield. - operationId: run_shield_v1_safety_run_shield_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_safety_run_shield_Request' + parameters: + - name: prompt_id + in: path required: true + schema: + type: string + description: 'Path parameter: prompt_id' + delete: + tags: + - Prompts + summary: Delete Prompt + operationId: delete_prompt_v1_prompts__prompt_id__delete responses: '200': - description: A RunShieldResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/RunShieldResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3307,20 +2282,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/shields/{identifier}: + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/versions: get: tags: - - Shields - summary: Get Shield - description: Get a shield by its identifier. - operationId: get_shield_v1_shields__identifier__get + - Prompts + summary: List Prompt Versions + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get responses: '200': - description: A Shield. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Shield' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3334,26 +2314,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: identifier + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: identifier' - /v1/shields: - get: + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/set-default-version: + post: tags: - - Shields - summary: List Shields - description: List all shields. - operationId: list_shields_v1_shields_get + - Prompts + summary: Set Default Version + operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post responses: '200': - description: A ListShieldsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListShieldsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3366,120 +2344,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1beta/datasetio/append-rows/{dataset_id}: - post: - tags: - - Datasetio - summary: Append Rows - description: Append rows to a dataset. - operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post - requestBody: - content: - application/json: - schema: - items: - additionalProperties: true - type: object - type: array - title: Rows - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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: dataset_id - in: path - required: true - schema: - type: string - description: 'Path parameter: dataset_id' - /v1beta/datasetio/iterrows/{dataset_id}: - get: - tags: - - Datasetio - summary: Iterrows - 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. - operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get parameters: - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - title: Limit - - name: start_index - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - title: Start Index - - name: dataset_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: dataset_id' - responses: - '200': - description: A PaginatedResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedResponse' - '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 - /v1beta/datasets/{dataset_id}: + description: 'Path parameter: prompt_id' + /v1/conversations/{conversation_id}/items: get: tags: - - Datasets - summary: Get Dataset - description: Get a dataset by its ID. - operationId: get_dataset_v1beta_datasets__dataset_id__get + - Conversations + summary: List Items + operationId: list_items_v1_conversations__conversation_id__items_get responses: '200': - description: A Dataset. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Dataset' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3493,58 +2376,23 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: dataset_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: dataset_id' - /v1beta/datasets: - get: - tags: - - Datasets - summary: List Datasets - description: List all datasets. - operationId: list_datasets_v1beta_datasets_get - responses: - '200': - description: A ListDatasetsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListDatasetsResponse' - '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: + description: 'Path parameter: conversation_id' post: tags: - - Scoring - summary: Score - description: Score a list of rows. - operationId: score_v1_scoring_score_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_scoring_score_Request' - required: true + - Conversations + summary: Add Items + operationId: add_items_v1_conversations__conversation_id__items_post responses: '200': - description: A ScoreResponse object containing rows and aggregated results. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ScoreResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3557,26 +2405,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring/score-batch: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations: post: tags: - - Scoring - summary: Score Batch - description: Score a batch of rows. - operationId: score_batch_v1_scoring_score_batch_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_scoring_score_batch_Request' - required: true + - Conversations + summary: Create Conversation + operationId: create_conversation_v1_conversations_post responses: '200': - description: A ScoreBatchResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ScoreBatchResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3589,20 +2436,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring-functions/{scoring_fn_id}: + /v1/conversations/{conversation_id}: get: tags: - - Scoring Functions - summary: Get Scoring Function - description: Get a scoring function by its ID. - operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get + - Conversations + summary: Get Conversation + operationId: get_conversation_v1_conversations__conversation_id__get responses: '200': - description: A ScoringFn. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ScoringFn' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3616,58 +2461,23 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: scoring_fn_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: scoring_fn_id' - /v1/scoring-functions: - get: - tags: - - Scoring Functions - summary: List Scoring Functions - description: List all scoring functions. - 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 - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + description: 'Path parameter: conversation_id' post: tags: - - Eval - summary: Evaluate Rows - description: Evaluate a list of rows on a benchmark. - operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_eval_benchmarks_benchmark_id_evaluations_Request' - required: true + - Conversations + summary: Update Conversation + operationId: update_conversation_v1_conversations__conversation_id__post responses: '200': - description: EvaluateResponse object containing generations and scores. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3681,26 +2491,23 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: - get: + description: 'Path parameter: conversation_id' + delete: tags: - - Eval - summary: Job Status - description: Get the status of a job. - operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get + - Conversations + summary: Openai Delete Conversation + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete responses: '200': - description: The status of the evaluation job. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Job' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3714,24 +2521,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id - in: path - required: true - schema: - type: string - description: 'Path parameter: benchmark_id' - - name: job_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: job_id' - delete: + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items/{item_id}: + get: tags: - - Eval - summary: Job Cancel - description: Cancel a job. - operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete + - Conversations + summary: Retrieve + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get responses: '200': description: Successful Response @@ -3751,32 +2552,29 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: benchmark_id' - - name: job_id + description: 'Path parameter: conversation_id' + - name: item_id in: path required: true schema: type: string - description: 'Path parameter: job_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: - get: + description: 'Path parameter: item_id' + delete: tags: - - Eval - summary: Job Result - description: Get the result of a job. - operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get + - Conversations + summary: Openai Delete Conversation Item + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete responses: '200': - description: The result of the job. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3790,9961 +2588,7376 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: benchmark_id' - - name: job_id + description: 'Path parameter: conversation_id' + - name: item_id in: path required: true schema: type: string - description: 'Path parameter: job_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs: - post: - tags: - - Eval - summary: Run Eval - description: Run an evaluation on a benchmark. - operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BenchmarkConfig' - required: true - responses: - '200': - 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': - 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: benchmark_id - in: path - required: true - schema: - type: string - description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks/{benchmark_id}: - get: - tags: - - Benchmarks - summary: Get Benchmark - description: Get a benchmark by its ID. - operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get - responses: - '200': - description: A Benchmark. - content: - application/json: - schema: - $ref: '#/components/schemas/Benchmark' - '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: benchmark_id - in: path - required: true - schema: + description: 'Path parameter: item_id' +components: + responses: + BadRequest400: + description: The request was invalid or malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 400 + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 429 + title: Too Many Requests + detail: You have exceeded the rate limit. Please try again later. + InternalServerError500: + description: The server encountered an unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 500 + title: Internal Server Error + detail: An unexpected error occurred + DefaultError: + description: An error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + schemas: + ImageContentItem: + description: A image content item + properties: + type: + const: image + default: image + title: Type type: string - description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks: - get: - tags: - - Benchmarks - summary: List Benchmarks - description: List all benchmarks. - operationId: list_benchmarks_v1alpha_eval_benchmarks_get - responses: - '200': - description: A ListBenchmarksResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListBenchmarksResponse' - '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 - /v1alpha/post-training/job/cancel: - post: - tags: - - Post Training - summary: Cancel Training Job - description: Cancel a training job. - operationId: cancel_training_job_v1alpha_post_training_job_cancel_post - parameters: - - name: job_uuid - in: query - required: true - schema: + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + TextContentItem: + description: A text content item + properties: + type: + const: text + default: text + title: Type type: string - title: Job Uuid - 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 - /v1alpha/post-training/job/artifacts: - get: - tags: - - Post Training - summary: Get Training Job Artifacts - description: Get the artifacts of a training job. - operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get - parameters: - - name: job_uuid - in: query - required: true - schema: + text: + title: Text type: string - title: Job Uuid - responses: - '200': - description: A PostTrainingJobArtifactsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' - '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 - /v1alpha/post-training/job/status: - get: - tags: - - Post Training - summary: Get Training Job Status - description: Get the status of a training job. - operationId: get_training_job_status_v1alpha_post_training_job_status_get - parameters: - - name: job_uuid - in: query - required: true - schema: + required: + - text + title: TextContentItem + type: object + URL: + description: A URL reference to external content. + properties: + uri: + title: Uri type: string - title: Job Uuid - responses: - '200': - description: A PostTrainingJobStatusResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJobStatusResponse' - '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 - /v1alpha/post-training/jobs: - get: - tags: - - Post Training - summary: Get Training Jobs - description: Get all training jobs. - operationId: get_training_jobs_v1alpha_post_training_jobs_get - responses: - '200': - description: A ListPostTrainingJobsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListPostTrainingJobsResponse' - '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' - /v1alpha/post-training/preference-optimize: - post: - tags: - - Post Training - summary: Preference Optimize - description: Run preference optimization of a model. - operationId: preference_optimize_v1alpha_post_training_preference_optimize_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_post_training_preference_optimize_Request' - required: true - responses: - '200': - description: A PostTrainingJob. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' - '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' - /v1alpha/post-training/supervised-fine-tune: - post: - tags: - - Post Training - summary: Supervised Fine Tune - description: Run supervised fine-tuning of a model. - operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_post_training_supervised_fine_tune_Request' - required: true - responses: - '200': - description: A PostTrainingJob. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' - '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/tools/{tool_name}: - get: - tags: - - Tool Groups - summary: Get Tool - description: Get a tool by its name. - operationId: get_tool_v1_tools__tool_name__get - responses: - '200': - description: A ToolDef. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDef' - '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: tool_name - in: path - required: true - schema: - type: string - description: 'Path parameter: tool_name' - /v1/toolgroups/{toolgroup_id}: - get: - tags: - - Tool Groups - summary: Get Tool Group - description: Get a tool group by its ID. - operationId: get_tool_group_v1_toolgroups__toolgroup_id__get - responses: - '200': - description: A ToolGroup. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolGroup' - '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: toolgroup_id - in: path - required: true - schema: - type: string - description: 'Path parameter: toolgroup_id' - /v1/toolgroups: - get: - tags: - - Tool Groups - summary: List Tool Groups - description: List tool groups with optional provider. - 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 - /v1/tools: - get: - tags: - - Tool Groups - summary: List Tools - description: List tools with optional tool group. - operationId: list_tools_v1_tools_get - parameters: - - name: toolgroup_id - in: query - required: false - schema: + required: + - uri + title: URL + type: object + _URLOrData: + description: A URL or a base64 encoded string + properties: + url: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - 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/tool-runtime/invoke: - post: - tags: - - Tool Runtime - summary: Invoke Tool - description: Run a tool with the given arguments. - 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: - - Tool Runtime - summary: List Runtime Tools - description: List all tools in the runtime. - operationId: list_runtime_tools_v1_tool_runtime_list_tools_get - parameters: - - name: tool_group_id - in: query - required: false - schema: + nullable: true + title: URL + data: anyOf: - type: string - type: 'null' - title: Tool Group Id - - name: mcp_endpoint - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' - title: Mcp Endpoint - 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/files/{file_id}: - get: - tags: - - Files - summary: Openai Retrieve File - description: |- - Retrieve file. - - Returns information about a specific file. - operationId: openai_retrieve_file_v1_files__file_id__get - responses: - '200': - description: An OpenAIFileObject containing file information. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIFileObject' - '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: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' - delete: - tags: - - Files - summary: Openai Delete File - description: Delete file. - operationId: openai_delete_file_v1_files__file_id__delete - responses: - '200': - description: An OpenAIFileDeleteResponse indicating successful deletion. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIFileDeleteResponse' - '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: file_id - in: path - required: true - schema: + contentEncoding: base64 + nullable: true + title: _URLOrData + type: object + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + GreedySamplingStrategy: + description: Greedy sampling strategy that selects the highest probability token at each step. + properties: + type: + const: greedy + default: greedy + title: Type type: string - description: 'Path parameter: file_id' - /v1/files: - get: - tags: - - Files - summary: Openai List Files - description: |- - List files. - - Returns a list of files that belong to the user's organization. - operationId: openai_list_files_v1_files_get - parameters: - - name: after - in: query - required: false - schema: + title: GreedySamplingStrategy + type: object + TopKSamplingStrategy: + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. + 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. + properties: + type: + const: top_p + default: top_p + title: Type + type: string + temperature: + anyOf: + - type: number + minimum: 0.0 + - type: 'null' + top_p: + anyOf: + - type: number + - type: 'null' + default: 0.95 + required: + - temperature + title: TopPSamplingStrategy + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + OpenAIChatCompletionContentPartImageParam: + description: Image content part for OpenAI-compatible chat completion messages. + properties: + type: + const: image_url + default: image_url + title: Type + type: string + image_url: + $ref: '#/components/schemas/OpenAIImageURL' + required: + - image_url + title: OpenAIChatCompletionContentPartImageParam + type: object + OpenAIChatCompletionContentPartTextParam: + description: Text content part for OpenAI-compatible chat completion messages. + properties: + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIChatCompletionContentPartTextParam + type: object + OpenAIFile: + properties: + type: + const: file + default: file + title: Type + type: string + file: + $ref: '#/components/schemas/OpenAIFileFile' + required: + - file + title: OpenAIFile + type: object + OpenAIFileFile: + properties: + file_data: anyOf: - type: string - type: 'null' - title: After - - name: limit - in: query - required: false - schema: + nullable: true + file_id: anyOf: - - type: integer + - type: string - type: 'null' - default: 10000 - title: Limit - - name: order - in: query - required: false - schema: + nullable: true + filename: anyOf: - - $ref: '#/components/schemas/Order' + - type: string - type: 'null' - default: desc - title: Order - - name: purpose - in: query - required: false - schema: + nullable: true + title: OpenAIFileFile + type: object + OpenAIImageURL: + description: Image URL specification for OpenAI-compatible chat completion messages. + properties: + url: + title: Url + type: string + detail: anyOf: - - $ref: '#/components/schemas/OpenAIFilePurpose' + - type: string - type: 'null' - title: Purpose - 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: - - Files - summary: Openai Upload File - description: |- - Upload file. - - Upload a file that can be used across various endpoints. - - The file upload should be a multipart form request with: - - file: The File object (not file name) to be uploaded. - - purpose: The intended purpose of the uploaded file. - - expires_after: Optional form values describing expiration for the file. - operationId: openai_upload_file_v1_files_post - requestBody: - required: true - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/Body_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}/content: - get: - tags: - - Files - summary: Openai Retrieve File Content - description: |- - Retrieve file content. - - Returns the contents of the specified file. - operationId: openai_retrieve_file_content_v1_files__file_id__content_get - responses: - '200': - description: The raw file content as a binary response. - content: - application/json: - schema: {} - '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: file_id - in: path - required: true - schema: + nullable: true + required: + - url + title: OpenAIImageURL + type: object + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + properties: + role: + const: assistant + default: assistant + title: Role type: string - description: 'Path parameter: file_id' - /v1/prompts: - get: - tags: - - Prompts - summary: List Prompts - description: List all prompts. - 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: - - Prompts - summary: Create Prompt - description: |- - Create prompt. - - Create a new prompt. - 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}: - get: - tags: - - Prompts - summary: Get Prompt - description: |- - Get prompt. - - Get a prompt by its identifier and optional version. - operationId: get_prompt_v1_prompts__prompt_id__get - parameters: - - name: version - in: query - required: false - schema: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + nullable: true + name: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + title: OpenAIAssistantMessageParam + type: object + OpenAIChatCompletionToolCall: + description: Tool call specification for OpenAI-compatible chat completion responses. + properties: + index: anyOf: - type: integer - type: 'null' - title: Version - - name: prompt_id - in: path - required: true - schema: + nullable: true + id: + anyOf: + - type: string + - type: 'null' + nullable: true + type: + const: function + default: function + title: Type type: string - description: 'Path parameter: prompt_id' - 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: - - Prompts - summary: Update Prompt - description: |- - Update prompt. - - Update an existing prompt (increments version). - 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: - - name: prompt_id - in: path - required: true - schema: + function: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction + - type: 'null' + nullable: true + title: OpenAIChatCompletionToolCallFunction + title: OpenAIChatCompletionToolCall + type: object + OpenAIChatCompletionToolCallFunction: + description: Function call details for OpenAI-compatible tool calls. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + arguments: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIChatCompletionToolCallFunction + type: object + OpenAIDeveloperMessageParam: + description: A message from the developer in an OpenAI-compatible chat completion request. + properties: + role: + const: developer + default: developer + title: Role type: string - description: 'Path parameter: prompt_id' - delete: - tags: - - Prompts - summary: Delete Prompt - description: |- - Delete prompt. - - Delete a prompt. - operationId: delete_prompt_v1_prompts__prompt_id__delete - 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 - parameters: - - name: prompt_id - in: path - required: true - schema: + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - content + title: OpenAIDeveloperMessageParam + type: object + OpenAISystemMessageParam: + description: A system message providing instructions or context to the model. + properties: + role: + const: system + default: system + title: Role type: string - description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/versions: - get: - tags: - - Prompts - summary: List Prompt Versions - description: |- - List prompt versions. - - List all versions of a specific prompt. - operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get - responses: - '200': - description: A ListPromptsResponse containing all versions of the prompt. - 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' - parameters: - - name: prompt_id - in: path - required: true - schema: + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - content + title: OpenAISystemMessageParam + type: object + OpenAIToolMessageParam: + description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. + properties: + role: + const: tool + default: tool + title: Role + type: string + tool_call_id: + title: Tool Call Id type: string - description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/set-default-version: - post: - tags: - - Prompts - summary: Set Default Version - description: |- - Set prompt version. - - Set which version of a prompt should be the default in get_prompt (latest). - 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: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + required: + - tool_call_id + - content + title: OpenAIToolMessageParam + type: object + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. + properties: + role: + const: user + default: user + title: Role type: string - description: 'Path parameter: prompt_id' - /v1/conversations/{conversation_id}/items: - get: - tags: - - Conversations - summary: List Items - description: |- - List items. - - List items in the conversation. - operationId: list_items_v1_conversations__conversation_id__items_get - parameters: - - name: after - in: query - required: false - schema: + 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' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: anyOf: - type: string - type: 'null' - title: After - - name: limit - in: query - required: false - schema: + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object + OpenAIMessageParam: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + OpenAIJSONSchema: + description: JSON schema specification for OpenAI-compatible structured response format. + properties: + name: + title: Name + type: string + description: anyOf: - - type: integer + - type: string - type: 'null' - title: Limit - - name: order - in: query - required: false - schema: + strict: anyOf: - - enum: - - asc - - desc - type: string + - type: boolean - type: 'null' - title: Order - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: include - in: query - required: false schema: anyOf: - - type: array - items: - $ref: '#/components/schemas/ConversationItemInclude' + - additionalProperties: true + type: object - type: 'null' - title: Include - 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: - - Conversations - summary: Add Items - description: |- - Create items. - - Create items in the conversation. - 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: - post: - tags: - - Conversations - summary: Create Conversation - description: |- - Create a conversation. - - Create a conversation. - 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}: - get: - tags: - - Conversations - summary: Get Conversation - description: |- - Retrieve a conversation. - - Get a conversation with the given ID. - operationId: get_conversation_v1_conversations__conversation_id__get - responses: - '200': - description: The 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' - parameters: - - name: conversation_id - in: path - required: true - schema: + title: OpenAIJSONSchema + type: object + OpenAIResponseFormatJSONObject: + description: JSON object response format for OpenAI-compatible chat completion requests. + properties: + type: + const: json_object + default: json_object + title: Type type: string - description: 'Path parameter: conversation_id' - post: - tags: - - Conversations - summary: Update Conversation - description: |- - Update a conversation. - - Update a conversation's metadata with the given ID. - operationId: update_conversation_v1_conversations__conversation_id__post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_conversations_conversation_id_Request' - required: true - responses: - '200': - description: The updated 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' - parameters: - - name: conversation_id - in: path - required: true - schema: + title: OpenAIResponseFormatJSONObject + type: object + OpenAIResponseFormatJSONSchema: + description: JSON schema response format for OpenAI-compatible chat completion requests. + properties: + type: + const: json_schema + default: json_schema + title: Type type: string - description: 'Path parameter: conversation_id' - delete: - tags: - - Conversations - summary: Openai Delete Conversation - description: |- - Delete a conversation. - - Delete a conversation with the given ID. - operationId: openai_delete_conversation_v1_conversations__conversation_id__delete - responses: - '200': - description: The deleted conversation resource. - content: - application/json: - schema: - $ref: '#/components/schemas/ConversationDeletedResource' - '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: conversation_id - in: path - required: true - schema: + json_schema: + $ref: '#/components/schemas/OpenAIJSONSchema' + required: + - json_schema + title: OpenAIResponseFormatJSONSchema + type: object + OpenAIResponseFormatText: + description: Text response format for OpenAI-compatible chat completion requests. + properties: + type: + const: text + default: text + title: Type type: string - description: 'Path parameter: conversation_id' - /v1/conversations/{conversation_id}/items/{item_id}: - get: - tags: - - Conversations - summary: Retrieve - description: |- - Retrieve an item. - - Retrieve a conversation item. - operationId: retrieve_v1_conversations__conversation_id__items__item_id__get - responses: - '200': - description: The conversation item. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseMessage' - '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: conversation_id - in: path - required: true - schema: + title: OpenAIResponseFormatText + type: object + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + VectorStoreChunkingStrategyAuto: + description: Automatic chunking strategy for vector store files. + properties: + type: + const: auto + default: auto + title: Type type: string - description: 'Path parameter: conversation_id' - - name: item_id - in: path - required: true - schema: + title: VectorStoreChunkingStrategyAuto + type: object + VectorStoreChunkingStrategyStatic: + description: Static chunking strategy with configurable parameters. + properties: + type: + const: static + default: static + title: Type type: string - description: 'Path parameter: item_id' - delete: - tags: - - Conversations - summary: Openai Delete Conversation Item - description: |- - Delete an item. - - Delete a conversation item. - operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete - responses: - '200': - description: The deleted item resource. - content: - application/json: - schema: - $ref: '#/components/schemas/ConversationItemDeletedResource' - '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: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: item_id - in: path - required: true - schema: - type: string - description: 'Path parameter: item_id' -components: - schemas: - AggregationFunctionType: + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + required: + - static + title: VectorStoreChunkingStrategyStatic + type: object + VectorStoreChunkingStrategyStaticConfig: + description: Configuration for static chunking strategy. + 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 + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + VectorStoreFileStatus: type: string enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: Types of aggregation functions for scoring results. - AllowedToolsFilter: + - completed + - in_progress + - cancelled + - failed + default: completed + OpenAIResponseInputMessageContentFile: + description: File content for input messages in OpenAI response format. properties: - tool_names: + type: + const: input_file + default: input_file + title: Type + type: string + file_data: anyOf: - - items: - type: string - type: array + - type: string + - type: 'null' + nullable: true + file_id: + anyOf: + - type: string - type: 'null' + nullable: true + file_url: + anyOf: + - type: string + - type: 'null' + nullable: true + filename: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIResponseInputMessageContentFile type: object - title: AllowedToolsFilter - description: Filter configuration for restricting which MCP tools can be used. - ApprovalFilter: + OpenAIResponseInputMessageContentImage: + description: Image content for input messages in OpenAI response format. properties: - always: + detail: + default: auto + title: Detail + type: string + enum: + - low + - high + - auto + type: + const: input_image + default: input_image + title: Type + type: string + file_id: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' - never: + nullable: true + image_url: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' + nullable: true + title: OpenAIResponseInputMessageContentImage type: object - title: ApprovalFilter - description: Filter configuration for MCP tool approval requirements. - ArrayType: + OpenAIResponseInputMessageContentText: + description: Text content for input messages in OpenAI response format. properties: - type: + text: + title: Text type: string - const: array + type: + const: input_text + default: input_text title: Type - default: array + type: string + required: + - text + title: OpenAIResponseInputMessageContentText type: object - title: ArrayType - description: Parameter type for array values. - BasicScoringFnParams: + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + OpenAIResponseAnnotationCitation: + description: URL citation annotation for referencing external web resources. properties: type: - type: string - const: basic + const: url_citation + default: url_citation 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: 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 - title: BasicScoringFnParams - description: Parameters for basic scoring function configuration. - Batch: + OpenAIResponseAnnotationContainerFileCitation: properties: - id: + type: + const: container_file_citation + default: container_file_citation + title: Type type: string - title: Id - completion_window: + container_id: + title: Container Id type: string - title: Completion Window - created_at: + end_index: + title: End Index type: integer - title: Created At - endpoint: + file_id: + title: File Id type: string - title: Endpoint - input_file_id: + filename: + title: Filename type: string - title: Input File Id - object: + 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. + properties: + type: + const: file_citation + default: file_citation + title: Type type: string - const: batch - title: Object - status: + file_id: + title: File Id type: string - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - title: Status - cancelled_at: - anyOf: - - type: integer - - type: 'null' - cancelling_at: - anyOf: - - type: integer - - type: 'null' - completed_at: - anyOf: - - type: integer - - type: 'null' - error_file_id: - anyOf: - - type: string - - type: 'null' - errors: - anyOf: - - $ref: '#/components/schemas/Errors' - title: Errors - - type: 'null' - title: Errors - expired_at: - anyOf: - - type: integer - - type: 'null' - expires_at: - anyOf: - - type: integer - - type: 'null' - failed_at: - anyOf: - - type: integer - - type: 'null' - finalizing_at: - anyOf: - - type: integer - - type: 'null' - in_progress_at: - anyOf: - - type: integer - - type: 'null' - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - model: - anyOf: - - type: string - - type: 'null' - output_file_id: - anyOf: - - type: string - - type: 'null' - request_counts: - anyOf: - - $ref: '#/components/schemas/BatchRequestCounts' - title: BatchRequestCounts - - type: 'null' - title: BatchRequestCounts - usage: - anyOf: - - $ref: '#/components/schemas/BatchUsage' - title: BatchUsage - - type: 'null' - title: BatchUsage - additionalProperties: true - type: object + filename: + title: Filename + type: string + index: + title: Index + type: integer required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - BatchError: - properties: - code: - anyOf: - - type: string - - type: 'null' - line: - anyOf: - - type: integer - - type: 'null' - message: - anyOf: - - type: string - - type: 'null' - param: - anyOf: - - type: string - - type: 'null' - additionalProperties: true + - file_id + - filename + - index + title: OpenAIResponseAnnotationFileCitation type: object - title: BatchError - BatchRequestCounts: + OpenAIResponseAnnotationFilePath: properties: - completed: - type: integer - title: Completed - failed: - type: integer - title: Failed - total: + type: + const: file_path + default: file_path + title: Type + type: string + file_id: + title: File Id + type: string + index: + title: Index 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 + - file_id + - index + title: OpenAIResponseAnnotationFilePath type: object - required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage - Benchmark: + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + OpenAIResponseContentPartRefusal: + description: Refusal content within a streamed response part. properties: - identifier: + type: + const: refusal + default: refusal + title: Type type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: + refusal: + title: Refusal type: string - title: Provider Id - description: ID of the provider that owns this resource - type: + required: + - refusal + title: OpenAIResponseContentPartRefusal + type: object + OpenAIResponseOutputMessageContentOutputText: + properties: + text: + title: Text type: string - const: benchmark + type: + const: output_text + default: output_text title: Type - default: benchmark - dataset_id: type: string - title: Dataset Id - scoring_functions: + annotations: items: - type: string + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations 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. - BenchmarkConfig: - properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - scoring_params: - additionalProperties: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: object - title: Scoring Params - description: Map between scoring function id and parameters for each scoring function you want to run - num_examples: - anyOf: - - type: integer - - type: 'null' - description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + - text + title: OpenAIResponseOutputMessageContentOutputText type: object - required: - - eval_candidate - title: BenchmarkConfig - description: A benchmark configuration for evaluation. - Body_openai_upload_file_v1_files_post: + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + MCPListToolsTool: + description: Tool definition returned by MCP list tools operation. properties: - file: + input_schema: + additionalProperties: true + title: Input Schema + type: object + name: + title: Name type: string - format: binary - title: File - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' - expires_after: + description: anyOf: - - $ref: '#/components/schemas/ExpiresAfter' - title: ExpiresAfter + - type: string - type: 'null' - title: ExpiresAfter - type: object + nullable: true required: - - file - - purpose - title: Body_openai_upload_file_v1_files_post - BooleanType: - properties: - type: - type: string - const: boolean - title: Type - default: boolean + - input_schema + - name + title: MCPListToolsTool type: object - title: BooleanType - description: Parameter type for boolean values. - ChatCompletionInputType: + OpenAIResponseMCPApprovalRequest: + description: A request for human approval of a tool invocation. properties: - type: + arguments: + title: Arguments type: string - const: chat_completion_input - title: Type - default: chat_completion_input - type: object - title: ChatCompletionInputType - description: Parameter type for chat completion input. - Checkpoint: - properties: - identifier: + id: + title: Id type: string - title: Identifier - created_at: + name: + title: Name type: string - format: date-time - title: Created At - epoch: - type: integer - title: Epoch - post_training_job_id: + server_label: + title: Server Label type: string - title: Post Training Job Id - path: + type: + const: mcp_approval_request + default: mcp_approval_request + title: Type type: string - title: Path - training_metrics: - anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' - title: PostTrainingMetric - - type: 'null' - title: PostTrainingMetric - type: object required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - Chunk-Input: + - 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 - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + discriminator: mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - chunk_id: + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: + enum: + - system + - developer + - user + - assistant + default: system + type: + const: message + default: message + title: Type + type: string + id: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' - chunk_metadata: + nullable: true + status: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' - title: ChunkMetadata - type: object + nullable: true required: - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - Chunk-Output: + - role + title: OpenAIResponseMessage + type: object + OpenAIResponseOutputMessageFileSearchToolCall: + description: File search tool call output message for OpenAI responses. properties: - content: + 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: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - title: list[ImageContentItem-Output | TextContentItem] - title: string | list[ImageContentItem-Output | TextContentItem] - chunk_id: - type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - type: 'null' - title: ChunkMetadata + nullable: true + required: + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall type: object + OpenAIResponseOutputMessageFileSearchToolCallResults: + description: Search results returned by the file search operation. + 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: - - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - ChunkMetadata: + - attributes + - file_id + - filename + - score + - text + title: OpenAIResponseOutputMessageFileSearchToolCallResults + type: object + OpenAIResponseOutputMessageFunctionToolCall: + description: Function tool call output message for OpenAI responses. properties: - chunk_id: - anyOf: - - type: string - - type: 'null' - document_id: - anyOf: - - type: string - - type: 'null' - source: - anyOf: - - type: string - - type: 'null' - created_timestamp: - anyOf: - - type: integer - - type: 'null' - updated_timestamp: - anyOf: - - type: integer - - type: 'null' - chunk_window: - anyOf: - - type: string - - type: 'null' - chunk_tokenizer: + 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' - chunk_embedding_model: + nullable: true + status: anyOf: - type: string - type: 'null' - chunk_embedding_dimension: - anyOf: - - type: integer - - type: 'null' - content_token_count: - anyOf: - - type: integer - - type: 'null' - metadata_token_count: - anyOf: - - type: integer - - type: 'null' + nullable: true + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall type: object - title: 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. - CompletionInputType: + OpenAIResponseOutputMessageMCPCall: + description: Model Context Protocol (MCP) call output message for OpenAI responses. properties: - type: + id: + title: Id type: string - const: completion_input + type: + const: mcp_call + default: mcp_call title: Type - default: completion_input - type: object - title: CompletionInputType - description: Parameter type for completion input. - Conversation: - properties: - id: type: string - title: Id - description: The unique ID of the conversation. - object: + arguments: + title: Arguments 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: + name: + title: Name + type: string + server_label: + title: Server Label + type: string + error: anyOf: - - additionalProperties: - type: string - type: object + - type: string - 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. - items: + nullable: true + output: anyOf: - - items: - additionalProperties: true - type: object - type: array + - type: string - type: 'null' - description: Initial items to include in the conversation context. You may add up to 20 items at a time. - type: object + nullable: true required: - id - - created_at - title: Conversation - description: OpenAI-compatible conversation object. - ConversationDeletedResource: + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + type: object + OpenAIResponseOutputMessageMCPListTools: + description: MCP list tools output message containing available tools from an MCP server. properties: id: - type: string title: Id - description: The deleted conversation identifier - object: type: string - title: Object - description: Object type - default: conversation.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true - type: object + type: + const: mcp_list_tools + default: mcp_list_tools + title: Type + type: string + server_label: + title: Server Label + type: string + tools: + items: + $ref: '#/components/schemas/MCPListToolsTool' + title: Tools + type: array required: - id - title: ConversationDeletedResource - description: Response for deleted conversation. - ConversationItemDeletedResource: + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools + type: object + OpenAIResponseOutputMessageWebSearchToolCall: + description: Web search tool call output message for OpenAI responses. properties: id: - type: string title: Id - description: The deleted item identifier - object: type: string - title: Object - description: Object type - default: conversation.item.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true - type: object + status: + title: Status + type: string + type: + const: web_search_call + default: web_search_call + title: Type + type: string required: - id - title: ConversationItemDeletedResource - description: Response for deleted conversation item. - 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' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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' - title: OpenAIResponseMessage-Output | ... (9 variants) - type: array - title: Data - description: List of conversation items - first_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the first item in the list - last_id: + - status + title: OpenAIResponseOutputMessageWebSearchToolCall + type: object + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + AllowedToolsFilter: + description: Filter configuration for restricting which MCP tools can be used. + properties: + tool_names: anyOf: - - type: string + - items: + type: string + type: array - type: 'null' - description: The ID of the last item in the list - has_more: - type: boolean - title: Has More - description: Whether there are more items available - default: false + nullable: true + title: AllowedToolsFilter type: object - required: - - data - title: ConversationItemList - description: List of conversation items with pagination. - DPOAlignmentConfig: + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. properties: - beta: - type: number - title: Beta - loss_type: - $ref: '#/components/schemas/DPOLossType' - default: sigmoid + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + title: ApprovalFilter type: object - required: - - beta - title: DPOAlignmentConfig - description: Configuration for Direct Preference Optimization (DPO) alignment. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: + OpenAIResponseInputToolFileSearch: + description: File search tool configuration for OpenAI response inputs. properties: - dataset_id: + type: + const: file_search + default: file_search + title: Type 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: + vector_store_ids: + items: + type: string + title: Vector Store Ids + type: array + filters: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' - packed: + nullable: true + max_num_results: anyOf: - - type: boolean + - maximum: 50 + minimum: 1 + type: integer - type: 'null' - default: false - train_on_input: + default: 10 + ranking_options: anyOf: - - type: boolean + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions - type: 'null' - default: false - type: object + nullable: true + title: SearchRankingOptions required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: Configuration for training data and data loading. - Dataset: + - vector_store_ids + title: OpenAIResponseInputToolFileSearch + type: object + OpenAIResponseInputToolFunction: + description: Function tool configuration for OpenAI response inputs. properties: - identifier: + type: + const: function + default: function + title: Type type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + name: + title: Name + type: string + description: anyOf: - type: string - type: 'null' - description: Unique identifier for this resource in the provider - 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' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - 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. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - 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. - EfficiencyConfig: - properties: - enable_activation_checkpointing: + nullable: true + parameters: anyOf: - - type: boolean + - additionalProperties: true + type: object - type: 'null' - default: false - enable_activation_offloading: + strict: anyOf: - type: boolean - type: 'null' - default: false - memory_efficient_fsdp_wrap: - anyOf: - - type: boolean - - type: 'null' - default: false - fsdp_cpu_offload: - anyOf: - - type: boolean - - type: 'null' - default: false - type: object - title: EfficiencyConfig - description: Configuration for memory and compute efficiency optimizations. - Errors: - properties: - data: - anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array - - type: 'null' - object: - anyOf: - - type: string - - type: 'null' - 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 + nullable: true required: - - generations - - scores - title: EvaluateResponse - description: The response from an evaluation. - ExpiresAfter: - properties: - anchor: - type: string - const: created_at - title: Anchor - seconds: - type: integer - maximum: 2592000.0 - minimum: 3600.0 - title: Seconds + - name + - parameters + title: OpenAIResponseInputToolFunction type: object - required: - - anchor - - seconds - title: 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) - GreedySamplingStrategy: + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: type: - type: string - const: greedy + const: mcp + default: mcp title: Type - default: greedy - type: object - title: GreedySamplingStrategy - description: Greedy sampling strategy that selects the highest probability token at each step. - HealthInfo: - properties: - status: - $ref: '#/components/schemas/HealthStatus' - type: object - required: - - status - title: HealthInfo - description: Health status information for 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 - ImageContentItem-Output: - properties: - type: + server_label: + title: Server Label type: string - const: image - title: Type - default: image - image: - $ref: '#/components/schemas/_URLOrData' - type: object - required: - - image - title: ImageContentItem - description: A image content item - InputTokensDetails: - properties: - cached_tokens: - type: integer - title: Cached Tokens - additionalProperties: true - type: object - required: - - cached_tokens - title: InputTokensDetails - Job: - properties: - job_id: + server_url: + title: Server Url type: string - title: Job Id - status: - $ref: '#/components/schemas/JobStatus' - type: object + headers: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + require_approval: + anyOf: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + title: ApprovalFilter + default: never + title: string | ApprovalFilter + allowed_tools: + anyOf: + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter + - type: 'null' + title: list[string] | AllowedToolsFilter + nullable: true required: - - job_id - - status - title: Job - description: A job execution instance with status tracking. - JobStatus: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - description: Status of a job execution. - JsonType: - properties: - type: - type: string - const: json - title: Type - default: json + - server_label + - server_url + title: OpenAIResponseInputToolMCP type: object - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: + OpenAIResponseInputToolWebSearch: + description: Web search tool configuration for OpenAI response inputs. properties: type: - type: string - const: llm_as_judge + default: web_search title: Type - default: llm_as_judge - judge_model: type: string - title: Judge Model - prompt_template: + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + search_context_size: anyOf: - - type: string - - type: 'null' - judge_score_regexes: - items: + - pattern: ^low|medium|high$ 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: 'null' + default: medium + title: OpenAIResponseInputToolWebSearch type: object - required: - - judge_model - title: LLMAsJudgeScoringFnParams - description: Parameters for LLM-as-judge scoring function configuration. - ListBatchesResponse: + SearchRankingOptions: + description: Options for ranking and filtering search results. properties: - object: - type: string - const: list - title: Object - default: list - data: - items: - $ref: '#/components/schemas/Batch' - type: array - title: Data - description: List of batch objects - first_id: + ranker: anyOf: - type: string - type: 'null' - description: ID of the first batch in the list - last_id: + nullable: true + score_threshold: anyOf: - - type: string + - type: number - type: 'null' - description: ID of the last batch in the list - has_more: - type: boolean - title: Has More - description: Whether there are more batches available - default: false + default: 0.0 + title: SearchRankingOptions type: object - required: - - data - title: ListBatchesResponse - description: Response containing a list of batch objects. - ListBenchmarksResponse: + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. properties: - data: - items: - $ref: '#/components/schemas/Benchmark' - type: array - title: Data - type: object + type: + const: mcp + default: mcp + title: Type + type: string + server_label: + title: Server Label + type: string + allowed_tools: + anyOf: + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter + - type: 'null' + title: list[string] | AllowedToolsFilter + nullable: true required: - - data - title: ListBenchmarksResponse - ListDatasetsResponse: + - server_label + title: OpenAIResponseToolMCP + type: object + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. properties: - data: + type: + const: output_text + default: output_text + title: Type + type: string + text: + title: Text + type: string + annotations: items: - $ref: '#/components/schemas/Dataset' + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations type: array - title: Data - type: object + logprobs: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + nullable: true required: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - ListOpenAIChatCompletionResponse: + - text + title: OpenAIResponseContentPartOutputText + type: object + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. properties: - data: - items: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: - type: string - title: First Id - last_id: + type: + const: reasoning_text + default: reasoning_text + title: Type type: string - title: Last Id - object: + text: + title: Text type: string - const: list - title: Object - default: list - type: object required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIChatCompletionResponse - description: Response from listing OpenAI-compatible chat completions. - ListOpenAIFileResponse: + - text + title: OpenAIResponseContentPartReasoningText + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. properties: - data: - items: - $ref: '#/components/schemas/OpenAIFileObject' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: - type: string - title: First Id - last_id: + type: + const: summary_text + default: summary_text + title: Type type: string - title: Last Id - object: + text: + title: Text type: string - const: list - title: Object - default: list - type: object required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIFileResponse - description: Response for listing files in OpenAI Files API. - ListOpenAIResponseInputItem: - properties: - data: - items: - $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' - type: array - title: Data - object: - type: string - const: list - title: Object - default: list + - text + title: OpenAIResponseContentPartReasoningSummary type: object - required: - - data - title: ListOpenAIResponseInputItem - description: List container for OpenAI response input items. - ListOpenAIResponseObject: + OpenAIResponseError: + description: Error details for failed OpenAI response requests. properties: - data: - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput-Output' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: - type: string - title: First Id - last_id: + code: + title: Code type: string - title: Last Id - object: + message: + title: Message type: string - const: list - title: Object - default: list - type: object required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject - description: Paginated list of OpenAI response objects with navigation metadata. - ListPostTrainingJobsResponse: + - code + - message + title: OpenAIResponseError + type: object + OpenAIResponseObject: + description: Complete OpenAI response object containing generation results and metadata. 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. - 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. - ListScoringFunctionsResponse: - properties: - data: - items: - $ref: '#/components/schemas/ScoringFn' - 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 - ListToolDefsResponse: - properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - type: array - title: Data - type: object - required: - - data - title: ListToolDefsResponse - description: Response containing a list of tool definitions. - 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. - LoraFinetuningConfig: - properties: - type: + created_at: + title: Created At + type: integer + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + nullable: true + title: OpenAIResponseError + id: + title: Id type: string - const: LoRA - title: Type - default: LoRA - lora_attn_modules: + model: + title: Model + type: string + object: + const: response + default: response + title: Object + type: string + output: items: - type: string + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output type: array - title: Lora Attn Modules - apply_lora_to_mlp: - type: boolean - title: Apply Lora To Mlp - apply_lora_to_output: + parallel_tool_calls: + default: false + title: Parallel Tool Calls type: boolean - title: Apply Lora To Output - rank: - type: integer - title: Rank - alpha: - type: integer - title: Alpha - use_dora: + previous_response_id: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - quantize_base: + nullable: true + prompt: anyOf: - - type: boolean + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' - default: false - type: object - required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - MCPListToolsTool: - properties: - input_schema: - additionalProperties: true - type: object - title: Input Schema - name: + nullable: true + title: OpenAIResponsePrompt + status: + title: Status type: string - title: Name - description: + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + tools: + anyOf: + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + nullable: true + truncation: anyOf: - type: string - type: 'null' - type: object - required: - - input_schema - - name - title: MCPListToolsTool - description: Tool definition returned by MCP list tools operation. - Model: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + nullable: true + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage + - type: 'null' + nullable: true + title: OpenAIResponseUsage + instructions: anyOf: - type: string - type: 'null' - description: Unique identifier for this resource in the provider - 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 + nullable: true + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + nullable: true required: - - identifier - - provider_id - title: Model - description: A model resource representing an AI model registered in Llama Stack. - ModelCandidate: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject + type: object + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' type: - type: string - const: model + const: response.completed + default: response.completed title: Type - default: model - model: type: string - title: Model - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: - anyOf: - - $ref: '#/components/schemas/SystemMessage' - title: SystemMessage - - type: 'null' - title: SystemMessage - type: object required: - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType - description: Enumeration of supported model types in Llama Stack. - ModerationObject: + - response + title: OpenAIResponseObjectStreamResponseCompleted + type: object + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. properties: - id: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id type: string - title: Id - model: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.added + default: response.content_part.added + title: Type 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. - ModerationObjectResults: - properties: - flagged: - type: boolean - title: Flagged - categories: - anyOf: - - additionalProperties: - type: boolean - type: object - - type: 'null' - category_applied_input_types: - anyOf: - - additionalProperties: - items: - type: string - type: array - type: object - - type: 'null' - category_scores: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - user_message: - anyOf: - - type: string - - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded type: object - required: - - flagged - title: ModerationObjectResults - description: A moderation object. - NumberType: + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. properties: - type: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id type: string - const: number + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.done + default: response.content_part.done title: Type - default: number + type: string + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone type: object - title: NumberType - description: Parameter type for numeric values. - ObjectType: + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' type: - type: string - const: object + const: response.created + default: response.created title: Type - default: object - type: object - title: ObjectType - description: Parameter type for object values. - OpenAIAssistantMessageParam-Input: - properties: - role: type: string - const: assistant - title: Role - default: assistant - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' + required: + - response + title: OpenAIResponseObjectStreamResponseCreated type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIAssistantMessageParam-Output: + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. properties: - role: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.failed + default: response.failed + title: Type type: string - const: assistant - title: Role - default: assistant - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIChatCompletion: + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. properties: - id: - type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAIChoice-Output' - type: array - title: Choices - object: + item_id: + title: Item Id type: string - const: chat.completion - title: Object - default: chat.completion - created: + output_index: + title: Output Index type: integer - title: Created - model: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type type: string - title: Model - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - title: OpenAIChatCompletionUsage + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted type: object + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type + type: string required: - - id - - choices - - created - - model - title: OpenAIChatCompletion - description: Response from an OpenAI-compatible chat completion request. - OpenAIChatCompletionContentPartImageParam: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type type: string - const: image_url + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta title: Type - default: image_url - image_url: - $ref: '#/components/schemas/OpenAIImageURL' + type: string + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. + properties: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type + type: string required: - - image_url - title: OpenAIChatCompletionContentPartImageParam - description: Image content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionContentPartTextParam: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer type: + const: response.in_progress + default: response.in_progress + title: Type type: string - const: text + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress + type: object + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.incomplete + default: response.incomplete title: Type - default: text - text: type: string - title: Text + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type + type: string required: - - text - title: OpenAIChatCompletionContentPartTextParam - description: Text content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionRequestWithExtraBody: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: properties: - model: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type type: string - title: Model - messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' - title: OpenAIUserMessageParam-Input - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' - title: OpenAIAssistantMessageParam-Input - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: 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' - title: OpenAIUserMessageParam-Input | ... (5 variants) - type: array - minItems: 1 - title: Messages - frequency_penalty: - anyOf: - - type: number - - type: 'null' - function_call: - anyOf: - - type: string - - additionalProperties: true - type: object - - type: 'null' - title: string | object - functions: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - logit_bias: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - logprobs: - anyOf: - - type: boolean - - type: 'null' - max_completion_tokens: - anyOf: - - type: integer - - type: 'null' - max_tokens: - anyOf: - - type: integer - - type: 'null' - n: - anyOf: - - type: integer - - type: 'null' - parallel_tool_calls: - anyOf: - - type: boolean - - type: 'null' - presence_penalty: - anyOf: - - type: number - - type: 'null' - response_format: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - discriminator: - propertyName: type - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - - type: 'null' - title: Response Format - seed: - anyOf: - - type: integer - - type: 'null' - stop: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - type: 'null' - title: string | list[string] - stream: - anyOf: - - type: boolean - - type: 'null' - stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - temperature: - anyOf: - - type: number - - type: 'null' - tool_choice: - anyOf: - - type: string - - additionalProperties: true - type: object - - type: 'null' - title: string | object - tools: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - top_logprobs: - anyOf: - - type: integer - - type: 'null' - top_p: - anyOf: - - type: number - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible chat completion endpoint. - OpenAIChatCompletionToolCall: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. properties: - index: - anyOf: - - type: integer - - type: 'null' - id: - anyOf: - - type: string - - type: 'null' + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: function + const: response.mcp_call.completed + default: response.mcp_call.completed title: Type - default: function - function: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - title: OpenAIChatCompletionToolCallFunction - - type: 'null' - title: OpenAIChatCompletionToolCallFunction + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted type: object - title: OpenAIChatCompletionToolCall - description: Tool call specification for OpenAI-compatible chat completion responses. - OpenAIChatCompletionToolCallFunction: + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. properties: - name: - anyOf: - - type: string - - type: 'null' - arguments: - anyOf: - - type: string - - type: 'null' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.failed + default: response.mcp_call.failed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed type: object - title: OpenAIChatCompletionToolCallFunction - description: Function call details for OpenAI-compatible tool calls. - OpenAIChatCompletionUsage: + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. properties: - prompt_tokens: - type: integer - title: Prompt Tokens - completion_tokens: + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - title: Completion Tokens - total_tokens: + sequence_number: + title: Sequence Number type: integer - title: Total Tokens - prompt_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' - title: OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - title: OpenAIChatCompletionUsagePromptTokensDetails - completion_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' - title: OpenAIChatCompletionUsageCompletionTokensDetails - - type: 'null' - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object + type: + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress + title: Type + type: string required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - description: Usage information for OpenAI chat completion. - OpenAIChatCompletionUsageCompletionTokensDetails: - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress type: object - title: OpenAIChatCompletionUsageCompletionTokensDetails - description: Token details for output tokens in OpenAI chat completion usage. - OpenAIChatCompletionUsagePromptTokensDetails: + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted type: object - title: OpenAIChatCompletionUsagePromptTokensDetails - description: Token details for prompt tokens in OpenAI chat completion usage. - OpenAIChoice-Output: + OpenAIResponseObjectStreamResponseMcpListToolsFailed: properties: - message: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' - title: OpenAIUserMessageParam-Output - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' - title: OpenAIAssistantMessageParam-Output - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam-Output | ... (5 variants) - 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: + sequence_number: + title: Sequence Number type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - title: OpenAIChoiceLogprobs-Output - - type: 'null' - title: OpenAIChoiceLogprobs-Output - type: object + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type + type: string required: - - message - - finish_reason - - index - title: OpenAIChoice - description: A choice from an OpenAI-compatible chat completion response. - OpenAIChoiceLogprobs-Output: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + type: object + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress type: object - title: OpenAIChoiceLogprobs - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. - OpenAICompletion: + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. properties: - id: + response_id: + title: Response Id type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAICompletionChoice-Output' - type: array - title: Choices - created: + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index type: integer - title: Created - model: - type: string - title: Model - object: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.added + default: response.output_item.added + title: Type 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. - - :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" - OpenAICompletionChoice-Output: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded + type: object + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. properties: - finish_reason: - type: string - title: Finish Reason - text: + response_id: + title: Response Id type: string - title: Text - index: + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - title: OpenAIChoiceLogprobs-Output - - type: 'null' - title: OpenAIChoiceLogprobs-Output - type: object + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done + title: Type + type: string required: - - finish_reason - - text - - index - title: 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 - OpenAICompletionRequestWithExtraBody: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone + type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. properties: - model: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.annotation.added + default: response.output_text.annotation.added + title: Type type: string - title: Model - prompt: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - items: - type: integer - type: array - title: list[integer] - - items: - items: - type: integer - type: array - type: array - title: list[array] - title: string | ... (4 variants) - best_of: - anyOf: - - type: integer - - type: 'null' - echo: - anyOf: - - type: boolean - - type: 'null' - frequency_penalty: - anyOf: - - type: number - - type: 'null' - logit_bias: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - logprobs: - anyOf: - - type: boolean - - type: 'null' - max_tokens: - anyOf: - - type: integer - - type: 'null' - n: - anyOf: - - type: integer - - type: 'null' - presence_penalty: - anyOf: - - type: number - - type: 'null' - seed: - anyOf: - - type: integer - - type: 'null' - stop: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - type: 'null' - title: string | list[string] - stream: - anyOf: - - type: boolean - - type: 'null' - stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - temperature: - anyOf: - - type: number - - type: 'null' - top_p: - anyOf: - - type: number - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - suffix: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible completion endpoint. - OpenAICompletionWithInputMessages: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + type: object + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. properties: - id: + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAIChoice-Output' - type: array - title: Choices - object: + item_id: + title: Item Id type: string - const: chat.completion - title: Object - default: chat.completion - created: + output_index: + title: Output Index type: integer - title: Created - model: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.delta + default: response.output_text.delta + title: Type type: string - title: Model - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - title: OpenAIChatCompletionUsage - input_messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' - title: OpenAIUserMessageParam-Output - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' - title: OpenAIAssistantMessageParam-Output - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - 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' - title: OpenAIUserMessageParam-Output | ... (5 variants) - type: array - title: Input Messages - type: object required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - properties: - file_ids: - items: - type: string - type: array - title: File Ids - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - additionalProperties: true + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta type: object + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. + properties: + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done + title: Type + type: string required: - - file_ids - title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - description: Request to create a vector store file batch with extra_body support. - OpenAICreateVectorStoreRequestWithExtraBody: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. properties: - name: - anyOf: - - type: string - - type: 'null' - file_ids: - anyOf: - - items: - type: string - type: array - - type: 'null' - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - additionalProperties: true - type: object - title: OpenAICreateVectorStoreRequestWithExtraBody - description: Request to create a vector store with extra_body support. - OpenAIDeleteResponseObject: - properties: - id: + item_id: + title: Item Id type: string - title: Id - object: + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type type: string - const: response - title: Object - default: response - deleted: - type: boolean - title: Deleted - default: true - type: object required: - - id - title: OpenAIDeleteResponseObject - description: Response object confirming deletion of an OpenAI response. - OpenAIDeveloperMessageParam: - properties: - role: - type: string - const: developer - title: Role - default: developer - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded type: object - required: - - content - title: OpenAIDeveloperMessageParam - description: A message from the developer in an OpenAI-compatible chat completion request. - OpenAIEmbeddingData: + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. properties: - object: + item_id: + title: Item Id type: string - const: embedding - title: Object - default: embedding - embedding: - anyOf: - - items: - type: number - type: array - title: list[number] - - type: string - title: list[number] | string - index: + output_index: + title: Output Index type: integer - title: Index - type: object - required: - - embedding - - index - title: OpenAIEmbeddingData - description: A single embedding data object from an OpenAI-compatible embeddings response. - OpenAIEmbeddingUsage: - properties: - prompt_tokens: + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number type: integer - title: Prompt Tokens - total_tokens: + summary_index: + title: Summary Index type: integer - title: Total Tokens - type: object - required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage - description: Usage information for an OpenAI-compatible embeddings response. - OpenAIEmbeddingsRequestWithExtraBody: - properties: - model: + type: + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done + title: Type type: string - title: Model - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - encoding_format: - anyOf: - - type: string - - type: 'null' - default: float - dimensions: - anyOf: - - type: integer - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object required: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody - description: Request parameters for OpenAI-compatible embeddings endpoint. - OpenAIEmbeddingsResponse: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. properties: - object: + delta: + title: Delta type: string - const: list - title: Object - default: list - data: - items: - $ref: '#/components/schemas/OpenAIEmbeddingData' - type: array - title: Data - model: + item_id: + title: Item Id 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. - OpenAIFile: - properties: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - type: string - const: file + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta title: Type - default: file - file: - $ref: '#/components/schemas/OpenAIFileFile' - type: object + type: string required: - - file - title: OpenAIFile - OpenAIFileDeleteResponse: + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. properties: - id: + text: + title: Text type: string - title: Id - object: + item_id: + title: Item Id type: string - const: file - title: Object - default: file - deleted: - type: boolean - title: Deleted - type: object - required: - - id - - deleted - title: OpenAIFileDeleteResponse - description: Response for deleting a file in OpenAI Files API. - OpenAIFileFile: - properties: - file_data: - anyOf: - - type: string - - type: 'null' - file_id: - anyOf: - - type: string - - type: 'null' - filename: - anyOf: - - type: string - - type: 'null' - type: object - title: OpenAIFileFile - OpenAIFileObject: - properties: - object: - type: string - const: file - title: Object - default: file - id: - type: string - title: Id - bytes: + output_index: + title: Output Index type: integer - title: Bytes - created_at: + sequence_number: + title: Sequence Number type: integer - title: Created At - expires_at: + summary_index: + title: Summary Index 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. - OpenAIFilePurpose: - type: string - enum: - - assistants - - batch - title: OpenAIFilePurpose - description: Valid purpose values for OpenAI Files API. - OpenAIImageURL: - properties: - url: + type: + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done + title: Type type: string - title: Url - detail: - anyOf: - - type: string - - type: 'null' - type: object required: - - url - title: OpenAIImageURL - description: Image URL specification for OpenAI-compatible chat completion messages. - OpenAIJSONSchema: - properties: - name: - type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - title: OpenAIJSONSchema - description: JSON schema specification for OpenAI-compatible structured response format. - OpenAIListModelsResponse: - properties: - data: - items: - $ref: '#/components/schemas/OpenAIModel' - type: array - title: Data + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone type: object - required: - - data - title: OpenAIListModelsResponse - OpenAIModel: + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. properties: - id: + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - title: Id - object: + item_id: + title: Item Id type: string - const: model - title: Object - default: model - created: + output_index: + title: Output Index type: integer - title: Created - owned_by: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.delta + default: response.reasoning_text.delta + title: Type type: string - title: Owned By - custom_metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object required: - - id - - created - - owned_by - title: OpenAIModel - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata - OpenAIResponseAnnotationCitation: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. properties: - type: - type: string - const: url_citation - title: Type - default: url_citation - end_index: - type: integer - title: End Index - start_index: + content_index: + title: Content Index type: integer - title: Start Index - title: + text: + title: Text type: string - title: Title - url: + item_id: + title: Item Id type: string - title: Url - type: object - required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation - description: URL citation annotation for referencing external web resources. - OpenAIResponseAnnotationContainerFileCitation: - properties: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: container_file_citation + const: response.reasoning_text.done + default: response.reasoning_text.done title: Type - default: container_file_citation - container_id: type: string - title: Container Id - end_index: + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone + type: object + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. + properties: + content_index: + title: Content Index type: integer - title: End Index - file_id: + delta: + title: Delta type: string - title: File Id - filename: + item_id: + title: Item Id type: string - title: Filename - start_index: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number 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 + const: response.refusal.delta + default: response.refusal.delta 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. - OpenAIResponseAnnotationFilePath: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta + type: object + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. properties: - type: + content_index: + title: Content Index + type: integer + refusal: + title: Refusal type: string - const: file_path - title: Type - default: file_path - file_id: + item_id: + title: Item Id type: string - title: File Id - index: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number type: integer - title: Index - type: object - required: - - file_id - - index - title: OpenAIResponseAnnotationFilePath - OpenAIResponseContentPartRefusal: - properties: type: - type: string - const: refusal + const: response.refusal.done + default: response.refusal.done title: Type - default: refusal - refusal: type: string - title: Refusal - type: object required: + - content_index - refusal - title: OpenAIResponseContentPartRefusal - description: Refusal content within a streamed response part. - OpenAIResponseError: - properties: - code: - type: string - title: Code - message: - type: string - title: Message + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone type: object - required: - - code - - message - title: OpenAIResponseError - description: Error details for failed OpenAI response requests. - OpenAIResponseFormatJSONObject: + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. properties: - type: + item_id: + title: Item Id 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. - OpenAIResponseFormatJSONSchema: - properties: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: json_schema + const: response.web_search_call.completed + default: response.web_search_call.completed title: Type - default: json_schema - json_schema: - $ref: '#/components/schemas/OpenAIJSONSchema' - type: object + type: string required: - - json_schema - title: OpenAIResponseFormatJSONSchema - description: JSON schema response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatText: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. properties: - type: + item_id: + title: Item Id type: string - const: text + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress title: Type - default: text + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress type: object - title: OpenAIResponseFormatText - description: Text response format for OpenAI-compatible chat completion requests. - OpenAIResponseInputFunctionToolCallOutput: + OpenAIResponseObjectStreamResponseWebSearchCallSearching: properties: - call_id: - type: string - title: Call Id - output: + item_id: + title: Item Id type: string - title: Output + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: function_call_output + const: response.web_search_call.searching + default: response.web_search_call.searching title: Type - default: function_call_output + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + type: object + OpenAIResponsePrompt: + description: OpenAI compatible Prompt object that is used in OpenAI responses. + properties: id: + title: Id + type: string + variables: anyOf: - - type: string + - additionalProperties: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: object - type: 'null' - status: + nullable: true + version: anyOf: - type: string - type: 'null' - type: object + nullable: true required: - - call_id - - output - title: OpenAIResponseInputFunctionToolCallOutput - description: This represents the output of a function call that gets passed back to the model. - OpenAIResponseInputMessageContentFile: + - id + title: OpenAIResponsePrompt + type: object + OpenAIResponseText: + description: Text response configuration for OpenAI responses. + properties: + format: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat + - type: 'null' + nullable: true + title: OpenAIResponseTextFormat + title: OpenAIResponseText + type: object + OpenAIResponseTextFormat: + description: Configuration for Responses API text format. properties: type: - type: string - const: input_file title: Type - default: input_file - file_data: + type: string + enum: + - text + - json_schema + - json_object + default: text + name: anyOf: - type: string - type: 'null' - file_id: + schema: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' - file_url: + description: anyOf: - type: string - type: 'null' - filename: + strict: anyOf: - - type: string + - type: boolean - type: 'null' + title: OpenAIResponseTextFormat type: object - title: OpenAIResponseInputMessageContentFile - description: File content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentImage: + OpenAIResponseUsage: + description: Usage information for OpenAI response. properties: - detail: - title: Detail - default: auto - type: string - enum: - - low - - high - - auto - type: - type: string - const: input_image - title: Type - default: input_image - file_id: + 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: - - type: string + - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails - type: 'null' - image_url: + nullable: true + title: OpenAIResponseUsageInputTokensDetails + output_tokens_details: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails - type: 'null' - type: object - title: OpenAIResponseInputMessageContentImage - description: Image content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentText: - properties: - text: - type: string - title: Text - type: - type: string - const: input_text - title: Type - default: input_text - type: object + nullable: true + title: OpenAIResponseUsageOutputTokensDetails required: - - text - title: OpenAIResponseInputMessageContentText - description: Text content for input messages in OpenAI response format. - OpenAIResponseInputToolFileSearch: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage + type: object + OpenAIResponseUsageInputTokensDetails: + description: Token details for input tokens in OpenAI response usage. 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: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - max_num_results: + cached_tokens: anyOf: - type: integer - maximum: 50.0 - minimum: 1.0 - type: 'null' - default: 10 - ranking_options: + nullable: true + title: OpenAIResponseUsageInputTokensDetails + type: object + OpenAIResponseUsageOutputTokensDetails: + description: Token details for output tokens in OpenAI response usage. + properties: + reasoning_tokens: anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions + - type: integer - type: 'null' - title: SearchRankingOptions + nullable: true + title: OpenAIResponseUsageOutputTokensDetails type: object - required: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch - description: File search tool configuration for OpenAI response inputs. - OpenAIResponseInputToolFunction: + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) + OpenAIResponseInputFunctionToolCallOutput: + description: This represents the output of a function call that gets passed back to the model. properties: - type: + call_id: + title: Call Id type: string - const: function + output: + title: Output + type: string + type: + const: function_call_output + default: function_call_output title: Type - default: function - name: type: string - title: Name - description: + id: anyOf: - type: string - type: 'null' - parameters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - strict: + nullable: true + status: anyOf: - - type: boolean + - type: string - type: 'null' - type: object + nullable: true required: - - name - - parameters - title: OpenAIResponseInputToolFunction - description: Function tool configuration for OpenAI response inputs. - OpenAIResponseInputToolMCP: + - call_id + - output + title: OpenAIResponseInputFunctionToolCallOutput + type: object + OpenAIResponseMCPApprovalResponse: + description: A response to an MCP approval request. properties: - type: + approval_request_id: + title: Approval Request Id type: string - const: mcp + approve: + title: Approve + type: boolean + type: + const: mcp_approval_response + default: mcp_approval_response title: Type - default: mcp - server_label: type: string - title: Server Label - server_url: - type: string - title: Server Url - headers: + id: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - require_approval: + nullable: true + reason: anyOf: - type: string - const: always - - type: string - const: never - - $ref: '#/components/schemas/ApprovalFilter' - title: ApprovalFilter - title: string | ApprovalFilter - default: never - allowed_tools: - anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter - type: 'null' - title: list[string] | AllowedToolsFilter - type: object + nullable: true required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - OpenAIResponseInputToolWebSearch: + - approval_request_id + - approve + title: OpenAIResponseMCPApprovalResponse + type: object + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + ArrayType: + description: Parameter type for array values. properties: type: + const: array + default: array title: Type - default: web_search type: string - enum: - - web_search - - web_search_preview - - web_search_preview_2025_03_11 - - web_search_2025_08_26 - search_context_size: - anyOf: - - type: string - pattern: ^low|medium|high$ - - type: 'null' - default: medium + title: ArrayType type: object - title: OpenAIResponseInputToolWebSearch - description: Web search tool configuration for OpenAI response inputs. - OpenAIResponseMCPApprovalRequest: + BooleanType: + description: Parameter type for boolean values. 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 + const: boolean + default: boolean title: Type - default: mcp_approval_request + type: string + title: BooleanType type: object - required: - - arguments - - id - - name - - server_label - title: OpenAIResponseMCPApprovalRequest - description: A request for human approval of a tool invocation. - OpenAIResponseMCPApprovalResponse: + ChatCompletionInputType: + description: Parameter type for chat completion input. properties: - approval_request_id: + type: + const: chat_completion_input + default: chat_completion_input + title: Type type: string - title: Approval Request Id - approve: - type: boolean - title: Approve + title: ChatCompletionInputType + type: object + CompletionInputType: + description: Parameter type for completion input. + properties: type: + const: completion_input + default: completion_input + title: Type type: string - const: mcp_approval_response + title: CompletionInputType + type: object + JsonType: + description: Parameter type for JSON values. + properties: + type: + const: json + default: json title: Type - default: mcp_approval_response - id: - anyOf: - - type: string - - type: 'null' - reason: - anyOf: - - type: string - - type: 'null' + type: string + title: JsonType type: object - required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse - description: A response to an MCP approval request. - OpenAIResponseMessage-Input: + NumberType: + description: Parameter type for numeric values. properties: - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role + type: + const: number + default: number + title: Type type: string - enum: - - system - - developer - - user - - assistant - default: system + title: NumberType + type: object + ObjectType: + description: Parameter type for object values. + properties: type: + const: object + default: object + title: Type type: string - const: message + title: ObjectType + type: object + StringType: + description: Parameter type for string values. + properties: + type: + const: string + default: string title: Type - default: message - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' + type: string + title: StringType 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. - OpenAIResponseMessage-Output: + UnionType: + description: Parameter type for union values. properties: - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system type: - type: string - const: message + const: union + default: union title: Type - default: message - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' + type: string + title: UnionType type: object + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + ConversationItem: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + RowsDataSource: + description: A dataset stored in rows. + properties: + type: + const: rows + default: rows + title: Type + type: string + rows: + items: + additionalProperties: true + type: object + title: Rows + type: array 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: + - rows + title: RowsDataSource + type: object + URIDataSource: + description: A dataset that can be obtained from a URI. properties: - created_at: - type: integer - title: Created At - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - title: OpenAIResponseError - id: + type: + const: uri + default: uri + title: Type type: string - title: Id - model: + uri: + title: Uri type: string - title: Model - object: + required: + - uri + title: URIDataSource + type: object + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + AggregationFunctionType: + description: Types of aggregation functions for scoring results. + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + type: string + BasicScoringFnParams: + description: Parameters for basic scoring function configuration. + properties: + type: + const: basic + default: basic + title: Type type: string - const: response - title: Object - default: response - output: + aggregation_functions: + description: Aggregation functions to apply to the scores of each row items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions type: array - title: Output - parallel_tool_calls: - type: boolean - title: Parallel Tool Calls - default: false - previous_response_id: + title: BasicScoringFnParams + type: object + LLMAsJudgeScoringFnParams: + description: Parameters for LLM-as-judge scoring function configuration. + 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' - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt - status: + nullable: true + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array + required: + - judge_model + title: LLMAsJudgeScoringFnParams + type: object + RegexParserScoringFnParams: + description: Parameters for regex parser scoring function configuration. + properties: + type: + const: regex_parser + default: regex_parser + title: Type type: string - title: Status - temperature: - anyOf: - - type: number - - type: 'null' - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - truncation: - anyOf: - - type: string - - type: 'null' - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - title: OpenAIResponseUsage - instructions: + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array + title: RegexParserScoringFnParams + type: object + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + LoraFinetuningConfig: + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + properties: + type: + const: LoRA + default: LoRA + title: Type + type: string + lora_attn_modules: + items: + type: string + title: Lora Attn Modules + type: array + apply_lora_to_mlp: + title: Apply Lora To Mlp + type: boolean + apply_lora_to_output: + title: Apply Lora To Output + type: boolean + rank: + title: Rank + type: integer + alpha: + title: Alpha + type: integer + use_dora: anyOf: - - type: string + - type: boolean - type: 'null' - max_tool_calls: + default: false + quantize_base: anyOf: - - type: integer + - type: boolean - type: 'null' - type: object + default: false required: - - created_at - - id - - model - - output - - status - title: OpenAIResponseObject - description: Complete OpenAI response object containing generation results and metadata. - OpenAIResponseObjectWithInput-Output: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + type: object + QATFinetuningConfig: + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: - created_at: + type: + const: QAT + default: QAT + title: Type + type: string + quantizer_name: + title: Quantizer Name + type: string + group_size: + title: Group Size type: integer - title: Created At - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - title: OpenAIResponseError - id: + required: + - quantizer_name + - group_size + title: QATFinetuningConfig + type: object + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + SpanEndPayload: + description: Payload for a span end event. + properties: + type: + const: span_end + default: span_end + title: Type type: string - title: Id - model: + status: + $ref: '#/components/schemas/SpanStatus' + required: + - status + title: SpanEndPayload + type: object + SpanStartPayload: + description: Payload for a span start event. + properties: + type: + const: span_start + default: span_start + title: Type type: string - title: Model - object: + name: + title: Name type: string - const: response - title: Object - default: response - output: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - type: array - title: Output - parallel_tool_calls: - type: boolean - title: Parallel Tool Calls - default: false - previous_response_id: + parent_span_id: anyOf: - type: string - type: 'null' - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt - status: - type: string - title: Status - temperature: - anyOf: - - type: number - - type: 'null' - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - truncation: - anyOf: - - type: string - - type: 'null' - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - title: OpenAIResponseUsage - instructions: - anyOf: - - type: string - - type: 'null' - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - input: - items: - $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' - type: array - title: Input - type: object + nullable: true required: - - created_at - - id - - model - - output - - status - - input - title: OpenAIResponseObjectWithInput - description: OpenAI response object extended with input context information. - 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' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: 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' - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - type: array - title: Annotations + - name + title: SpanStartPayload type: object - required: - - text - title: OpenAIResponseOutputMessageContentOutputText - OpenAIResponseOutputMessageFileSearchToolCall: + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: - id: + trace_id: + title: Trace Id type: string - title: Id - queries: - items: - type: string - type: array - title: Queries - status: + span_id: + title: Span Id type: string - title: Status - type: + timestamp: + format: date-time + title: Timestamp type: string - const: file_search_call - title: Type - default: file_search_call - results: + attributes: anyOf: - - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' - type: array + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object - type: 'null' - type: object - required: - - id - - queries - - status - title: OpenAIResponseOutputMessageFileSearchToolCall - description: File search tool call output message for OpenAI responses. - OpenAIResponseOutputMessageFileSearchToolCallResults: - properties: - attributes: - additionalProperties: true - type: object - title: Attributes - file_id: + type: + const: metric + default: metric + title: Type type: string - title: File Id - filename: + metric: + title: Metric type: string - title: Filename - score: - type: number - title: Score - text: + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + title: Unit type: string - title: Text - type: object required: - - attributes - - file_id - - filename - - score - - text - title: OpenAIResponseOutputMessageFileSearchToolCallResults - description: Search results returned by the file search operation. - OpenAIResponseOutputMessageFunctionToolCall: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. properties: - call_id: - type: string - title: Call Id - name: + trace_id: + title: Trace Id type: string - title: Name - arguments: + span_id: + title: Span Id type: string - title: Arguments - type: + timestamp: + format: date-time + title: Timestamp type: string - const: function_call - title: Type - default: function_call - id: + attributes: anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object - type: 'null' - type: object - required: - - call_id - - name - - arguments - title: OpenAIResponseOutputMessageFunctionToolCall - description: Function tool call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPCall: - properties: - id: - type: string - title: Id type: - type: string - const: mcp_call + const: structured_log + default: structured_log title: Type - default: mcp_call - arguments: type: string - title: Arguments - name: + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id type: string - title: Name - server_label: + span_id: + title: Span Id type: string - title: Server Label - error: - anyOf: - - type: string - - type: 'null' - output: + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - - type: string + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object - type: 'null' - type: object - required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - description: Model Context Protocol (MCP) call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPListTools: - properties: - id: - type: string - title: Id type: - type: string - const: mcp_list_tools + const: unstructured_log + default: unstructured_log title: Type - default: mcp_list_tools - server_label: type: string - title: Server Label - tools: + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' + required: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent + type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. + properties: + data: items: - $ref: '#/components/schemas/MCPListToolsTool' + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + title: Data type: array - title: Tools - type: object + object: + const: list + default: list + title: Object + type: string required: - - id - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - description: MCP list tools output message containing available tools from an MCP server. - OpenAIResponseOutputMessageWebSearchToolCall: + - data + title: ListOpenAIResponseInputItem + type: object + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. properties: + created_at: + title: Created At + type: integer + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + nullable: true + title: OpenAIResponseError id: - type: string title: Id - status: type: string - title: Status - type: + model: + title: Model 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. - OpenAIResponsePrompt: - properties: - id: + object: + const: response + default: response + title: Object type: string - title: Id - variables: - anyOf: - - additionalProperties: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: object - - type: 'null' - version: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output + type: array + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: anyOf: - type: string - type: 'null' - type: object - required: - - id - title: OpenAIResponsePrompt - description: OpenAI compatible Prompt object that is used in OpenAI responses. - OpenAIResponseText: - properties: - format: + nullable: true + prompt: anyOf: - - $ref: '#/components/schemas/OpenAIResponseTextFormat' - title: OpenAIResponseTextFormat + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' - title: OpenAIResponseTextFormat - type: object - title: OpenAIResponseText - description: Text response configuration for OpenAI responses. - OpenAIResponseTextFormat: - properties: - type: - title: Type + nullable: true + title: OpenAIResponsePrompt + status: + title: Status type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - description: + temperature: anyOf: - - type: string + - type: number - type: 'null' - strict: + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: anyOf: - - type: boolean + - type: number - type: 'null' - type: object - title: OpenAIResponseTextFormat - description: Configuration for Responses API text format. - OpenAIResponseToolMCP: - properties: - type: - type: string - const: mcp - title: Type - default: mcp - server_label: - type: string - title: Server Label - allowed_tools: + nullable: true + tools: anyOf: - items: - type: string + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter - type: 'null' - title: list[string] | AllowedToolsFilter - type: object - required: - - server_label - title: OpenAIResponseToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. - 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: + nullable: true + truncation: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' - title: OpenAIResponseUsageInputTokensDetails + - type: string - type: 'null' - title: OpenAIResponseUsageInputTokensDetails - output_tokens_details: + nullable: true + usage: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' - title: OpenAIResponseUsageOutputTokensDetails + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' - title: OpenAIResponseUsageOutputTokensDetails - type: object - required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - description: Usage information for OpenAI response. - OpenAIResponseUsageInputTokensDetails: - properties: - cached_tokens: + nullable: true + title: OpenAIResponseUsage + instructions: anyOf: - - type: integer + - type: string - type: 'null' - type: object - title: OpenAIResponseUsageInputTokensDetails - description: Token details for input tokens in OpenAI response usage. - OpenAIResponseUsageOutputTokensDetails: - properties: - reasoning_tokens: + nullable: true + max_tool_calls: anyOf: - type: integer - type: 'null' + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + title: Input + type: array + required: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput type: object - title: OpenAIResponseUsageOutputTokensDetails - description: Token details for output tokens in OpenAI response usage. - OpenAISystemMessageParam: + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. properties: - role: + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - const: system - title: Role - default: system - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - type: object - required: - - content - title: OpenAISystemMessageParam - description: A system message providing instructions or context to the model. - OpenAITokenLogProb: - properties: - token: + last_id: + title: Last Id + type: string + object: + const: list + default: list + title: Object type: string - title: Token - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - 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. - - :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 - OpenAIToolMessageParam: + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject + type: object + OpenAIDeleteResponseObject: + description: Response object confirming deletion of an OpenAI response. properties: - role: + id: + title: Id type: string - const: tool - title: Role - default: tool - tool_call_id: + object: + const: response + default: response + title: Object type: string - title: Tool Call Id - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - type: object + deleted: + default: true + title: Deleted + type: boolean required: - - tool_call_id - - content - title: OpenAIToolMessageParam - description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. - OpenAITopLogProb: + - id + title: OpenAIDeleteResponseObject + type: object + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. properties: - token: + type: + title: Type type: string - title: Token - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - 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. - - :token: The token - :bytes: (Optional) The bytes for the token - :logprob: The log probability of the token - OpenAIUserMessageParam-Input: + - type + title: ResponseGuardrailSpec + type: object + Batch: + additionalProperties: true properties: - role: + id: + title: Id type: string - const: user - title: Role - default: user - content: + completion_window: + title: Completion Window + type: string + created_at: + title: Created At + type: integer + endpoint: + title: Endpoint + type: string + input_file_id: + title: Input File Id + type: string + object: + const: batch + title: Object + type: string + status: + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + title: Status + type: string + cancelled_at: anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: + - type: integer + - type: 'null' + nullable: true + cancelling_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + completed_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + error_file_id: anyOf: - type: string - type: 'null' - type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - OpenAIUserMessageParam-Output: - properties: - role: - type: string - const: user - title: Role - default: user - content: + nullable: true + errors: + anyOf: + - $ref: '#/components/schemas/Errors' + title: Errors + - type: 'null' + nullable: true + title: Errors + expired_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + expires_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + failed_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + finalizing_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + in_progress_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + nullable: true + model: anyOf: - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: + - type: 'null' + nullable: true + output_file_id: anyOf: - type: string - type: 'null' - type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - 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 + nullable: true + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts + - type: 'null' + nullable: true + title: BatchRequestCounts + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage + - type: 'null' + nullable: true + title: BatchUsage required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: Configuration parameters for the optimization algorithm. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: Available optimizer algorithms for training. - Order: - type: string - enum: - - asc - - desc - title: Order - description: Sort order for paginated responses. - OutputTokensDetails: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + type: object + BatchError: + additionalProperties: true properties: - reasoning_tokens: - type: integer - title: Reasoning Tokens + code: + anyOf: + - type: string + - type: 'null' + nullable: true + line: + anyOf: + - type: integer + - type: 'null' + nullable: true + message: + anyOf: + - type: string + - type: 'null' + nullable: true + param: + anyOf: + - type: string + - type: 'null' + nullable: true + title: BatchError + type: object + BatchRequestCounts: additionalProperties: true + properties: + completed: + title: Completed + type: integer + failed: + title: Failed + type: integer + total: + title: Total + type: integer + required: + - completed + - failed + - total + title: BatchRequestCounts type: object + BatchUsage: + additionalProperties: true + properties: + input_tokens: + title: Input Tokens + type: integer + input_tokens_details: + $ref: '#/components/schemas/InputTokensDetails' + output_tokens: + title: Output Tokens + type: integer + output_tokens_details: + $ref: '#/components/schemas/OutputTokensDetails' + total_tokens: + title: Total Tokens + type: integer required: - - reasoning_tokens - title: OutputTokensDetails - PaginatedResponse: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage + type: object + Errors: + additionalProperties: true properties: data: - items: - additionalProperties: true - type: object - type: array - title: Data - has_more: - type: boolean - title: Has More - url: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + nullable: true + object: anyOf: - type: string - type: 'null' + nullable: true + title: Errors type: object - required: - - data - - has_more - title: PaginatedResponse - description: A generic paginated response that follows a simple format. - PostTrainingJob: + InputTokensDetails: + additionalProperties: true properties: - job_uuid: - type: string - title: Job Uuid + cached_tokens: + title: Cached Tokens + type: integer + required: + - cached_tokens + title: InputTokensDetails type: object + OutputTokensDetails: + additionalProperties: true + properties: + reasoning_tokens: + title: Reasoning Tokens + type: integer required: - - job_uuid - title: PostTrainingJob - PostTrainingJobArtifactsResponse: + - reasoning_tokens + title: OutputTokensDetails + type: object + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - job_uuid: + object: + const: list + default: list + title: Object type: string - title: Job Uuid - checkpoints: + data: + description: List of batch objects items: - $ref: '#/components/schemas/Checkpoint' + $ref: '#/components/schemas/Batch' + title: Data type: array - title: Checkpoints - type: object - required: - - job_uuid - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingJobStatusResponse: - properties: - job_uuid: - type: string - title: Job Uuid - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: + first_id: anyOf: - type: string - format: date-time - type: 'null' - started_at: + description: ID of the first batch in the list + nullable: true + last_id: anyOf: - type: string - format: date-time - type: 'null' - completed_at: + description: ID of the last batch in the list + nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean + required: + - data + title: ListBatchesResponse + type: object + Benchmark: + description: A benchmark resource for evaluating model performance. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier + type: string + provider_resource_id: anyOf: - type: string - format: date-time - - type: 'null' - resources_allocated: - anyOf: - - additionalProperties: true - type: object - type: 'null' - checkpoints: + description: Unique identifier for this resource in the provider + nullable: true + 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: - $ref: '#/components/schemas/Checkpoint' + type: string + title: Scoring Functions type: array - title: Checkpoints - type: object + metadata: + additionalProperties: true + description: Metadata for this evaluation task + title: Metadata + type: object required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark + type: object + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string + required: + - image + title: ImageDelta + type: object + TextDelta: + description: A text content delta for streaming responses. + properties: + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: TextDelta + type: object + JobStatus: + description: Status of a job execution. + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + type: string + Job: + description: A job execution instance with status tracking. + properties: + job_id: + title: Job Id + type: string + status: + $ref: '#/components/schemas/JobStatus' + required: + - job_id + - status + title: Job + type: object + MetricInResponse: + description: A metric value included in API responses. + properties: + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - metric + - value + title: MetricInResponse + type: object + PaginatedResponse: + description: A generic paginated response that follows a simple format. + properties: + data: + items: + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - data + - has_more + title: PaginatedResponse + type: object PostTrainingMetric: + description: Training metrics captured during post-training jobs. properties: epoch: - type: integer title: Epoch + type: integer train_loss: - type: number title: Train Loss - validation_loss: type: number + validation_loss: title: Validation Loss - perplexity: type: number + perplexity: title: Perplexity - type: object + type: number required: - epoch - train_loss - validation_loss - perplexity title: PostTrainingMetric - description: Training metrics captured during post-training jobs. - Prompt: - properties: - prompt: - anyOf: - - type: string - - type: 'null' - description: The system prompt with variable placeholders - 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. - ProviderInfo: + Checkpoint: + description: Checkpoint created during training runs. properties: - api: - type: string - title: Api - provider_id: + identifier: + title: Identifier type: string - title: Provider Id - provider_type: + created_at: + format: date-time + title: Created At 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. - QATFinetuningConfig: - properties: - type: + epoch: + title: Epoch + type: integer + post_training_job_id: + title: Post Training Job Id type: string - const: QAT - title: Type - default: QAT - quantizer_name: + path: + title: Path type: string - title: Quantizer Name - group_size: - type: integer - title: Group Size - type: object + training_metrics: + anyOf: + - $ref: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric + - type: 'null' + nullable: true + title: PostTrainingMetric required: - - quantizer_name - - group_size - title: QATFinetuningConfig - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - QueryChunksResponse: - properties: - chunks: - items: - $ref: '#/components/schemas/Chunk-Output' - type: array - title: Chunks - scores: - items: - type: number - type: array - title: Scores + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint type: object - required: - - chunks - - scores - title: QueryChunksResponse - description: Response from querying chunks in a vector database. - RegexParserScoringFnParams: + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: type: - type: string - const: regex_parser + const: dialog + default: dialog 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: string + title: DialogType type: object - title: RegexParserScoringFnParams - description: Parameters for regex parser scoring function configuration. - RerankData: + Conversation: + description: OpenAI-compatible conversation object. properties: - index: + 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. + 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 - title: Index - relevance_score: - type: number - title: Relevance Score + 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. + nullable: true + 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. + nullable: true + required: + - id + - created_at + title: Conversation 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: - - index - - relevance_score - title: RerankData - description: A single rerank result from a reranking response. - RerankResponse: + - id + title: ConversationDeletedResource + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. properties: - data: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. items: - $ref: '#/components/schemas/RerankData' + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items type: array - title: Data - type: object required: - - data - title: RerankResponse - description: Response from a reranking request. - RouteInfo: + - items + title: ConversationItemCreateRequest + type: object + ConversationItemDeletedResource: + description: Response for deleted conversation item. properties: - route: + id: + description: The deleted item identifier + title: Id type: string - title: Route - method: + object: + default: conversation.item.deleted + description: Object type + title: Object type: string - title: Method - provider_types: - items: - type: string - type: array - title: Provider Types - type: object + deleted: + default: true + description: Whether the object was deleted + title: Deleted + type: boolean required: - - route - - method - - provider_types - title: RouteInfo - description: Information about an API route including its path, method, and implementing providers. - RowsDataSource: + - id + title: ConversationItemDeletedResource + type: object + ConversationItemList: + description: List of conversation items with pagination. properties: - type: + object: + default: list + description: Object type + title: Object type: string - const: rows - title: Type - default: rows - rows: + data: + description: List of conversation items items: - additionalProperties: true - type: object + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + title: Data type: array - title: Rows - type: object - required: - - rows - title: RowsDataSource - description: A dataset stored in rows. - RunShieldResponse: - properties: - violation: + first_id: anyOf: - - $ref: '#/components/schemas/SafetyViolation' - title: SafetyViolation + - type: string - type: 'null' - title: SafetyViolation - type: object - title: RunShieldResponse - description: Response from running a safety shield. - SafetyViolation: - properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - user_message: + description: The ID of the first item in the list + nullable: true + last_id: anyOf: - type: string - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - type: object + description: The ID of the last item in the list + nullable: true + has_more: + default: false + description: Whether there are more items available + title: Has More + type: boolean required: - - violation_level - title: SafetyViolation - description: Details of a safety violation detected by content moderation. - SamplingParams: + - data + title: ConversationItemList + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - max_tokens: - anyOf: - - type: integer - - type: 'null' - repetition_penalty: - anyOf: - - type: number - - type: 'null' - default: 1.0 - stop: - anyOf: - - items: - type: string - type: array - - type: 'null' - type: object - title: SamplingParams - description: Sampling parameters. - ScoreBatchResponse: - properties: - dataset_id: - anyOf: - - type: string - - type: 'null' - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results - type: object + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true + type: object + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string required: - - results - title: ScoreBatchResponse - description: Response from batch scoring operations on datasets. - ScoreResponse: - properties: - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results + - id + - content + - role + - status + title: ConversationMessage type: object - required: - - results - title: ScoreResponse - description: The response from scoring. - ScoringFn: + DatasetPurpose: + description: Purpose of the dataset. Each purpose has a required input data schema. + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + title: DatasetPurpose + type: string + Dataset: + description: Dataset resource for storing and accessing training or evaluation data. properties: identifier: - type: string - title: 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 + nullable: true provider_id: - type: string - title: Provider Id description: ID of the provider that owns this resource - type: + title: Provider Id type: string - const: scoring_function + type: + const: dataset + default: dataset title: Type - default: scoring_function - description: - anyOf: - - type: string - - type: 'null' + type: string + purpose: + $ref: '#/components/schemas/DatasetPurpose' + source: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource metadata: additionalProperties: true - type: object + description: Any additional metadata for this dataset title: Metadata - description: Any additional metadata for this definition - return_type: - oneOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - description: The return type of the deterministic function - discriminator: - propertyName: type - mapping: - 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: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: Params - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval - type: object + type: object required: - identifier - provider_id - - return_type - title: ScoringFn - description: A scoring function resource for evaluating model outputs. - ScoringResult: - properties: - score_rows: - items: - additionalProperties: true - type: object - type: array - title: Score Rows - aggregated_results: - additionalProperties: true - type: object - title: Aggregated Results + - purpose + - source + title: Dataset type: object - required: - - score_rows - - aggregated_results - title: ScoringResult - description: A scoring result for a single row. - SearchRankingOptions: + Error: + description: Error response from the API. Roughly follows RFC 7807. properties: - ranker: + status: + title: Status + type: integer + title: + title: Title + type: string + detail: + title: Detail + type: string + instance: anyOf: - type: string - type: 'null' - score_threshold: - anyOf: - - type: number - - type: 'null' - default: 0.0 + nullable: true + required: + - status + - title + - detail + title: Error type: object - title: SearchRankingOptions - description: Options for ranking and filtering search results. - Shield: + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + InlineProviderSpec: properties: - identifier: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' - description: Unique identifier for this resource in the provider - 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: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - identifier - - provider_id - title: Shield - description: A safety shield resource that can be used to check content. - StringType: - properties: - type: - type: string - const: string - title: Type - default: string - type: object - title: StringType - description: Parameter type for string values. - SystemMessage: - properties: - role: - type: string - const: system - title: Role - default: system - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - type: object - required: - - content - title: SystemMessage - description: A system message providing instructions or context to the model. - 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 - ToolDef: - properties: - toolgroup_id: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - type: string - type: 'null' - name: - type: string - title: Name - description: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - type: string - type: 'null' - input_schema: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - output_schema: + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - metadata: + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. + nullable: true + description: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - type: object + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true required: - - name - title: ToolDef - description: Tool definition used in runtime contexts. - ToolGroup: + - api + - provider_type + - config_class + title: InlineProviderSpec + type: object + ModelType: + description: Enumeration of supported model types in Llama Stack. + enum: + - llm + - embedding + - rerank + title: ModelType + type: string + Model: + description: A model resource representing an AI model registered in Llama Stack. properties: identifier: - type: string - title: 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 + nullable: true provider_id: - type: string - title: Provider Id description: ID of the provider that owns this resource - type: + title: Provider Id type: string - const: tool_group + type: + const: model + default: model title: Type - default: tool_group - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object + type: string + metadata: + additionalProperties: true + description: Any additional metadata for this model + title: Metadata + type: object + model_type: + $ref: '#/components/schemas/ModelType' + default: llm required: - identifier - provider_id - title: ToolGroup - description: A group of related tools managed together. - ToolInvocationResult: + title: Model + type: object + ProviderSpec: properties: - content: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - type: array - title: list[ImageContentItem-Output | TextContentItem] - type: 'null' - title: string | list[ImageContentItem-Output | TextContentItem] - error_message: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - type: string - type: 'null' - error_code: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - - type: integer + - type: string - type: 'null' - metadata: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + required: + - api + - provider_type + - config_class + title: ProviderSpec type: object - title: ToolInvocationResult - description: Result of a tool invocation. - TopKSamplingStrategy: + RemoteProviderSpec: properties: - type: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider 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. - TopPSamplingStrategy: - properties: - type: + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class type: string - const: top_p - title: Type - default: top_p - temperature: + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - - type: number - minimum: 0.0 + - type: string - type: 'null' - top_p: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - - type: number + - type: string - type: 'null' - default: 0.95 - type: object - required: - - temperature - title: TopPSamplingStrategy - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. - 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: - anyOf: - - type: integer - - type: 'null' - default: 1 - data_config: - anyOf: - - $ref: '#/components/schemas/DataConfig' - title: DataConfig - - type: 'null' - title: DataConfig - optimizer_config: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - title: OptimizerConfig + - type: string - type: 'null' - title: OptimizerConfig - efficiency_config: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - title: EfficiencyConfig + - type: string - type: 'null' - title: EfficiencyConfig - dtype: + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type + type: string + description: anyOf: - type: string - type: 'null' - default: bf16 - type: object + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true required: - - n_epochs - title: TrainingConfig - description: Comprehensive configuration for the training process. - URIDataSource: - properties: - type: - type: string - const: uri - title: Type - default: uri - uri: - type: string - title: Uri + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec type: object - required: - - uri - title: URIDataSource - description: A dataset that can be obtained from a URI. - URL: + ScoringFn: + description: A scoring function resource for evaluating model outputs. properties: - uri: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Uri - type: object - required: - - uri - title: URL - description: A URL reference to external content. - UnionType: - properties: - type: + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - const: union - title: Type - default: union - type: object - title: UnionType - description: Parameter type for union values. - VectorStoreChunkingStrategyAuto: - properties: type: - type: string - const: auto + const: scoring_function + default: scoring_function title: Type - default: auto - type: object - title: VectorStoreChunkingStrategyAuto - description: Automatic chunking strategy for vector store files. - VectorStoreChunkingStrategyStatic: - properties: - type: type: string - const: static - title: Type - default: static - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' - type: object + description: + anyOf: + - type: string + - type: 'null' + 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: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + params: + anyOf: + - discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + title: Params + nullable: true required: - - static - title: VectorStoreChunkingStrategyStatic - description: Static chunking strategy with configurable parameters. - 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 + - identifier + - provider_id + - return_type + title: ScoringFn type: object - title: VectorStoreChunkingStrategyStaticConfig - description: Configuration for static chunking strategy. - VectorStoreContent: + Shield: + description: A safety shield resource that can be used to check content. properties: - type: - type: string - const: text - title: Type - text: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Text - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - chunk_metadata: + provider_resource_id: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' - title: ChunkMetadata - metadata: + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string + type: + const: shield + default: shield + title: Type + type: string + params: anyOf: - additionalProperties: true type: object - type: 'null' - type: object + nullable: true required: - - type - - text - title: VectorStoreContent - description: Content item from a vector store file or search result. - VectorStoreDeleteResponse: + - identifier + - provider_id + title: Shield + type: object + ToolGroup: + description: A group of related tools managed together. properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store.deleted - deleted: - type: boolean - title: Deleted - default: true - type: object - required: - - id - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - 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: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Vector Store Id - status: - title: Status + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - 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. - VectorStoreFileContentResponse: - properties: - object: + type: + const: tool_group + default: tool_group + title: Type type: string - const: vector_store.file_content.page - title: Object - default: vector_store.file_content.page - data: - items: - $ref: '#/components/schemas/VectorStoreContent' - type: array - title: Data - has_more: - type: boolean - title: Has More - default: false - next_page: + mcp_endpoint: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - type: object + nullable: true + title: URL + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true required: - - data - title: VectorStoreFileContentResponse - description: Represents the parsed content of a vector store file. - 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 + - identifier + - provider_id + title: ToolGroup type: object - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - description: File processing status counts for a vector store. - VectorStoreFileDeleteResponse: + ModelCandidate: + description: A model candidate for evaluation. properties: - id: + type: + const: model + default: model + title: Type type: string - title: Id - object: + model: + title: Model type: string - title: Object - default: vector_store.file.deleted - deleted: - type: boolean - title: Deleted - default: true - type: object + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage + - type: 'null' + nullable: true + title: SystemMessage required: - - id - title: VectorStoreFileDeleteResponse - description: Response from deleting a vector store file. - VectorStoreFileLastError: - properties: - code: - title: Code - type: string - enum: - - server_error - - rate_limit_exceeded - default: server_error - message: - type: string - title: Message + - model + - sampling_params + title: ModelCandidate type: object - required: - - code - - message - title: VectorStoreFileLastError - description: Error information for failed vector store file processing. - VectorStoreFileObject: + SamplingParams: + description: Sampling parameters. 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' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + strategy: discriminator: - propertyName: type mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - created_at: - type: integer - title: Created At - last_error: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + max_tokens: anyOf: - - $ref: '#/components/schemas/VectorStoreFileLastError' - title: VectorStoreFileLastError + - type: integer - type: 'null' - title: VectorStoreFileLastError - status: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - usage_bytes: - type: integer - title: Usage Bytes - default: 0 - vector_store_id: - type: string - title: Vector Store Id + nullable: true + repetition_penalty: + anyOf: + - type: number + - type: 'null' + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + title: SamplingParams type: object - required: - - id - - chunking_strategy - - created_at - - status - - vector_store_id - title: VectorStoreFileObject - description: OpenAI Vector Store File object. - VectorStoreFilesListInBatchResponse: + SystemMessage: + description: A system message providing instructions or context to the model. properties: - object: + role: + const: system + default: system + title: Role type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - type: array - title: Data - first_id: + content: anyOf: - type: string - - type: 'null' - last_id: + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + required: + - content + title: SystemMessage + type: object + BenchmarkConfig: + description: A benchmark configuration for evaluation. + properties: + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + description: Map between scoring function id and parameters for each scoring function you want to run + title: Scoring Params + type: object + num_examples: anyOf: - - type: string + - type: integer - type: 'null' - has_more: - type: boolean - title: Has More - default: false + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + nullable: true + required: + - eval_candidate + title: BenchmarkConfig type: object + ScoringResult: + description: A scoring result for a single row. + properties: + score_rows: + items: + additionalProperties: true + type: object + title: Score Rows + type: array + aggregated_results: + additionalProperties: true + title: Aggregated Results + type: object required: - - data - title: VectorStoreFilesListInBatchResponse - description: Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: + - score_rows + - aggregated_results + title: ScoringResult + type: object + EvaluateResponse: + description: The response from an evaluation. properties: - object: - type: string - title: Object - default: list - data: + generations: items: - $ref: '#/components/schemas/VectorStoreFileObject' + additionalProperties: true + type: object + title: Generations type: array - title: Data - first_id: - anyOf: - - type: string - - type: 'null' - last_id: - anyOf: - - type: string - - type: 'null' - has_more: - type: boolean - title: Has More - default: false + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Scores + type: object + required: + - generations + - scores + title: EvaluateResponse 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: - - data - title: VectorStoreListFilesResponse - description: Response from listing files in a vector store. - VectorStoreListResponse: + - anchor + - seconds + title: ExpiresAfter + type: object + OpenAIFileObject: + description: OpenAI File object as defined in the OpenAI Files API. properties: object: - type: string + const: file + default: file title: Object - default: list + 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: '#/components/schemas/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 + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. + properties: data: items: - $ref: '#/components/schemas/VectorStoreObject' - type: array + $ref: '#/components/schemas/OpenAIFileObject' title: Data - first_id: - anyOf: - - type: string - - type: 'null' - last_id: - anyOf: - - type: string - - type: 'null' + type: array has_more: - type: boolean title: Has More - default: false - type: object + 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 - title: VectorStoreListResponse - description: Response from listing vector stores. - VectorStoreObject: + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse + type: object + OpenAIFileDeleteResponse: + description: Response for deleting a file in OpenAI Files API. properties: id: - type: string title: Id - object: type: string + object: + const: file + default: file title: Object - default: vector_store - created_at: - type: integer - title: Created At - name: - anyOf: - - type: string - - type: 'null' - usage_bytes: - type: integer - title: Usage Bytes - default: 0 - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - status: type: string - title: Status - default: completed - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - expires_at: - anyOf: - - type: integer - - type: 'null' - last_active_at: - anyOf: - - type: integer - - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - type: object + deleted: + title: Deleted + type: boolean required: - id - - created_at - - file_counts - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreSearchResponse-Output: + - deleted + title: OpenAIFileDeleteResponse + type: object + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). properties: - file_id: - type: string - title: File Id - filename: + type: + const: bf16 + default: bf16 + title: Type type: string - title: Filename - score: - type: number - title: Score - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - title: string | number | boolean - type: object - - type: 'null' - content: - items: - $ref: '#/components/schemas/VectorStoreContent' - type: array - title: Content + title: Bf16QuantizationConfig type: object - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - description: Response from searching a vector store. - VectorStoreSearchResponsePage: + EmbeddingsResponse: + description: Response containing generated embeddings. properties: - object: - type: string - title: Object - default: vector_store.search_results.page - search_query: - items: - type: string - type: array - title: Search Query - data: + embeddings: items: - $ref: '#/components/schemas/VectorStoreSearchResponse-Output' + items: + type: number + type: array + title: Embeddings type: array - title: Data - has_more: - type: boolean - title: Has More - default: false - next_page: - anyOf: - - type: string - - type: 'null' - type: object required: - - search_query - - data - title: VectorStoreSearchResponsePage - description: Paginated response from searching a vector store. - VersionInfo: + - embeddings + title: EmbeddingsResponse + type: object + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. properties: - version: + type: + const: fp8_mixed + default: fp8_mixed + title: Type type: string - title: Version + title: Fp8QuantizationConfig type: object - required: - - version - title: VersionInfo - description: Version information for the service. - ViolationLevel: - type: string - enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - _URLOrData: + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. properties: - url: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - data: + type: + const: int4_mixed + default: int4_mixed + title: Type + type: string + scheme: anyOf: - type: string - type: 'null' - contentEncoding: base64 + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig type: object - title: _URLOrData - description: A URL or a base64 encoded string - _batches_Request: + OpenAIChatCompletionUsage: + description: Usage information for OpenAI chat completion. properties: - input_file_id: - type: string - title: Input File Id - endpoint: - type: string - title: Endpoint - completion_window: - type: string - const: 24h - title: Completion Window - metadata: + 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: - - additionalProperties: - type: string - type: object + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' - idempotency_key: + nullable: true + title: OpenAIChatCompletionUsagePromptTokensDetails + completion_tokens_details: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' - type: object + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails required: - - input_file_id - - endpoint - - completion_window - title: _batches_Request - _conversations_Request: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage + type: object + OpenAIChatCompletionUsageCompletionTokensDetails: + description: Token details for output tokens in OpenAI chat completion usage. properties: - items: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) - type: array - - type: 'null' - metadata: + reasoning_tokens: anyOf: - - additionalProperties: - type: string - type: object + - type: integer - type: 'null' + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails type: object - title: _conversations_Request - _conversations_conversation_id_Request: + OpenAIChatCompletionUsagePromptTokensDetails: + description: Token details for prompt tokens in OpenAI chat completion usage. properties: - metadata: - additionalProperties: - type: string - type: object - title: Metadata + cached_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsagePromptTokensDetails type: object - required: - - metadata - title: _conversations_conversation_id_Request - _conversations_conversation_id_items_Request: + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. properties: - items: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) - type: array - title: Items - type: object - required: - - items - title: _conversations_conversation_id_items_Request - _eval_benchmarks_benchmark_id_evaluations_Request: - properties: - input_rows: - items: - additionalProperties: true - type: object - type: array - title: Input Rows - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - type: object - required: - - input_rows - - scoring_functions - - benchmark_config - title: _eval_benchmarks_benchmark_id_evaluations_Request - _inference_rerank_Request: - properties: - model: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + finish_reason: + title: Finish Reason type: string - title: Model - query: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - items: - items: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - type: array - title: Items - max_num_results: + index: + title: Index + type: integer + logprobs: anyOf: - - type: integer + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' - type: object + nullable: true + title: OpenAIChoiceLogprobs required: - - model - - query - - items - title: _inference_rerank_Request - _moderations_Request: + - 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. properties: - input: + content: anyOf: - - type: string - items: - type: string + $ref: '#/components/schemas/OpenAITokenLogProb' type: array - title: list[string] - title: string | list[string] - model: + - type: 'null' + nullable: true + refusal: anyOf: - - type: string + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs type: object - required: - - input - title: _moderations_Request - _post_training_preference_optimize_Request: + OpenAICompletionWithInputMessages: properties: - job_uuid: - type: string - title: Job Uuid - finetuned_model: + id: + title: Id type: string - title: Finetuned Model - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - type: object - required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: _post_training_preference_optimize_Request - _post_training_supervised_fine_tune_Request: - properties: - job_uuid: + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object type: string - title: Job Uuid - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config + created: + title: Created + type: integer model: + title: Model + type: string + usage: anyOf: - - type: string - - type: 'null' - description: Model descriptor for training if not in provider config` - checkpoint_dir: - anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' - algorithm_config: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig + nullable: true + title: OpenAIChatCompletionUsage + input_messages: + items: discriminator: - propertyName: type mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - title: LoraFinetuningConfig | QATFinetuningConfig - - type: 'null' - title: Algorithm Config - type: object + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + title: Input Messages + type: array required: - - job_uuid - - training_config - - hyperparam_search_config - - logger_config - title: _post_training_supervised_fine_tune_Request - _prompts_Request: + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + 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: - prompt: + token: + title: Token type: string - title: Prompt - variables: + bytes: anyOf: - items: - type: string + type: integer type: array - type: 'null' - type: object + nullable: true + logprob: + title: Logprob + type: number + top_logprobs: + items: + $ref: '#/components/schemas/OpenAITopLogProb' + title: Top Logprobs + type: array required: - - prompt - title: _prompts_Request - _prompts_prompt_id_Request: + - 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: - prompt: + token: + title: Token type: string - title: Prompt - version: - type: integer - title: Version - variables: + bytes: anyOf: - items: - type: string + type: integer type: array - type: 'null' - set_as_default: - type: boolean - title: Set As Default - default: true + nullable: true + logprob: + title: Logprob + type: number + required: + - token + - logprob + title: OpenAITopLogProb type: object + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. + 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: - - prompt - - version - title: _prompts_prompt_id_Request - _prompts_prompt_id_set_default_version_Request: + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse + type: object + OpenAIChatCompletion: + description: Response from an OpenAI-compatible chat completion request. properties: - version: + 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 - title: Version - type: object + model: + title: Model + type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - version - title: _prompts_prompt_id_set_default_version_Request - _responses_Request: + - id + - choices + - created + - model + title: OpenAIChatCompletion + type: object + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. properties: - input: + content: anyOf: - type: string - - items: - $ref: '#/components/schemas/OpenAIResponseMessageInputUnion' - type: array - title: list[OpenAIResponseMessageInputUnion] - title: string | list[OpenAIResponseMessageInputUnion] - model: - type: string - title: Model - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - type: 'null' - title: OpenAIResponsePrompt - instructions: + nullable: true + refusal: anyOf: - type: string - type: 'null' - previous_response_id: + nullable: true + role: anyOf: - type: string - type: 'null' - conversation: + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + reasoning_content: anyOf: - type: string - type: 'null' - store: + nullable: true + title: OpenAIChoiceDelta + type: object + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. + properties: + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: anyOf: - - type: boolean + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' - default: true - stream: + nullable: true + title: OpenAIChoiceLogprobs + required: + - delta + - finish_reason + - index + title: OpenAIChunkChoice + type: object + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + properties: + id: + title: Id + type: string + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object + type: string + created: + title: Created + type: integer + model: + title: Model + type: string + usage: anyOf: - - type: boolean + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' - default: false - temperature: + nullable: true + title: OpenAIChatCompletionUsage + required: + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk + type: object + OpenAIChatCompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible chat completion endpoint. + properties: + model: + title: Model + type: string + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + minItems: 1 + title: Messages + type: array + frequency_penalty: anyOf: - type: number - type: 'null' - text: + nullable: true + function_call: anyOf: - - $ref: '#/components/schemas/OpenAIResponseText' - title: OpenAIResponseText + - type: string + - additionalProperties: true + type: object - type: 'null' - title: OpenAIResponseText - tools: + title: string | object + nullable: true + functions: anyOf: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - discriminator: - propertyName: type - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) + additionalProperties: true + type: object type: array - type: 'null' - include: + nullable: true + logit_bias: anyOf: - - items: - type: string - type: array + - additionalProperties: + type: number + type: object - type: 'null' - max_infer_iters: + nullable: true + logprobs: anyOf: - - type: integer + - type: boolean - type: 'null' - default: 10 - max_tool_calls: + nullable: true + max_completion_tokens: anyOf: - type: integer - type: 'null' - type: object - required: - - input - - model - title: _responses_Request - _scoring_score_Request: - properties: - input_rows: - items: - additionalProperties: true - type: object - type: array - title: Input Rows - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - 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: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - 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 - _tool_runtime_invoke_Request: - properties: - tool_name: - type: string - title: Tool Name - kwargs: - additionalProperties: true - type: object - title: Kwargs - type: object - required: - - tool_name - - kwargs - title: _tool_runtime_invoke_Request - _vector_io_query_Request: - properties: - vector_store_id: - type: string - title: Vector Store Id - query: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - params: + nullable: true + max_tokens: anyOf: - - additionalProperties: true - type: object + - type: integer - type: 'null' - type: object - required: - - vector_store_id - - query - title: _vector_io_query_Request - _vector_stores_vector_store_id_Request: - properties: - name: + nullable: true + n: anyOf: - - type: string + - type: integer - type: 'null' - expires_after: + nullable: true + parallel_tool_calls: anyOf: - - additionalProperties: true - type: object + - type: boolean - type: 'null' - metadata: + nullable: true + presence_penalty: anyOf: - - additionalProperties: true - type: object + - type: number - type: 'null' - type: object - title: _vector_stores_vector_store_id_Request - _vector_stores_vector_store_id_files_Request: - properties: - file_id: - type: string - title: File Id - attributes: + nullable: true + response_format: anyOf: - - additionalProperties: true - type: object + - discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - type: 'null' - chunking_strategy: + title: Response Format + nullable: true + seed: anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: integer - type: 'null' - title: Chunking Strategy - type: object - required: - - file_id - title: _vector_stores_vector_store_id_files_Request - _vector_stores_vector_store_id_files_file_id_Request: - properties: - attributes: - additionalProperties: true - type: object - title: Attributes - type: object - required: - - attributes - title: _vector_stores_vector_store_id_files_file_id_Request - _vector_stores_vector_store_id_search_Request: - properties: - query: + nullable: true + stop: anyOf: - type: string - items: type: string type: array title: list[string] + - type: 'null' title: string | list[string] - filters: + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - max_num_results: + nullable: true + temperature: anyOf: - - type: integer + - type: number - type: 'null' - default: 10 - ranking_options: + nullable: true + tool_choice: anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions + - type: string + - additionalProperties: true + type: object - type: 'null' - title: SearchRankingOptions - rewrite_query: + title: string | object + nullable: true + tools: anyOf: - - type: boolean + - items: + additionalProperties: true + type: object + type: array - type: 'null' - default: false - search_mode: + nullable: true + top_logprobs: + anyOf: + - type: integer + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: anyOf: - type: string - type: 'null' - default: vector - type: object + nullable: true required: - - query - title: _vector_stores_vector_store_id_search_Request - Error: - description: Error response from the API. Roughly follows RFC 7807. + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody + 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: - status: - title: Status - type: integer - title: - title: Title + finish_reason: + title: Finish Reason type: string - detail: - title: Detail + text: + title: Text type: string - instance: + index: + title: Index + type: integer + logprobs: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - - status - - title - - detail - title: Error + - finish_reason + - text + - index + title: OpenAICompletionChoice type: object - ImageContentItem: - description: A image content item + OpenAICompletion: + 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: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/components/schemas/_URLOrData' - required: - - image - title: ImageContentItem - type: object - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - BuiltinTool: - enum: - - brave_search - - wolfram_alpha - - photogen - - code_interpreter - title: BuiltinTool - type: string - ImageDelta: - description: An image content delta for streaming responses. - properties: - type: - const: image - default: image - title: Type - type: string - image: - format: binary - title: Image - type: string - required: - - image - title: ImageDelta - type: object - TextDelta: - description: A text content delta for streaming responses. - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text + id: + title: Id type: string - required: - - text - title: TextDelta - type: object - ToolCall: - properties: - call_id: - title: Call Id + choices: + items: + $ref: '#/components/schemas/OpenAICompletionChoice' + title: Choices + type: array + created: + title: Created + type: integer + model: + title: Model type: string - tool_name: - anyOf: - - $ref: '#/components/schemas/BuiltinTool' - title: BuiltinTool - - type: string - title: BuiltinTool | string - arguments: - title: Arguments + object: + const: text_completion + default: text_completion + title: Object type: string required: - - call_id - - tool_name - - arguments - title: ToolCall + - id + - choices + - created + - model + title: OpenAICompletion type: object - ToolCallDelta: - description: A tool call content delta for streaming responses. + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens properties: - type: - const: tool_call - default: tool_call - title: Type - type: string - tool_call: + text_offset: anyOf: - - type: string - - $ref: '#/components/schemas/ToolCall' - title: ToolCall - title: string | ToolCall - parse_status: - $ref: '#/components/schemas/ToolCallParseStatus' - required: - - tool_call - - parse_status - title: ToolCallDelta - type: object - ToolCallParseStatus: - description: Status of tool call parsing during streaming. - enum: - - started - - in_progress - - failed - - succeeded - title: ToolCallParseStatus - type: string - ContentDelta: - discriminator: - mapping: - image: '#/components/schemas/ImageDelta' - text: '#/components/schemas/TextDelta' - tool_call: '#/components/schemas/ToolCallDelta' - propertyName: type - oneOf: - - $ref: '#/components/schemas/TextDelta' - title: TextDelta - - $ref: '#/components/schemas/ImageDelta' - title: ImageDelta - - $ref: '#/components/schemas/ToolCallDelta' - title: ToolCallDelta - title: TextDelta | ImageDelta | ToolCallDelta - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat - type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. - 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 - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: anyOf: - - type: string - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: number type: array - title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] nullable: true - name: + tokens: anyOf: - - type: string + - items: + type: string + type: array - type: 'null' nullable: true - tool_calls: + top_logprobs: anyOf: - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + additionalProperties: + type: number + type: object type: array - type: 'null' nullable: true - title: OpenAIAssistantMessageParam + title: OpenAICompletionLogprobs type: object - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. + OpenAICompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible completion endpoint. properties: - role: - const: user - default: user - title: Role + model: + title: Model type: string - content: + prompt: 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' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: string type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: + title: list[string] + - items: + type: integer + type: array + title: list[integer] + - items: + items: + type: integer + type: array + type: array + title: list[array] + title: string | ... (4 variants) + best_of: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - required: - - content - title: OpenAIUserMessageParam - type: object - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - OpenAIResponseFormatParam: - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - VectorStoreFileStatus: - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - OpenAIResponseInputMessageContent: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - 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: + echo: + anyOf: + - type: boolean + - type: 'null' + nullable: true + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: 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' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: string type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - const: message - default: message - title: Type - type: string - id: + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: anyOf: - - type: string + - type: boolean - type: 'null' nullable: true - status: + stream_options: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - required: - - content - - role - title: OpenAIResponseMessage - type: object - OpenAIResponseOutput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseContentPartOutputText: - description: Text content within a streamed response part. - properties: - type: - const: output_text - default: output_text - title: Type - type: string - text: - title: Text - type: string - annotations: - items: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations - type: array - logprobs: + temperature: anyOf: - - items: - additionalProperties: true - type: object - type: array + - type: number + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true + suffix: + anyOf: + - type: string - type: 'null' nullable: true required: - - text - title: OpenAIResponseContentPartOutputText - type: object - OpenAIResponseContentPartReasoningText: - description: Reasoning text emitted as part of a streamed response. - properties: - type: - const: reasoning_text - default: reasoning_text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIResponseContentPartReasoningText - type: object - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseContentPartReasoningSummary: - description: Reasoning summary part in a streamed response. - properties: - type: - const: summary_text - default: summary_text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIResponseContentPartReasoningSummary + - model + - prompt + title: OpenAICompletionRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseCompleted: - description: Streaming event indicating a response has been completed. + OpenAIEmbeddingData: + description: A single embedding data object from an OpenAI-compatible embeddings response. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.completed - default: response.completed - title: Type + object: + const: embedding + default: embedding + title: Object type: string + embedding: + anyOf: + - items: + type: number + type: array + title: list[number] + - type: string + title: list[number] | string + index: + title: Index + type: integer required: - - response - title: OpenAIResponseObjectStreamResponseCompleted + - embedding + - index + title: OpenAIEmbeddingData type: object - OpenAIResponseObjectStreamResponseContentPartAdded: - description: Streaming event for when a new content part is added to a response item. + OpenAIEmbeddingUsage: + description: Usage information for an OpenAI-compatible embeddings response. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index + prompt_tokens: + title: Prompt Tokens type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number + total_tokens: + title: Total Tokens type: integer - type: - const: response.content_part.added - default: response.content_part.added - title: Type - type: string required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartAdded + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage type: object - OpenAIResponseObjectStreamResponseContentPartDone: - description: Streaming event for when a content part is completed. + OpenAIEmbeddingsRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible embeddings endpoint. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer - type: - const: response.content_part.done - default: response.content_part.done - title: Type - type: string - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartDone - type: object - OpenAIResponseObjectStreamResponseCreated: - description: Streaming event indicating a new response has been created. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.created - default: response.created - title: Type - type: string - required: - - response - title: OpenAIResponseObjectStreamResponseCreated - type: object - OpenAIResponseObjectStreamResponseFailed: - description: Streaming event emitted when a response fails. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.failed - default: response.failed - title: Type - type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseFailed - type: object - OpenAIResponseObjectStreamResponseFileSearchCallCompleted: - description: Streaming event for completed file search calls. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.completed - default: response.file_search_call.completed - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - type: object - OpenAIResponseObjectStreamResponseFileSearchCallInProgress: - description: Streaming event for file search calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - type: object - OpenAIResponseObjectStreamResponseFileSearchCallSearching: - description: Streaming event for file search currently searching. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.searching - default: response.file_search_call.searching - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: - description: Streaming event for incremental function call argument updates. - properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - title: Type - type: string - required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: - description: Streaming event for when function call arguments are completed. - properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.done - default: response.function_call_arguments.done - title: Type - type: string - required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - type: object - OpenAIResponseObjectStreamResponseInProgress: - description: Streaming event indicating the response remains in progress. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.in_progress - default: response.in_progress - title: Type - type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseInProgress - type: object - OpenAIResponseObjectStreamResponseIncomplete: - description: Streaming event emitted when a response ends in an incomplete state. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.incomplete - default: response.incomplete - title: Type - type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseIncomplete - type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: - properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - title: Type + model: + title: Model type: string - required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: - properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - title: Type - type: string - required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - type: object - OpenAIResponseObjectStreamResponseMcpCallCompleted: - description: Streaming event for completed MCP calls. - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.completed - default: response.mcp_call.completed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - type: object - OpenAIResponseObjectStreamResponseMcpCallFailed: - description: Streaming event for failed MCP calls. - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.failed - default: response.mcp_call.failed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallFailed - type: object - OpenAIResponseObjectStreamResponseMcpCallInProgress: - description: Streaming event for MCP calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - type: object - OpenAIResponseObjectStreamResponseMcpListToolsCompleted: - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - type: object - OpenAIResponseObjectStreamResponseMcpListToolsFailed: - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - type: object - OpenAIResponseObjectStreamResponseMcpListToolsInProgress: - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - type: object - OpenAIResponseObjectStreamResponseOutputItemAdded: - description: Streaming event for when a new output item is added to the response. - properties: - response_id: - title: Response Id - type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.added - default: response.output_item.added - title: Type - type: string - required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemAdded - type: object - OpenAIResponseObjectStreamResponseOutputItemDone: - description: Streaming event for when an output item is completed. - properties: - response_id: - title: Response Id - type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.done - default: response.output_item.done - title: Type - type: string - required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemDone - type: object - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: - description: Streaming event for when an annotation is added to output text. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - content_index: - title: Content Index - type: integer - annotation_index: - title: Annotation Index - type: integer - annotation: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.annotation.added - default: response.output_text.annotation.added - title: Type - type: string - required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - type: object - OpenAIResponseObjectStreamResponseOutputTextDelta: - description: Streaming event for incremental text content updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.delta - default: response.output_text.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDelta - type: object - OpenAIResponseObjectStreamResponseOutputTextDone: - description: Streaming event for when text output is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.done - default: response.output_text.done - title: Type - type: string - required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDone - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: - description: Streaming event for when a new reasoning summary part is added. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - title: Type - type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: - description: Streaming event for when a reasoning summary part is completed. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - title: Type - type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: - description: Streaming event for incremental reasoning summary text updates. - properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - title: Type - type: string - required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: - description: Streaming event for when reasoning summary text is completed. - properties: - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - title: Type - type: string - required: - - text - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - type: object - OpenAIResponseObjectStreamResponseReasoningTextDelta: - description: Streaming event for incremental reasoning text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.delta - default: response.reasoning_text.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - type: object - OpenAIResponseObjectStreamResponseReasoningTextDone: - description: Streaming event for when reasoning text is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.done - default: response.reasoning_text.done - title: Type - type: string - required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDone - type: object - OpenAIResponseObjectStreamResponseRefusalDelta: - description: Streaming event for incremental refusal text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.delta - default: response.refusal.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDelta - type: object - OpenAIResponseObjectStreamResponseRefusalDone: - description: Streaming event for when refusal text is completed. - properties: - content_index: - title: Content Index - type: integer - refusal: - title: Refusal - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.done - default: response.refusal.done - title: Type - type: string - required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDone - type: object - OpenAIResponseObjectStreamResponseWebSearchCallCompleted: - description: Streaming event for completed web search calls. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.completed - default: response.web_search_call.completed - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - type: object - OpenAIResponseObjectStreamResponseWebSearchCallInProgress: - description: Streaming event for web search calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - type: object - OpenAIResponseObjectStreamResponseWebSearchCallSearching: - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.searching - default: response.web_search_call.searching - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - type: object - OpenAIResponseObjectStream: - discriminator: - mapping: - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - title: OpenAIResponseObjectStreamResponseCreated - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - title: OpenAIResponseObjectStreamResponseInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - title: OpenAIResponseObjectStreamResponseOutputItemAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - title: OpenAIResponseObjectStreamResponseOutputItemDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - title: OpenAIResponseObjectStreamResponseOutputTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - title: OpenAIResponseObjectStreamResponseOutputTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - title: OpenAIResponseObjectStreamResponseMcpCallFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - title: OpenAIResponseObjectStreamResponseContentPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - title: OpenAIResponseObjectStreamResponseContentPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - title: OpenAIResponseObjectStreamResponseReasoningTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - title: OpenAIResponseObjectStreamResponseRefusalDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - title: OpenAIResponseObjectStreamResponseRefusalDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - title: OpenAIResponseObjectStreamResponseIncomplete - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - title: OpenAIResponseObjectStreamResponseFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - title: OpenAIResponseObjectStreamResponseCompleted - title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - SpanEndPayload: - description: Payload for a span end event. + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + encoding_format: + anyOf: + - type: string + - type: 'null' + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody + type: object + OpenAIEmbeddingsResponse: + description: Response from an OpenAI-compatible embeddings request. properties: - type: - const: span_end - default: span_end - title: Type + object: + const: list + default: list + title: Object type: string - status: - $ref: '#/components/schemas/SpanStatus' + data: + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + title: Data + type: array + model: + title: Model + type: string + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' required: - - status - title: SpanEndPayload + - data + - model + - usage + title: OpenAIEmbeddingsResponse type: object - SpanStartPayload: - description: Payload for a span start event. + RerankData: + description: A single rerank result from a reranking response. properties: - type: - const: span_start - default: span_start - title: Type + index: + title: Index + type: integer + relevance_score: + title: Relevance Score + type: number + required: + - index + - relevance_score + title: RerankData + type: object + RerankResponse: + description: Response from a reranking request. + properties: + data: + items: + $ref: '#/components/schemas/RerankData' + title: Data + type: array + required: + - data + title: RerankResponse + type: object + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object + required: + - logprobs_by_token + title: TokenLogProbs + type: object + ToolResponseMessage: + description: A message representing the result of a tool invocation. + properties: + role: + const: tool + default: tool + title: Role type: string - name: - title: Name + call_id: + title: Call Id type: string - parent_span_id: + content: anyOf: - type: string - - type: 'null' - nullable: true + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - - name - title: SpanStartPayload + - call_id + - content + title: ToolResponseMessage type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. + UserMessage: + description: A message from the user in a chat conversation. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp + role: + const: user + default: user + title: Role type: string - attributes: + content: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent + - content + title: UserMessage type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. + HealthStatus: + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + type: string + HealthInfo: + description: Health status information for the service. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload + status: + $ref: '#/components/schemas/HealthStatus' required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent + - status + title: HealthInfo type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type + route: + title: Route type: string - message: - title: Message + method: + title: Method type: string - severity: - $ref: '#/components/schemas/LogSeverity' + provider_types: + items: + type: string + title: Provider Types + type: array required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent + - route + - method + - provider_types + title: RouteInfo type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. + ListRoutesResponse: + description: Response containing a list of all available API routes. properties: - type: - title: Type + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array + required: + - data + title: ListRoutesResponse + type: object + VersionInfo: + description: Version information for the service. + properties: + version: + title: Version type: string required: - - type - title: ResponseGuardrailSpec + - version + title: VersionInfo type: object - OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. + OpenAIModel: + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: - created_at: - title: Created At - type: integer - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - nullable: true - title: OpenAIResponseError id: title: Id type: string - model: - title: Model - type: string object: - const: response - default: response + const: model + default: model 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output - type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls + created: + title: Created + type: integer + owned_by: + title: Owned By + type: string + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + required: + - id + - created + - owned_by + title: OpenAIModel + type: object + DPOLossType: + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + type: string + DPOAlignmentConfig: + description: Configuration for Direct Preference Optimization (DPO) alignment. + properties: + beta: + title: Beta + type: number + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid + required: + - beta + title: DPOAlignmentConfig + type: object + DatasetFormat: + description: Format of the training dataset. + enum: + - instruct + - dialog + title: DatasetFormat + type: string + DataConfig: + description: Configuration for training data and data loading. + properties: + dataset_id: + title: Dataset Id + type: string + batch_size: + title: Batch Size + type: integer + shuffle: + title: Shuffle type: boolean - previous_response_id: + data_format: + $ref: '#/components/schemas/DatasetFormat' + validation_dataset_id: anyOf: - type: string - type: 'null' nullable: true - prompt: + packed: anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt + - type: boolean - type: 'null' - nullable: true - title: OpenAIResponsePrompt - status: - title: Status - type: string - temperature: + default: false + train_on_input: anyOf: - - type: number + - type: boolean - type: 'null' - nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: + default: false + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + type: object + EfficiencyConfig: + description: Configuration for memory and compute efficiency optimizations. + properties: + enable_activation_checkpointing: anyOf: - - type: number + - type: boolean - type: 'null' - nullable: true - tools: + default: false + enable_activation_offloading: anyOf: - - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array + - type: boolean - type: 'null' - nullable: true - truncation: + default: false + memory_efficient_fsdp_wrap: anyOf: - - type: string + - type: boolean + - type: 'null' + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + default: false + title: EfficiencyConfig + type: object + OptimizerType: + description: Available optimizer algorithms for training. + enum: + - adam + - adamw + - sgd + title: OptimizerType + type: string + OptimizerConfig: + description: Configuration parameters for the optimization algorithm. + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + lr: + title: Lr + type: number + weight_decay: + title: Weight Decay + type: number + num_warmup_steps: + title: Num Warmup Steps + type: integer + required: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + type: object + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. + 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 + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. + properties: + job_uuid: + title: Job Uuid + type: string + log_lines: + items: + type: string + title: Log Lines + type: array + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream + type: object + PostTrainingJobStatusResponse: + description: Status of a finetuning job. + properties: + job_uuid: + title: Job Uuid + type: string + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string - type: 'null' nullable: true - usage: + started_at: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage + - format: date-time + type: string - type: 'null' nullable: true - title: OpenAIResponseUsage - instructions: + completed_at: anyOf: - - type: string + - format: date-time + type: string - type: 'null' nullable: true - max_tool_calls: + resources_allocated: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' nullable: true - input: + checkpoints: 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Input + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints type: array required: - - created_at - - id - - model - - output + - job_uuid - status - - input - title: OpenAIResponseObjectWithInput + title: PostTrainingJobStatusResponse type: object - MetricInResponse: - description: A metric value included in API responses. + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + TrainingConfig: + description: Comprehensive configuration for the training process. properties: - metric: - title: Metric - type: string - value: + n_epochs: + title: N Epochs + type: integer + max_steps_per_epoch: + default: 1 + title: Max Steps Per Epoch + type: integer + gradient_accumulation_steps: + default: 1 + title: Gradient Accumulation Steps + type: integer + max_validation_steps: anyOf: - type: integer - - type: number - title: integer | number - unit: + - type: 'null' + default: 1 + data_config: anyOf: - - type: string + - $ref: '#/components/schemas/DataConfig' + title: DataConfig + - type: 'null' + nullable: true + title: DataConfig + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig + - type: 'null' + nullable: true + title: OptimizerConfig + efficiency_config: + anyOf: + - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig - type: 'null' nullable: true + title: EfficiencyConfig + dtype: + anyOf: + - type: string + - type: 'null' + default: bf16 required: - - metric - - value - title: MetricInResponse + - n_epochs + title: TrainingConfig type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. properties: - type: - const: dialog - default: dialog - title: Type + job_uuid: + title: Job Uuid type: string - title: DialogType + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. + Prompt: + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. + prompt: + anyOf: + - type: string + - type: 'null' + description: The system prompt with variable placeholders + nullable: true + version: + description: Version (integer starting at 1, incremented on save) + minimum: 1 + title: Version + type: integer + prompt_id: + description: Unique identifier in format 'pmpt_<48-digit-hash>' + title: Prompt Id + type: string + variables: + description: List of variable names that can be used in the prompt template items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items + type: string + title: Variables type: array + is_default: + default: false + description: Boolean indicating whether this version is the default version + title: Is Default + type: boolean required: - - items - title: ConversationItemCreateRequest + - version + - prompt_id + title: Prompt type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. + ProviderInfo: + description: Information about a registered provider including its configuration and health status. properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status + api: + title: Api type: string - type: - const: message - default: message - title: Type + provider_id: + title: Provider Id type: string - object: - const: message - default: message - title: Object + provider_type: + title: Provider Type type: string + config: + additionalProperties: true + title: Config + type: object + health: + additionalProperties: true + title: Health + type: object required: - - id - - content - - role - - status - title: ConversationMessage + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo + type: object + ModerationObjectResults: + description: A moderation object. + properties: + flagged: + title: Flagged + type: boolean + categories: + anyOf: + - additionalProperties: + type: boolean + type: object + - type: 'null' + nullable: true + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + nullable: true + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object + required: + - flagged + title: ModerationObjectResults type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). + ModerationObject: + description: A moderation object. properties: - type: - const: bf16 - default: bf16 - title: Type + id: + title: Id type: string - title: Bf16QuantizationConfig - type: object - EmbeddingsResponse: - description: Response containing generated embeddings. - properties: - embeddings: + model: + title: Model + type: string + results: items: - items: - type: number - type: array - title: Embeddings + $ref: '#/components/schemas/ModerationObjectResults' + title: Results type: array required: - - embeddings - title: EmbeddingsResponse - type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. - properties: - type: - const: fp8_mixed - default: fp8_mixed - title: Type - type: string - title: Fp8QuantizationConfig + - id + - model + - results + title: ModerationObject type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. + SafetyViolation: + description: Details of a safety violation detected by content moderation. properties: - type: - const: int4_mixed - default: int4_mixed - title: Type - type: string - scheme: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: anyOf: - type: string - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object + required: + - violation_level + title: SafetyViolation type: object - OpenAIChoiceDelta: - description: A delta from an OpenAI-compatible chat completion streaming response. + ViolationLevel: + description: Severity level of a safety violation. + enum: + - info + - warn + - error + title: ViolationLevel + type: string + RunShieldResponse: + description: Response from running a safety shield. properties: - content: + violation: anyOf: - - type: string + - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation - type: 'null' nullable: true - refusal: + title: SafetyViolation + title: RunShieldResponse + type: object + ScoreBatchResponse: + description: Response from batch scoring operations on datasets. + properties: + dataset_id: anyOf: - type: string - type: 'null' nullable: true - role: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object + required: + - results + title: ScoreBatchResponse + type: object + ScoreResponse: + description: The response from scoring. + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object + required: + - results + title: ScoreResponse + type: object + ToolDef: + description: Tool definition used in runtime contexts. + properties: + toolgroup_id: anyOf: - type: string - type: 'null' nullable: true - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - nullable: true - reasoning_content: + name: + title: Name + type: string + description: anyOf: - type: string - type: 'null' nullable: true - title: OpenAIChoiceDelta - type: object - OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. - properties: - content: + input_schema: anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - refusal: + output_schema: anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceLogprobs - type: object - OpenAIChunkChoice: - description: A chunk choice from an OpenAI-compatible chat completion streaming response. - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + metadata: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceLogprobs required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice + - name + title: ToolDef type: object - OpenAIChatCompletionChunk: - description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + ListToolDefsResponse: + description: Response containing a list of tool definitions. properties: - id: - title: Id - type: string - choices: + data: items: - $ref: '#/components/schemas/OpenAIChunkChoice' - title: Choices - type: array - object: - const: chat.completion.chunk - default: chat.completion.chunk - title: Object - type: string - created: - title: Created - type: integer - model: - title: Model - type: string - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsage - required: - - id - - choices - - created - - model - title: OpenAIChatCompletionChunk - type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs - - type: 'null' - nullable: true - title: OpenAIChoiceLogprobs - required: - - message - - finish_reason - - index - title: OpenAIChoice + $ref: '#/components/schemas/ToolDef' + title: Data + type: array + required: + - data + title: ListToolDefsResponse 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 + ToolGroupInput: + description: Input data for registering a tool group. properties: - finish_reason: - title: Finish Reason + toolgroup_id: + title: Toolgroup Id type: string - text: - title: Text + provider_id: + title: Provider Id type: string - index: - title: Index - type: integer - logprobs: + args: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceLogprobs + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL required: - - finish_reason - - text - - index - title: OpenAICompletionChoice + - toolgroup_id + - provider_id + title: ToolGroupInput type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens + ToolInvocationResult: + description: Result of a tool invocation. properties: - text_offset: + content: anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: - type: integer + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array + title: list[ImageContentItem | TextContentItem] - type: 'null' + title: string | list[ImageContentItem | TextContentItem] nullable: true - token_logprobs: + error_message: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - tokens: + error_code: anyOf: - - items: - type: string - type: array + - type: integer - type: 'null' nullable: true - top_logprobs: + metadata: anyOf: - - items: - additionalProperties: - type: number - type: object - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAICompletionLogprobs + title: ToolInvocationResult type: object - TokenLogProbs: - description: Log probabilities for generated tokens. + 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. properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs + chunk_id: + anyOf: + - type: string + - type: 'null' + nullable: true + document_id: + anyOf: + - type: string + - type: 'null' + nullable: true + source: + anyOf: + - type: string + - type: 'null' + nullable: true + created_timestamp: + anyOf: + - type: integer + - type: 'null' + nullable: true + updated_timestamp: + anyOf: + - type: integer + - type: 'null' + nullable: true + chunk_window: + anyOf: + - type: string + - type: 'null' + nullable: true + chunk_tokenizer: + anyOf: + - type: string + - type: 'null' + nullable: true + chunk_embedding_model: + anyOf: + - type: string + - type: 'null' + nullable: true + chunk_embedding_dimension: + anyOf: + - type: integer + - type: 'null' + nullable: true + content_token_count: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata_token_count: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: ChunkMetadata type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. + Chunk: + description: A chunk of content that can be inserted into a vector database. properties: - role: - const: tool - default: tool - title: Role - type: string - call_id: - title: Call Id - type: string content: anyOf: - type: string @@ -13774,442 +9987,541 @@ components: type: array title: list[ImageContentItem | TextContentItem] title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + nullable: true + title: ChunkMetadata required: - - call_id - content - title: ToolResponseMessage + - chunk_id + title: Chunk type: object - UserMessage: - description: A message from the user in a chat conversation. + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store file batch with extra_body support. + properties: + file_ids: + items: + type: string + title: File Ids + type: array + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: + anyOf: + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + nullable: true + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + type: object + OpenAICreateVectorStoreRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store with extra_body support. properties: - role: - const: user - default: user - title: Role - type: string - content: + name: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem + - type: 'null' + nullable: true + file_ids: + anyOf: - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem + type: string type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: + - type: 'null' + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: anyOf: - - type: string - discriminator: mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' - title: string | list[ImageContentItem | TextContentItem] + title: Chunking Strategy nullable: true - required: - - content - title: UserMessage + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: OpenAICreateVectorStoreRequestWithExtraBody type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. + QueryChunksResponse: + description: Response from querying chunks in a vector database. properties: - job_uuid: - title: Job Uuid - type: string - log_lines: + chunks: items: - type: string - title: Log Lines + $ref: '#/components/schemas/Chunk' + title: Chunks + type: array + scores: + items: + type: number + title: Scores type: array required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream + - chunks + - scores + title: QueryChunksResponse type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. + VectorStoreContent: + description: Content item from a vector store file or search result. properties: - job_uuid: - title: Job Uuid - type: string - finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id + type: + const: text + title: Type type: string - validation_dataset_id: - title: Validation Dataset Id + text: + title: Text type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - title: Hyperparam Search Config - type: object - logger_config: + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + nullable: true + title: ChunkMetadata + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + required: + - type + - text + title: VectorStoreContent + type: object + VectorStoreCreateRequest: + description: Request to create a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: additionalProperties: true - title: Logger Config + title: Metadata type: object - required: -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 87bc7442f (chore: re-add missing endpoints) - - job_uuid - - training_config - - hyperparam_search_config - - logger_config - title: SupervisedFineTuneRequest -<<<<<<< HEAD - RegisterModelRequest: + title: VectorStoreCreateRequest type: object + VectorStoreDeleteResponse: + description: Response from deleting a vector store. properties: - model_id: - type: string - description: The identifier of the model to register. - provider_model_id: + id: + title: Id type: string - description: >- - The identifier of the model in the provider. - provider_id: + object: + default: vector_store.deleted + title: Object type: string - description: The identifier of the provider. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Any additional metadata for this model. - model_type: - $ref: '#/components/schemas/ModelType' - description: The type of model to register. - additionalProperties: false + deleted: + default: true + title: Deleted + type: boolean required: - - model_id - title: RegisterModelRequest - ParamType: - 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' - discriminator: - propertyName: type - mapping: - string: '#/components/schemas/StringType' - number: '#/components/schemas/NumberType' - boolean: '#/components/schemas/BooleanType' - array: '#/components/schemas/ArrayType' - object: '#/components/schemas/ObjectType' - json: '#/components/schemas/JsonType' - union: '#/components/schemas/UnionType' - chat_completion_input: '#/components/schemas/ChatCompletionInputType' - completion_input: '#/components/schemas/CompletionInputType' - RegisterScoringFunctionRequest: + - id + title: VectorStoreDeleteResponse + type: object + VectorStoreFileCounts: + description: File processing status counts for a 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 + VectorStoreFileBatchObject: + description: OpenAI Vector Store File Batch object. properties: - scoring_fn_id: + id: + title: Id type: string - description: >- - The ID of the scoring function to register. - description: + object: + default: vector_store.file_batch + title: Object type: string - description: The description of the scoring function. - return_type: - $ref: '#/components/schemas/ParamType' - description: The return type of the scoring function. - provider_scoring_fn_id: + created_at: + title: Created At + type: integer + vector_store_id: + title: Vector Store Id type: string - description: >- - The ID of the provider scoring function to use for the scoring function. - provider_id: + status: + title: Status type: string - description: >- - The ID of the provider to use for the scoring function. - params: - $ref: '#/components/schemas/ScoringFnParams' - description: >- - The parameters for the scoring function for benchmark eval, these can - be overridden for app eval. - additionalProperties: false + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' required: - - scoring_fn_id - - description - - return_type - title: RegisterScoringFunctionRequest - RegisterShieldRequest: + - id + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject type: object + VectorStoreFileContentResponse: + description: Represents the parsed content of a vector store file. properties: - shield_id: + object: + const: vector_store.file_content.page + default: vector_store.file_content.page + title: Object type: string - description: >- - The identifier of the shield to register. - provider_shield_id: + data: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - data + title: VectorStoreFileContentResponse + type: object + VectorStoreFileDeleteResponse: + description: Response from deleting a vector store file. + properties: + id: + title: Id type: string - description: >- - The identifier of the shield in the provider. - provider_id: + object: + default: vector_store.file.deleted + title: Object type: string - description: The identifier of the provider. - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The parameters of the shield. - additionalProperties: false + deleted: + default: true + title: Deleted + type: boolean required: - - shield_id - title: RegisterShieldRequest - RegisterToolGroupRequest: + - id + title: VectorStoreFileDeleteResponse type: object + VectorStoreFileLastError: + description: Error information for failed vector store file processing. properties: - toolgroup_id: + code: + title: Code type: string - description: The ID of the tool group to register. - provider_id: + enum: + - server_error + - rate_limit_exceeded + default: server_error + message: + title: Message 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 -======= ->>>>>>> 87bc7442f (chore: re-add missing endpoints) - DataSource: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - RegisterDatasetRequest: -<<<<<<< HEAD -======= -======= ->>>>>>> 9c248d3e0 (fix: Query default values can't be set in Annotated) - - job_uuid - - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - - algorithm_config - - optimizer_config - - training_config - - hyperparam_search_config - - logger_config - title: PostTrainingRLHFRequest -<<<<<<< HEAD ->>>>>>> ceca36b91 (chore: regen scehma with main) -======= ->>>>>>> 87bc7442f (chore: re-add missing endpoints) -======= ->>>>>>> 9c248d3e0 (fix: Query default values can't be set in Annotated) + required: + - code + - message + title: VectorStoreFileLastError type: object - ToolGroupInput: - description: Input data for registering a tool group. + VectorStoreFileObject: + description: OpenAI Vector Store File object. properties: - toolgroup_id: - title: Toolgroup Id + id: + title: Id type: string - provider_id: - title: Provider Id + object: + default: vector_store.file + title: Object type: string - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: + attributes: + additionalProperties: true + title: Attributes + type: object + chunking_strategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + created_at: + title: Created At + type: integer + last_error: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' nullable: true - title: URL + title: VectorStoreFileLastError + status: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + vector_store_id: + title: Vector Store Id + type: string required: - - toolgroup_id - - provider_id - title: ToolGroupInput + - id + - chunking_strategy + - created_at + - status + - vector_store_id + title: VectorStoreFileObject type: object - Chunk: - description: A chunk of content that can be inserted into a vector database. + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. properties: - content: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id + - type: 'null' + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + 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. + properties: + object: + default: list + title: Object type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - chunk_metadata: + last_id: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' nullable: true - title: ChunkMetadata + has_more: + default: false + title: Has More + type: boolean required: - - content - - chunk_id - title: Chunk + - data + title: VectorStoreListFilesResponse type: object - VectorStoreCreateRequest: - description: Request to create a vector store. + VectorStoreObject: + description: OpenAI Vector Store object. 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' nullable: true - file_ids: - items: - type: string - title: File Ids - type: array + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + default: completed + title: Status + type: string expires_after: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - chunking_strategy: + expires_at: anyOf: - - additionalProperties: true - type: object + - type: integer + - type: 'null' + nullable: true + last_active_at: + anyOf: + - type: integer - type: 'null' nullable: true metadata: additionalProperties: true title: Metadata type: object - title: VectorStoreCreateRequest + required: + - id + - created_at + - file_counts + title: VectorStoreObject + type: object + VectorStoreListResponse: + description: Response from listing vector stores. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + nullable: true + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListResponse type: object VectorStoreModifyRequest: description: Request to modify a vector store. @@ -14303,149 +10615,34 @@ components: - content title: VectorStoreSearchResponse type: object - _safety_run_shield_Request: + VectorStoreSearchResponsePage: + description: Paginated response from searching a vector store. properties: - shield_id: - title: Shield Id + object: + default: vector_store.search_results.page + title: Object type: string - messages: + search_query: 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Messages + type: string + title: Search Query type: array - params: - additionalProperties: true - title: Params - type: object + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - shield_id - - messages - - params - title: _safety_run_shield_Request + - search_query + - data + title: VectorStoreSearchResponsePage type: object - OpenAIResponseMessageOutputUnion: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - x-stainless-naming: OpenAIResponseMessageOutputOneOf - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse - x-stainless-naming: OpenAIResponseMessageOutputUnion - OpenAIResponseMessageInputUnion: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - x-stainless-naming: OpenAIResponseMessageInputOneOf - title: OpenAIResponseMessage-Input | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse - x-stainless-naming: OpenAIResponseMessageInputUnion - responses: - BadRequest400: - description: The request was invalid or malformed - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 400 - 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 - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 429 - title: Too Many Requests - detail: You have exceeded the rate limit. Please try again later. - InternalServerError500: - description: The server encountered an unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 500 - title: Internal Server Error - detail: An unexpected error occurred - DefaultError: - description: An error occurred - content: - application/json: - schema: - $ref: '#/components/schemas/Error' diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index e31c384829..e0bb216d72 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -18,18 +18,13 @@ paths: tags: - Models summary: Get Model - description: |- - Get model. - - Get a model by its identifier. operationId: get_model_v1_models__model_id__get responses: '200': - description: A Model. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Model' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -53,10 +48,6 @@ paths: tags: - Models summary: Unregister Model - description: |- - Unregister model. - - Unregister a model. operationId: unregister_model_v1_models__model_id__delete responses: '200': @@ -89,15 +80,13 @@ paths: tags: - Models summary: Openai List Models - description: List models using the OpenAI API. operationId: openai_list_models_v1_models_get responses: '200': - description: A OpenAIListModelsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIListModelsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -114,24 +103,13 @@ paths: tags: - Models summary: Register Model - description: |- - Register model. - - Register a model. operationId: register_model_v1_models_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_models_Request' - required: true responses: '200': - description: A Model. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Model' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -150,15 +128,13 @@ paths: tags: - Shields summary: Get Shield - description: Get a shield by its identifier. operationId: get_shield_v1_shields__identifier__get responses: '200': - description: A Shield. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Shield' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -182,7 +158,6 @@ paths: tags: - Shields summary: Unregister Shield - description: Unregister a shield. operationId: unregister_shield_v1_shields__identifier__delete responses: '200': @@ -215,15 +190,13 @@ paths: tags: - Shields summary: List Shields - description: List all shields. operationId: list_shields_v1_shields_get responses: '200': - description: A ListShieldsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListShieldsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -240,21 +213,13 @@ paths: tags: - Shields summary: Register Shield - description: Register a shield. operationId: register_shield_v1_shields_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_shields_Request' - required: true responses: '200': - description: A Shield. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Shield' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -273,15 +238,13 @@ paths: tags: - Datasets summary: Get Dataset - description: Get a dataset by its ID. operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': - description: A Dataset. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Dataset' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -305,7 +268,6 @@ paths: tags: - Datasets summary: Unregister Dataset - description: Unregister a dataset by its ID. operationId: unregister_dataset_v1beta_datasets__dataset_id__delete responses: '200': @@ -338,15 +300,13 @@ paths: tags: - Datasets summary: List Datasets - description: List all datasets. operationId: list_datasets_v1beta_datasets_get responses: '200': - description: A ListDatasetsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListDatasetsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -363,21 +323,13 @@ paths: tags: - Datasets summary: Register Dataset - description: Register a new dataset. operationId: register_dataset_v1beta_datasets_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_datasets_Request' - required: true responses: '200': - description: A Dataset. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Dataset' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -396,15 +348,13 @@ paths: tags: - Scoring Functions summary: Get Scoring Function - description: Get a scoring function by its ID. operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': - description: A ScoringFn. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ScoringFn' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -428,7 +378,6 @@ paths: tags: - Scoring Functions summary: Unregister Scoring Function - description: Unregister a scoring function. operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete responses: '200': @@ -461,40 +410,30 @@ paths: tags: - Scoring Functions summary: List Scoring Functions - description: List all scoring functions. operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': - description: A ListScoringFunctionsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListScoringFunctionsResponse' + schema: {} '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: - Scoring Functions summary: Register Scoring Function - description: Register a scoring function. operationId: register_scoring_function_v1_scoring_functions_post - deprecated: true - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' responses: '200': description: Successful Response @@ -502,31 +441,30 @@ paths: application/json: schema: {} '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' + deprecated: true /v1alpha/eval/benchmarks/{benchmark_id}: get: tags: - Benchmarks summary: Get Benchmark - description: Get a benchmark by its ID. operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': - description: A Benchmark. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Benchmark' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -550,7 +488,6 @@ paths: tags: - Benchmarks summary: Unregister Benchmark - description: Unregister a benchmark. operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete responses: '200': @@ -583,40 +520,30 @@ paths: tags: - Benchmarks summary: List Benchmarks - description: List all benchmarks. operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': - description: A ListBenchmarksResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListBenchmarksResponse' + schema: {} '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: - Benchmarks summary: Register Benchmark - description: Register a benchmark. operationId: register_benchmark_v1alpha_eval_benchmarks_post - deprecated: true - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Body_register_benchmark_v1alpha_eval_benchmarks_post' responses: '200': description: Successful Response @@ -624,31 +551,30 @@ paths: application/json: schema: {} '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' + deprecated: true /v1/toolgroups/{toolgroup_id}: get: tags: - Tool Groups summary: Get Tool Group - description: Get a tool group by its ID. operationId: get_tool_group_v1_toolgroups__toolgroup_id__get responses: '200': - description: A ToolGroup. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ToolGroup' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -672,7 +598,6 @@ paths: tags: - Tool Groups summary: Unregister Toolgroup - description: Unregister a tool group. operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete responses: '200': @@ -705,39 +630,30 @@ paths: tags: - Tool Groups summary: List Tool Groups - description: List tool groups with optional provider. operationId: list_tool_groups_v1_toolgroups_get responses: '200': - description: A ListToolGroupsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListToolGroupsResponse' + schema: {} '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: - Tool Groups summary: Register Tool Group - description: Register a tool group. operationId: register_tool_group_v1_toolgroups_post - deprecated: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' responses: '200': description: Successful Response @@ -745,3227 +661,2757 @@ paths: application/json: schema: {} '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' + deprecated: true components: + responses: + BadRequest400: + description: The request was invalid or malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 400 + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 429 + title: Too Many Requests + detail: You have exceeded the rate limit. Please try again later. + InternalServerError500: + description: The server encountered an unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 500 + title: Internal Server Error + detail: An unexpected error occurred + DefaultError: + description: An error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/Error' schemas: - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: Types of aggregation functions for scoring results. - AllowedToolsFilter: - properties: - tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' - type: object - title: AllowedToolsFilter - description: Filter configuration for restricting which MCP tools can be used. - ApprovalFilter: - properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - type: object - title: ApprovalFilter - description: Filter configuration for MCP tool approval requirements. - ArrayType: + ImageContentItem: + description: A image content item properties: type: - type: string - const: array + const: image + default: image title: Type - default: array + type: string + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem type: object - title: ArrayType - description: Parameter type for array values. - BasicScoringFnParams: + TextContentItem: + description: A text content item properties: type: - type: string - const: basic + const: text + default: text 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. - 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: + text: + title: Text type: string - const: batch - title: Object - status: + required: + - text + title: TextContentItem + type: object + URL: + description: A URL reference to external content. + properties: + uri: + title: Uri type: string - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - title: Status - cancelled_at: - anyOf: - - type: integer - - type: 'null' - cancelling_at: - anyOf: - - type: integer - - type: 'null' - completed_at: - anyOf: - - type: integer - - type: 'null' - error_file_id: - anyOf: - - type: string - - type: 'null' - errors: - anyOf: - - $ref: '#/components/schemas/Errors' - title: Errors - - type: 'null' - title: Errors - expired_at: - anyOf: - - type: integer - - type: 'null' - expires_at: - anyOf: - - type: integer - - type: 'null' - failed_at: - anyOf: - - type: integer - - type: 'null' - finalizing_at: - anyOf: - - type: integer - - type: 'null' - in_progress_at: - anyOf: - - type: integer - - type: 'null' - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - model: - anyOf: - - type: string - - type: 'null' - output_file_id: - anyOf: - - type: string - - type: 'null' - request_counts: - anyOf: - - $ref: '#/components/schemas/BatchRequestCounts' - title: BatchRequestCounts - - type: 'null' - title: BatchRequestCounts - usage: - anyOf: - - $ref: '#/components/schemas/BatchUsage' - title: BatchUsage - - type: 'null' - title: BatchUsage - additionalProperties: true - type: object required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - BatchError: + - uri + title: URL + type: object + _URLOrData: + description: A URL or a base64 encoded string properties: - code: - anyOf: - - type: string - - type: 'null' - line: - anyOf: - - type: integer - - type: 'null' - message: + url: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - param: + nullable: true + title: URL + data: anyOf: - type: string - type: 'null' - additionalProperties: true + contentEncoding: base64 + nullable: true + title: _URLOrData type: object - title: BatchError - BatchRequestCounts: + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + GreedySamplingStrategy: + description: Greedy sampling strategy that selects the highest probability token at each step. properties: - completed: - type: integer - title: Completed - failed: - type: integer - title: Failed - total: - type: integer - title: Total - additionalProperties: true + type: + const: greedy + default: greedy + title: Type + type: string + title: GreedySamplingStrategy type: object - required: - - completed - - failed - - total - title: BatchRequestCounts - BatchUsage: + TopKSamplingStrategy: + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. 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: + const: top_k + default: top_k + title: Type + type: string + top_k: + minimum: 1 + title: Top K 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: + - 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. properties: - identifier: + type: + const: top_p + default: top_p + title: Type type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + temperature: anyOf: - - type: string + - type: number + minimum: 0.0 - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: - type: string - title: Provider Id - description: ID of the provider that owns this resource + top_p: + anyOf: + - type: number + - type: 'null' + default: 0.95 + required: + - temperature + title: TopPSamplingStrategy + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: type: - type: string - const: benchmark + const: grammar + default: grammar title: Type - default: benchmark - dataset_id: type: string - title: Dataset Id - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - metadata: + bnf: additionalProperties: true + title: Bnf 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. - BenchmarkConfig: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - scoring_params: - additionalProperties: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + type: + const: json_schema + default: json_schema + title: Type + type: string + json_schema: + additionalProperties: true + title: Json Schema type: object - title: Scoring Params - description: Map between scoring function id and parameters for each scoring function you want to run - num_examples: - anyOf: - - type: integer - - type: 'null' - description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + required: + - json_schema + title: JsonSchemaResponseFormat type: object + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + OpenAIChatCompletionContentPartImageParam: + description: Image content part for OpenAI-compatible chat completion messages. + properties: + type: + const: image_url + default: image_url + title: Type + type: string + image_url: + $ref: '#/components/schemas/OpenAIImageURL' required: - - eval_candidate - title: BenchmarkConfig - description: A benchmark configuration for evaluation. - Body_openai_upload_file_v1_files_post: + - image_url + title: OpenAIChatCompletionContentPartImageParam + type: object + OpenAIChatCompletionContentPartTextParam: + description: Text content part for OpenAI-compatible chat completion messages. properties: - file: + type: + const: text + default: text + title: Type type: string - format: binary - title: File - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' - expires_after: - anyOf: - - $ref: '#/components/schemas/ExpiresAfter' - title: ExpiresAfter - - type: 'null' - title: ExpiresAfter + text: + title: Text + type: string + required: + - text + title: OpenAIChatCompletionContentPartTextParam type: object + OpenAIFile: + properties: + type: + const: file + default: file + title: Type + type: string + file: + $ref: '#/components/schemas/OpenAIFileFile' required: - file - - purpose - title: Body_openai_upload_file_v1_files_post - Body_register_benchmark_v1alpha_eval_benchmarks_post: + title: OpenAIFile + type: object + OpenAIFileFile: properties: - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - metadata: + file_data: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - type: object - required: - - scoring_functions - title: Body_register_benchmark_v1alpha_eval_benchmarks_post - Body_register_scoring_function_v1_scoring_functions_post: - properties: - return_type: + nullable: true + file_id: anyOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - params: + - type: string + - type: 'null' + nullable: true + filename: anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: string - type: 'null' - title: Params + nullable: true + title: OpenAIFileFile type: object + OpenAIImageURL: + description: Image URL specification for OpenAI-compatible chat completion messages. + properties: + url: + title: Url + type: string + detail: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - return_type - title: Body_register_scoring_function_v1_scoring_functions_post - Body_register_tool_group_v1_toolgroups_post: + - url + title: OpenAIImageURL + type: object + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: - mcp_endpoint: + role: + const: assistant + default: assistant + title: Role + type: string + content: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: URL - args: + title: string | list[OpenAIChatCompletionContentPartTextParam] + nullable: true + name: anyOf: - - additionalProperties: true - type: object + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array - type: 'null' + nullable: true + title: OpenAIAssistantMessageParam type: object - title: Body_register_tool_group_v1_toolgroups_post - BooleanType: + OpenAIChatCompletionToolCall: + description: Tool call specification for OpenAI-compatible chat completion responses. properties: + index: + anyOf: + - type: integer + - type: 'null' + nullable: true + id: + anyOf: + - type: string + - type: 'null' + nullable: true type: - type: string - const: boolean + const: function + default: function title: Type - default: boolean - type: object - title: BooleanType - description: Parameter type for boolean values. - ChatCompletionInputType: - properties: - type: type: string - const: chat_completion_input - title: Type - default: chat_completion_input + function: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction + - type: 'null' + nullable: true + title: OpenAIChatCompletionToolCallFunction + title: OpenAIChatCompletionToolCall type: object - title: ChatCompletionInputType - description: Parameter type for chat completion input. - Checkpoint: + OpenAIChatCompletionToolCallFunction: + description: Function call details for OpenAI-compatible tool calls. properties: - identifier: - type: string - title: Identifier - created_at: - type: string - format: date-time - title: Created At - epoch: - type: integer - title: Epoch - post_training_job_id: - type: string - title: Post Training Job Id - path: - type: string - title: Path - training_metrics: + name: anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' - title: PostTrainingMetric + - type: string - type: 'null' - title: PostTrainingMetric + nullable: true + arguments: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIChatCompletionToolCallFunction type: object - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - Chunk-Input: + OpenAIDeveloperMessageParam: + description: A message from the developer in an OpenAI-compatible chat completion request. properties: + role: + const: developer + default: developer + title: Role + type: string content: anyOf: - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - chunk_id: + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - content + title: OpenAIDeveloperMessageParam + type: object + OpenAISystemMessageParam: + description: A system message providing instructions or context to the model. + properties: + role: + const: system + default: system + title: Role type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: + content: anyOf: + - type: string - items: - type: number + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - - type: 'null' - chunk_metadata: + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' - title: ChunkMetadata - type: object + nullable: true required: - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - Chunk-Output: + title: OpenAISystemMessageParam + type: object + OpenAIToolMessageParam: + description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. properties: + role: + const: tool + default: tool + title: Role + type: string + tool_call_id: + title: Tool Call Id + type: string content: anyOf: - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: list[ImageContentItem-Output | TextContentItem] - title: string | list[ImageContentItem-Output | TextContentItem] - chunk_id: + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + required: + - tool_call_id + - content + title: OpenAIToolMessageParam + type: object + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. + properties: + role: + const: user + default: user + title: Role type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: + content: anyOf: + - type: string - items: - type: number + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - - type: 'null' - chunk_metadata: + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' - title: ChunkMetadata - type: object + nullable: true required: - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - ChunkMetadata: + title: OpenAIUserMessageParam + type: object + OpenAIMessageParam: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + OpenAIJSONSchema: + description: JSON schema specification for OpenAI-compatible structured response format. properties: - chunk_id: - anyOf: - - type: string - - type: 'null' - document_id: - anyOf: - - type: string - - type: 'null' - source: + name: + title: Name + type: string + description: anyOf: - type: string - type: 'null' - created_timestamp: - anyOf: - - type: integer - - type: 'null' - updated_timestamp: - anyOf: - - type: integer - - type: 'null' - chunk_window: + strict: anyOf: - - type: string + - type: boolean - type: 'null' - chunk_tokenizer: + schema: anyOf: - - type: string - - type: 'null' - chunk_embedding_model: - anyOf: - - type: string - - type: 'null' - chunk_embedding_dimension: - anyOf: - - type: integer - - type: 'null' - content_token_count: - anyOf: - - type: integer - - type: 'null' - metadata_token_count: - anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' + title: OpenAIJSONSchema type: object - title: 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. - CompletionInputType: + OpenAIResponseFormatJSONObject: + description: JSON object response format for OpenAI-compatible chat completion requests. properties: type: - type: string - const: completion_input + const: json_object + default: json_object title: Type - default: completion_input + type: string + title: OpenAIResponseFormatJSONObject type: object - title: CompletionInputType - description: Parameter type for completion input. - Conversation: + OpenAIResponseFormatJSONSchema: + description: JSON schema response format for OpenAI-compatible chat completion requests. properties: - id: - type: string - title: Id - description: The unique ID of the conversation. - object: + type: + const: json_schema + default: json_schema + title: Type 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: - 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. - 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. - type: object + json_schema: + $ref: '#/components/schemas/OpenAIJSONSchema' required: - - id - - created_at - title: Conversation - description: OpenAI-compatible conversation object. - ConversationDeletedResource: + - json_schema + title: OpenAIResponseFormatJSONSchema + type: object + OpenAIResponseFormatText: + description: Text response format for OpenAI-compatible chat completion requests. properties: - id: - type: string - title: Id - description: The deleted conversation identifier - object: + type: + const: text + default: text + title: Type type: string - title: Object - description: Object type - default: conversation.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true + title: OpenAIResponseFormatText type: object - required: - - id - title: ConversationDeletedResource - description: Response for deleted conversation. - ConversationItemDeletedResource: + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + VectorStoreChunkingStrategyAuto: + description: Automatic chunking strategy for vector store files. properties: - id: - type: string - title: Id - description: The deleted item identifier - object: + type: + const: auto + default: auto + title: Type type: string - title: Object - description: Object type - default: conversation.item.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true + title: VectorStoreChunkingStrategyAuto type: object + VectorStoreChunkingStrategyStatic: + description: Static chunking strategy with configurable parameters. + properties: + type: + const: static + default: static + title: Type + type: string + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' required: - - id - title: ConversationItemDeletedResource - description: Response for deleted conversation item. - ConversationItemInclude: + - static + title: VectorStoreChunkingStrategyStatic + type: object + VectorStoreChunkingStrategyStaticConfig: + description: Configuration for static chunking strategy. + 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 + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + VectorStoreFileStatus: 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: + - completed + - in_progress + - cancelled + - failed + default: completed + OpenAIResponseInputMessageContentFile: + description: File content for input messages in OpenAI response format. properties: - object: + type: + const: input_file + default: input_file + title: Type type: string - title: Object - description: Object type - default: list - data: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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' - title: OpenAIResponseMessage-Output | ... (9 variants) - type: array - title: Data - description: List of conversation items - first_id: + file_data: anyOf: - type: string - type: 'null' - description: The ID of the first item in the list - last_id: + nullable: true + file_id: anyOf: - type: string - type: 'null' - description: The ID of the last item in the list - has_more: - type: boolean - title: Has More - description: Whether there are more items available - default: false + nullable: true + file_url: + anyOf: + - type: string + - type: 'null' + nullable: true + filename: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIResponseInputMessageContentFile 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. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: + OpenAIResponseInputMessageContentImage: + description: Image content for input messages in OpenAI response format. properties: - dataset_id: + detail: + default: auto + title: Detail 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: + enum: + - low + - high + - auto + type: + const: input_image + default: input_image + title: Type + type: string + file_id: anyOf: - type: string - type: 'null' - packed: - anyOf: - - type: boolean - - type: 'null' - default: false - train_on_input: + nullable: true + image_url: anyOf: - - type: boolean + - type: string - type: 'null' - default: false + nullable: true + title: OpenAIResponseInputMessageContentImage type: object - required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: Configuration for training data and data loading. - Dataset: + OpenAIResponseInputMessageContentText: + description: Text content for input messages in OpenAI response format. properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: + text: + title: Text type: string - title: Provider Id - description: ID of the provider that owns this resource type: - type: string - const: dataset + const: input_text + default: input_text title: Type - default: dataset - purpose: - $ref: '#/components/schemas/DatasetPurpose' - source: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - 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 + type: string required: - - identifier - - provider_id - - purpose - - source - title: Dataset - description: Dataset resource for storing and accessing training or evaluation data. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - 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. - EfficiencyConfig: - properties: - enable_activation_checkpointing: - anyOf: - - type: boolean - - type: 'null' - default: false - enable_activation_offloading: - anyOf: - - type: boolean - - type: 'null' - default: false - memory_efficient_fsdp_wrap: - anyOf: - - type: boolean - - type: 'null' - default: false - fsdp_cpu_offload: - anyOf: - - type: boolean - - type: 'null' - default: false - type: object - title: EfficiencyConfig - description: Configuration for memory and compute efficiency optimizations. - Errors: - properties: - data: - anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array - - type: 'null' - object: - anyOf: - - type: string - - type: 'null' - 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 + - text + title: OpenAIResponseInputMessageContentText type: object - required: - - generations - - scores - title: EvaluateResponse - description: The response from an evaluation. - ExpiresAfter: + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + OpenAIResponseAnnotationCitation: + description: URL citation annotation for referencing external web resources. properties: - anchor: + type: + const: url_citation + default: url_citation + title: Type type: string - const: created_at - title: Anchor - seconds: + end_index: + title: End Index type: integer - maximum: 2592000.0 - minimum: 3600.0 - title: Seconds - type: object + start_index: + title: Start Index + type: integer + title: + title: Title + type: string + url: + title: Url + type: string required: - - anchor - - seconds - title: 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) - GreedySamplingStrategy: + - end_index + - start_index + - title + - url + title: OpenAIResponseAnnotationCitation + type: object + OpenAIResponseAnnotationContainerFileCitation: properties: type: - type: string - const: greedy + const: container_file_citation + default: container_file_citation title: Type - default: greedy - type: object - title: GreedySamplingStrategy - description: Greedy sampling strategy that selects the highest probability token at each step. - HealthInfo: - properties: - status: - $ref: '#/components/schemas/HealthStatus' - type: object + 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: - - status - title: HealthInfo - description: Health status information for the service. - HealthStatus: - type: string - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - ImageContentItem-Input: + - 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. properties: type: - type: string - const: image + const: file_citation + default: file_citation title: Type - default: image - image: - $ref: '#/components/schemas/_URLOrData' - type: object + type: string + file_id: + title: File Id + type: string + filename: + title: Filename + type: string + index: + title: Index + type: integer required: - - image - title: ImageContentItem - description: A image content item - ImageContentItem-Output: + - file_id + - filename + - index + title: OpenAIResponseAnnotationFileCitation + type: object + OpenAIResponseAnnotationFilePath: properties: type: - type: string - const: image + const: file_path + default: file_path title: Type - default: image - image: - $ref: '#/components/schemas/_URLOrData' - type: object - required: - - image - title: ImageContentItem - description: A image content item - InputTokensDetails: - properties: - cached_tokens: + type: string + file_id: + title: File Id + type: string + index: + title: Index 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' + - file_id + - index + title: OpenAIResponseAnnotationFilePath type: object - required: - - job_id - - status - title: Job - description: A job execution instance with status tracking. - JobStatus: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - description: Status of a job execution. - JsonType: + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + OpenAIResponseContentPartRefusal: + description: Refusal content within a streamed response part. properties: type: - type: string - const: json + const: refusal + default: refusal title: Type - default: json + type: string + refusal: + title: Refusal + type: string + required: + - refusal + title: OpenAIResponseContentPartRefusal type: object - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: + OpenAIResponseOutputMessageContentOutputText: properties: - type: + text: + title: Text type: string - const: llm_as_judge + type: + const: output_text + default: output_text title: Type - default: llm_as_judge - judge_model: type: string - title: Judge Model - prompt_template: - anyOf: - - type: string - - type: 'null' - judge_score_regexes: - items: - type: string - type: array - title: Judge Score Regexes - description: Regexes to extract the answer from generated response - aggregation_functions: + annotations: items: - $ref: '#/components/schemas/AggregationFunctionType' + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations 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. - ListBatchesResponse: + - text + title: OpenAIResponseOutputMessageContentOutputText + type: object + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + MCPListToolsTool: + description: Tool definition returned by MCP list tools operation. properties: - object: + input_schema: + additionalProperties: true + title: Input Schema + type: object + name: + title: Name type: string - const: list - title: Object - default: list - data: - items: - $ref: '#/components/schemas/Batch' - type: array - title: Data - description: List of batch objects - first_id: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - last_id: + description: anyOf: - type: string - type: 'null' - description: ID of the last batch in the list - has_more: - type: boolean - title: Has More - description: Whether there are more batches available - default: false - type: object + nullable: true required: - - data - title: ListBatchesResponse - description: Response containing a list of batch objects. - 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 + - input_schema + - name + title: MCPListToolsTool type: object - required: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - ListOpenAIChatCompletionResponse: + OpenAIResponseMCPApprovalRequest: + description: A request for human approval of a tool invocation. properties: - data: - items: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: + arguments: + title: Arguments type: string - title: First Id - last_id: + id: + title: Id type: string - title: Last Id - object: + 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 - const: list - title: Object - default: list - type: object required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIChatCompletionResponse - description: Response from listing OpenAI-compatible chat completions. - ListOpenAIFileResponse: + - 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: - data: - items: - $ref: '#/components/schemas/OpenAIFileObject' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: - type: string - title: First Id - last_id: + 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' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role type: string - title: Last Id - object: + enum: + - system + - developer + - user + - assistant + default: system + type: + const: message + default: message + title: Type type: string - const: list - title: Object - default: list - type: object + id: + anyOf: + - type: string + - type: 'null' + nullable: true + status: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIFileResponse - description: Response for listing files in OpenAI Files API. - ListOpenAIResponseInputItem: + - content + - role + title: OpenAIResponseMessage + type: object + OpenAIResponseOutputMessageFileSearchToolCall: + description: File search tool call output message for OpenAI responses. properties: - data: + id: + title: Id + type: string + queries: items: - $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' + type: string + title: Queries type: array - title: Data - object: + status: + title: Status type: string - const: list - title: Object - default: list - type: object + type: + const: file_search_call + default: file_search_call + title: Type + type: string + results: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array + - type: 'null' + nullable: true required: - - data - title: ListOpenAIResponseInputItem - description: List container for OpenAI response input items. - ListOpenAIResponseObject: + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall + type: object + OpenAIResponseOutputMessageFileSearchToolCallResults: + description: Search results returned by the file search operation. properties: - data: - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput-Output' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: + attributes: + additionalProperties: true + title: Attributes + type: object + file_id: + title: File Id type: string - title: First Id - last_id: + filename: + title: Filename type: string - title: Last Id - object: + score: + title: Score + type: number + text: + title: Text type: string - const: list - title: Object - default: list - type: object - required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject - description: Paginated list of OpenAI response objects with navigation metadata. - 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 + - attributes + - file_id + - filename + - score + - text + title: OpenAIResponseOutputMessageFileSearchToolCallResults type: object - required: - - data - title: ListPromptsResponse - description: Response model to list prompts. - ListProvidersResponse: + OpenAIResponseOutputMessageFunctionToolCall: + description: Function tool call output message for OpenAI responses. 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. - 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. - ListScoringFunctionsResponse: - properties: - data: - items: - $ref: '#/components/schemas/ScoringFn' - 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 - ListToolDefsResponse: - properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - type: array - title: Data - type: object - required: - - data - title: ListToolDefsResponse - description: Response containing a list of tool definitions. - 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. - LoraFinetuningConfig: - properties: - type: + call_id: + title: Call Id type: string - const: LoRA + name: + title: Name + type: string + arguments: + title: Arguments + type: string + type: + const: function_call + default: function_call title: Type - default: LoRA - lora_attn_modules: - items: - type: string - type: array - title: Lora Attn Modules - apply_lora_to_mlp: - type: boolean - title: Apply Lora To Mlp - apply_lora_to_output: - type: boolean - title: Apply Lora To Output - rank: - type: integer - title: Rank - alpha: - type: integer - title: Alpha - use_dora: + type: string + id: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - quantize_base: + nullable: true + status: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - type: object + nullable: true required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - MCPListToolsTool: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + type: object + OpenAIResponseOutputMessageMCPCall: + description: Model Context Protocol (MCP) call output message for OpenAI responses. properties: - input_schema: - additionalProperties: true - type: object - title: Input Schema - name: + id: + title: Id + type: string + type: + const: mcp_call + default: mcp_call + title: Type + type: string + arguments: + title: Arguments type: string + name: title: Name - description: + type: string + server_label: + title: Server Label + type: string + error: anyOf: - type: string - type: 'null' - type: object - required: - - input_schema - - name - title: MCPListToolsTool - description: Tool definition returned by MCP list tools operation. - Model: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + nullable: true + output: anyOf: - type: string - type: 'null' - description: Unique identifier for this resource in the provider - 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 + nullable: true required: - - identifier - - provider_id - title: Model - description: A model resource representing an AI model registered in Llama Stack. - ModelCandidate: + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + type: object + OpenAIResponseOutputMessageMCPListTools: + description: MCP list tools output message containing available tools from an MCP server. properties: - type: + id: + title: Id type: string - const: model + type: + const: mcp_list_tools + default: mcp_list_tools title: Type - default: model - model: type: string - title: Model - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: - anyOf: - - $ref: '#/components/schemas/SystemMessage' - title: SystemMessage - - type: 'null' - title: SystemMessage - type: object + server_label: + title: Server Label + type: string + tools: + items: + $ref: '#/components/schemas/MCPListToolsTool' + title: Tools + type: array required: - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType - description: Enumeration of supported model types in Llama Stack. - ModerationObject: + - id + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools + type: object + OpenAIResponseOutputMessageWebSearchToolCall: + description: Web search tool call output message for OpenAI responses. properties: id: - type: string title: Id - model: type: string - title: Model - results: - items: - $ref: '#/components/schemas/ModerationObjectResults' - type: array - title: Results - type: object + status: + title: Status + type: string + type: + const: web_search_call + default: web_search_call + title: Type + type: string required: - id - - model - - results - title: ModerationObject - description: A moderation object. - ModerationObjectResults: + - status + title: OpenAIResponseOutputMessageWebSearchToolCall + type: object + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + AllowedToolsFilter: + description: Filter configuration for restricting which MCP tools can be used. properties: - flagged: - type: boolean - title: Flagged - categories: - anyOf: - - additionalProperties: - type: boolean - type: object - - type: 'null' - category_applied_input_types: + tool_names: anyOf: - - additionalProperties: - items: - type: string - type: array - type: object + - items: + type: string + type: array - type: 'null' - category_scores: + nullable: true + title: AllowedToolsFilter + type: object + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. + properties: + always: anyOf: - - additionalProperties: - type: number - type: object + - items: + type: string + type: array - type: 'null' - user_message: + nullable: true + never: anyOf: - - type: string + - items: + type: string + type: array - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - type: object - required: - - flagged - title: ModerationObjectResults - description: A moderation object. - NumberType: - properties: - type: - type: string - const: number - title: Type - default: number + nullable: true + title: ApprovalFilter type: object - title: NumberType - description: Parameter type for numeric values. - ObjectType: + OpenAIResponseInputToolFileSearch: + description: File search tool configuration for OpenAI response inputs. properties: type: - type: string - const: object + const: file_search + default: file_search title: Type - default: object - type: object - title: ObjectType - description: Parameter type for object values. - OpenAIAssistantMessageParam-Input: - properties: - role: type: string - const: assistant - title: Role - default: assistant - content: + vector_store_ids: + items: + type: string + title: Vector Store Ids + type: array + filters: anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] + - additionalProperties: true + type: object - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: + nullable: true + max_num_results: anyOf: - - type: string + - maximum: 50 + minimum: 1 + type: integer - type: 'null' - tool_calls: + default: 10 + ranking_options: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions - type: 'null' + nullable: true + title: SearchRankingOptions + required: + - vector_store_ids + title: OpenAIResponseInputToolFileSearch type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIAssistantMessageParam-Output: + OpenAIResponseInputToolFunction: + description: Function tool configuration for OpenAI response inputs. properties: - role: + type: + const: function + default: function + title: Type type: string - const: assistant - title: Role - default: assistant - content: + name: + title: Name + type: string + description: anyOf: - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: + nullable: true + parameters: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' - tool_calls: + strict: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - type: boolean - type: 'null' + nullable: true + required: + - name + - parameters + title: OpenAIResponseInputToolFunction type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIChatCompletion: + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: - id: + type: + const: mcp + default: mcp + title: Type type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAIChoice-Output' - type: array - title: Choices - object: + server_label: + title: Server Label type: string - const: chat.completion - title: Object - default: chat.completion - created: - type: integer - title: Created - model: + server_url: + title: Server Url type: string - title: Model - usage: + headers: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage + - additionalProperties: true + type: object - type: 'null' - title: OpenAIChatCompletionUsage - type: object + nullable: true + require_approval: + anyOf: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + title: ApprovalFilter + default: never + title: string | ApprovalFilter + allowed_tools: + anyOf: + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter + - type: 'null' + title: list[string] | AllowedToolsFilter + nullable: true required: - - id - - choices - - created - - model - title: OpenAIChatCompletion - description: Response from an OpenAI-compatible chat completion request. - OpenAIChatCompletionContentPartImageParam: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + type: object + OpenAIResponseInputToolWebSearch: + description: Web search tool configuration for OpenAI response inputs. properties: type: - type: string - const: image_url + default: web_search 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. - 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. - OpenAIChatCompletionRequestWithExtraBody: - properties: - model: type: string - title: Model - messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' - title: OpenAIUserMessageParam-Input - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' - title: OpenAIAssistantMessageParam-Input - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: 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' - title: OpenAIUserMessageParam-Input | ... (5 variants) - type: array - minItems: 1 - title: Messages - frequency_penalty: + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + search_context_size: anyOf: - - type: number + - pattern: ^low|medium|high$ + type: string - type: 'null' - function_call: + default: medium + title: OpenAIResponseInputToolWebSearch + type: object + SearchRankingOptions: + description: Options for ranking and filtering search results. + properties: + ranker: anyOf: - type: string - - additionalProperties: true - type: object - - type: 'null' - title: string | object - functions: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - logit_bias: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - logprobs: - anyOf: - - type: boolean - - type: 'null' - max_completion_tokens: - anyOf: - - type: integer - - type: 'null' - max_tokens: - anyOf: - - type: integer - - type: 'null' - n: - anyOf: - - type: integer - - type: 'null' - parallel_tool_calls: - anyOf: - - type: boolean - type: 'null' - presence_penalty: + nullable: true + score_threshold: anyOf: - type: number - type: 'null' - response_format: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - discriminator: - propertyName: type - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - - type: 'null' - title: Response Format - seed: - anyOf: - - type: integer - - type: 'null' - stop: + default: 0.0 + title: SearchRankingOptions + type: object + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + properties: + type: + const: mcp + default: mcp + title: Type + type: string + server_label: + title: Server Label + type: string + allowed_tools: anyOf: - - type: string - items: type: string type: array title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - title: string | list[string] - stream: - anyOf: - - type: boolean - - type: 'null' - stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - temperature: - anyOf: - - type: number - - type: 'null' - tool_choice: - anyOf: - - type: string - - additionalProperties: true - type: object - - type: 'null' - title: string | object - tools: + title: list[string] | AllowedToolsFilter + nullable: true + required: + - server_label + title: OpenAIResponseToolMCP + type: object + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. + properties: + type: + const: output_text + default: output_text + title: Type + type: string + text: + title: Text + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations + type: array + logprobs: anyOf: - items: additionalProperties: true type: object type: array - type: 'null' - top_logprobs: - anyOf: - - type: integer - - type: 'null' - top_p: - anyOf: - - type: number - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object + nullable: true required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible chat completion endpoint. - OpenAIChatCompletionToolCall: + - text + title: OpenAIResponseContentPartOutputText + type: object + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. properties: - index: + type: + const: reasoning_text + default: reasoning_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningText + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. + properties: + type: + const: summary_text + default: summary_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningSummary + type: object + OpenAIResponseError: + description: Error details for failed OpenAI response requests. + properties: + code: + title: Code + type: string + message: + title: Message + type: string + required: + - code + - message + title: OpenAIResponseError + type: object + OpenAIResponseObject: + description: Complete OpenAI response object containing generation results and metadata. + properties: + created_at: + title: Created At + type: integer + error: anyOf: - - type: integer + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' + nullable: true + title: OpenAIResponseError 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output + type: array + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: anyOf: - type: string - type: 'null' - type: + nullable: true + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + nullable: true + title: OpenAIResponsePrompt + status: + title: Status type: string - const: function - title: Type - default: function - function: + temperature: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - title: OpenAIChatCompletionToolCallFunction + - type: number - type: 'null' - title: OpenAIChatCompletionToolCallFunction - type: object - title: OpenAIChatCompletionToolCall - description: Tool call specification for OpenAI-compatible chat completion responses. - OpenAIChatCompletionToolCallFunction: - properties: - name: + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: anyOf: - - type: string + - type: number - type: 'null' - arguments: + nullable: true + tools: anyOf: - - type: string + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array - type: 'null' - type: object - title: OpenAIChatCompletionToolCallFunction - description: Function call details for OpenAI-compatible tool calls. - 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: + nullable: true + truncation: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' - title: OpenAIChatCompletionUsagePromptTokensDetails + - type: string - type: 'null' - title: OpenAIChatCompletionUsagePromptTokensDetails - completion_tokens_details: + nullable: true + usage: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' - title: OpenAIChatCompletionUsageCompletionTokensDetails + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object - required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - description: Usage information for OpenAI chat completion. - OpenAIChatCompletionUsageCompletionTokensDetails: - properties: - reasoning_tokens: + nullable: true + title: OpenAIResponseUsage + instructions: anyOf: - - type: integer + - type: string - type: 'null' - type: object - title: OpenAIChatCompletionUsageCompletionTokensDetails - description: Token details for output tokens in OpenAI chat completion usage. - OpenAIChatCompletionUsagePromptTokensDetails: - properties: - cached_tokens: + nullable: true + max_tool_calls: anyOf: - type: integer - type: 'null' + nullable: true + required: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject type: object - title: OpenAIChatCompletionUsagePromptTokensDetails - description: Token details for prompt tokens in OpenAI chat completion usage. - OpenAIChoice-Input: + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. properties: - message: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' - title: OpenAIUserMessageParam-Input - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' - title: OpenAIAssistantMessageParam-Input - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam-Input | ... (5 variants) - 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' - finish_reason: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.completed + default: response.completed + title: Type type: string - title: Finish Reason - index: - type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Input' - title: OpenAIChoiceLogprobs-Input - - type: 'null' - title: OpenAIChoiceLogprobs-Input - type: object required: - - message - - finish_reason - - index - title: OpenAIChoice - description: A choice from an OpenAI-compatible chat completion response. - OpenAIChoice-Output: + - response + title: OpenAIResponseObjectStreamResponseCompleted + type: object + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. properties: - message: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' - title: OpenAIUserMessageParam-Output - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' - title: OpenAIAssistantMessageParam-Output - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam-Output | ... (5 variants) + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: 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: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - title: OpenAIChoiceLogprobs-Output - - type: 'null' - title: OpenAIChoiceLogprobs-Output - type: object + type: + const: response.content_part.added + default: response.content_part.added + title: Type + type: string required: - - message - - finish_reason - - index - title: OpenAIChoice - description: A choice from an OpenAI-compatible chat completion response. - OpenAIChoiceLogprobs-Input: - properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - type: object - title: OpenAIChoiceLogprobs - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. - OpenAIChoiceLogprobs-Output: - properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded type: object - title: OpenAIChoiceLogprobs - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. - OpenAICompletion: + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. properties: - id: - type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAICompletionChoice-Output' - type: array - title: Choices - created: + content_index: + title: Content Index type: integer - title: Created - model: + response_id: + title: Response Id type: string - title: Model - object: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.done + default: response.content_part.done + title: Type 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. - - :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" - OpenAICompletionChoice-Input: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone + type: object + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. properties: - finish_reason: - type: string - title: Finish Reason - text: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.created + default: response.created + title: Type type: string - title: Text - index: - type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Input' - title: OpenAIChoiceLogprobs-Input - - type: 'null' - title: OpenAIChoiceLogprobs-Input - type: object required: - - finish_reason - - text - - index - title: 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 - OpenAICompletionChoice-Output: + - response + title: OpenAIResponseObjectStreamResponseCreated + type: object + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. properties: - finish_reason: - type: string - title: Finish Reason - text: - type: string - title: Text - index: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - title: OpenAIChoiceLogprobs-Output - - type: 'null' - title: OpenAIChoiceLogprobs-Output - type: object + type: + const: response.failed + default: response.failed + title: Type + type: string required: - - finish_reason - - text - - index - title: 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 - OpenAICompletionRequestWithExtraBody: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed + type: object + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. properties: - model: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type type: string - title: Model - prompt: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - items: - type: integer - type: array - title: list[integer] - - items: - items: - type: integer - type: array - type: array - title: list[array] - title: string | ... (4 variants) - best_of: - anyOf: - - type: integer - - type: 'null' - echo: - anyOf: - - type: boolean - - type: 'null' - frequency_penalty: - anyOf: - - type: number - - type: 'null' - logit_bias: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - logprobs: - anyOf: - - type: boolean - - type: 'null' - max_tokens: - anyOf: - - type: integer - - type: 'null' - n: - anyOf: - - type: integer - - type: 'null' - presence_penalty: - anyOf: - - type: number - - type: 'null' - seed: - anyOf: - - type: integer - - type: 'null' - stop: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - type: 'null' - title: string | list[string] - stream: - anyOf: - - type: boolean - - type: 'null' - stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - temperature: - anyOf: - - type: number - - type: 'null' - top_p: - anyOf: - - type: number - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - suffix: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible completion endpoint. - OpenAICompletionWithInputMessages: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. properties: - id: - type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAIChoice-Output' - type: array - title: Choices - object: + item_id: + title: Item Id type: string - const: chat.completion - title: Object - default: chat.completion - created: + output_index: + title: Output Index type: integer - title: Created - model: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type type: string - title: Model - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - title: OpenAIChatCompletionUsage - input_messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' - title: OpenAIUserMessageParam-Output - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' - title: OpenAIAssistantMessageParam-Output - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - 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' - title: OpenAIUserMessageParam-Output | ... (5 variants) - type: array - title: Input Messages - type: object required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - properties: - file_ids: - items: - type: string - type: array - title: File Ids - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - additionalProperties: true + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress type: object + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type + type: string required: - - file_ids - title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - description: Request to create a vector store file batch with extra_body support. - OpenAICreateVectorStoreRequestWithExtraBody: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. properties: - name: - anyOf: - - type: string - - type: 'null' - file_ids: - anyOf: - - items: - type: string - type: array - - type: 'null' - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - additionalProperties: true - type: object - title: OpenAICreateVectorStoreRequestWithExtraBody - description: Request to create a vector store with extra_body support. - OpenAIDeleteResponseObject: - properties: - id: + delta: + title: Delta type: string - title: Id - object: + item_id: + title: Item Id type: string - const: response - title: Object - default: response - deleted: - type: boolean - title: Deleted - default: true - type: object - required: - - id - title: OpenAIDeleteResponseObject - description: Response object confirming deletion of an OpenAI response. - OpenAIDeveloperMessageParam: - properties: - role: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + title: Type type: string - const: developer - title: Role - default: developer - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - type: object required: - - content - title: OpenAIDeveloperMessageParam - description: A message from the developer in an OpenAI-compatible chat completion request. - OpenAIEmbeddingData: - properties: - object: - type: string - const: embedding - title: Object - default: embedding - embedding: - anyOf: - - items: - type: number - type: array - title: list[number] - - type: string - title: list[number] | string - index: - type: integer - title: Index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta type: object - required: - - embedding - - index - title: OpenAIEmbeddingData - description: A single embedding data object from an OpenAI-compatible embeddings response. - OpenAIEmbeddingUsage: + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. properties: - prompt_tokens: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - title: Prompt Tokens - total_tokens: + sequence_number: + title: Sequence Number type: integer - title: Total Tokens - type: object - required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage - description: Usage information for an OpenAI-compatible embeddings response. - OpenAIEmbeddingsRequestWithExtraBody: - properties: - model: + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type type: string - title: Model - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - encoding_format: - anyOf: - - type: string - - type: 'null' - default: float - dimensions: - anyOf: - - type: integer - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object required: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody - description: Request parameters for OpenAI-compatible embeddings endpoint. - OpenAIEmbeddingsResponse: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. properties: - object: - type: string - const: list - title: Object - default: list - data: - items: - $ref: '#/components/schemas/OpenAIEmbeddingData' - type: array - title: Data - model: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type 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. - OpenAIFile: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress + type: object + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: file + const: response.incomplete + default: response.incomplete title: Type - default: file - file: - $ref: '#/components/schemas/OpenAIFileFile' - type: object + type: string required: - - file - title: OpenAIFile - OpenAIFileDeleteResponse: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: properties: - id: + delta: + title: Delta type: string - title: Id - object: + item_id: + title: Item Id type: string - const: file - title: Object - default: file - deleted: - type: boolean - title: Deleted - type: object - required: - - id - - deleted - title: OpenAIFileDeleteResponse - description: Response for deleting a file in OpenAI Files API. - OpenAIFileFile: - properties: - file_data: - anyOf: - - type: string - - type: 'null' - file_id: - anyOf: - - type: string - - type: 'null' - filename: - anyOf: - - type: string - - type: 'null' + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta type: object - title: OpenAIFileFile - OpenAIFileObject: + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: properties: - object: + arguments: + title: Arguments type: string - const: file - title: Object - default: file - id: + item_id: + title: Item Id type: string - title: Id - bytes: - type: integer - title: Bytes - created_at: + output_index: + title: Output Index type: integer - title: Created At - expires_at: + sequence_number: + title: Sequence Number type: integer - title: Expires At - filename: + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type 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. - OpenAIFilePurpose: - type: string - enum: - - assistants - - batch - title: OpenAIFilePurpose - description: Valid purpose values for OpenAI Files API. - OpenAIImageURL: - properties: - url: - type: string - title: Url - detail: - anyOf: - - type: string - - type: 'null' + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone type: object - required: - - url - title: OpenAIImageURL - description: Image URL specification for OpenAI-compatible chat completion messages. - OpenAIJSONSchema: + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. properties: - name: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted type: object - title: OpenAIJSONSchema - description: JSON schema specification for OpenAI-compatible structured response format. - OpenAIListModelsResponse: + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. properties: - data: - items: - $ref: '#/components/schemas/OpenAIModel' - type: array - title: Data - type: object + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.failed + default: response.mcp_call.failed + title: Type + type: string required: - - data - title: OpenAIListModelsResponse - OpenAIModel: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed + type: object + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. properties: - id: - type: string - title: Id - object: + item_id: + title: Item Id type: string - const: model - title: Object - default: model - created: + output_index: + title: Output Index type: integer - title: Created - owned_by: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress + title: Type type: string - title: Owned By - custom_metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object required: - - id - - created - - owned_by - title: OpenAIModel - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata - OpenAIResponseAnnotationCitation: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + type: object + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: properties: + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: url_citation + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed 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. - OpenAIResponseAnnotationContainerFileCitation: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + type: object + OpenAIResponseObjectStreamResponseMcpListToolsFailed: properties: + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: container_file_citation + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed title: Type - default: container_file_citation - container_id: type: string - title: Container Id - end_index: + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + type: object + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + properties: + sequence_number: + title: Sequence Number type: integer - title: End Index - file_id: + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type 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: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. properties: - type: - type: string - const: file_citation - title: Type - default: file_citation - file_id: - type: string - title: File Id - filename: + response_id: + title: Response Id type: string - title: Filename - index: + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number type: integer - title: Index - type: object - required: - - file_id - - filename - - index - title: OpenAIResponseAnnotationFileCitation - description: File citation annotation for referencing specific files in response content. - OpenAIResponseAnnotationFilePath: - properties: type: - type: string - const: file_path + const: response.output_item.added + default: response.output_item.added 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: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded + type: object + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. properties: - type: + response_id: + title: Response Id type: string - const: refusal + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done title: Type - default: refusal - refusal: type: string - title: Refusal - type: object required: - - refusal - title: OpenAIResponseContentPartRefusal - description: Refusal content within a streamed response part. - OpenAIResponseError: - properties: - code: - type: string - title: Code - message: - type: string - title: Message + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone type: object - required: - - code - - message - title: OpenAIResponseError - description: Error details for failed OpenAI response requests. - OpenAIResponseFormatJSONObject: + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. properties: - type: + item_id: + title: Item Id 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. - OpenAIResponseFormatJSONSchema: - properties: + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: json_schema + const: response.output_text.annotation.added + default: response.output_text.annotation.added 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. - OpenAIResponseFormatText: - properties: - type: type: string - const: text - title: Type - default: text + required: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded type: object - title: OpenAIResponseFormatText - description: Text response format for OpenAI-compatible chat completion requests. - OpenAIResponseInputFunctionToolCallOutput: + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. properties: - call_id: + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - title: Call Id - output: + item_id: + title: Item Id type: string - title: Output + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.output_text.delta + default: response.output_text.delta + title: Type type: string - const: function_call_output - title: Type - default: function_call_output - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' - 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: - anyOf: - - type: string - - type: 'null' - file_id: - anyOf: - - type: string - - type: 'null' - file_url: - anyOf: - - type: string - - type: 'null' - filename: - anyOf: - - type: string - - type: 'null' + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta type: object - title: OpenAIResponseInputMessageContentFile - description: File content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentImage: + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. properties: - detail: - title: Detail - default: auto + content_index: + title: Content Index + type: integer + text: + title: Text type: string - enum: - - low - - high - - auto - type: + item_id: + title: Item Id type: string - const: input_image + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done title: Type - default: input_image - file_id: - anyOf: - - type: string - - type: 'null' - image_url: - anyOf: - - type: string - - type: 'null' + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone type: object - title: OpenAIResponseInputMessageContentImage - description: Image content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentText: + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. properties: - text: + item_id: + title: Item Id type: string - title: Text + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - type: string - const: input_text + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added title: Type - default: input_text - type: object + type: string required: - - text - title: OpenAIResponseInputMessageContentText - description: Text content for input messages in OpenAI response format. - OpenAIResponseInputToolFileSearch: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. properties: - type: + item_id: + title: Item Id type: string - const: file_search + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done title: Type - default: file_search - vector_store_ids: - items: - type: string - type: array - title: Vector Store Ids - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - max_num_results: - anyOf: - - type: integer - maximum: 50.0 - minimum: 1.0 - - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - title: SearchRankingOptions - type: object + type: string required: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch - description: File search tool configuration for OpenAI response inputs. - OpenAIResponseInputToolFunction: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. properties: - type: + delta: + title: Delta type: string - const: function + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta title: Type - default: function - name: type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - parameters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - type: object required: - - name - - parameters - title: OpenAIResponseInputToolFunction - description: Function tool configuration for OpenAI response inputs. - OpenAIResponseInputToolMCP: + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. properties: - type: - type: string - const: mcp - title: Type - default: mcp - server_label: + text: + title: Text type: string - title: Server Label - server_url: + item_id: + title: Item Id type: string - title: Server Url - headers: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - require_approval: - anyOf: - - type: string - const: always - - type: string - const: never - - $ref: '#/components/schemas/ApprovalFilter' - title: ApprovalFilter - title: string | ApprovalFilter - default: never - allowed_tools: - anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter - - type: 'null' - title: list[string] | AllowedToolsFilter - type: object - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - OpenAIResponseInputToolWebSearch: - properties: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done title: Type - default: web_search type: string - enum: - - web_search - - web_search_preview - - web_search_preview_2025_03_11 - - web_search_2025_08_26 - search_context_size: - anyOf: - - type: string - pattern: ^low|medium|high$ - - type: 'null' - default: medium + required: + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone type: object - title: OpenAIResponseInputToolWebSearch - description: Web search tool configuration for OpenAI response inputs. - OpenAIResponseMCPApprovalRequest: + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. properties: - arguments: + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - title: Arguments - id: + item_id: + title: Item Id type: string - title: Id - name: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.delta + default: response.reasoning_text.delta + title: Type type: string - title: Name - server_label: + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. + properties: + content_index: + title: Content Index + type: integer + text: + title: Text type: string - title: Server Label - type: + item_id: + title: Item Id type: string - const: mcp_approval_request + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done title: Type - default: mcp_approval_request - type: object + type: string required: - - arguments - - id - - name - - server_label - title: OpenAIResponseMCPApprovalRequest - description: A request for human approval of a tool invocation. - OpenAIResponseMCPApprovalResponse: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone + type: object + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. properties: - approval_request_id: + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - title: Approval Request Id - approve: - type: boolean - title: Approve - type: + item_id: + title: Item Id type: string - const: mcp_approval_response + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.delta + default: response.refusal.delta title: Type - default: mcp_approval_response - id: - anyOf: - - type: string - - type: 'null' - reason: - anyOf: - - type: string - - type: 'null' - type: object + type: string required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse - description: A response to an MCP approval request. - OpenAIResponseMessage-Input: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta + type: object + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. properties: - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role + content_index: + title: Content Index + type: integer + refusal: + title: Refusal type: string - enum: - - system - - developer - - user - - assistant - default: system - type: + item_id: + title: Item Id type: string - const: message + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.done + default: response.refusal.done title: Type - default: message - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' - type: object + type: string 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. - OpenAIResponseMessage-Output: + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone + type: object + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. properties: - content: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseWebSearchCallSearching: + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + type: object + OpenAIResponsePrompt: + description: OpenAI compatible Prompt object that is used in OpenAI responses. + properties: + id: + title: Id + type: string + variables: anyOf: - - type: string - - items: + - additionalProperties: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText @@ -3973,2552 +3419,1758 @@ components: title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - type: string - const: message - title: Type - default: message - id: - anyOf: - - type: string + type: object - type: 'null' - status: + nullable: true + version: anyOf: - type: string - type: 'null' - type: object + nullable: true 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: + - id + title: OpenAIResponsePrompt + type: object + OpenAIResponseText: + description: Text response configuration for OpenAI responses. properties: - created_at: - type: integer - title: Created At - error: + format: anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat - type: 'null' - title: OpenAIResponseError - id: - type: string - title: Id - model: - type: string - title: Model - object: + nullable: true + title: OpenAIResponseTextFormat + title: OpenAIResponseText + type: object + OpenAIResponseTextFormat: + description: Configuration for Responses API text format. + properties: + type: + title: Type type: string - const: response - title: Object - default: response - output: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - type: array - title: Output - parallel_tool_calls: - type: boolean - title: Parallel Tool Calls - default: false - previous_response_id: + enum: + - text + - json_schema + - json_object + default: text + name: anyOf: - type: string - type: 'null' - prompt: + schema: anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt + - additionalProperties: true + type: object - type: 'null' - title: OpenAIResponsePrompt - status: - type: string - title: Status - temperature: + description: anyOf: - - type: number + - type: string - type: 'null' - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: + strict: anyOf: - - type: number + - type: boolean - type: 'null' - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - truncation: - anyOf: - - type: string - - type: 'null' - usage: + title: OpenAIResponseTextFormat + type: object + OpenAIResponseUsage: + description: Usage information for OpenAI response. + 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: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage + - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails - type: 'null' - title: OpenAIResponseUsage - instructions: + nullable: true + title: OpenAIResponseUsageInputTokensDetails + output_tokens_details: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails - type: 'null' - max_tool_calls: + nullable: true + title: OpenAIResponseUsageOutputTokensDetails + required: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage + type: object + OpenAIResponseUsageInputTokensDetails: + description: Token details for input tokens in OpenAI response usage. + properties: + cached_tokens: anyOf: - type: integer - type: 'null' + nullable: true + title: OpenAIResponseUsageInputTokensDetails type: object - required: - - created_at - - id - - model - - output - - status - title: OpenAIResponseObject - description: Complete OpenAI response object containing generation results and metadata. - OpenAIResponseObjectWithInput-Input: + OpenAIResponseUsageOutputTokensDetails: + description: Token details for output tokens in OpenAI response usage. properties: - created_at: - type: integer - title: Created At - error: + reasoning_tokens: anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError + - type: integer - type: 'null' - title: OpenAIResponseError - id: - type: string - title: Id - model: - type: string - title: Model - object: + nullable: true + title: OpenAIResponseUsageOutputTokensDetails + type: object + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) + 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 - const: response - title: Object - default: response output: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (7 variants) - type: array title: Output - parallel_tool_calls: - type: boolean - title: Parallel Tool Calls - default: false - previous_response_id: + type: string + type: + const: function_call_output + default: function_call_output + title: Type + type: string + id: anyOf: - type: string - type: 'null' - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt + nullable: true status: - type: string - title: Status - temperature: - anyOf: - - type: number - - type: 'null' - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - truncation: - anyOf: - - type: string - - type: 'null' - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - title: OpenAIResponseUsage - instructions: anyOf: - type: string - type: 'null' - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - input: - items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input - type: array - title: Input - type: object + nullable: true required: - - created_at - - id - - model + - call_id - output - - status - - input - title: OpenAIResponseObjectWithInput - description: OpenAI response object extended with input context information. - OpenAIResponseObjectWithInput-Output: + title: OpenAIResponseInputFunctionToolCallOutput + type: object + OpenAIResponseMCPApprovalResponse: + description: A response to an MCP approval request. properties: - created_at: - type: integer - title: Created At - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - title: OpenAIResponseError - id: - type: string - title: Id - model: - type: string - title: Model - object: + approval_request_id: + title: Approval Request Id type: string - const: response - title: Object - default: response - output: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - type: array - title: Output - parallel_tool_calls: + approve: + title: Approve type: boolean - title: Parallel Tool Calls - default: false - previous_response_id: - anyOf: - - type: string - - type: 'null' - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt - status: + type: + const: mcp_approval_response + default: mcp_approval_response + title: Type type: string - title: Status - temperature: - anyOf: - - type: number - - type: 'null' - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - truncation: + id: anyOf: - type: string - type: 'null' - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - title: OpenAIResponseUsage - instructions: + nullable: true + reason: anyOf: - type: string - type: 'null' - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - input: - items: - $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' - type: array - title: Input - type: object + nullable: true required: - - created_at - - id - - model - - output - - status - - input - title: OpenAIResponseObjectWithInput - description: OpenAI response object extended with input context information. - 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' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: 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' - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - type: array - title: Annotations + - approval_request_id + - approve + title: OpenAIResponseMCPApprovalResponse type: object - required: - - text - title: OpenAIResponseOutputMessageContentOutputText - OpenAIResponseOutputMessageFileSearchToolCall: + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + ArrayType: + description: Parameter type for array values. 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 + const: array + default: array title: Type - default: file_search_call - results: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' - type: array - - type: 'null' + type: string + title: ArrayType type: object - required: - - id - - queries - - status - title: OpenAIResponseOutputMessageFileSearchToolCall - description: File search tool call output message for OpenAI responses. - OpenAIResponseOutputMessageFileSearchToolCallResults: + BooleanType: + description: Parameter type for boolean values. 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: + const: boolean + default: boolean + title: Type type: string - title: Text + title: BooleanType type: object - required: - - attributes - - file_id - - filename - - score - - text - title: OpenAIResponseOutputMessageFileSearchToolCallResults - description: Search results returned by the file search operation. - OpenAIResponseOutputMessageFunctionToolCall: + ChatCompletionInputType: + description: Parameter type for chat completion input. properties: - call_id: - type: string - title: Call Id - name: - type: string - title: Name - arguments: - type: string - title: Arguments type: - type: string - const: function_call + const: chat_completion_input + default: chat_completion_input title: Type - default: function_call - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' + type: string + title: ChatCompletionInputType type: object - required: - - call_id - - name - - arguments - title: OpenAIResponseOutputMessageFunctionToolCall - description: Function tool call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPCall: + CompletionInputType: + description: Parameter type for completion input. properties: - id: - type: string - title: Id type: - type: string - const: mcp_call + const: completion_input + default: completion_input title: Type - default: mcp_call - arguments: - type: string - title: Arguments - name: - type: string - title: Name - server_label: type: string - title: Server Label - error: - anyOf: - - type: string - - type: 'null' - output: - anyOf: - - type: string - - type: 'null' + title: CompletionInputType type: object - required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - description: Model Context Protocol (MCP) call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPListTools: + JsonType: + description: Parameter type for JSON values. properties: - id: - type: string - title: Id type: - type: string - const: mcp_list_tools + const: json + default: json title: Type - default: mcp_list_tools - server_label: type: string - title: Server Label - tools: - items: - $ref: '#/components/schemas/MCPListToolsTool' - type: array - title: Tools + title: JsonType type: object - required: - - id - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - description: MCP list tools output message containing available tools from an MCP server. - OpenAIResponseOutputMessageWebSearchToolCall: + NumberType: + description: Parameter type for numeric values. properties: - id: - type: string - title: Id - status: + type: + const: number + default: number + title: Type type: string - title: Status + title: NumberType + type: object + ObjectType: + description: Parameter type for object values. + properties: type: + const: object + default: object + title: Type type: string - const: web_search_call + title: ObjectType + type: object + StringType: + description: Parameter type for string values. + properties: + type: + const: string + default: string title: Type - default: web_search_call + type: string + title: StringType type: object - required: - - id - - status - title: OpenAIResponseOutputMessageWebSearchToolCall - description: Web search tool call output message for OpenAI responses. - OpenAIResponsePrompt: + UnionType: + description: Parameter type for union values. properties: - id: + type: + const: union + default: union + title: Type type: string - title: Id - variables: - anyOf: - - additionalProperties: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: object - - type: 'null' - version: - anyOf: - - type: string - - type: 'null' - type: object - required: - - id - title: OpenAIResponsePrompt - description: OpenAI compatible Prompt object that is used in OpenAI responses. - OpenAIResponseText: - properties: - format: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseTextFormat' - title: OpenAIResponseTextFormat - - type: 'null' - title: OpenAIResponseTextFormat + title: UnionType type: object - title: OpenAIResponseText - description: Text response configuration for OpenAI responses. - OpenAIResponseTextFormat: + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + ConversationItem: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + RowsDataSource: + description: A dataset stored in rows. properties: type: + const: rows + default: rows title: Type type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: - anyOf: - - additionalProperties: true + rows: + items: + additionalProperties: true type: object - - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' + title: Rows + type: array + required: + - rows + title: RowsDataSource type: object - title: OpenAIResponseTextFormat - description: Configuration for Responses API text format. - OpenAIResponseToolMCP: + URIDataSource: + description: A dataset that can be obtained from a URI. properties: type: - type: string - const: mcp + const: uri + default: uri title: Type - default: mcp - server_label: type: string - title: Server Label - allowed_tools: - anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter - - type: 'null' - title: list[string] | AllowedToolsFilter - type: object + uri: + title: Uri + type: string required: - - server_label - title: OpenAIResponseToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' - title: OpenAIResponseUsageInputTokensDetails - - type: 'null' - title: OpenAIResponseUsageInputTokensDetails - output_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' - title: OpenAIResponseUsageOutputTokensDetails - - type: 'null' - title: OpenAIResponseUsageOutputTokensDetails + - uri + title: URIDataSource type: object - required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - description: Usage information for OpenAI response. - OpenAIResponseUsageInputTokensDetails: + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + AggregationFunctionType: + description: Types of aggregation functions for scoring results. + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + type: string + BasicScoringFnParams: + description: Parameters for basic scoring function configuration. properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' + type: + const: basic + default: basic + title: Type + type: string + aggregation_functions: + description: Aggregation functions to apply to the scores of each row + items: + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array + title: BasicScoringFnParams type: object - title: OpenAIResponseUsageInputTokensDetails - description: Token details for input tokens in OpenAI response usage. - OpenAIResponseUsageOutputTokensDetails: + LLMAsJudgeScoringFnParams: + description: Parameters for LLM-as-judge scoring function configuration. properties: - reasoning_tokens: + type: + const: llm_as_judge + default: llm_as_judge + title: Type + type: string + judge_model: + title: Judge Model + type: string + prompt_template: anyOf: - - type: integer + - type: string - type: 'null' - type: object - title: OpenAIResponseUsageOutputTokensDetails - description: Token details for output tokens in OpenAI response usage. - OpenAISystemMessageParam: - properties: - role: - type: string - const: system - title: Role - default: system - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - type: object + nullable: true + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array required: - - content - title: OpenAISystemMessageParam - description: A system message providing instructions or context to the model. - OpenAITokenLogProb: + - judge_model + title: LLMAsJudgeScoringFnParams + type: object + RegexParserScoringFnParams: + description: Parameters for regex parser scoring function configuration. properties: - token: + type: + const: regex_parser + default: regex_parser + title: Type type: string - title: Token - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - logprob: - type: number - title: Logprob - top_logprobs: + parsing_regexes: + description: Regex to extract the answer from generated response items: - $ref: '#/components/schemas/OpenAITopLogProb' + type: string + title: Parsing Regexes type: array - title: Top Logprobs + aggregation_functions: + description: Aggregation functions to apply to the scores of each row + items: + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array + title: RegexParserScoringFnParams type: object - required: - - token - - logprob - - top_logprobs - title: 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 - OpenAIToolMessageParam: + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + LoraFinetuningConfig: + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. properties: - role: - type: string - const: tool - title: Role - default: tool - tool_call_id: + type: + const: LoRA + default: LoRA + title: Type type: string - title: Tool Call Id - content: + lora_attn_modules: + items: + type: string + title: Lora Attn Modules + type: array + apply_lora_to_mlp: + title: Apply Lora To Mlp + type: boolean + apply_lora_to_output: + title: Apply Lora To Output + type: boolean + rank: + title: Rank + type: integer + alpha: + title: Alpha + type: integer + use_dora: anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - type: object + - type: boolean + - type: 'null' + default: false + quantize_base: + anyOf: + - type: boolean + - type: 'null' + default: false required: - - tool_call_id - - content - title: OpenAIToolMessageParam - description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. - OpenAITopLogProb: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + type: object + QATFinetuningConfig: + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: - token: + type: + const: QAT + default: QAT + title: Type type: string - title: Token - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - logprob: - type: number - title: Logprob + quantizer_name: + title: Quantizer Name + type: string + group_size: + title: Group Size + type: integer + required: + - quantizer_name + - group_size + title: QATFinetuningConfig type: object + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + SpanEndPayload: + description: Payload for a span end event. + properties: + type: + const: span_end + default: span_end + title: Type + type: string + status: + $ref: '#/components/schemas/SpanStatus' required: - - token - - logprob - title: 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 - OpenAIUserMessageParam-Input: + - status + title: SpanEndPayload + type: object + SpanStartPayload: + description: Payload for a span start event. properties: - role: + type: + const: span_start + default: span_start + title: Type type: string - const: user - title: Role - default: user - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] name: + title: Name + type: string + parent_span_id: anyOf: - type: string - type: 'null' - type: object + nullable: true required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - OpenAIUserMessageParam-Output: - properties: - role: - type: string - const: user - title: Role - default: user - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: - anyOf: - - type: string - - type: 'null' - type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - 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 + - name + title: SpanStartPayload type: object - required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: Configuration parameters for the optimization algorithm. - OptimizerType: - type: string + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. enum: - - adam - - adamw - - sgd - title: OptimizerType - description: Available optimizer algorithms for training. - Order: + - ok + - error + title: SpanStatus type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. enum: - - asc - - desc - title: Order - description: Sort order for paginated responses. - OutputTokensDetails: - properties: - reasoning_tokens: - type: integer - title: Reasoning Tokens - additionalProperties: true - type: object - required: - - reasoning_tokens - title: OutputTokensDetails - PaginatedResponse: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: - data: - items: - additionalProperties: true - type: object - type: array - title: Data - has_more: - type: boolean - title: Has More - url: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - - type: string + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object - type: 'null' - type: object - required: - - data - - has_more - title: PaginatedResponse - description: A generic paginated response that follows a simple format. - PostTrainingJob: - properties: - job_uuid: + type: + const: metric + default: metric + title: Type type: string - title: Job Uuid - type: object - required: - - job_uuid - title: PostTrainingJob - PostTrainingJobArtifactsResponse: - properties: - job_uuid: + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + title: Unit type: string - title: Job Uuid - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints - type: object required: - - job_uuid - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingJobStatusResponse: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. properties: - job_uuid: + trace_id: + title: Trace Id type: string - title: Job Uuid - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - type: string - format: date-time - - type: 'null' - started_at: - anyOf: - - type: string - format: date-time - - type: 'null' - completed_at: - anyOf: - - type: string - format: date-time - - type: 'null' - resources_allocated: + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - - additionalProperties: true + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints - type: object + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - PostTrainingMetric: - properties: - epoch: - type: integer - title: Epoch - train_loss: - type: number - title: Train Loss - validation_loss: - type: number - title: Validation Loss - perplexity: - type: number - title: Perplexity - type: object - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: Training metrics captured during post-training jobs. - Prompt: - properties: - prompt: - anyOf: - - type: string - - type: 'null' - description: The system prompt with variable placeholders - 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 + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent type: object - required: - - version - - prompt_id - title: Prompt - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. - ProviderInfo: + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. properties: - api: + trace_id: + title: Trace Id type: string - title: Api - provider_id: + span_id: + title: Span Id type: string - title: Provider Id - provider_type: + timestamp: + format: date-time + title: Timestamp 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. - QATFinetuningConfig: - properties: + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' type: - type: string - const: QAT + const: unstructured_log + default: unstructured_log title: Type - default: QAT - quantizer_name: type: string - title: Quantizer Name - group_size: - type: integer - title: Group Size - type: object - required: - - quantizer_name - - group_size - title: QATFinetuningConfig - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - 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. - RegexParserScoringFnParams: - properties: - type: + message: + title: Message 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. - RerankData: - properties: - index: - type: integer - title: Index - relevance_score: - type: number - title: Relevance Score - type: object + severity: + $ref: '#/components/schemas/LogSeverity' required: - - index - - relevance_score - title: RerankData - description: A single rerank result from a reranking response. - RerankResponse: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent + type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. properties: data: items: - $ref: '#/components/schemas/RerankData' - type: array + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage title: Data - type: object + type: array + object: + const: list + default: list + title: Object + type: string required: - data - title: RerankResponse - description: Response from a reranking request. - RouteInfo: - properties: - route: - type: string - title: Route - method: - type: string - title: Method - provider_types: - items: - type: string - type: array - title: Provider Types + title: ListOpenAIResponseInputItem type: object - required: - - route - - method - - provider_types - title: RouteInfo - description: Information about an API route including its path, method, and implementing providers. - RowsDataSource: + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. properties: - type: + created_at: + title: Created At + type: integer + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + nullable: true + title: OpenAIResponseError + id: + title: Id type: string - const: rows - title: Type - default: rows - rows: + model: + title: Model + type: string + object: + const: response + default: response + title: Object + type: string + output: items: - additionalProperties: true - type: object + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output type: array - title: Rows - type: object - required: - - rows - title: RowsDataSource - description: A dataset stored in rows. - RunShieldResponse: - properties: - violation: + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: anyOf: - - $ref: '#/components/schemas/SafetyViolation' - title: SafetyViolation + - type: string - type: 'null' - title: SafetyViolation - type: object - title: RunShieldResponse - description: Response from running a safety shield. - SafetyViolation: - properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - user_message: + nullable: true + prompt: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - type: object - required: - - violation_level - title: SafetyViolation - description: Details of a safety violation detected by content moderation. - SamplingParams: - properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - max_tokens: + nullable: true + title: OpenAIResponsePrompt + status: + title: Status + type: string + temperature: anyOf: - - type: integer + - type: number - type: 'null' - repetition_penalty: + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: anyOf: - type: number - type: 'null' - default: 1.0 - stop: + nullable: true + tools: anyOf: - items: - type: string + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - type: object - title: SamplingParams - description: Sampling parameters. - ScoreBatchResponse: - properties: - dataset_id: + nullable: true + truncation: anyOf: - type: string - type: 'null' - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results - type: object - required: - - results - title: ScoreBatchResponse - description: Response from batch scoring operations on datasets. - ScoreResponse: - properties: - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results - type: object - required: - - results - title: ScoreResponse - description: The response from scoring. - ScoringFn: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + nullable: true + usage: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' - description: Unique identifier for this resource in the provider - 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: + nullable: true + title: OpenAIResponseUsage + instructions: anyOf: - type: string - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - description: Any additional metadata for this definition - return_type: - oneOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - description: The return type of the deterministic function - discriminator: - propertyName: type - mapping: - 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: + nullable: true + max_tool_calls: anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: integer - type: 'null' - title: Params - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval - type: object - required: - - identifier - - provider_id - - return_type - title: ScoringFn - description: A scoring function resource for evaluating model outputs. - ScoringResult: - properties: - score_rows: + nullable: true + input: items: - additionalProperties: true - type: object + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + title: Input 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. - SearchRankingOptions: - properties: - ranker: - anyOf: - - type: string - - type: 'null' - score_threshold: - anyOf: - - type: number - - type: 'null' - default: 0.0 + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput type: object - title: SearchRankingOptions - description: Options for ranking and filtering search results. - Shield: + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. properties: - identifier: + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: + last_id: + title: Last Id type: string - title: Provider Id - description: ID of the provider that owns this resource - type: + object: + const: list + default: list + title: Object type: string - const: shield - title: Type - default: shield - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object required: - - identifier - - provider_id - title: Shield - description: A safety shield resource that can be used to check content. - StringType: - properties: - type: - type: string - const: string - title: Type - default: string + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject type: object - title: StringType - description: Parameter type for string values. - SystemMessage: + OpenAIDeleteResponseObject: + description: Response object confirming deletion of an OpenAI response. properties: - role: + id: + title: Id type: string - const: system - title: Role - default: system - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - type: object + object: + const: response + default: response + title: Object + type: string + deleted: + default: true + title: Deleted + type: boolean required: - - content - title: SystemMessage - description: A system message providing instructions or context to the model. - TextContentItem: + - id + title: OpenAIDeleteResponseObject + type: object + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. 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 - ToolDef: + - type + title: ResponseGuardrailSpec + type: object + Batch: + additionalProperties: true properties: - toolgroup_id: - anyOf: - - type: string - - type: 'null' - name: + id: + title: Id type: string - title: Name - description: + completion_window: + title: Completion Window + type: string + created_at: + title: Created At + type: integer + endpoint: + title: Endpoint + type: string + input_file_id: + title: Input File Id + type: string + object: + const: batch + title: Object + type: string + status: + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + title: Status + type: string + cancelled_at: anyOf: - - type: string + - type: integer - type: 'null' - input_schema: + nullable: true + cancelling_at: anyOf: - - additionalProperties: true - type: object + - type: integer - type: 'null' - output_schema: + nullable: true + completed_at: anyOf: - - additionalProperties: true - type: object + - type: integer - type: 'null' - metadata: + nullable: true + error_file_id: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - type: object - required: - - name - title: ToolDef - description: Tool definition used in runtime contexts. - ToolGroup: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + nullable: true + errors: anyOf: - - type: string + - $ref: '#/components/schemas/Errors' + title: Errors - type: 'null' - description: Unique identifier for this resource in the provider - 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: + nullable: true + title: Errors + expired_at: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: integer - type: 'null' - title: URL - args: + nullable: true + expires_at: anyOf: - - additionalProperties: true - type: object + - type: integer - type: 'null' - type: object - required: - - identifier - - provider_id - title: ToolGroup - description: A group of related tools managed together. - ToolInvocationResult: - properties: - content: + nullable: true + failed_at: anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - type: array - title: list[ImageContentItem-Output | TextContentItem] + - type: integer - type: 'null' - title: string | list[ImageContentItem-Output | TextContentItem] - error_message: + nullable: true + finalizing_at: anyOf: - - type: string + - type: integer - type: 'null' - error_code: + nullable: true + in_progress_at: anyOf: - type: integer - type: 'null' + nullable: true metadata: anyOf: - - additionalProperties: true + - additionalProperties: + type: string type: object - type: 'null' - type: object - title: ToolInvocationResult - description: Result of a tool invocation. - 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. - TopPSamplingStrategy: - properties: - type: - type: string - const: top_p - title: Type - default: top_p - temperature: + nullable: true + model: anyOf: - - type: number - minimum: 0.0 + - type: string - type: 'null' - top_p: + nullable: true + output_file_id: anyOf: - - type: number + - type: string - type: 'null' - default: 0.95 - type: object - required: - - temperature - title: TopPSamplingStrategy - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. - 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: + nullable: true + request_counts: anyOf: - - type: integer + - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts - type: 'null' - default: 1 - data_config: + nullable: true + title: BatchRequestCounts + usage: anyOf: - - $ref: '#/components/schemas/DataConfig' - title: DataConfig + - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage - type: 'null' - title: DataConfig - optimizer_config: + nullable: true + title: BatchUsage + required: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + type: object + BatchError: + additionalProperties: true + properties: + code: anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - title: OptimizerConfig + - type: string - type: 'null' - title: OptimizerConfig - efficiency_config: + nullable: true + line: anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - title: EfficiencyConfig + - type: integer - type: 'null' - title: EfficiencyConfig - dtype: + nullable: true + message: anyOf: - type: string - type: 'null' - default: bf16 + nullable: true + param: + anyOf: + - type: string + - type: 'null' + nullable: true + title: BatchError type: object - required: - - n_epochs - title: TrainingConfig - description: Comprehensive configuration for the training process. - URIDataSource: + BatchRequestCounts: + additionalProperties: true properties: - type: - type: string - const: uri - title: Type - default: uri - uri: - type: string - title: Uri - type: object + completed: + title: Completed + type: integer + failed: + title: Failed + type: integer + total: + title: Total + type: integer required: - - uri - title: URIDataSource - description: A dataset that can be obtained from a URI. - URL: - properties: - uri: - type: string - title: Uri + - completed + - failed + - total + title: BatchRequestCounts type: object - required: - - uri - title: URL - description: A URL reference to external content. - UnionType: + BatchUsage: + additionalProperties: true properties: - type: - type: string - const: union - title: Type - default: union - type: object - title: UnionType - description: Parameter type for union values. - VectorStoreChunkingStrategyAuto: - properties: - type: - type: string - const: auto - title: Type - default: auto - type: object - title: VectorStoreChunkingStrategyAuto - description: Automatic chunking strategy for vector store files. - 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. - VectorStoreChunkingStrategyStaticConfig: - properties: - chunk_overlap_tokens: + input_tokens: + title: Input Tokens type: integer - title: Chunk Overlap Tokens - default: 400 - max_chunk_size_tokens: + input_tokens_details: + $ref: '#/components/schemas/InputTokensDetails' + output_tokens: + title: Output Tokens type: integer - maximum: 4096.0 - minimum: 100.0 - title: Max Chunk Size Tokens - default: 800 + output_tokens_details: + $ref: '#/components/schemas/OutputTokensDetails' + total_tokens: + title: Total Tokens + type: integer + required: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage type: object - title: VectorStoreChunkingStrategyStaticConfig - description: Configuration for static chunking strategy. - VectorStoreContent: + Errors: + additionalProperties: true properties: - type: - type: string - const: text - title: Type - text: - type: string - title: Text - embedding: + data: anyOf: - items: - type: number + $ref: '#/components/schemas/BatchError' type: array - type: 'null' - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - title: ChunkMetadata - metadata: + nullable: true + object: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + nullable: true + title: Errors type: object - required: - - type - - text - title: VectorStoreContent - description: Content item from a vector store file or search result. - VectorStoreDeleteResponse: + InputTokensDetails: + additionalProperties: true properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store.deleted - deleted: - type: boolean - title: Deleted - default: true - type: object + cached_tokens: + title: Cached Tokens + type: integer required: - - id - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - VectorStoreFileBatchObject: + - cached_tokens + title: InputTokensDetails + type: object + OutputTokensDetails: + additionalProperties: true properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store.file_batch - created_at: + reasoning_tokens: + title: Reasoning Tokens type: integer - title: Created At - vector_store_id: - type: string - title: Vector Store Id - status: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - 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. - VectorStoreFileContentResponse: + - reasoning_tokens + title: OutputTokensDetails + type: object + ListBatchesResponse: + description: Response containing a list of batch objects. properties: object: - type: string - const: vector_store.file_content.page + const: list + default: list title: Object - default: vector_store.file_content.page + type: string data: + description: List of batch objects items: - $ref: '#/components/schemas/VectorStoreContent' - type: array + $ref: '#/components/schemas/Batch' title: Data - has_more: - type: boolean - title: Has More - default: false - next_page: + type: array + first_id: anyOf: - type: string - type: 'null' - type: object + description: ID of the first batch in the list + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + description: ID of the last batch in the list + nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean required: - data - title: VectorStoreFileContentResponse - description: Represents the parsed content of a vector store file. - 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 + title: ListBatchesResponse type: object - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - description: File processing status counts for a vector store. - VectorStoreFileDeleteResponse: + Benchmark: + description: A benchmark resource for evaluating model performance. properties: - id: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Id - object: + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - title: Object - default: vector_store.file.deleted - deleted: - type: boolean - title: Deleted - default: true - type: object - required: - - id - title: VectorStoreFileDeleteResponse - description: Response from deleting a vector store file. - VectorStoreFileLastError: - properties: - code: - title: Code + type: + const: benchmark + default: benchmark + title: Type type: string - enum: - - server_error - - rate_limit_exceeded - default: server_error - message: + dataset_id: + title: Dataset Id type: string - title: Message - type: object + scoring_functions: + items: + type: string + title: Scoring Functions + type: array + metadata: + additionalProperties: true + description: Metadata for this evaluation task + title: Metadata + type: object required: - - code - - message - title: VectorStoreFileLastError - description: Error information for failed vector store file processing. - VectorStoreFileObject: + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark + type: object + ImageDelta: + description: An image content delta for streaming responses. properties: - id: + type: + const: image + default: image + title: Type type: string - title: Id - object: + image: + format: binary + title: Image type: string - title: Object - default: vector_store.file - attributes: - additionalProperties: true - type: object - title: Attributes - chunking_strategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - created_at: - type: integer - title: Created At - last_error: - anyOf: - - $ref: '#/components/schemas/VectorStoreFileLastError' - title: VectorStoreFileLastError - - type: 'null' - title: VectorStoreFileLastError - status: - title: Status + required: + - image + title: ImageDelta + type: object + TextDelta: + description: A text content delta for streaming responses. + properties: + type: + const: text + default: text + title: Type type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - usage_bytes: - type: integer - title: Usage Bytes - default: 0 - vector_store_id: + text: + title: Text type: string - title: Vector Store Id + required: + - text + title: TextDelta type: object + JobStatus: + description: Status of a job execution. + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + type: string + Job: + description: A job execution instance with status tracking. + properties: + job_id: + title: Job Id + type: string + status: + $ref: '#/components/schemas/JobStatus' required: - - id - - chunking_strategy - - created_at + - job_id - status - - vector_store_id - title: VectorStoreFileObject - description: OpenAI Vector Store File object. - VectorStoreFilesListInBatchResponse: + title: Job + type: object + MetricInResponse: + description: A metric value included in API responses. properties: - object: + metric: + title: Metric type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - type: array - title: Data - first_id: + value: anyOf: - - type: string - - type: 'null' - last_id: + - type: integer + - type: number + title: integer | number + unit: anyOf: - type: string - type: 'null' - has_more: - type: boolean - title: Has More - default: false - type: object + nullable: true required: - - data - title: VectorStoreFilesListInBatchResponse - description: Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: + - metric + - value + title: MetricInResponse + type: object + PaginatedResponse: + description: A generic paginated response that follows a simple format. properties: - object: - type: string - title: Object - default: list data: items: - $ref: '#/components/schemas/VectorStoreFileObject' - type: array + additionalProperties: true + type: object title: Data - first_id: - anyOf: - - type: string - - type: 'null' - last_id: - anyOf: - - type: string - - type: 'null' + type: array has_more: - type: boolean title: Has More - default: false - type: object - required: - - data - title: VectorStoreListFilesResponse - description: Response from listing files in a vector store. - VectorStoreListResponse: - properties: - object: - type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - type: array - title: Data - first_id: - anyOf: - - type: string - - type: 'null' - last_id: + type: boolean + url: anyOf: - type: string - type: 'null' - has_more: - type: boolean - title: Has More - default: false - type: object + nullable: true required: - data - title: VectorStoreListResponse - description: Response from listing vector stores. - VectorStoreObject: + - has_more + title: PaginatedResponse + type: object + PostTrainingMetric: + description: Training metrics captured during post-training jobs. properties: - id: - type: string - title: Id - 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: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + type: object + Checkpoint: + description: Checkpoint created during training runs. + properties: + identifier: + title: Identifier type: string - title: Object - default: vector_store created_at: - type: integer + format: date-time title: Created At - name: - anyOf: - - type: string - - type: 'null' - usage_bytes: + type: string + epoch: + title: Epoch type: integer - title: Usage Bytes - default: 0 - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - status: + post_training_job_id: + title: Post Training Job Id type: string - title: Status - default: completed - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - expires_at: - anyOf: - - type: integer - - type: 'null' - last_active_at: + path: + title: Path + type: string + training_metrics: anyOf: - - type: integer + - $ref: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - type: object + nullable: true + title: PostTrainingMetric required: - - id + - identifier - created_at - - file_counts - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreSearchResponse-Input: - properties: - file_id: - type: string - title: File Id - filename: - type: string - title: Filename - score: - type: number - title: Score - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - title: string | number | boolean - type: object - - type: 'null' - content: - items: - $ref: '#/components/schemas/VectorStoreContent' - type: array - title: Content + - epoch + - post_training_job_id + - path + title: Checkpoint type: object - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - description: Response from searching a vector store. - VectorStoreSearchResponse-Output: + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: - file_id: - type: string - title: File Id - filename: + type: + const: dialog + default: dialog + title: Type type: string - title: Filename - score: - type: number - title: Score - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - title: string | number | boolean - type: object - - type: 'null' - content: - items: - $ref: '#/components/schemas/VectorStoreContent' - type: array - title: Content + title: DialogType type: object - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - description: Response from searching a vector store. - VectorStoreSearchResponsePage: + Conversation: + description: OpenAI-compatible conversation object. properties: - object: + 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. title: Object - default: vector_store.search_results.page - search_query: - items: - type: string - type: array - title: Search Query - data: - items: - $ref: '#/components/schemas/VectorStoreSearchResponse-Output' - type: array - title: Data - has_more: - type: boolean - title: Has More - default: false - next_page: - anyOf: - - type: string - - type: 'null' - type: object - required: - - search_query - - data - title: VectorStoreSearchResponsePage - description: Paginated response from searching a vector store. - VersionInfo: - properties: - version: - type: string - title: Version - type: object - required: - - version - title: VersionInfo - description: Version information for the service. - ViolationLevel: - type: string - enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - _URLOrData: - properties: - url: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - type: object - title: _URLOrData - description: A URL or a base64 encoded string - _batches_Request: - properties: - input_file_id: - type: string - title: Input File Id - endpoint: type: string - title: Endpoint - completion_window: - type: string - const: 24h - title: Completion Window + 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' - idempotency_key: - anyOf: - - type: string - - type: 'null' - type: object - required: - - input_file_id - - endpoint - - completion_window - title: _batches_Request - _conversations_Request: - properties: + 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. + nullable: true items: anyOf: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) + additionalProperties: true + type: object type: array - type: 'null' - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - type: object - title: _conversations_Request - _conversations_conversation_id_Request: - properties: - metadata: - additionalProperties: - type: string - type: object - title: Metadata - type: object + description: Initial items to include in the conversation context. You may add up to 20 items at a time. + nullable: true required: - - metadata - title: _conversations_conversation_id_Request - _conversations_conversation_id_items_Request: + - id + - created_at + title: Conversation + type: object + ConversationDeletedResource: + description: Response for deleted conversation. properties: - items: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall + 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 + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' title: OpenAIResponseOutputMessageFunctionToolCall - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' @@ -6531,8 +5183,47 @@ components: title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array + required: + - items + title: ConversationItemCreateRequest + 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 + ConversationItemList: + 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: - propertyName: type mapping: file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' @@ -6541,3592 +5232,3369 @@ components: mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse' mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - message: '#/components/schemas/OpenAIResponseMessage-Input' + message: '#/components/schemas/OpenAIResponseMessage' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + title: Data type: array - title: Items - type: object + first_id: + anyOf: + - type: string + - type: 'null' + description: The ID of the first item in the list + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + description: The ID of the last item in the list + nullable: true + has_more: + default: false + description: Whether there are more items available + title: Has More + type: boolean required: - - items - title: _conversations_conversation_id_items_Request - _datasets_Request: - properties: - purpose: - title: Purpose - source: - title: Source - metadata: - title: Metadata - dataset_id: - title: Dataset Id + - data + title: ConversationItemList type: object - required: - - purpose - - source - title: _datasets_Request - _eval_benchmarks_benchmark_id_evaluations_Request: + ConversationMessage: + description: OpenAI-compatible message item for conversations. properties: - input_rows: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content items: additionalProperties: true type: object + title: Content type: array - title: Input Rows - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - type: object + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string required: - - input_rows - - scoring_functions - - benchmark_config - title: _eval_benchmarks_benchmark_id_evaluations_Request - _inference_rerank_Request: + - id + - content + - role + - status + title: ConversationMessage + type: object + DatasetPurpose: + description: Purpose of the dataset. Each purpose has a required input data schema. + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + title: DatasetPurpose + type: string + Dataset: + description: Dataset resource for storing and accessing training or evaluation data. properties: - model: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Model - query: + provider_resource_id: anyOf: - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - items: - items: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - type: array - title: Items - max_num_results: - anyOf: - - type: integer - type: 'null' - type: object + description: Unique identifier for this resource in the provider + nullable: true + 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: '#/components/schemas/DatasetPurpose' + source: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + metadata: + additionalProperties: true + description: Any additional metadata for this dataset + title: Metadata + type: object required: - - model - - query - - items - title: _inference_rerank_Request - _models_Request: + - identifier + - provider_id + - purpose + - source + title: Dataset + type: object + Error: + description: Error response from the API. Roughly follows RFC 7807. properties: - model_id: + status: + title: Status + type: integer + title: + title: Title + type: string + detail: + title: Detail type: string - title: Model Id - provider_model_id: + instance: anyOf: - type: string - type: 'null' - provider_id: + nullable: true + required: + - status + - title + - detail + title: Error + type: object + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + InlineProviderSpec: + properties: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' - metadata: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - model_type: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - - $ref: '#/components/schemas/ModelType' - title: ModelType + - type: string - type: 'null' - title: ModelType - type: object - required: - - model_id - title: _models_Request - _moderations_Request: - properties: - input: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - model: + - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: anyOf: - type: string - type: 'null' - type: object + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. + nullable: true + description: + anyOf: + - type: string + - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true required: - - input - title: _moderations_Request - _post_training_preference_optimize_Request: + - api + - provider_type + - config_class + title: InlineProviderSpec + type: object + ModelType: + description: Enumeration of supported model types in Llama Stack. + enum: + - llm + - embedding + - rerank + title: ModelType + type: string + Model: + description: A model resource representing an AI model registered in Llama Stack. properties: - job_uuid: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Job Uuid - finetuned_model: + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - title: Finetuned Model - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: + type: + const: model + default: model + title: Type + type: string + metadata: additionalProperties: true + description: Any additional metadata for this model + title: Metadata type: object - title: Logger Config - type: object + model_type: + $ref: '#/components/schemas/ModelType' + default: llm required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: _post_training_preference_optimize_Request - _post_training_supervised_fine_tune_Request: + - identifier + - provider_id + title: Model + type: object + ProviderSpec: properties: - job_uuid: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - title: Job Uuid - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - model: + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' - description: Model descriptor for training if not in provider config` - checkpoint_dir: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - type: string - type: 'null' - algorithm_config: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - discriminator: - propertyName: type - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - title: LoraFinetuningConfig | QATFinetuningConfig - - type: 'null' - title: Algorithm Config - type: object - required: - - job_uuid - - training_config - - hyperparam_search_config - - logger_config - title: _post_training_supervised_fine_tune_Request - _prompts_Request: - properties: - prompt: - type: string - title: Prompt - variables: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' - type: object - required: - - prompt - title: _prompts_Request - _prompts_prompt_id_Request: - properties: - prompt: - type: string - title: Prompt - version: - type: integer - title: Version - variables: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' - set_as_default: + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External type: boolean - title: Set As Default - default: true - type: object + deps__: + items: + type: string + title: Deps + type: array required: - - prompt - - version - title: _prompts_prompt_id_Request - _prompts_prompt_id_set_default_version_Request: - properties: - version: - type: integer - title: Version + - api + - provider_type + - config_class + title: ProviderSpec type: object - required: - - version - title: _prompts_prompt_id_set_default_version_Request - _responses_Request: + RemoteProviderSpec: properties: - input: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIResponseMessageInputUnion' - type: array - title: list[OpenAIResponseMessageInputUnion] - title: string | list[OpenAIResponseMessageInputUnion] - model: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - title: Model - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt - instructions: + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' - previous_response_id: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - type: string - type: 'null' - conversation: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - type: string - type: 'null' - store: - anyOf: - - type: boolean - - type: 'null' - default: true - stream: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - type: boolean + - type: string - type: 'null' + nullable: true + is_external: default: false - temperature: - anyOf: - - type: number - - type: 'null' - text: + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type + type: string + description: anyOf: - - $ref: '#/components/schemas/OpenAIResponseText' - title: OpenAIResponseText + - type: string - type: 'null' - title: OpenAIResponseText - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - discriminator: - propertyName: type - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - include: - anyOf: - - items: - type: string - type: array - - type: 'null' - max_infer_iters: - anyOf: - - type: integer - - type: 'null' - default: 10 - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - type: object - required: - - input - - model - title: _responses_Request - _scoring_score_Request: - properties: - input_rows: - items: - additionalProperties: true - type: object - type: array - title: Input Rows - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - title: Scoring Functions - type: object + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true required: - - input_rows - - scoring_functions - title: _scoring_score_Request - _scoring_score_batch_Request: - properties: - dataset_id: - type: string - title: Dataset Id - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - title: Scoring Functions - save_results_dataset: - type: boolean - title: Save Results Dataset - default: false + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec type: object - required: - - dataset_id - - scoring_functions - title: _scoring_score_batch_Request - _shields_Request: + ScoringFn: + description: A scoring function resource for evaluating model outputs. properties: - shield_id: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Shield Id - provider_shield_id: + provider_resource_id: anyOf: - type: string - type: 'null' + description: Unique identifier for this resource in the provider + 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: anyOf: - type: string - type: 'null' + 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: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) params: anyOf: - - additionalProperties: true - type: object + - discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' - type: object + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + title: Params + nullable: true required: - - shield_id - title: _shields_Request - _tool_runtime_invoke_Request: - properties: - tool_name: - type: string - title: Tool Name - kwargs: - additionalProperties: true - type: object - title: Kwargs + - identifier + - provider_id + - return_type + title: ScoringFn type: object - required: - - tool_name - - kwargs - title: _tool_runtime_invoke_Request - _vector_io_query_Request: + Shield: + description: A safety shield resource that can be used to check content. properties: - vector_store_id: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Vector Store Id - query: + provider_resource_id: anyOf: - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string + type: + const: shield + default: shield + title: Type + type: string params: anyOf: - additionalProperties: true type: object - type: 'null' - type: object + nullable: true required: - - vector_store_id - - query - title: _vector_io_query_Request - _vector_stores_vector_store_id_Request: + - identifier + - provider_id + title: Shield + type: object + ToolGroup: + description: A group of related tools managed together. properties: - name: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier + type: string + provider_resource_id: anyOf: - type: string - type: 'null' - expires_after: + description: Unique identifier for this resource in the provider + nullable: true + 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: - - additionalProperties: true - type: object + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - metadata: + nullable: true + title: URL + args: anyOf: - additionalProperties: true type: object - type: 'null' + nullable: true + required: + - identifier + - provider_id + title: ToolGroup type: object - title: _vector_stores_vector_store_id_Request - _vector_stores_vector_store_id_files_Request: + ModelCandidate: + description: A model candidate for evaluation. properties: - file_id: + type: + const: model + default: model + title: Type type: string - title: File Id - attributes: + model: + title: Model + type: string + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage - type: 'null' - title: Chunking Strategy - type: object + nullable: true + title: SystemMessage required: - - file_id - title: _vector_stores_vector_store_id_files_Request - _vector_stores_vector_store_id_files_file_id_Request: - properties: - attributes: - additionalProperties: true - type: object - title: Attributes + - model + - sampling_params + title: ModelCandidate type: object - required: - - attributes - title: _vector_stores_vector_store_id_files_file_id_Request - _vector_stores_vector_store_id_search_Request: + SamplingParams: + description: Sampling parameters. properties: - query: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - max_num_results: + strategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + max_tokens: anyOf: - type: integer - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - title: SearchRankingOptions - rewrite_query: + nullable: true + repetition_penalty: anyOf: - - type: boolean + - type: number - type: 'null' - default: false - search_mode: + default: 1.0 + stop: anyOf: - - type: string + - items: + type: string + type: array - type: 'null' - default: vector + nullable: true + title: SamplingParams type: object - required: - - query - title: _vector_stores_vector_store_id_search_Request - Error: - description: Error response from the API. Roughly follows RFC 7807. + SystemMessage: + description: A system message providing instructions or context to the model. properties: - status: - title: Status - type: integer - title: - title: Title - type: string - detail: - title: Detail + role: + const: system + default: system + title: Role type: string - instance: + content: anyOf: - type: string - - type: 'null' - nullable: true + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - - status - - title - - detail - title: Error + - content + title: SystemMessage type: object - ImageContentItem: - description: A image content item + BenchmarkConfig: + description: A benchmark configuration for evaluation. properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/components/schemas/_URLOrData' + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + description: Map between scoring function id and parameters for each scoring function you want to run + title: Scoring Params + type: object + num_examples: + anyOf: + - type: integer + - type: 'null' + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + nullable: true required: - - image - title: ImageContentItem + - eval_candidate + title: BenchmarkConfig type: object - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - BuiltinTool: - enum: - - brave_search - - wolfram_alpha - - photogen - - code_interpreter - title: BuiltinTool - type: string - ImageDelta: - description: An image content delta for streaming responses. + ScoringResult: + description: A scoring result for a single row. properties: - type: - const: image - default: image - title: Type - type: string - image: - format: binary - title: Image - type: string + score_rows: + items: + additionalProperties: true + type: object + title: Score Rows + type: array + aggregated_results: + additionalProperties: true + title: Aggregated Results + type: object required: - - image - title: ImageDelta + - score_rows + - aggregated_results + title: ScoringResult type: object - TextDelta: - description: A text content delta for streaming responses. + EvaluateResponse: + description: The response from an evaluation. properties: - type: - const: text - default: text - title: Type + generations: + items: + additionalProperties: true + type: object + title: Generations + type: array + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Scores + type: object + required: + - generations + - scores + title: EvaluateResponse + 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 - text: - title: Text + seconds: + maximum: 2592000 + minimum: 3600 + title: Seconds + type: integer + required: + - anchor + - seconds + title: ExpiresAfter + type: object + OpenAIFileObject: + description: OpenAI File object as defined in the OpenAI Files API. + 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: '#/components/schemas/OpenAIFilePurpose' required: - - text - title: TextDelta + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject type: object - ToolCall: + OpenAIFilePurpose: + description: Valid purpose values for OpenAI Files API. + enum: + - assistants + - batch + title: OpenAIFilePurpose + type: string + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. properties: - call_id: - title: Call Id + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - tool_name: - anyOf: - - $ref: '#/components/schemas/BuiltinTool' - title: BuiltinTool - - type: string - title: BuiltinTool | string - arguments: - title: Arguments + last_id: + title: Last Id + type: string + object: + const: list + default: list + title: Object type: string required: - - call_id - - tool_name - - arguments - title: ToolCall + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse type: object - ToolCallDelta: - description: A tool call content delta for streaming responses. + OpenAIFileDeleteResponse: + description: Response for deleting a file in OpenAI Files API. properties: - type: - const: tool_call - default: tool_call - title: Type + id: + title: Id type: string - tool_call: - anyOf: - - type: string - - $ref: '#/components/schemas/ToolCall' - title: ToolCall - title: string | ToolCall - parse_status: - $ref: '#/components/schemas/ToolCallParseStatus' + object: + const: file + default: file + title: Object + type: string + deleted: + title: Deleted + type: boolean required: - - tool_call - - parse_status - title: ToolCallDelta + - id + - deleted + title: OpenAIFileDeleteResponse type: object - ToolCallParseStatus: - description: Status of tool call parsing during streaming. - enum: - - started - - in_progress - - failed - - succeeded - title: ToolCallParseStatus - type: string - ContentDelta: - discriminator: - mapping: - image: '#/components/schemas/ImageDelta' - text: '#/components/schemas/TextDelta' - tool_call: '#/components/schemas/ToolCallDelta' - propertyName: type - oneOf: - - $ref: '#/components/schemas/TextDelta' - title: TextDelta - - $ref: '#/components/schemas/ImageDelta' - title: ImageDelta - - $ref: '#/components/schemas/ToolCallDelta' - title: ToolCallDelta - title: TextDelta | ImageDelta | ToolCallDelta - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). properties: type: - const: grammar - default: grammar + const: bf16 + default: bf16 title: Type type: string - bnf: - additionalProperties: true - title: Bnf - type: object + title: Bf16QuantizationConfig + type: object + EmbeddingsResponse: + description: Response containing generated embeddings. + properties: + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array required: - - bnf - title: GrammarResponseFormat + - embeddings + title: EmbeddingsResponse type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. properties: type: - const: json_schema - default: json_schema + const: fp8_mixed + default: fp8_mixed title: Type type: string - json_schema: - additionalProperties: true - title: Json Schema - type: object - required: - - json_schema - title: JsonSchemaResponseFormat + title: Fp8QuantizationConfig type: object - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. properties: - role: - const: assistant - default: assistant - title: Role + type: + const: int4_mixed + default: int4_mixed + title: Type type: string - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - nullable: true - name: + scheme: anyOf: - type: string - type: 'null' - nullable: true - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - nullable: true - title: OpenAIAssistantMessageParam + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig type: object - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. + OpenAIChatCompletionUsage: + description: Usage information for OpenAI chat completion. properties: - role: - const: user - default: user - title: Role - type: string - content: + 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: - - 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' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsagePromptTokensDetails + completion_tokens_details: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails required: - - content - title: OpenAIUserMessageParam + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage type: object - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - OpenAIResponseFormatParam: - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - VectorStoreFileStatus: - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - OpenAIResponseInputMessageContent: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - 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. + OpenAIChatCompletionUsageCompletionTokensDetails: + description: Token details for output tokens in OpenAI chat completion usage. 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' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - const: message - default: message - title: Type - type: string - id: + reasoning_tokens: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - status: + title: OpenAIChatCompletionUsageCompletionTokensDetails + type: object + OpenAIChatCompletionUsagePromptTokensDetails: + description: Token details for prompt tokens in OpenAI chat completion usage. + properties: + cached_tokens: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - required: - - content - - role - title: OpenAIResponseMessage + title: OpenAIChatCompletionUsagePromptTokensDetails type: object - OpenAIResponseOutput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseContentPartOutputText: - description: Text content within a streamed response part. + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. properties: - type: - const: output_text - default: output_text - title: Type + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + finish_reason: + title: Finish Reason type: string - text: - title: Text + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs + 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. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs + type: object + OpenAICompletionWithInputMessages: + properties: + id: + title: Id type: string - annotations: + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage + input_messages: items: discriminator: mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type + 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/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations + - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + title: Input Messages type: array - logprobs: + required: + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + 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: - additionalProperties: true - type: object + type: integer type: array - type: 'null' nullable: true + logprob: + title: Logprob + type: number + top_logprobs: + items: + $ref: '#/components/schemas/OpenAITopLogProb' + title: Top Logprobs + type: array required: - - text - title: OpenAIResponseContentPartOutputText + - token + - logprob + - top_logprobs + title: OpenAITokenLogProb type: object - OpenAIResponseContentPartReasoningText: - description: Reasoning text emitted as part of a streamed response. + 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: - type: - const: reasoning_text - default: reasoning_text - title: Type - type: string - text: - title: Text + token: + title: Token type: string + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + logprob: + title: Logprob + type: number required: - - text - title: OpenAIResponseContentPartReasoningText + - token + - logprob + title: OpenAITopLogProb type: object - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseContentPartReasoningSummary: - description: Reasoning summary part in a streamed response. + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. properties: - type: - const: summary_text - default: summary_text - title: Type + data: + items: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - text: - title: Text + last_id: + title: Last Id type: string - required: - - text - title: OpenAIResponseContentPartReasoningSummary - type: object - OpenAIResponseObjectStreamResponseCompleted: - description: Streaming event indicating a response has been completed. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.completed - default: response.completed - title: Type + object: + const: list + default: list + title: Object type: string required: - - response - title: OpenAIResponseObjectStreamResponseCompleted + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse type: object - OpenAIResponseObjectStreamResponseContentPartAdded: - description: Streaming event for when a new content part is added to a response item. + OpenAIChatCompletion: + description: Response from an OpenAI-compatible chat completion request. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id + id: + title: Id type: string - item_id: - title: Item Id + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number + created: + title: Created type: integer - type: - const: response.content_part.added - default: response.content_part.added - title: Type + model: + title: Model type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartAdded + - id + - choices + - created + - model + title: OpenAIChatCompletion type: object - OpenAIResponseObjectStreamResponseContentPartDone: - description: Streaming event for when a content part is completed. + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer - type: - const: response.content_part.done - default: response.content_part.done - title: Type - type: string - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartDone + content: + anyOf: + - type: string + - type: 'null' + nullable: true + refusal: + anyOf: + - type: string + - type: 'null' + nullable: true + role: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + reasoning_content: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIChoiceDelta type: object - OpenAIResponseObjectStreamResponseCreated: - description: Streaming event indicating a new response has been created. + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.created - default: response.created - title: Type + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason type: string - required: - - response - title: OpenAIResponseObjectStreamResponseCreated - type: object - OpenAIResponseObjectStreamResponseFailed: - description: Streaming event emitted when a response fails. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number + index: + title: Index type: integer - type: - const: response.failed - default: response.failed - title: Type - type: string + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseFailed + - delta + - finish_reason + - index + title: OpenAIChunkChoice type: object - OpenAIResponseObjectStreamResponseFileSearchCallCompleted: - description: Streaming event for completed file search calls. + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: - item_id: - title: Item Id + id: + title: Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.completed - default: response.file_search_call.completed - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - type: object - OpenAIResponseObjectStreamResponseFileSearchCallInProgress: - description: Streaming event for file search calls in progress. - properties: - item_id: - title: Item Id + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + created: + title: Created type: integer - type: - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - title: Type + model: + title: Model type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk type: object - OpenAIResponseObjectStreamResponseFileSearchCallSearching: - description: Streaming event for file search currently searching. + OpenAIChatCompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible chat completion endpoint. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.searching - default: response.file_search_call.searching - title: Type + model: + title: Model type: string + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + minItems: 1 + title: Messages + type: array + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + function_call: + anyOf: + - type: string + - additionalProperties: true + type: object + - type: 'null' + title: string | object + nullable: true + functions: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + response_format: + anyOf: + - discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: 'null' + title: Response Format + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + tool_choice: + anyOf: + - type: string + - additionalProperties: true + type: object + - type: 'null' + title: string | object + nullable: true + tools: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - type: integer + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: - description: Streaming event for incremental function call argument updates. + 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: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - title: Type - type: string - required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: - description: Streaming event for when function call arguments are completed. - properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.done - default: response.function_call_arguments.done - title: Type - type: string - required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - type: object - OpenAIResponseObjectStreamResponseInProgress: - description: Streaming event indicating the response remains in progress. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.in_progress - default: response.in_progress - title: Type - type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseInProgress - type: object - OpenAIResponseObjectStreamResponseIncomplete: - description: Streaming event emitted when a response ends in an incomplete state. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.incomplete - default: response.incomplete - title: Type - type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseIncomplete - type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: - properties: - delta: - title: Delta + finish_reason: + title: Finish Reason type: string - item_id: - title: Item Id + text: + title: Text type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + index: + title: Index type: integer - type: - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - title: Type - type: string + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - finish_reason + - text + - index + title: OpenAICompletionChoice type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + OpenAICompletion: + 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: - arguments: - title: Arguments - type: string - item_id: - title: Item Id + id: + title: Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + choices: + items: + $ref: '#/components/schemas/OpenAICompletionChoice' + title: Choices + type: array + created: + title: Created type: integer - type: - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - title: Type + model: + title: Model type: string - required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - type: object - OpenAIResponseObjectStreamResponseMcpCallCompleted: - description: Streaming event for completed MCP calls. - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.completed - default: response.mcp_call.completed - title: Type + object: + const: text_completion + default: text_completion + title: Object type: string required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - id + - choices + - created + - model + title: OpenAICompletion type: object - OpenAIResponseObjectStreamResponseMcpCallFailed: - description: Streaming event for failed MCP calls. + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.failed - default: response.mcp_call.failed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallFailed + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs type: object - OpenAIResponseObjectStreamResponseMcpCallInProgress: - description: Streaming event for MCP calls in progress. + OpenAICompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible completion endpoint. properties: - item_id: - title: Item Id + model: + title: Model type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - title: Type + prompt: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - items: + type: integer + type: array + title: list[integer] + - items: + items: + type: integer + type: array + type: array + title: list[array] + title: string | ... (4 variants) + best_of: + anyOf: + - type: integer + - type: 'null' + nullable: true + echo: + anyOf: + - type: boolean + - type: 'null' + nullable: true + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true + suffix: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - model + - prompt + title: OpenAICompletionRequestWithExtraBody + type: object + OpenAIEmbeddingData: + description: A single embedding data object from an OpenAI-compatible embeddings response. + properties: + object: + const: embedding + default: embedding + title: Object type: string + embedding: + anyOf: + - items: + type: number + type: array + title: list[number] + - type: string + title: list[number] | string + index: + title: Index + type: integer required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - embedding + - index + title: OpenAIEmbeddingData type: object - OpenAIResponseObjectStreamResponseMcpListToolsCompleted: + OpenAIEmbeddingUsage: + description: Usage information for an OpenAI-compatible embeddings response. properties: - sequence_number: - title: Sequence Number + prompt_tokens: + title: Prompt Tokens type: integer - type: - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - title: Type + total_tokens: + title: Total Tokens + type: integer + required: + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage + type: object + OpenAIEmbeddingsRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible embeddings endpoint. + properties: + model: + title: Model type: string + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + encoding_format: + anyOf: + - type: string + - type: 'null' + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseMcpListToolsFailed: + OpenAIEmbeddingsResponse: + description: Response from an OpenAI-compatible embeddings request. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - title: Type + object: + const: list + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + title: Data + type: array + model: + title: Model type: string + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - data + - model + - usage + title: OpenAIEmbeddingsResponse type: object - OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + RerankData: + description: A single rerank result from a reranking response. properties: - sequence_number: - title: Sequence Number + index: + title: Index type: integer - type: - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - title: Type - type: string + relevance_score: + title: Relevance Score + type: number required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - index + - relevance_score + title: RerankData type: object - OpenAIResponseObjectStreamResponseOutputItemAdded: - description: Streaming event for when a new output item is added to the response. + RerankResponse: + description: Response from a reranking request. properties: - response_id: - title: Response Id - type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.added - default: response.output_item.added - title: Type - type: string - required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemAdded - type: object - OpenAIResponseObjectStreamResponseOutputItemDone: - description: Streaming event for when an output item is completed. - properties: - response_id: - title: Response Id - type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.done - default: response.output_item.done - title: Type - type: string - required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemDone - type: object - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: - description: Streaming event for when an annotation is added to output text. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - content_index: - title: Content Index - type: integer - annotation_index: - title: Annotation Index - type: integer - annotation: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.annotation.added - default: response.output_text.annotation.added - title: Type - type: string + data: + items: + $ref: '#/components/schemas/RerankData' + title: Data + type: array required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - data + title: RerankResponse type: object - OpenAIResponseObjectStreamResponseOutputTextDelta: - description: Streaming event for incremental text content updates. + TokenLogProbs: + description: Log probabilities for generated tokens. properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.delta - default: response.output_text.delta - title: Type - type: string + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDelta + - logprobs_by_token + title: TokenLogProbs type: object - OpenAIResponseObjectStreamResponseOutputTextDone: - description: Streaming event for when text output is completed. + ToolResponseMessage: + description: A message representing the result of a tool invocation. properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id + role: + const: tool + default: tool + title: Role type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.done - default: response.output_text.done - title: Type + call_id: + title: Call Id type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDone + - call_id + - content + title: ToolResponseMessage type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: - description: Streaming event for when a new reasoning summary part is added. + UserMessage: + description: A message from the user in a chat conversation. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - title: Type + role: + const: user + default: user + title: Role type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - content + title: UserMessage type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: - description: Streaming event for when a reasoning summary part is completed. + HealthStatus: + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + type: string + HealthInfo: + description: Health status information for the service. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - title: Type - type: string + status: + $ref: '#/components/schemas/HealthStatus' required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - status + title: HealthInfo type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: - description: Streaming event for incremental reasoning summary text updates. + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - delta: - title: Delta - type: string - item_id: - title: Item Id + route: + title: Route type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - title: Type + method: + title: Method type: string + provider_types: + items: + type: string + title: Provider Types + type: array required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - route + - method + - provider_types + title: RouteInfo type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: - description: Streaming event for when reasoning summary text is completed. + ListRoutesResponse: + description: Response containing a list of all available API routes. properties: - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - title: Type + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array + required: + - data + title: ListRoutesResponse + type: object + VersionInfo: + description: Version information for the service. + properties: + version: + title: Version type: string required: - - text - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - version + title: VersionInfo type: object - OpenAIResponseObjectStreamResponseReasoningTextDelta: - description: Streaming event for incremental reasoning text updates. + OpenAIModel: + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta + id: + title: Id type: string - item_id: - title: Item Id + object: + const: model + default: model + title: Object type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + created: + title: Created type: integer - type: - const: response.reasoning_text.delta - default: response.reasoning_text.delta - title: Type + owned_by: + title: Owned By type: string + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - id + - created + - owned_by + title: OpenAIModel type: object - OpenAIResponseObjectStreamResponseReasoningTextDone: - description: Streaming event for when reasoning text is completed. + DPOLossType: + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + type: string + DPOAlignmentConfig: + description: Configuration for Direct Preference Optimization (DPO) alignment. properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.done - default: response.reasoning_text.done - title: Type - type: string + beta: + title: Beta + type: number + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDone + - beta + title: DPOAlignmentConfig type: object - OpenAIResponseObjectStreamResponseRefusalDelta: - description: Streaming event for incremental refusal text updates. + DatasetFormat: + description: Format of the training dataset. + enum: + - instruct + - dialog + title: DatasetFormat + type: string + DataConfig: + description: Configuration for training data and data loading. properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id + dataset_id: + title: Dataset Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + batch_size: + title: Batch Size type: integer - type: - const: response.refusal.delta - default: response.refusal.delta - title: Type - type: string + shuffle: + title: Shuffle + type: boolean + data_format: + $ref: '#/components/schemas/DatasetFormat' + validation_dataset_id: + anyOf: + - type: string + - type: 'null' + nullable: true + packed: + anyOf: + - type: boolean + - type: 'null' + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + default: false required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDelta + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig type: object - OpenAIResponseObjectStreamResponseRefusalDone: - description: Streaming event for when refusal text is completed. + EfficiencyConfig: + description: Configuration for memory and compute efficiency optimizations. properties: - content_index: - title: Content Index - type: integer - refusal: - title: Refusal - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.done - default: response.refusal.done - title: Type - type: string - required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDone + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + default: false + title: EfficiencyConfig type: object - OpenAIResponseObjectStreamResponseWebSearchCallCompleted: - description: Streaming event for completed web search calls. + OptimizerType: + description: Available optimizer algorithms for training. + enum: + - adam + - adamw + - sgd + title: OptimizerType + type: string + OptimizerConfig: + description: Configuration parameters for the optimization algorithm. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + lr: + title: Lr + type: number + weight_decay: + title: Weight Decay + type: number + num_warmup_steps: + title: Num Warmup Steps type: integer - type: - const: response.web_search_call.completed - default: response.web_search_call.completed - title: Type - type: string required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig type: object - OpenAIResponseObjectStreamResponseWebSearchCallInProgress: - description: Streaming event for web search calls in progress. + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - title: Type + job_uuid: + title: Job Uuid type: string + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - job_uuid + title: PostTrainingJobArtifactsResponse type: object - OpenAIResponseObjectStreamResponseWebSearchCallSearching: + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.searching - default: response.web_search_call.searching - title: Type + job_uuid: + title: Job Uuid type: string + log_lines: + items: + type: string + title: Log Lines + type: array required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - job_uuid + - log_lines + title: PostTrainingJobLogStream type: object - OpenAIResponseObjectStream: - discriminator: - mapping: - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - title: OpenAIResponseObjectStreamResponseCreated - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - title: OpenAIResponseObjectStreamResponseInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - title: OpenAIResponseObjectStreamResponseOutputItemAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - title: OpenAIResponseObjectStreamResponseOutputItemDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - title: OpenAIResponseObjectStreamResponseOutputTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - title: OpenAIResponseObjectStreamResponseOutputTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - title: OpenAIResponseObjectStreamResponseMcpCallFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - title: OpenAIResponseObjectStreamResponseContentPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - title: OpenAIResponseObjectStreamResponseContentPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - title: OpenAIResponseObjectStreamResponseReasoningTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - title: OpenAIResponseObjectStreamResponseRefusalDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - title: OpenAIResponseObjectStreamResponseRefusalDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - title: OpenAIResponseObjectStreamResponseIncomplete - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - title: OpenAIResponseObjectStreamResponseFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - title: OpenAIResponseObjectStreamResponseCompleted - title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - SpanEndPayload: - description: Payload for a span end event. + PostTrainingJobStatusResponse: + description: Status of a finetuning job. properties: - type: - const: span_end - default: span_end - title: Type + job_uuid: + title: Job Uuid type: string status: - $ref: '#/components/schemas/SpanStatus' + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + started_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + completed_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + TrainingConfig: + description: Comprehensive configuration for the training process. + properties: + n_epochs: + title: N Epochs + type: integer + max_steps_per_epoch: + default: 1 + title: Max Steps Per Epoch + type: integer + gradient_accumulation_steps: + default: 1 + title: Gradient Accumulation Steps + type: integer + max_validation_steps: + anyOf: + - type: integer + - type: 'null' + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + title: DataConfig + - type: 'null' + nullable: true + title: DataConfig + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig + - type: 'null' + nullable: true + title: OptimizerConfig + efficiency_config: + anyOf: + - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig + - type: 'null' + nullable: true + title: EfficiencyConfig + dtype: + anyOf: + - type: string + - type: 'null' + default: bf16 + required: + - n_epochs + title: TrainingConfig + type: object + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. + properties: + job_uuid: + title: Job Uuid + type: string + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object required: - - status - title: SpanEndPayload + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest type: object - SpanStartPayload: - description: Payload for a span start event. + Prompt: + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. properties: - type: - const: span_start - default: span_start - title: Type - type: string - name: - title: Name - type: string - parent_span_id: + prompt: anyOf: - type: string - type: 'null' + description: The system prompt with variable placeholders nullable: true + version: + description: Version (integer starting at 1, incremented on save) + minimum: 1 + title: Version + type: integer + prompt_id: + description: Unique identifier in format 'pmpt_<48-digit-hash>' + title: Prompt Id + type: string + variables: + description: List of variable names that can be used in the prompt template + items: + type: string + title: Variables + type: array + is_default: + default: false + description: Boolean indicating whether this version is the default version + title: Is Default + type: boolean required: - - name - title: SpanStartPayload + - version + - prompt_id + title: Prompt type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. + ProviderInfo: + description: Information about a registered provider including its configuration and health status. properties: - trace_id: - title: Trace Id + api: + title: Api type: string - span_id: - title: Span Id + provider_id: + title: Provider Id type: string - timestamp: - format: date-time - title: Timestamp + provider_type: + title: Provider Type type: string - attributes: + config: + additionalProperties: true + title: Config + type: object + health: + additionalProperties: true + title: Health + type: object + required: + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo + type: object + ModerationObjectResults: + description: A moderation object. + properties: + flagged: + title: Flagged + type: boolean + categories: anyOf: - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) + type: boolean type: object - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: + nullable: true + category_applied_input_types: anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + nullable: true + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent + - flagged + title: ModerationObjectResults type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. + ModerationObject: + description: A moderation object. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id + id: + title: Id type: string - timestamp: - format: date-time - title: Timestamp + model: + title: Model type: string - attributes: + results: + items: + $ref: '#/components/schemas/ModerationObjectResults' + title: Results + type: array + required: + - id + - model + - results + title: ModerationObject + type: object + SafetyViolation: + description: Details of a safety violation detected by content moderation. + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent + - violation_level + title: SafetyViolation type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. + ViolationLevel: + description: Severity level of a safety violation. + enum: + - info + - warn + - error + title: ViolationLevel + type: string + RunShieldResponse: + description: Response from running a safety shield. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: + violation: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object + - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message - type: string - severity: - $ref: '#/components/schemas/LogSeverity' + nullable: true + title: SafetyViolation + title: RunShieldResponse + type: object + ScoreBatchResponse: + description: Response from batch scoring operations on datasets. + properties: + dataset_id: + anyOf: + - type: string + - type: 'null' + nullable: true + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent + - results + title: ScoreBatchResponse type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. + ScoreResponse: + description: The response from scoring. properties: - type: - title: Type - type: string + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object required: - - type - title: ResponseGuardrailSpec + - results + title: ScoreResponse type: object - OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. + ToolDef: + description: Tool definition used in runtime contexts. properties: - created_at: - title: Created At - type: integer - error: + toolgroup_id: anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError + - type: string - type: 'null' nullable: true - title: OpenAIResponseError - id: - title: Id - type: string - model: - title: Model - type: string - object: - const: response - default: response - title: Object + name: + title: Name 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output - type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: + description: anyOf: - type: string - type: 'null' nullable: true - prompt: + input_schema: anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIResponsePrompt - status: - title: Status + output_schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + required: + - name + title: ToolDef + type: object + ListToolDefsResponse: + description: Response containing a list of tool definitions. + properties: + data: + items: + $ref: '#/components/schemas/ToolDef' + title: Data + type: array + required: + - data + title: ListToolDefsResponse + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id type: string - temperature: + provider_id: + title: Provider Id + type: string + args: anyOf: - - type: number + - additionalProperties: true + type: object - type: 'null' nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: + mcp_endpoint: anyOf: - - type: number + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true - tools: + title: URL + required: + - toolgroup_id + - provider_id + title: ToolGroupInput + type: object + ToolInvocationResult: + description: Result of a tool invocation. + properties: + content: anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array + title: list[ImageContentItem | TextContentItem] - type: 'null' + title: string | list[ImageContentItem | TextContentItem] nullable: true - truncation: + error_message: anyOf: - type: string - type: 'null' nullable: true - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - nullable: true - title: OpenAIResponseUsage - instructions: + error_code: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - max_tool_calls: + metadata: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Input - type: array - required: - - created_at - - id - - model - - output - - status - - input - title: OpenAIResponseObjectWithInput + title: ToolInvocationResult type: object - MetricInResponse: - description: A metric value included in API responses. + 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. properties: - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: + chunk_id: anyOf: - type: string - type: 'null' nullable: true - required: - - metric - - value - title: MetricInResponse - type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. - properties: - type: - const: dialog - default: dialog - title: Type - type: string - title: DialogType - type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. - properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array - required: - - items - title: ConversationItemCreateRequest - type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. - properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status - type: string - type: - const: message - default: message - title: Type - type: string - object: - const: message - default: message - title: Object - type: string - required: - - id - - content - - role - - status - title: ConversationMessage - type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). - properties: - type: - const: bf16 - default: bf16 - title: Type - type: string - title: Bf16QuantizationConfig - type: object - EmbeddingsResponse: - description: Response containing generated embeddings. - properties: - embeddings: - items: - items: - type: number - type: array - title: Embeddings - type: array - required: - - embeddings - title: EmbeddingsResponse - type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. - properties: - type: - const: fp8_mixed - default: fp8_mixed - title: Type - type: string - title: Fp8QuantizationConfig - type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. - properties: - type: - const: int4_mixed - default: int4_mixed - title: Type - type: string - scheme: + document_id: + anyOf: + - type: string + - type: 'null' + nullable: true + source: anyOf: - type: string - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig - type: object - OpenAIChoiceDelta: - description: A delta from an OpenAI-compatible chat completion streaming response. - properties: - content: + nullable: true + created_timestamp: + anyOf: + - type: integer + - type: 'null' + nullable: true + updated_timestamp: + anyOf: + - type: integer + - type: 'null' + nullable: true + chunk_window: anyOf: - type: string - type: 'null' nullable: true - refusal: + chunk_tokenizer: anyOf: - type: string - type: 'null' nullable: true - role: + chunk_embedding_model: anyOf: - type: string - type: 'null' nullable: true - tool_calls: + chunk_embedding_dimension: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - type: integer - type: 'null' nullable: true - reasoning_content: + content_token_count: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - title: OpenAIChoiceDelta + metadata_token_count: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: ChunkMetadata type: object - OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + Chunk: + description: A chunk of content that can be inserted into a vector database. properties: content: anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: - $ref: '#/components/schemas/OpenAITokenLogProb' + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - - type: 'null' - nullable: true - refusal: + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: anyOf: - items: - $ref: '#/components/schemas/OpenAITokenLogProb' + type: number type: array - type: 'null' nullable: true - title: OpenAIChoiceLogprobs - type: object - OpenAIChunkChoice: - description: A chunk choice from an OpenAI-compatible chat completion streaming response. - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + chunk_metadata: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true - title: OpenAIChoiceLogprobs + title: ChunkMetadata required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice + - content + - chunk_id + title: Chunk type: object - OpenAIChatCompletionChunk: - description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store file batch with extra_body support. properties: - id: - title: Id - type: string - choices: + file_ids: items: - $ref: '#/components/schemas/OpenAIChunkChoice' - title: Choices + type: string + title: File Ids type: array - object: - const: chat.completion.chunk - default: chat.completion.chunk - title: Object - type: string - created: - title: Created - type: integer - model: - title: Model - type: string - usage: + attributes: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChatCompletionUsage + chunking_strategy: + anyOf: + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + nullable: true required: - - id - - choices - - created - - model - title: OpenAIChatCompletionChunk + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. + OpenAICreateVectorStoreRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store with extra_body support. 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + name: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - type: string - type: 'null' nullable: true - title: OpenAIChoiceLogprobs + file_ids: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: + anyOf: + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: OpenAICreateVectorStoreRequestWithExtraBody + type: object + QueryChunksResponse: + description: Response from querying chunks in a vector database. + properties: + chunks: + items: + $ref: '#/components/schemas/Chunk' + title: Chunks + type: array + scores: + items: + type: number + title: Scores + type: array required: - - message - - finish_reason - - index - title: OpenAIChoice + - chunks + - scores + title: QueryChunksResponse 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 + VectorStoreContent: + description: Content item from a vector store file or search result. properties: - finish_reason: - title: Finish Reason + type: + const: text + title: Type type: string text: title: Text type: string - index: - title: Index - type: integer - logprobs: + embedding: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - items: + type: number + type: array + - type: 'null' + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + nullable: true + title: ChunkMetadata + metadata: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceLogprobs required: - - finish_reason + - type - text - - index - title: OpenAICompletionChoice + title: VectorStoreContent type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens + VectorStoreCreateRequest: + description: Request to create a vector store. properties: - text_offset: - anyOf: - - items: - type: integer - type: array - - type: 'null' - nullable: true - token_logprobs: + name: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - tokens: + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: anyOf: - - items: - type: string - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - top_logprobs: + chunking_strategy: anyOf: - - items: - additionalProperties: - type: number - type: object - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAICompletionLogprobs - type: object - TokenLogProbs: - description: Log probabilities for generated tokens. - properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token + metadata: + additionalProperties: true + title: Metadata type: object - required: - - logprobs_by_token - title: TokenLogProbs + title: VectorStoreCreateRequest type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. + VectorStoreDeleteResponse: + description: Response from deleting a vector store. properties: - role: - const: tool - default: tool - title: Role + id: + title: Id type: string - call_id: - title: Call Id + object: + default: vector_store.deleted + title: Object type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + deleted: + default: true + title: Deleted + type: boolean required: - - call_id - - content - title: ToolResponseMessage + - id + title: VectorStoreDeleteResponse type: object - UserMessage: - description: A message from the user in a chat conversation. + VectorStoreFileCounts: + description: File processing status counts for a vector store. properties: - role: - const: user - default: user - title: Role + 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 + VectorStoreFileBatchObject: + description: OpenAI Vector Store File Batch object. + properties: + id: + title: Id type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: + 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: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + required: + - id + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + type: object + VectorStoreFileContentResponse: + description: Represents the parsed content of a vector store file. + properties: + object: + const: vector_store.file_content.page + default: vector_store.file_content.page + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - type: 'null' - title: string | list[ImageContentItem | TextContentItem] nullable: true required: - - content - title: UserMessage + - data + title: VectorStoreFileContentResponse type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. + VectorStoreFileDeleteResponse: + description: Response from deleting a vector store file. properties: - job_uuid: - title: Job Uuid + id: + title: Id type: string - log_lines: - items: - type: string - title: Log Lines - type: array + object: + default: vector_store.file.deleted + title: Object + type: string + deleted: + default: true + title: Deleted + type: boolean required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream + - id + title: VectorStoreFileDeleteResponse type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. + VectorStoreFileLastError: + description: Error information for failed vector store file processing. properties: - job_uuid: - title: Job Uuid - type: string - finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id + code: + title: Code type: string - validation_dataset_id: - title: Validation Dataset Id + enum: + - server_error + - rate_limit_exceeded + default: server_error + message: + title: Message type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - title: Hyperparam Search Config - type: object - logger_config: - additionalProperties: true - title: Logger Config - type: object required: - - job_uuid - - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - - algorithm_config - - optimizer_config - - training_config - - hyperparam_search_config - - logger_config - title: PostTrainingRLHFRequest + - code + - message + title: VectorStoreFileLastError type: object - ToolGroupInput: - description: Input data for registering a tool group. + VectorStoreFileObject: + description: OpenAI Vector Store File object. properties: - toolgroup_id: - title: Toolgroup Id + id: + title: Id type: string - provider_id: - title: Provider Id + object: + default: vector_store.file + title: Object type: string - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: + attributes: + additionalProperties: true + title: Attributes + type: object + chunking_strategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + created_at: + title: Created At + type: integer + last_error: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' nullable: true - title: URL + title: VectorStoreFileLastError + status: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + vector_store_id: + title: Vector Store Id + type: string required: - - toolgroup_id - - provider_id - title: ToolGroupInput + - id + - chunking_strategy + - created_at + - status + - vector_store_id + title: VectorStoreFileObject type: object - Chunk: - description: A chunk of content that can be inserted into a vector database. + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. properties: - content: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id + - type: 'null' + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + 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. + properties: + object: + default: list + title: Object type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - chunk_metadata: + last_id: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' nullable: true - title: ChunkMetadata + has_more: + default: false + title: Has More + type: boolean required: - - content - - chunk_id - title: Chunk + - data + title: VectorStoreListFilesResponse type: object - VectorStoreCreateRequest: - description: Request to create a vector store. + VectorStoreObject: + description: OpenAI Vector Store object. 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' nullable: true - file_ids: - items: - type: string - title: File Ids - type: array + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + default: completed + title: Status + type: string expires_after: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - chunking_strategy: + expires_at: anyOf: - - additionalProperties: true - type: object + - type: integer + - type: 'null' + nullable: true + last_active_at: + anyOf: + - type: integer - type: 'null' nullable: true metadata: additionalProperties: true title: Metadata type: object - title: VectorStoreCreateRequest + required: + - id + - created_at + - file_counts + title: VectorStoreObject + type: object + VectorStoreListResponse: + description: Response from listing vector stores. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + nullable: true + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListResponse type: object VectorStoreModifyRequest: description: Request to modify a vector store. @@ -10220,149 +8688,34 @@ components: - content title: VectorStoreSearchResponse type: object - _safety_run_shield_Request: + VectorStoreSearchResponsePage: + description: Paginated response from searching a vector store. properties: - shield_id: - title: Shield Id + object: + default: vector_store.search_results.page + title: Object type: string - messages: + search_query: 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Messages + type: string + title: Search Query type: array - params: - additionalProperties: true - title: Params - type: object + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - shield_id - - messages - - params - title: _safety_run_shield_Request + - search_query + - data + title: VectorStoreSearchResponsePage type: object - OpenAIResponseMessageOutputUnion: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - x-stainless-naming: OpenAIResponseMessageOutputOneOf - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse - x-stainless-naming: OpenAIResponseMessageOutputUnion - OpenAIResponseMessageInputUnion: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - x-stainless-naming: OpenAIResponseMessageInputOneOf - title: OpenAIResponseMessage-Input | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse - x-stainless-naming: OpenAIResponseMessageInputUnion - responses: - BadRequest400: - description: The request was invalid or malformed - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 400 - 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 - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 429 - title: Too Many Requests - detail: You have exceeded the rate limit. Please try again later. - InternalServerError500: - description: The server encountered an unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 500 - title: Internal Server Error - detail: An unexpected error occurred - DefaultError: - description: An error occurred - content: - application/json: - schema: - $ref: '#/components/schemas/Error' diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index d0ed2b6140..b5862cb52c 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -18,21 +18,13 @@ paths: tags: - Inference summary: Rerank - description: Rerank a list of documents based on their relevance to a query. 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: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/RerankResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -50,18 +42,7 @@ paths: tags: - Datasetio summary: Append Rows - description: Append rows to a dataset. operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post - requestBody: - content: - application/json: - schema: - items: - additionalProperties: true - type: object - type: array - title: Rows - required: true responses: '200': description: Successful Response @@ -92,73 +73,44 @@ paths: tags: - Datasetio summary: Iterrows - 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. operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get - parameters: - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - title: Limit - - name: start_index - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - title: Start Index - - name: dataset_id - in: path - required: true - schema: - type: string - description: 'Path parameter: dataset_id' responses: '200': - description: A PaginatedResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/PaginatedResponse' + schema: {} '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: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' /v1beta/datasets/{dataset_id}: get: tags: - Datasets summary: Get Dataset - description: Get a dataset by its ID. operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': - description: A Dataset. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Dataset' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -183,15 +135,13 @@ paths: tags: - Datasets summary: List Datasets - description: List all datasets. operationId: list_datasets_v1beta_datasets_get responses: '200': - description: A ListDatasetsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListDatasetsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -209,21 +159,13 @@ paths: tags: - Eval summary: Evaluate Rows - description: Evaluate a list of rows on a benchmark. operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_eval_benchmarks_benchmark_id_evaluations_Request' - required: true responses: '200': - description: EvaluateResponse object containing generations and scores. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -248,15 +190,13 @@ paths: tags: - Eval summary: Job Status - description: Get the status of a job. operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': - description: The status of the evaluation job. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Job' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -286,7 +226,6 @@ paths: tags: - Eval summary: Job Cancel - description: Cancel a job. operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete responses: '200': @@ -324,15 +263,13 @@ paths: tags: - Eval summary: Job Result - description: Get the result of a job. operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get responses: '200': - description: The result of the job. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -363,21 +300,13 @@ paths: tags: - Eval summary: Run Eval - description: Run an evaluation on a benchmark. operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BenchmarkConfig' - required: true responses: '200': - description: The job that was created to run the evaluation. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Job' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -402,15 +331,13 @@ paths: tags: - Benchmarks summary: Get Benchmark - description: Get a benchmark by its ID. operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': - description: A Benchmark. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Benchmark' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -435,41 +362,31 @@ paths: tags: - Benchmarks summary: List Benchmarks - description: List all benchmarks. operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': - description: A ListBenchmarksResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListBenchmarksResponse' + schema: {} '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/cancel: post: tags: - Post Training summary: Cancel Training Job - description: Cancel a training job. operationId: cancel_training_job_v1alpha_post_training_job_cancel_post - parameters: - - name: job_uuid - in: query - required: true - schema: - type: string - title: Job Uuid responses: '200': description: Successful Response @@ -477,97 +394,77 @@ paths: application/json: schema: {} '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: - Post Training summary: Get Training Job Artifacts - description: Get the artifacts of a training job. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + schema: {} '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/status: get: tags: - Post Training summary: Get Training Job Status - description: Get the status of a training job. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/PostTrainingJobStatusResponse' + schema: {} '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/jobs: get: tags: - Post Training summary: Get Training Jobs - description: Get all training jobs. operationId: get_training_jobs_v1alpha_post_training_jobs_get responses: '200': - description: A ListPostTrainingJobsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListPostTrainingJobsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -585,21 +482,13 @@ paths: tags: - Post Training summary: Preference Optimize - description: Run preference optimization of a model. operationId: preference_optimize_v1alpha_post_training_preference_optimize_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_post_training_preference_optimize_Request' - required: true responses: '200': - description: A PostTrainingJob. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -617,21 +506,13 @@ paths: tags: - Post Training summary: Supervised Fine Tune - description: Run supervised fine-tuning of a model. operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_post_training_supervised_fine_tune_Request' - required: true responses: '200': - description: A PostTrainingJob. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -645,3373 +526,2744 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' components: + responses: + BadRequest400: + description: The request was invalid or malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 400 + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 429 + title: Too Many Requests + detail: You have exceeded the rate limit. Please try again later. + InternalServerError500: + description: The server encountered an unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 500 + title: Internal Server Error + detail: An unexpected error occurred + DefaultError: + description: An error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/Error' schemas: - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: Types of aggregation functions for scoring results. - AllowedToolsFilter: - properties: - tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' - type: object - title: AllowedToolsFilter - description: Filter configuration for restricting which MCP tools can be used. - ApprovalFilter: - properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - type: object - title: ApprovalFilter - description: Filter configuration for MCP tool approval requirements. - ArrayType: + ImageContentItem: + description: A image content item properties: type: - type: string - const: array + const: image + default: image title: Type - default: array + type: string + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem type: object - title: ArrayType - description: Parameter type for array values. - BasicScoringFnParams: + TextContentItem: + description: A text content item properties: type: - type: string - const: basic + const: text + default: text 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. - Batch: - properties: - id: type: string - title: Id - completion_window: + text: + title: Text type: string - title: Completion Window - created_at: - type: integer - title: Created At - endpoint: + required: + - text + title: TextContentItem + type: object + URL: + description: A URL reference to external content. + properties: + uri: + title: Uri 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: - anyOf: - - type: integer - - type: 'null' - cancelling_at: - anyOf: - - type: integer - - type: 'null' - completed_at: - anyOf: - - type: integer - - type: 'null' - error_file_id: - anyOf: - - type: string - - type: 'null' - errors: - anyOf: - - $ref: '#/components/schemas/Errors' - title: Errors - - type: 'null' - title: Errors - expired_at: - anyOf: - - type: integer - - type: 'null' - expires_at: - anyOf: - - type: integer - - type: 'null' - failed_at: - anyOf: - - type: integer - - type: 'null' - finalizing_at: - anyOf: - - type: integer - - type: 'null' - in_progress_at: - anyOf: - - type: integer - - type: 'null' - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - model: - anyOf: - - type: string - - type: 'null' - output_file_id: - anyOf: - - type: string - - type: 'null' - request_counts: - anyOf: - - $ref: '#/components/schemas/BatchRequestCounts' - title: BatchRequestCounts - - type: 'null' - title: BatchRequestCounts - usage: - anyOf: - - $ref: '#/components/schemas/BatchUsage' - title: BatchUsage - - type: 'null' - title: BatchUsage - additionalProperties: true - type: object required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - BatchError: + - uri + title: URL + type: object + _URLOrData: + description: A URL or a base64 encoded string properties: - code: - anyOf: - - type: string - - type: 'null' - line: - anyOf: - - type: integer - - type: 'null' - message: + url: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - param: + nullable: true + title: URL + data: anyOf: - type: string - type: 'null' - additionalProperties: true + contentEncoding: base64 + nullable: true + title: _URLOrData type: object - title: BatchError - BatchRequestCounts: + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + GreedySamplingStrategy: + description: Greedy sampling strategy that selects the highest probability token at each step. properties: - completed: - type: integer - title: Completed - failed: - type: integer - title: Failed - total: - type: integer - title: Total - additionalProperties: true + type: + const: greedy + default: greedy + title: Type + type: string + title: GreedySamplingStrategy type: object - required: - - completed - - failed - - total - title: BatchRequestCounts - BatchUsage: + TopKSamplingStrategy: + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. 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: + const: top_k + default: top_k + title: Type + type: string + top_k: + minimum: 1 + title: Top K 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: + - 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. properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: - type: string - title: Provider Id - description: ID of the provider that owns this resource type: - type: string - const: benchmark + const: top_p + default: top_p 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. - BenchmarkConfig: - properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - scoring_params: - additionalProperties: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: object - title: Scoring Params - description: Map between scoring function id and parameters for each scoring function you want to run - num_examples: + temperature: anyOf: - - type: integer + - type: number + minimum: 0.0 - type: 'null' - description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - type: object + top_p: + anyOf: + - type: number + - type: 'null' + default: 0.95 required: - - eval_candidate - title: BenchmarkConfig - description: A benchmark configuration for evaluation. - BooleanType: + - temperature + title: TopPSamplingStrategy + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. properties: type: - type: string - const: boolean + const: grammar + default: grammar title: Type - default: boolean + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat type: object - title: BooleanType - description: Parameter type for boolean values. - ChatCompletionInputType: + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. properties: type: - type: string - const: chat_completion_input + const: json_schema + default: json_schema title: Type - default: chat_completion_input + type: string + json_schema: + additionalProperties: true + title: Json Schema + type: object + required: + - json_schema + title: JsonSchemaResponseFormat type: object - title: ChatCompletionInputType - description: Parameter type for chat completion input. - Checkpoint: + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + OpenAIChatCompletionContentPartImageParam: + description: Image content part for OpenAI-compatible chat completion messages. properties: - identifier: - type: string - title: Identifier - created_at: + type: + const: image_url + default: image_url + title: Type type: string - format: date-time - title: Created At - epoch: - type: integer - title: Epoch - post_training_job_id: + image_url: + $ref: '#/components/schemas/OpenAIImageURL' + required: + - image_url + title: OpenAIChatCompletionContentPartImageParam + type: object + OpenAIChatCompletionContentPartTextParam: + description: Text content part for OpenAI-compatible chat completion messages. + properties: + type: + const: text + default: text + title: Type type: string - title: Post Training Job Id - path: + text: + title: Text type: string - title: Path - training_metrics: - anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' - title: PostTrainingMetric - - type: 'null' - title: PostTrainingMetric - type: object required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - Chunk-Output: + - text + title: OpenAIChatCompletionContentPartTextParam + type: object + OpenAIFile: properties: - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - type: array - title: list[ImageContentItem-Output | TextContentItem] - title: string | list[ImageContentItem-Output | TextContentItem] - chunk_id: + type: + const: file + default: file + title: Type type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - title: ChunkMetadata - type: object + file: + $ref: '#/components/schemas/OpenAIFileFile' required: - - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - ChunkMetadata: + - file + title: OpenAIFile + type: object + OpenAIFileFile: properties: - chunk_id: - anyOf: - - type: string - - type: 'null' - document_id: - anyOf: - - type: string - - type: 'null' - source: + file_data: anyOf: - type: string - type: 'null' - created_timestamp: - anyOf: - - type: integer - - type: 'null' - updated_timestamp: - anyOf: - - type: integer - - type: 'null' - chunk_window: + nullable: true + file_id: anyOf: - type: string - type: 'null' - chunk_tokenizer: + nullable: true + filename: anyOf: - type: string - type: 'null' - chunk_embedding_model: + nullable: true + title: OpenAIFileFile + type: object + OpenAIImageURL: + description: Image URL specification for OpenAI-compatible chat completion messages. + properties: + url: + title: Url + type: string + detail: anyOf: - type: string - type: 'null' - chunk_embedding_dimension: - anyOf: - - type: integer - - type: 'null' - content_token_count: + nullable: true + required: + - url + title: OpenAIImageURL + type: object + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: anyOf: - - type: integer + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - metadata_token_count: + title: string | list[OpenAIChatCompletionContentPartTextParam] + nullable: true + name: anyOf: - - type: integer + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array - type: 'null' + nullable: true + title: OpenAIAssistantMessageParam type: object - title: 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. - CompletionInputType: + OpenAIChatCompletionToolCall: + description: Tool call specification for OpenAI-compatible chat completion responses. properties: + index: + anyOf: + - type: integer + - type: 'null' + nullable: true + id: + anyOf: + - type: string + - type: 'null' + nullable: true type: - type: string - const: completion_input + const: function + default: function title: Type - default: completion_input + type: string + function: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction + - type: 'null' + nullable: true + title: OpenAIChatCompletionToolCallFunction + title: OpenAIChatCompletionToolCall type: object - title: CompletionInputType - description: Parameter type for completion input. - Conversation: + OpenAIChatCompletionToolCallFunction: + description: Function call details for OpenAI-compatible tool calls. 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: + name: anyOf: - - additionalProperties: - type: string - type: object + - type: string - 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. - items: + nullable: true + arguments: anyOf: - - items: - additionalProperties: true - type: object - type: array + - type: string - type: 'null' - description: Initial items to include in the conversation context. You may add up to 20 items at a time. + nullable: true + title: OpenAIChatCompletionToolCallFunction type: object - required: - - id - - created_at - title: Conversation - description: OpenAI-compatible conversation object. - ConversationDeletedResource: + OpenAIDeveloperMessageParam: + description: A message from the developer in an OpenAI-compatible chat completion request. properties: - id: - type: string - title: Id - description: The deleted conversation identifier - object: + role: + const: developer + default: developer + title: Role type: string - title: Object - description: Object type - default: conversation.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true - type: object + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - id - title: ConversationDeletedResource - description: Response for deleted conversation. - ConversationItemDeletedResource: - properties: - id: - type: string - title: Id - description: The deleted item identifier - object: - type: string - title: Object - description: Object type - default: conversation.item.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true + - content + title: OpenAIDeveloperMessageParam type: object - required: - - id - title: ConversationItemDeletedResource - description: Response for deleted conversation item. - ConversationItemList: + OpenAISystemMessageParam: + description: A system message providing instructions or context to the model. properties: - object: + role: + const: system + default: system + title: Role type: string - title: Object - description: Object type - default: list - data: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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' - title: OpenAIResponseMessage-Output | ... (9 variants) - type: array - title: Data - description: List of conversation items - first_id: + content: anyOf: - type: string - - type: 'null' - description: The ID of the first item in the list - last_id: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: anyOf: - type: string - type: 'null' - description: The ID of the last item in the list - has_more: - type: boolean - title: Has More - description: Whether there are more items available - default: false - type: object + nullable: true required: - - data - title: ConversationItemList - description: List of conversation items with pagination. - DPOAlignmentConfig: + - content + title: OpenAISystemMessageParam + type: object + OpenAIToolMessageParam: + description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. 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. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: - properties: - dataset_id: + role: + const: tool + default: tool + title: Role 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: + tool_call_id: + title: Tool Call Id + type: string + content: anyOf: - type: string - - type: 'null' - packed: - anyOf: - - type: boolean - - type: 'null' - default: false - train_on_input: - anyOf: - - type: boolean - - type: 'null' - default: false - type: object + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: Configuration for training data and data loading. - Dataset: + - tool_call_id + - content + title: OpenAIToolMessageParam + type: object + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. properties: - identifier: + role: + const: user + default: user + title: Role type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + 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' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: anyOf: - type: string - type: 'null' - description: Unique identifier for this resource in the provider - 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' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - 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 + nullable: true required: - - identifier - - provider_id - - purpose - - source - title: Dataset - description: Dataset resource for storing and accessing training or evaluation data. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - 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. - EfficiencyConfig: + - content + title: OpenAIUserMessageParam + type: object + OpenAIMessageParam: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + OpenAIJSONSchema: + description: JSON schema specification for OpenAI-compatible structured response format. properties: - enable_activation_checkpointing: - anyOf: - - type: boolean - - type: 'null' - default: false - enable_activation_offloading: - anyOf: - - type: boolean - - type: 'null' - default: false - memory_efficient_fsdp_wrap: + name: + title: Name + type: string + description: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - fsdp_cpu_offload: + strict: anyOf: - type: boolean - type: 'null' - default: false - type: object - title: EfficiencyConfig - description: Configuration for memory and compute efficiency optimizations. - Errors: - properties: - data: - anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array - - type: 'null' - object: + schema: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' - additionalProperties: true + title: OpenAIJSONSchema type: object - title: Errors - EvaluateResponse: + OpenAIResponseFormatJSONObject: + description: JSON object response format for OpenAI-compatible chat completion requests. properties: - generations: - items: - additionalProperties: true - type: object - type: array - title: Generations - scores: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Scores + type: + const: json_object + default: json_object + title: Type + type: string + title: OpenAIResponseFormatJSONObject type: object - required: - - generations - - scores - title: EvaluateResponse - description: The response from an evaluation. - ExpiresAfter: + OpenAIResponseFormatJSONSchema: + description: JSON schema response format for OpenAI-compatible chat completion requests. properties: - anchor: + type: + const: json_schema + default: json_schema + title: Type type: string - const: created_at - title: Anchor - seconds: - type: integer - maximum: 2592000.0 - minimum: 3600.0 - title: Seconds - type: object + json_schema: + $ref: '#/components/schemas/OpenAIJSONSchema' required: - - anchor - - seconds - title: 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) - GreedySamplingStrategy: + - json_schema + title: OpenAIResponseFormatJSONSchema + type: object + OpenAIResponseFormatText: + description: Text response format for OpenAI-compatible chat completion requests. properties: type: - type: string - const: greedy + const: text + default: text title: Type - default: greedy - type: object - title: GreedySamplingStrategy - description: Greedy sampling strategy that selects the highest probability token at each step. - HealthInfo: - properties: - status: - $ref: '#/components/schemas/HealthStatus' + type: string + title: OpenAIResponseFormatText type: object - required: - - status - title: HealthInfo - description: Health status information for the service. - HealthStatus: - type: string - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - ImageContentItem-Input: + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + VectorStoreChunkingStrategyAuto: + description: Automatic chunking strategy for vector store files. properties: type: - type: string - const: image + const: auto + default: auto title: Type - default: image - image: - $ref: '#/components/schemas/_URLOrData' + type: string + title: VectorStoreChunkingStrategyAuto type: object - required: - - image - title: ImageContentItem - description: A image content item - ImageContentItem-Output: + VectorStoreChunkingStrategyStatic: + description: Static chunking strategy with configurable parameters. properties: type: - type: string - const: image + const: static + default: static title: Type - default: image - image: - $ref: '#/components/schemas/_URLOrData' - type: object + type: string + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' required: - - image - title: ImageContentItem - description: A image content item - InputTokensDetails: - properties: - cached_tokens: - type: integer - title: Cached Tokens - additionalProperties: true + - static + title: VectorStoreChunkingStrategyStatic type: object - required: - - cached_tokens - title: InputTokensDetails - Job: + VectorStoreChunkingStrategyStaticConfig: + description: Configuration for static chunking strategy. properties: - job_id: - type: string - title: Job Id - status: - $ref: '#/components/schemas/JobStatus' + 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 - required: - - job_id - - status - title: Job - description: A job execution instance with status tracking. - JobStatus: + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + VectorStoreFileStatus: type: string enum: - completed - in_progress - - failed - - scheduled - cancelled - title: JobStatus - description: Status of a job execution. - JsonType: - properties: - type: - type: string - const: json - title: Type - default: json - type: object - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: + - failed + default: completed + OpenAIResponseInputMessageContentFile: + description: File content for input messages in OpenAI response format. properties: type: - type: string - const: llm_as_judge + const: input_file + default: input_file title: Type - default: llm_as_judge - judge_model: type: string - title: Judge Model - prompt_template: + file_data: anyOf: - type: string - type: 'null' - 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 + nullable: true + file_id: + anyOf: + - type: string + - type: 'null' + nullable: true + file_url: + anyOf: + - type: string + - type: 'null' + nullable: true + filename: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIResponseInputMessageContentFile type: object - required: - - judge_model - title: LLMAsJudgeScoringFnParams - description: Parameters for LLM-as-judge scoring function configuration. - ListBatchesResponse: + OpenAIResponseInputMessageContentImage: + description: Image content for input messages in OpenAI response format. properties: - object: + detail: + default: auto + title: Detail type: string - const: list - title: Object - default: list - data: - items: - $ref: '#/components/schemas/Batch' - type: array - title: Data - description: List of batch objects - first_id: + enum: + - low + - high + - auto + type: + const: input_image + default: input_image + title: Type + type: string + file_id: anyOf: - type: string - type: 'null' - description: ID of the first batch in the list - last_id: + nullable: true + image_url: anyOf: - type: string - type: 'null' - description: ID of the last batch in the list - has_more: - type: boolean - title: Has More - description: Whether there are more batches available - default: false + nullable: true + title: OpenAIResponseInputMessageContentImage type: object - required: - - data - title: ListBatchesResponse - description: Response containing a list of batch objects. - ListBenchmarksResponse: + OpenAIResponseInputMessageContentText: + description: Text content for input messages in OpenAI response format. properties: - data: - items: - $ref: '#/components/schemas/Benchmark' - type: array - title: Data - type: object + text: + title: Text + type: string + type: + const: input_text + default: input_text + title: Type + type: string required: - - data - title: ListBenchmarksResponse - ListDatasetsResponse: - properties: - data: - items: - $ref: '#/components/schemas/Dataset' - type: array - title: Data + - text + title: OpenAIResponseInputMessageContentText type: object - required: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - ListOpenAIChatCompletionResponse: + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + OpenAIResponseAnnotationCitation: + description: URL citation annotation for referencing external web resources. properties: - data: - items: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: + type: + const: url_citation + default: url_citation + title: Type type: string - title: First Id - last_id: + end_index: + title: End Index + type: integer + start_index: + title: Start Index + type: integer + title: + title: Title type: string - title: Last Id - object: + url: + title: Url type: string - const: list - title: Object - default: list - type: object required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIChatCompletionResponse - description: Response from listing OpenAI-compatible chat completions. - ListOpenAIFileResponse: + - end_index + - start_index + - title + - url + title: OpenAIResponseAnnotationCitation + type: object + OpenAIResponseAnnotationContainerFileCitation: properties: - data: - items: - $ref: '#/components/schemas/OpenAIFileObject' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: + type: + const: container_file_citation + default: container_file_citation + title: Type type: string - title: First Id - last_id: + container_id: + title: Container Id type: string - title: Last Id - object: + end_index: + title: End Index + type: integer + file_id: + title: File Id type: string - const: list - title: Object - default: list - type: object - required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIFileResponse - description: Response for listing files in OpenAI Files API. - ListOpenAIResponseInputItem: - properties: - data: - items: - $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' - type: array - title: Data - object: + filename: + title: Filename type: string - const: list - title: Object - default: list - type: object + start_index: + title: Start Index + type: integer required: - - data - title: ListOpenAIResponseInputItem - description: List container for OpenAI response input items. - ListOpenAIResponseObject: + - 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. properties: - data: - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput-Output' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: + type: + const: file_citation + default: file_citation + title: Type type: string - title: First Id - last_id: + file_id: + title: File Id type: string - title: Last Id - object: + filename: + title: Filename type: string - const: list - title: Object - default: list - type: object + index: + title: Index + type: integer required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject - description: Paginated list of OpenAI response objects with navigation metadata. - ListPostTrainingJobsResponse: - properties: - data: - items: - $ref: '#/components/schemas/PostTrainingJob' - type: array - title: Data + - file_id + - filename + - index + title: OpenAIResponseAnnotationFileCitation type: object - required: - - data - title: ListPostTrainingJobsResponse - ListRoutesResponse: + OpenAIResponseAnnotationFilePath: properties: - data: - items: - $ref: '#/components/schemas/RouteInfo' - type: array - title: Data - type: object + type: + const: file_path + default: file_path + title: Type + type: string + file_id: + title: File Id + type: string + index: + title: Index + type: integer required: - - data - title: ListRoutesResponse - description: Response containing a list of all available API routes. - ListToolDefsResponse: - properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - type: array - title: Data + - file_id + - index + title: OpenAIResponseAnnotationFilePath type: object + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + OpenAIResponseContentPartRefusal: + description: Refusal content within a streamed response part. + properties: + type: + const: refusal + default: refusal + title: Type + type: string + refusal: + title: Refusal + type: string required: - - data - title: ListToolDefsResponse - description: Response containing a list of tool definitions. - LoraFinetuningConfig: + - refusal + title: OpenAIResponseContentPartRefusal + type: object + OpenAIResponseOutputMessageContentOutputText: properties: + text: + title: Text + type: string type: + const: output_text + default: output_text + title: Type type: string - const: LoRA - title: Type - default: LoRA - lora_attn_modules: + annotations: items: - type: string + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations type: array - title: Lora Attn Modules - apply_lora_to_mlp: - type: boolean - title: Apply Lora To Mlp - apply_lora_to_output: - type: boolean - title: Apply Lora To Output - rank: - type: integer - title: Rank - alpha: - type: integer - title: Alpha - use_dora: - anyOf: - - type: boolean - - type: 'null' - default: false - quantize_base: - anyOf: - - type: boolean - - type: 'null' - default: false - type: object required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + - text + title: OpenAIResponseOutputMessageContentOutputText + type: object + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal MCPListToolsTool: + description: Tool definition returned by MCP list tools operation. properties: input_schema: additionalProperties: true - type: object title: Input Schema + type: object name: - type: string title: Name + type: string description: anyOf: - type: string - type: 'null' - type: object + nullable: true required: - input_schema - name title: MCPListToolsTool - description: Tool definition returned by MCP list tools operation. - Model: + type: object + OpenAIResponseMCPApprovalRequest: + description: A request for human approval of a tool invocation. properties: - identifier: + arguments: + title: Arguments type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: + id: + title: Id type: string - title: Provider Id - description: ID of the provider that owns this resource - type: + name: + title: Name type: string - const: model + server_label: + title: Server Label + type: string + type: + const: mcp_approval_request + default: mcp_approval_request 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 + type: string required: - - identifier - - provider_id - title: Model - description: A model resource representing an AI model registered in Llama Stack. - ModelCandidate: + - 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: - type: + 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' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role type: string - const: model + enum: + - system + - developer + - user + - assistant + default: system + type: + const: message + default: message title: Type - default: model - model: type: string - title: Model - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: + id: anyOf: - - $ref: '#/components/schemas/SystemMessage' - title: SystemMessage + - type: string - type: 'null' - title: SystemMessage - type: object + nullable: true + status: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType - description: Enumeration of supported model types in Llama Stack. - ModerationObject: + - content + - role + title: OpenAIResponseMessage + type: object + OpenAIResponseOutputMessageFileSearchToolCall: + description: File search tool call output message for OpenAI responses. properties: id: - type: string title: Id - model: type: string - title: Model - results: + queries: items: - $ref: '#/components/schemas/ModerationObjectResults' + type: string + title: Queries type: array - title: Results - type: object + status: + title: Status + type: string + type: + const: file_search_call + default: file_search_call + title: Type + type: string + results: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array + - type: 'null' + nullable: true required: - id - - model - - results - title: ModerationObject - description: A moderation object. - ModerationObjectResults: + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall + type: object + OpenAIResponseOutputMessageFileSearchToolCallResults: + description: Search results returned by the file search operation. properties: - flagged: - type: boolean - title: Flagged - categories: + 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. + 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: - - additionalProperties: - type: boolean - type: object + - type: string - type: 'null' - category_applied_input_types: + nullable: true + status: anyOf: - - additionalProperties: - items: - type: string - type: array - type: object + - type: string - type: 'null' - category_scores: + nullable: true + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + type: object + OpenAIResponseOutputMessageMCPCall: + description: Model Context Protocol (MCP) call output message for OpenAI responses. + 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: - - additionalProperties: - type: number - type: object + - type: string - type: 'null' - user_message: + nullable: true + output: anyOf: - type: string - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - type: object + nullable: true required: - - flagged - title: ModerationObjectResults - description: A moderation object. - NumberType: + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + type: object + OpenAIResponseOutputMessageMCPListTools: + description: MCP list tools output message containing available tools from an MCP server. properties: - type: + id: + title: Id type: string - const: number + type: + const: mcp_list_tools + default: mcp_list_tools title: Type - default: number + type: string + server_label: + title: Server Label + type: string + tools: + items: + $ref: '#/components/schemas/MCPListToolsTool' + title: Tools + type: array + required: + - id + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools type: object - title: NumberType - description: Parameter type for numeric values. - ObjectType: + OpenAIResponseOutputMessageWebSearchToolCall: + description: Web search tool call output message for OpenAI responses. properties: - type: + id: + title: Id type: string - const: object + status: + title: Status + type: string + type: + const: web_search_call + default: web_search_call title: Type - default: object + type: string + required: + - id + - status + title: OpenAIResponseOutputMessageWebSearchToolCall type: object - title: ObjectType - description: Parameter type for object values. - OpenAIAssistantMessageParam-Input: + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + AllowedToolsFilter: + description: Filter configuration for restricting which MCP tools can be used. properties: - role: - type: string - const: assistant - title: Role - default: assistant - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - tool_calls: + tool_names: anyOf: - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: string type: array - type: 'null' + nullable: true + title: AllowedToolsFilter type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIAssistantMessageParam-Output: + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. properties: - role: - type: string - const: assistant - title: Role - default: assistant - content: + always: anyOf: - - type: string - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: string type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - type: 'null' - tool_calls: + nullable: true + never: anyOf: - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: string type: array - type: 'null' + nullable: true + title: ApprovalFilter type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIChatCompletion: + OpenAIResponseInputToolFileSearch: + description: File search tool configuration for OpenAI response inputs. properties: - id: + type: + const: file_search + default: file_search + title: Type type: string - title: Id - choices: + vector_store_ids: items: - $ref: '#/components/schemas/OpenAIChoice-Output' + type: string + title: Vector Store Ids 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: + filters: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage + - additionalProperties: true + type: object - type: 'null' - title: OpenAIChatCompletionUsage - type: object + nullable: true + max_num_results: + anyOf: + - maximum: 50 + minimum: 1 + type: integer + - type: 'null' + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + nullable: true + title: SearchRankingOptions required: - - id - - choices - - created - - model - title: OpenAIChatCompletion - description: Response from an OpenAI-compatible chat completion request. - OpenAIChatCompletionContentPartImageParam: - properties: - type: - type: string - const: image_url - title: Type - default: image_url - image_url: - $ref: '#/components/schemas/OpenAIImageURL' + - vector_store_ids + title: OpenAIResponseInputToolFileSearch type: object - required: - - image_url - title: OpenAIChatCompletionContentPartImageParam - description: Image content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionContentPartTextParam: + OpenAIResponseInputToolFunction: + description: Function tool configuration for OpenAI response inputs. properties: type: - type: string - const: text + const: function + default: function 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. - OpenAIChatCompletionRequestWithExtraBody: - properties: - model: + name: + title: Name type: string - title: Model - messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' - title: OpenAIUserMessageParam-Input - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' - title: OpenAIAssistantMessageParam-Input - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: 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' - title: OpenAIUserMessageParam-Input | ... (5 variants) - type: array - minItems: 1 - title: Messages - frequency_penalty: - anyOf: - - type: number - - type: 'null' - function_call: + description: anyOf: - type: string - - additionalProperties: true - type: object - - type: 'null' - title: string | object - functions: - anyOf: - - items: - additionalProperties: true - type: object - type: array - type: 'null' - logit_bias: + nullable: true + parameters: anyOf: - - additionalProperties: - type: number + - additionalProperties: true type: object - type: 'null' - logprobs: - anyOf: - - type: boolean - - type: 'null' - max_completion_tokens: - anyOf: - - type: integer - - type: 'null' - max_tokens: - anyOf: - - type: integer - - type: 'null' - n: - anyOf: - - type: integer - - type: 'null' - parallel_tool_calls: + strict: anyOf: - type: boolean - type: 'null' - presence_penalty: - anyOf: - - type: number - - type: 'null' - response_format: + nullable: true + required: + - name + - parameters + title: OpenAIResponseInputToolFunction + type: object + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + properties: + type: + const: mcp + default: mcp + title: Type + type: string + server_label: + title: Server Label + type: string + server_url: + title: Server Url + type: string + headers: anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - discriminator: - propertyName: type - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - additionalProperties: true + type: object - type: 'null' - title: Response Format - seed: + nullable: true + require_approval: anyOf: - - type: integer - - type: 'null' - stop: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + title: ApprovalFilter + default: never + title: string | ApprovalFilter + allowed_tools: anyOf: - - type: string - items: type: string type: array title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - title: string | list[string] - stream: - anyOf: - - type: boolean - - type: 'null' - stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - temperature: + title: list[string] | AllowedToolsFilter + nullable: true + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + type: object + OpenAIResponseInputToolWebSearch: + description: Web search tool configuration for OpenAI response inputs. + properties: + type: + default: web_search + title: Type + type: string + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + search_context_size: anyOf: - - type: number + - pattern: ^low|medium|high$ + type: string - type: 'null' - tool_choice: + default: medium + title: OpenAIResponseInputToolWebSearch + type: object + SearchRankingOptions: + description: Options for ranking and filtering search results. + properties: + ranker: anyOf: - type: string - - additionalProperties: true - type: object - - type: 'null' - title: string | object - tools: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - top_logprobs: - anyOf: - - type: integer - type: 'null' - top_p: + nullable: true + score_threshold: anyOf: - type: number - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - additionalProperties: true + default: 0.0 + title: SearchRankingOptions type: object - required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible chat completion endpoint. - OpenAIChatCompletionToolCall: + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. properties: - index: - anyOf: - - type: integer - - type: 'null' - id: - anyOf: - - type: string - - type: 'null' type: - type: string - const: function + const: mcp + default: mcp title: Type - default: function - function: + type: string + server_label: + title: Server Label + type: string + allowed_tools: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - title: OpenAIChatCompletionToolCallFunction + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - title: OpenAIChatCompletionToolCallFunction + title: list[string] | AllowedToolsFilter + nullable: true + required: + - server_label + title: OpenAIResponseToolMCP type: object - title: OpenAIChatCompletionToolCall - description: Tool call specification for OpenAI-compatible chat completion responses. - OpenAIChatCompletionToolCallFunction: + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. properties: - name: - anyOf: - - type: string - - type: 'null' - arguments: + type: + const: output_text + default: output_text + title: Type + type: string + text: + title: Text + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations + type: array + logprobs: anyOf: - - type: string + - items: + additionalProperties: true + type: object + type: array - type: 'null' + nullable: true + required: + - text + title: OpenAIResponseContentPartOutputText type: object - title: OpenAIChatCompletionToolCallFunction - description: Function call details for OpenAI-compatible tool calls. - OpenAIChatCompletionUsage: + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' - title: OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - title: OpenAIChatCompletionUsagePromptTokensDetails - completion_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' - title: OpenAIChatCompletionUsageCompletionTokensDetails - - type: 'null' - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object + type: + const: reasoning_text + default: reasoning_text + title: Type + type: string + text: + title: Text + type: string required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - description: Usage information for OpenAI chat completion. - OpenAIChatCompletionUsageCompletionTokensDetails: - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' + - text + title: OpenAIResponseContentPartReasoningText type: object - title: OpenAIChatCompletionUsageCompletionTokensDetails - description: Token details for output tokens in OpenAI chat completion usage. - OpenAIChatCompletionUsagePromptTokensDetails: + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' + type: + const: summary_text + default: summary_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningSummary type: object - title: OpenAIChatCompletionUsagePromptTokensDetails - description: Token details for prompt tokens in OpenAI chat completion usage. - OpenAIChoice-Output: + OpenAIResponseError: + description: Error details for failed OpenAI response requests. properties: + code: + title: Code + type: string message: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' - title: OpenAIUserMessageParam-Output - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' - title: OpenAIAssistantMessageParam-Output - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam-Output | ... (5 variants) - 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: + title: Message type: string - title: Finish Reason - index: - type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - title: OpenAIChoiceLogprobs-Output - - type: 'null' - title: OpenAIChoiceLogprobs-Output - type: object required: + - code - message - - finish_reason - - index - title: OpenAIChoice - description: A choice from an OpenAI-compatible chat completion response. - OpenAIChoiceLogprobs-Output: + title: OpenAIResponseError + type: object + OpenAIResponseObject: + description: Complete OpenAI response object containing generation results and metadata. properties: - content: + created_at: + title: Created At + type: integer + error: anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' - type: object - title: OpenAIChoiceLogprobs - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. - OpenAICompletion: - properties: + nullable: true + title: OpenAIResponseError id: - type: string title: Id - choices: - items: - $ref: '#/components/schemas/OpenAICompletionChoice-Output' - type: array - title: Choices - created: - type: integer - title: Created - model: type: string + model: title: Model - object: type: string - const: text_completion + object: + const: response + default: response title: Object - default: text_completion - type: object - required: - - id - - choices - - created - - model - title: OpenAICompletion - 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" - OpenAICompletionChoice-Output: - properties: - finish_reason: - type: string - title: Finish Reason - text: - type: string - title: Text - index: - type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - title: OpenAIChoiceLogprobs-Output - - type: 'null' - title: OpenAIChoiceLogprobs-Output - type: object - required: - - finish_reason - - text - - index - title: 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 - OpenAICompletionRequestWithExtraBody: - properties: - model: type: string - title: Model - prompt: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output + type: array + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: anyOf: - type: string - - items: - type: string - type: array - title: list[string] - - items: - type: integer - type: array - title: list[integer] - - items: - items: - type: integer - type: array - type: array - title: list[array] - title: string | ... (4 variants) - best_of: - anyOf: - - type: integer - type: 'null' - echo: + nullable: true + prompt: anyOf: - - type: boolean + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' - frequency_penalty: + nullable: true + title: OpenAIResponsePrompt + status: + title: Status + type: string + temperature: anyOf: - type: number - type: 'null' - logit_bias: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - logprobs: - anyOf: - - type: boolean - - type: 'null' - max_tokens: - anyOf: - - type: integer - - type: 'null' - n: - anyOf: - - type: integer - - type: 'null' - presence_penalty: + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: anyOf: - type: number - type: 'null' - seed: - anyOf: - - type: integer - - type: 'null' - stop: + nullable: true + tools: anyOf: - - type: string - items: - type: string + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - title: list[string] - - type: 'null' - title: string | list[string] - stream: - anyOf: - - type: boolean - - type: 'null' - stream_options: - anyOf: - - additionalProperties: true - type: object - type: 'null' - temperature: + nullable: true + truncation: anyOf: - - type: number + - type: string - type: 'null' - top_p: + nullable: true + usage: anyOf: - - type: number + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' - user: + nullable: true + title: OpenAIResponseUsage + instructions: anyOf: - type: string - type: 'null' - suffix: + nullable: true + max_tool_calls: anyOf: - - type: string + - type: integer - type: 'null' - additionalProperties: true - type: object + nullable: true required: + - created_at + - id - model - - prompt - title: OpenAICompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible completion endpoint. - OpenAICompletionWithInputMessages: + - output + - status + title: OpenAIResponseObject + type: object + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. properties: - id: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.completed + default: response.completed + title: Type type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAIChoice-Output' - type: array - title: Choices - object: + required: + - response + title: OpenAIResponseObjectStreamResponseCompleted + type: object + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. + properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id type: string - const: chat.completion - title: Object - default: chat.completion - created: + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - title: Created - model: + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.added + default: response.content_part.added + title: Type type: string - title: Model - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - title: OpenAIChatCompletionUsage - input_messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' - title: OpenAIUserMessageParam-Output - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' - title: OpenAIAssistantMessageParam-Output - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - 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' - title: OpenAIUserMessageParam-Output | ... (5 variants) - type: array - title: Input Messages - type: object - required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - properties: - file_ids: - items: - type: string - type: array - title: File Ids - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - additionalProperties: true - type: object required: - - file_ids - title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - description: Request to create a vector store file batch with extra_body support. - OpenAICreateVectorStoreRequestWithExtraBody: - properties: - name: - anyOf: - - type: string - - type: 'null' - file_ids: - anyOf: - - items: - type: string - type: array - - type: 'null' - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - additionalProperties: true + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded type: object - title: OpenAICreateVectorStoreRequestWithExtraBody - description: Request to create a vector store with extra_body support. - OpenAIDeleteResponseObject: + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. properties: - id: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id type: string - title: Id - object: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.done + default: response.content_part.done + title: Type type: string - const: response - title: Object - default: response - deleted: - type: boolean - title: Deleted - default: true - type: object required: - - id - title: OpenAIDeleteResponseObject - description: Response object confirming deletion of an OpenAI response. - OpenAIDeveloperMessageParam: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone + type: object + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. properties: - role: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.created + default: response.created + title: Type type: string - const: developer - title: Role - default: developer - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - type: object required: - - content - title: OpenAIDeveloperMessageParam - description: A message from the developer in an OpenAI-compatible chat completion request. - OpenAIEmbeddingData: + - response + title: OpenAIResponseObjectStreamResponseCreated + type: object + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. properties: - object: - type: string - const: embedding - title: Object - default: embedding - embedding: - anyOf: - - items: - type: number - type: array - title: list[number] - - type: string - title: list[number] | string - index: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number type: integer - title: Index - type: object + type: + const: response.failed + default: response.failed + title: Type + type: string required: - - embedding - - index - title: OpenAIEmbeddingData - description: A single embedding data object from an OpenAI-compatible embeddings response. - OpenAIEmbeddingUsage: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed + type: object + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. properties: - prompt_tokens: + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - title: Prompt Tokens - total_tokens: + sequence_number: + title: Sequence Number type: integer - title: Total Tokens - type: object - required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage - description: Usage information for an OpenAI-compatible embeddings response. - OpenAIEmbeddingsRequestWithExtraBody: - properties: - model: + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type type: string - title: Model - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - encoding_format: - anyOf: - - type: string - - type: 'null' - default: float - dimensions: - anyOf: - - type: integer - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object required: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody - description: Request parameters for OpenAI-compatible embeddings endpoint. - OpenAIEmbeddingsResponse: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. properties: - object: + item_id: + title: Item Id type: string - const: list - title: Object - default: list - data: - items: - $ref: '#/components/schemas/OpenAIEmbeddingData' - type: array - title: Data - model: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type 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. - OpenAIFile: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. properties: - type: + item_id: + title: Item Id type: string - const: file + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.searching + default: response.file_search_call.searching title: Type - default: file - file: - $ref: '#/components/schemas/OpenAIFileFile' - type: object + type: string required: - - file - title: OpenAIFile - OpenAIFileDeleteResponse: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. properties: - id: + delta: + title: Delta type: string - title: Id - object: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + title: Type type: string - const: file - title: Object - default: file - deleted: - type: boolean - title: Deleted - type: object required: - - id - - deleted - title: OpenAIFileDeleteResponse - description: Response for deleting a file in OpenAI Files API. - OpenAIFileFile: - properties: - file_data: - anyOf: - - type: string - - type: 'null' - file_id: - anyOf: - - type: string - - type: 'null' - filename: - anyOf: - - type: string - - type: 'null' + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta type: object - title: OpenAIFileFile - OpenAIFileObject: + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. properties: - object: + arguments: + title: Arguments type: string - const: file - title: Object - default: file - id: + item_id: + title: Item Id type: string - title: Id - bytes: - type: integer - title: Bytes - created_at: + output_index: + title: Output Index type: integer - title: Created At - expires_at: + sequence_number: + title: Sequence Number type: integer - title: Expires At - filename: + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type 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. - OpenAIFilePurpose: - type: string - enum: - - assistants - - batch - title: OpenAIFilePurpose - description: Valid purpose values for OpenAI Files API. - OpenAIImageURL: - properties: - url: - type: string - title: Url - detail: - anyOf: - - type: string - - type: 'null' + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone type: object - required: - - url - title: OpenAIImageURL - description: Image URL specification for OpenAI-compatible chat completion messages. - OpenAIJSONSchema: + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. properties: - name: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress type: object - title: OpenAIJSONSchema - description: JSON schema specification for OpenAI-compatible structured response format. - OpenAIModel: + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. properties: - id: - type: string - title: Id - object: - type: string - const: model - title: Object - default: model - created: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number type: integer - title: Created - owned_by: + type: + const: response.incomplete + default: response.incomplete + title: Type type: string - title: Owned By - custom_metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object required: - - id - - created - - owned_by - title: OpenAIModel - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata - OpenAIResponseAnnotationCitation: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: properties: - type: + delta: + title: Delta type: string - const: url_citation - title: Type - default: url_citation - end_index: + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - title: End Index - start_index: + sequence_number: + title: Sequence Number type: integer - title: Start Index - title: - type: string - title: Title - url: + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type type: string - title: Url - type: object required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation - description: URL citation annotation for referencing external web resources. - OpenAIResponseAnnotationContainerFileCitation: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: properties: - type: + arguments: + title: Arguments type: string - const: container_file_citation - title: Type - default: container_file_citation - container_id: + item_id: + title: Item Id type: string - title: Container Id - end_index: + output_index: + title: Output Index type: integer - title: End Index - file_id: - type: string - title: File Id - filename: - type: string - title: Filename - start_index: + sequence_number: + title: Sequence Number 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 + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done 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. - OpenAIResponseAnnotationFilePath: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. properties: + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: file_path + const: response.mcp_call.completed + default: response.mcp_call.completed 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: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. properties: + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: refusal + const: response.mcp_call.failed + default: response.mcp_call.failed title: Type - default: refusal - refusal: type: string - title: Refusal - type: object required: - - refusal - title: OpenAIResponseContentPartRefusal - description: Refusal content within a streamed response part. - OpenAIResponseError: - properties: - code: - type: string - title: Code - message: - type: string - title: Message + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed type: object - required: - - code - - message - title: OpenAIResponseError - description: Error details for failed OpenAI response requests. - OpenAIResponseFormatJSONObject: + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. 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. - OpenAIResponseFormatJSONSchema: - properties: - type: + item_id: + title: Item Id type: string - const: json_schema + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress title: Type - default: json_schema - json_schema: - $ref: '#/components/schemas/OpenAIJSONSchema' - type: object + type: string required: - - json_schema - title: OpenAIResponseFormatJSONSchema - description: JSON schema response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatText: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + type: object + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: properties: + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: text + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed title: Type - default: text + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted type: object - title: OpenAIResponseFormatText - description: Text response format for OpenAI-compatible chat completion requests. - OpenAIResponseInputFunctionToolCallOutput: + OpenAIResponseObjectStreamResponseMcpListToolsFailed: properties: - call_id: - type: string - title: Call Id - output: - type: string - title: Output + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: function_call_output + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed title: Type - default: function_call_output - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' - type: object + type: string required: - - call_id - - output - title: OpenAIResponseInputFunctionToolCallOutput - description: This represents the output of a function call that gets passed back to the model. - OpenAIResponseInputMessageContentFile: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + type: object + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: properties: + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: input_file + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress title: Type - default: input_file - file_data: - anyOf: - - type: string - - type: 'null' - file_id: - anyOf: - - type: string - - type: 'null' - file_url: - anyOf: - - type: string - - type: 'null' - filename: - anyOf: - - type: string - - type: 'null' + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress type: object - title: OpenAIResponseInputMessageContentFile - description: File content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentImage: + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. properties: - detail: - title: Detail - default: auto + response_id: + title: Response Id type: string - enum: - - low - - high - - auto + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: input_image + const: response.output_item.added + default: response.output_item.added title: Type - default: input_image - file_id: - anyOf: - - type: string - - type: 'null' - image_url: - anyOf: - - type: string - - type: 'null' + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded type: object - title: OpenAIResponseInputMessageContentImage - description: Image content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentText: + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. properties: - text: + response_id: + title: Response Id type: string - title: Text + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: input_text + const: response.output_item.done + default: response.output_item.done title: Type - default: input_text - type: object + type: string required: - - text - title: OpenAIResponseInputMessageContentText - description: Text content for input messages in OpenAI response format. - OpenAIResponseInputToolFileSearch: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone + type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. properties: - type: + item_id: + title: Item Id type: string - const: file_search - title: Type - default: file_search - vector_store_ids: - items: - type: string - type: array - title: Vector Store Ids - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - max_num_results: - anyOf: - - type: integer - maximum: 50.0 - minimum: 1.0 - - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - title: SearchRankingOptions - type: object - required: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch - description: File search tool configuration for OpenAI response inputs. - OpenAIResponseInputToolFunction: - properties: + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: function + const: response.output_text.annotation.added + default: response.output_text.annotation.added title: Type - default: function - name: type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - parameters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - type: object required: - - name - - parameters - title: OpenAIResponseInputToolFunction - description: Function tool configuration for OpenAI response inputs. - OpenAIResponseInputToolMCP: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + type: object + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. properties: - type: - type: string - const: mcp - title: Type - default: mcp - server_label: + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - title: Server Label - server_url: + item_id: + title: Item Id type: string - title: Server Url - headers: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - require_approval: - anyOf: - - type: string - const: always - - type: string - const: never - - $ref: '#/components/schemas/ApprovalFilter' - title: ApprovalFilter - title: string | ApprovalFilter - default: never - allowed_tools: - anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter - - type: 'null' - title: list[string] | AllowedToolsFilter - type: object - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - OpenAIResponseInputToolWebSearch: - properties: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.output_text.delta + default: response.output_text.delta title: Type - default: web_search type: string - enum: - - web_search - - web_search_preview - - web_search_preview_2025_03_11 - - web_search_2025_08_26 - search_context_size: - anyOf: - - type: string - pattern: ^low|medium|high$ - - type: 'null' - default: medium + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta type: object - title: OpenAIResponseInputToolWebSearch - description: Web search tool configuration for OpenAI response inputs. - OpenAIResponseMCPApprovalRequest: + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. properties: - arguments: - type: string - title: Arguments - id: - type: string - title: Id - name: + content_index: + title: Content Index + type: integer + text: + title: Text type: string - title: Name - server_label: + item_id: + title: Item Id type: string - title: Server Label + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: mcp_approval_request + const: response.output_text.done + default: response.output_text.done title: Type - default: mcp_approval_request - type: object + type: string required: - - arguments - - id - - name - - server_label - title: OpenAIResponseMCPApprovalRequest - description: A request for human approval of a tool invocation. - OpenAIResponseMCPApprovalResponse: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. properties: - approval_request_id: + item_id: + title: Item Id type: string - title: Approval Request Id - approve: - type: boolean - title: Approve + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - type: string - const: mcp_approval_response + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added title: Type - default: mcp_approval_response - id: - anyOf: - - type: string - - type: 'null' - reason: - anyOf: - - type: string - - type: 'null' - type: object + type: string required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse - description: A response to an MCP approval request. - OpenAIResponseMessage-Output: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. properties: - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role + item_id: + title: Item Id type: string - enum: - - system - - developer - - user - - assistant - default: system + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - type: string - const: message + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done title: Type - default: message - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' - type: object + type: string 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: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. properties: - created_at: - type: integer - title: Created At - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - title: OpenAIResponseError - id: - type: string - title: Id - model: + delta: + title: Delta type: string - title: Model - object: + item_id: + title: Item Id type: string - const: response - title: Object - default: response - output: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - type: array - title: Output - parallel_tool_calls: - type: boolean - title: Parallel Tool Calls - default: false - previous_response_id: - anyOf: - - type: string - - type: 'null' - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt - status: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta + title: Type type: string - title: Status - temperature: - anyOf: - - type: number - - type: 'null' - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - truncation: - anyOf: - - type: string - - type: 'null' - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - title: OpenAIResponseUsage - instructions: - anyOf: - - type: string - - type: 'null' - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - type: object required: - - created_at - - id - - model - - output - - status - title: OpenAIResponseObject - description: Complete OpenAI response object containing generation results and metadata. - OpenAIResponseObjectWithInput-Output: + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. properties: - created_at: - type: integer - title: Created At - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - title: OpenAIResponseError - id: + text: + title: Text type: string - title: Id - model: + item_id: + title: Item Id type: string - title: Model - object: - type: string - const: response - title: Object - default: response - output: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - type: array - title: Output - parallel_tool_calls: - type: boolean - title: Parallel Tool Calls - default: false - previous_response_id: - anyOf: - - type: string - - type: 'null' - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt - status: - type: string - title: Status - temperature: - anyOf: - - type: number - - type: 'null' - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - truncation: - anyOf: - - type: string - - type: 'null' - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - title: OpenAIResponseUsage - instructions: - anyOf: - - type: string - - type: 'null' - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - input: - items: - $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' - type: array - title: Input - type: object - required: - - created_at - - id - - model - - output - - status - - input - title: OpenAIResponseObjectWithInput - description: OpenAI response object extended with input context information. - OpenAIResponseOutputMessageContentOutputText: - properties: - text: - type: string - title: Text + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - type: string - const: output_text + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done title: Type - default: output_text - annotations: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: 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' - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - type: array - title: Annotations - type: object + type: string required: - text - title: OpenAIResponseOutputMessageContentOutputText - OpenAIResponseOutputMessageFileSearchToolCall: + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. properties: - id: + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - title: Id - queries: - items: - type: string - type: array - title: Queries - status: + item_id: + title: Item Id type: string - title: Status + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: file_search_call + const: response.reasoning_text.delta + default: response.reasoning_text.delta title: Type - default: file_search_call - results: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' - type: array - - type: 'null' - type: object + type: string required: - - id - - queries - - status - title: OpenAIResponseOutputMessageFileSearchToolCall - description: File search tool call output message for OpenAI responses. - OpenAIResponseOutputMessageFileSearchToolCallResults: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. properties: - attributes: - additionalProperties: true - type: object - title: Attributes - file_id: + content_index: + title: Content Index + type: integer + text: + title: Text type: string - title: File Id - filename: + item_id: + title: Item Id type: string - title: Filename - score: - type: number - title: Score - text: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done + title: Type type: string - title: Text - type: object required: - - attributes - - file_id - - filename - - score + - content_index - text - title: OpenAIResponseOutputMessageFileSearchToolCallResults - description: Search results returned by the file search operation. - OpenAIResponseOutputMessageFunctionToolCall: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone + type: object + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. properties: - call_id: - type: string - title: Call Id - name: + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - title: Name - arguments: + item_id: + title: Item Id type: string - title: Arguments + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: function_call + const: response.refusal.delta + default: response.refusal.delta title: Type - default: function_call - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' - type: object + type: string required: - - call_id - - name - - arguments - title: OpenAIResponseOutputMessageFunctionToolCall - description: Function tool call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPCall: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta + type: object + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. properties: - id: + content_index: + title: Content Index + type: integer + refusal: + title: Refusal type: string - title: Id - type: + item_id: + title: Item Id type: string - const: mcp_call + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.done + default: response.refusal.done title: Type - default: mcp_call - arguments: type: string - title: Arguments - name: + required: + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone + type: object + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. + properties: + item_id: + title: Item Id type: string - title: Name - server_label: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type type: string - title: Server Label - error: - anyOf: - - type: string - - type: 'null' - output: - anyOf: - - type: string - - type: 'null' - type: object required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - description: Model Context Protocol (MCP) call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPListTools: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. properties: - id: + item_id: + title: Item Id type: string - title: Id + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: mcp_list_tools + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress 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. - OpenAIResponseOutputMessageWebSearchToolCall: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseWebSearchCallSearching: properties: - id: - type: string - title: Id - status: + item_id: + title: Item Id type: string - title: Status + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: web_search_call + const: response.web_search_call.searching + default: response.web_search_call.searching title: Type - default: web_search_call - type: object + type: string required: - - id - - status - title: OpenAIResponseOutputMessageWebSearchToolCall - description: Web search tool call output message for OpenAI responses. + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + type: object OpenAIResponsePrompt: + description: OpenAI compatible Prompt object that is used in OpenAI responses. properties: id: - type: string title: Id + type: string variables: anyOf: - additionalProperties: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText @@ -4019,36 +3271,33 @@ components: title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: object - type: 'null' + nullable: true version: anyOf: - type: string - type: 'null' - type: object + nullable: true required: - id title: OpenAIResponsePrompt - description: OpenAI compatible Prompt object that is used in OpenAI responses. + type: object OpenAIResponseText: + description: Text response configuration for OpenAI responses. properties: format: anyOf: - $ref: '#/components/schemas/OpenAIResponseTextFormat' title: OpenAIResponseTextFormat - type: 'null' + nullable: true title: OpenAIResponseTextFormat - type: object title: OpenAIResponseText - description: Text response configuration for OpenAI responses. + type: object OpenAIResponseTextFormat: + description: Configuration for Responses API text format. properties: type: title: Type @@ -4075,4764 +3324,5129 @@ components: anyOf: - type: boolean - type: 'null' - type: object title: OpenAIResponseTextFormat - description: Configuration for Responses API text format. - 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 - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter - - type: 'null' - title: list[string] | AllowedToolsFilter type: object - required: - - server_label - title: OpenAIResponseToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. OpenAIResponseUsage: + description: Usage information for OpenAI response. properties: input_tokens: - type: integer title: Input Tokens - output_tokens: type: integer + output_tokens: title: Output Tokens - total_tokens: type: integer + total_tokens: title: Total Tokens + type: integer input_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' title: OpenAIResponseUsageInputTokensDetails - type: 'null' + nullable: true title: OpenAIResponseUsageInputTokensDetails output_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' title: OpenAIResponseUsageOutputTokensDetails - type: 'null' + nullable: true title: OpenAIResponseUsageOutputTokensDetails - type: object required: - input_tokens - output_tokens - total_tokens title: OpenAIResponseUsage - description: Usage information for OpenAI response. + type: object OpenAIResponseUsageInputTokensDetails: + description: Token details for input tokens in OpenAI response usage. properties: cached_tokens: anyOf: - type: integer - type: 'null' - type: object + nullable: true title: OpenAIResponseUsageInputTokensDetails - description: Token details for input tokens in OpenAI response usage. + type: object OpenAIResponseUsageOutputTokensDetails: + description: Token details for output tokens in OpenAI response usage. properties: reasoning_tokens: anyOf: - type: integer - type: 'null' - type: object + nullable: true title: OpenAIResponseUsageOutputTokensDetails - description: Token details for output tokens in OpenAI response usage. - OpenAISystemMessageParam: + type: object + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) + OpenAIResponseInputFunctionToolCallOutput: + description: This represents the output of a function call that gets passed back to the model. properties: - role: + call_id: + title: Call Id type: string - const: system - title: Role - default: system - content: + output: + title: Output + type: string + type: + const: function_call_output + default: function_call_output + title: Type + type: string + id: anyOf: - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: + - type: 'null' + nullable: true + status: anyOf: - type: string - type: 'null' - type: object + nullable: true required: - - content - title: OpenAISystemMessageParam - description: A system message providing instructions or context to the model. - OpenAITokenLogProb: - properties: - token: - type: string - title: Token - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - logprob: - type: number - title: Logprob - top_logprobs: - items: - $ref: '#/components/schemas/OpenAITopLogProb' - type: array - title: Top Logprobs + - call_id + - output + title: OpenAIResponseInputFunctionToolCallOutput type: object - required: - - token - - logprob - - top_logprobs - title: 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 - OpenAIToolMessageParam: + OpenAIResponseMCPApprovalResponse: + description: A response to an MCP approval request. properties: - role: + approval_request_id: + title: Approval Request Id type: string - const: tool - title: Role - default: tool - tool_call_id: + approve: + title: Approve + type: boolean + type: + const: mcp_approval_response + default: mcp_approval_response + title: Type type: string - title: Tool Call Id - content: + id: anyOf: - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - 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. - OpenAITopLogProb: - properties: - token: - type: string - title: Token - bytes: + - type: 'null' + nullable: true + reason: anyOf: - - items: - type: integer - type: array + - type: string - type: 'null' - logprob: - type: number - title: Logprob - type: object + nullable: true required: - - token - - logprob - title: 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 - OpenAIUserMessageParam-Input: - properties: - role: - type: string - const: user - title: Role - default: user - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: - anyOf: - - type: string - - type: 'null' + - approval_request_id + - approve + title: OpenAIResponseMCPApprovalResponse type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - OpenAIUserMessageParam-Output: + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + ArrayType: + description: Parameter type for array values. properties: - role: + type: + const: array + default: array + title: Type type: string - const: user - title: Role - default: user - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: - anyOf: - - type: string - - type: 'null' + title: ArrayType type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - OptimizerConfig: + BooleanType: + description: Parameter type for boolean values. 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: + const: boolean + default: boolean + title: Type + type: string + title: BooleanType type: object - required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: Configuration parameters for the optimization algorithm. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: Available optimizer algorithms for training. - OutputTokensDetails: + ChatCompletionInputType: + description: Parameter type for chat completion input. properties: - reasoning_tokens: - type: integer - title: Reasoning Tokens - additionalProperties: true + type: + const: chat_completion_input + default: chat_completion_input + title: Type + type: string + title: ChatCompletionInputType type: object - required: - - reasoning_tokens - title: OutputTokensDetails - PaginatedResponse: + CompletionInputType: + description: Parameter type for completion input. properties: - data: - items: - additionalProperties: true - type: object - type: array - title: Data - has_more: - type: boolean - title: Has More - url: - anyOf: - - type: string - - type: 'null' + type: + const: completion_input + default: completion_input + title: Type + type: string + title: CompletionInputType type: object - required: - - data - - has_more - title: PaginatedResponse - description: A generic paginated response that follows a simple format. - PostTrainingJob: + JsonType: + description: Parameter type for JSON values. properties: - job_uuid: + type: + const: json + default: json + title: Type type: string - title: Job Uuid + title: JsonType type: object - required: - - job_uuid - title: PostTrainingJob - PostTrainingJobArtifactsResponse: + NumberType: + description: Parameter type for numeric values. properties: - job_uuid: + type: + const: number + default: number + title: Type type: string - title: Job Uuid - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints + title: NumberType type: object - required: - - job_uuid - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingJobStatusResponse: + ObjectType: + description: Parameter type for object values. properties: - job_uuid: + type: + const: object + default: object + title: Type type: string - title: Job Uuid - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - type: string - format: date-time - - type: 'null' - started_at: - anyOf: - - type: string - format: date-time - - type: 'null' - completed_at: - anyOf: - - type: string - format: date-time - - type: 'null' - resources_allocated: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints + title: ObjectType type: object - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - PostTrainingMetric: - properties: - epoch: - type: integer - title: Epoch - train_loss: - type: number - title: Train Loss - validation_loss: - type: number - title: Validation Loss - perplexity: - type: number - title: Perplexity - type: object - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: Training metrics captured during post-training jobs. - Prompt: + StringType: + description: Parameter type for string values. properties: - prompt: - anyOf: - - type: string - - type: 'null' - description: The system prompt with variable placeholders - version: - type: integer - minimum: 1.0 - title: Version - description: Version (integer starting at 1, incremented on save) - prompt_id: + type: + const: string + default: string + title: Type 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 + title: StringType type: object - required: - - version - - prompt_id - title: Prompt - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. - ProviderInfo: + UnionType: + description: Parameter type for union values. properties: - api: - type: string - title: Api - provider_id: - type: string - title: Provider Id - provider_type: + type: + const: union + default: union + title: Type type: string - title: Provider Type - config: - additionalProperties: true - type: object - title: Config - health: - additionalProperties: true - type: object - title: Health + title: UnionType type: object - required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo - description: Information about a registered provider including its configuration and health status. - QATFinetuningConfig: + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + ConversationItem: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + RowsDataSource: + description: A dataset stored in rows. properties: type: - type: string - const: QAT + const: rows + default: rows title: Type - default: QAT - quantizer_name: type: string - title: Quantizer Name - group_size: - type: integer - title: Group Size - type: object - required: - - quantizer_name - - group_size - title: QATFinetuningConfig - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - QueryChunksResponse: - properties: - chunks: - items: - $ref: '#/components/schemas/Chunk-Output' - type: array - title: Chunks - scores: + rows: items: - type: number + additionalProperties: true + type: object + title: Rows type: array - title: Scores - type: object required: - - chunks - - scores - title: QueryChunksResponse - description: Response from querying chunks in a vector database. - RegexParserScoringFnParams: + - rows + title: RowsDataSource + type: object + URIDataSource: + description: A dataset that can be obtained from a URI. properties: type: + const: uri + default: uri + title: Type type: string - const: regex_parser + uri: + title: Uri + type: string + required: + - uri + title: URIDataSource + type: object + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + AggregationFunctionType: + description: Types of aggregation functions for scoring results. + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + type: string + BasicScoringFnParams: + description: Parameters for basic scoring function configuration. + properties: + type: + const: basic + default: basic title: Type - default: regex_parser - parsing_regexes: - items: - type: string - type: array - title: Parsing Regexes - description: Regex to extract the answer from generated response + type: string aggregation_functions: + description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - type: array title: Aggregation Functions - description: Aggregation functions to apply to the scores of each row + type: array + title: BasicScoringFnParams type: object - title: RegexParserScoringFnParams - description: Parameters for regex parser scoring function configuration. - 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. - RerankResponse: + LLMAsJudgeScoringFnParams: + description: Parameters for LLM-as-judge scoring function configuration. properties: - data: + 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' + nullable: true + judge_score_regexes: + description: Regexes to extract the answer from generated response items: - $ref: '#/components/schemas/RerankData' + type: string + title: Judge Score Regexes + type: array + aggregation_functions: + description: Aggregation functions to apply to the scores of each row + items: + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions type: array - title: Data - type: object required: - - data - title: RerankResponse - description: Response from a reranking request. - RouteInfo: + - judge_model + title: LLMAsJudgeScoringFnParams + type: object + RegexParserScoringFnParams: + description: Parameters for regex parser scoring function configuration. properties: - route: - type: string - title: Route - method: + type: + const: regex_parser + default: regex_parser + title: Type type: string - title: Method - provider_types: + parsing_regexes: + description: Regex to extract the answer from generated response items: type: string + title: Parsing Regexes type: array - title: Provider Types + aggregation_functions: + description: Aggregation functions to apply to the scores of each row + items: + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array + title: RegexParserScoringFnParams type: object - required: - - route - - method - - provider_types - title: RouteInfo - description: Information about an API route including its path, method, and implementing providers. - RowsDataSource: + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + LoraFinetuningConfig: + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. properties: type: - type: string - const: rows + const: LoRA + default: LoRA title: Type - default: rows - rows: + type: string + lora_attn_modules: items: - additionalProperties: true - type: object + type: string + title: Lora Attn Modules type: array - title: Rows - type: object - required: - - rows - title: RowsDataSource - description: A dataset stored in rows. - RunShieldResponse: - properties: - violation: + apply_lora_to_mlp: + title: Apply Lora To Mlp + type: boolean + apply_lora_to_output: + title: Apply Lora To Output + type: boolean + rank: + title: Rank + type: integer + alpha: + title: Alpha + type: integer + use_dora: anyOf: - - $ref: '#/components/schemas/SafetyViolation' - title: SafetyViolation + - type: boolean - type: 'null' - title: SafetyViolation - type: object - title: RunShieldResponse - description: Response from running a safety shield. - SafetyViolation: - properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - user_message: + default: false + quantize_base: anyOf: - - type: string + - type: boolean - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata + default: false + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig type: object + QATFinetuningConfig: + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. + properties: + type: + const: QAT + default: QAT + title: Type + type: string + quantizer_name: + title: Quantizer Name + type: string + group_size: + title: Group Size + type: integer required: - - violation_level - title: SafetyViolation - description: Details of a safety violation detected by content moderation. - SamplingParams: + - quantizer_name + - group_size + title: QATFinetuningConfig + type: object + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + SpanEndPayload: + description: Payload for a span end event. properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - max_tokens: - anyOf: - - type: integer - - type: 'null' - repetition_penalty: - anyOf: - - type: number - - type: 'null' - default: 1.0 - stop: - anyOf: - - items: - type: string - type: array - - type: 'null' + type: + const: span_end + default: span_end + title: Type + type: string + status: + $ref: '#/components/schemas/SpanStatus' + required: + - status + title: SpanEndPayload type: object - title: SamplingParams - description: Sampling parameters. - ScoreBatchResponse: + SpanStartPayload: + description: Payload for a span start event. properties: - dataset_id: + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: anyOf: - type: string - type: 'null' - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results - type: object + nullable: true required: - - results - title: ScoreBatchResponse - description: Response from batch scoring operations on datasets. - ScoreResponse: - properties: - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results + - name + title: SpanStartPayload type: object - required: - - results - title: ScoreResponse - description: The response from scoring. - ScoringFn: + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: - identifier: + trace_id: + title: Trace Id type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: + span_id: + title: Span Id type: string - title: Provider Id - description: ID of the provider that owns this resource - type: + timestamp: + format: date-time + title: Timestamp type: string - const: scoring_function - title: Type - default: scoring_function - description: - anyOf: - - type: string - - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - description: Any additional metadata for this definition - return_type: - oneOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - description: The return type of the deterministic function - discriminator: - propertyName: type - mapping: - 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: + attributes: anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: Params - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval - type: object - required: - - identifier - - provider_id - - return_type - title: ScoringFn - description: A scoring function resource for evaluating model outputs. - ScoringResult: - properties: - score_rows: - items: - additionalProperties: true + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) 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. - SearchRankingOptions: - properties: - ranker: - anyOf: - - type: string - type: 'null' - score_threshold: + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: anyOf: + - type: integer - type: number - - type: 'null' - default: 0.0 + title: integer | number + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent type: object - title: SearchRankingOptions - description: Options for ranking and filtering search results. - Shield: + StructuredLogEvent: + description: A structured log event containing typed payload data. properties: - identifier: + trace_id: + title: Trace Id type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: + span_id: + title: Span Id type: string - title: Provider Id - description: ID of the provider that owns this resource - type: + timestamp: + format: date-time + title: Timestamp type: string - const: shield - title: Type - default: shield - params: + attributes: anyOf: - - additionalProperties: true + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - type: object - required: - - identifier - - provider_id - title: Shield - description: A safety shield resource that can be used to check content. - StringType: - properties: type: - type: string - const: string + const: structured_log + default: structured_log title: Type - default: string - type: object - title: StringType - description: Parameter type for string values. - SystemMessage: - properties: - role: type: string - const: system - title: Role - default: system - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - type: object + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload required: - - content - title: SystemMessage - description: A system message providing instructions or context to the model. - TextContentItem: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. properties: - type: + trace_id: + title: Trace Id type: string - const: text + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: unstructured_log + default: unstructured_log title: Type - default: text - text: type: string - title: Text + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' + required: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + title: Data + type: array + object: + const: list + default: list + title: Object + type: string required: - - text - title: TextContentItem - description: A text content item - ToolDef: + - data + title: ListOpenAIResponseInputItem + type: object + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. properties: - toolgroup_id: + created_at: + title: Created At + type: integer + error: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' - name: + nullable: true + title: OpenAIResponseError + id: + title: Id type: string - title: Name - description: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output + type: array + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: anyOf: - type: string - type: 'null' - input_schema: + nullable: true + prompt: anyOf: - - additionalProperties: true - type: object + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' - output_schema: + nullable: true + title: OpenAIResponsePrompt + status: + title: Status + type: string + temperature: anyOf: - - additionalProperties: true - type: object + - type: number - type: 'null' - metadata: + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: anyOf: - - additionalProperties: true - type: object + - type: number - type: 'null' - type: object - required: - - name - title: ToolDef - description: Tool definition used in runtime contexts. - ToolGroup: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + nullable: true + tools: anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - 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: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - identifier - - provider_id - title: ToolGroup - description: A group of related tools managed together. - ToolInvocationResult: - properties: - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem discriminator: - propertyName: type mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - title: list[ImageContentItem-Output | TextContentItem] - type: 'null' - title: string | list[ImageContentItem-Output | TextContentItem] - error_message: + nullable: true + truncation: anyOf: - type: string - type: 'null' - error_code: + nullable: true + usage: anyOf: - - type: integer + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' - metadata: + nullable: true + title: OpenAIResponseUsage + instructions: anyOf: - - additionalProperties: true - type: object + - type: string + - type: 'null' + nullable: true + max_tool_calls: + anyOf: + - type: integer - type: 'null' + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + title: Input + type: array + required: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput type: object - title: ToolInvocationResult - description: Result of a tool invocation. - TopKSamplingStrategy: + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. properties: - type: + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - const: top_k - title: Type - default: top_k - top_k: - type: integer - minimum: 1.0 - title: Top K + 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. + properties: + id: + title: Id + type: string + object: + const: response + default: response + title: Object + type: string + deleted: + default: true + title: Deleted + type: boolean required: - - top_k - title: TopKSamplingStrategy - description: Top-k sampling strategy that restricts sampling to the k most likely tokens. - TopPSamplingStrategy: + - id + title: OpenAIDeleteResponseObject + type: object + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. properties: type: - type: string - const: top_p title: Type - default: top_p - temperature: - anyOf: - - type: number - minimum: 0.0 - - type: 'null' - top_p: - anyOf: - - type: number - - type: 'null' - default: 0.95 - type: object + type: string required: - - temperature - title: TopPSamplingStrategy - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. - TrainingConfig: + - type + title: ResponseGuardrailSpec + type: object + Batch: + additionalProperties: true properties: - n_epochs: - type: integer - title: N Epochs - max_steps_per_epoch: - type: integer - title: Max Steps Per Epoch - default: 1 - gradient_accumulation_steps: + id: + title: Id + type: string + completion_window: + title: Completion Window + type: string + created_at: + title: Created At type: integer - title: Gradient Accumulation Steps - default: 1 - max_validation_steps: + endpoint: + title: Endpoint + type: string + input_file_id: + title: Input File Id + type: string + object: + const: batch + title: Object + type: string + status: + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + title: Status + type: string + cancelled_at: anyOf: - type: integer - type: 'null' - default: 1 - data_config: + nullable: true + cancelling_at: anyOf: - - $ref: '#/components/schemas/DataConfig' - title: DataConfig + - type: integer - type: 'null' - title: DataConfig - optimizer_config: + nullable: true + completed_at: anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - title: OptimizerConfig + - type: integer - type: 'null' - title: OptimizerConfig - efficiency_config: + nullable: true + error_file_id: anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - title: EfficiencyConfig + - type: string - type: 'null' - title: EfficiencyConfig - dtype: + nullable: true + errors: + anyOf: + - $ref: '#/components/schemas/Errors' + title: Errors + - type: 'null' + nullable: true + title: Errors + expired_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + expires_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + failed_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + finalizing_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + in_progress_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + nullable: true + model: anyOf: - type: string - type: 'null' - default: bf16 - type: object - required: - - n_epochs - title: TrainingConfig - description: Comprehensive configuration for the training process. - 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. - URL: - properties: - uri: - type: string - title: Uri - type: object + nullable: true + output_file_id: + anyOf: + - type: string + - type: 'null' + nullable: true + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts + - type: 'null' + nullable: true + title: BatchRequestCounts + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage + - type: 'null' + nullable: true + title: BatchUsage required: - - uri - title: URL - description: A URL reference to external content. - UnionType: - properties: - type: - type: string - const: union - title: Type - default: union + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch type: object - title: UnionType - description: Parameter type for union values. - VectorStoreChunkingStrategyAuto: + BatchError: + additionalProperties: true properties: - type: - type: string - const: auto - title: Type - default: auto + code: + anyOf: + - type: string + - type: 'null' + nullable: true + line: + anyOf: + - type: integer + - type: 'null' + nullable: true + message: + anyOf: + - type: string + - type: 'null' + nullable: true + param: + anyOf: + - type: string + - type: 'null' + nullable: true + title: BatchError type: object - title: VectorStoreChunkingStrategyAuto - description: Automatic chunking strategy for vector store files. - VectorStoreChunkingStrategyStatic: + BatchRequestCounts: + additionalProperties: true properties: - type: - type: string - const: static - title: Type - default: static - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' - type: object + completed: + title: Completed + type: integer + failed: + title: Failed + type: integer + total: + title: Total + type: integer required: - - static - title: VectorStoreChunkingStrategyStatic - description: Static chunking strategy with configurable parameters. - VectorStoreChunkingStrategyStaticConfig: + - completed + - failed + - total + title: BatchRequestCounts + type: object + BatchUsage: + additionalProperties: true properties: - chunk_overlap_tokens: + input_tokens: + title: Input Tokens type: integer - title: Chunk Overlap Tokens - default: 400 - max_chunk_size_tokens: + input_tokens_details: + $ref: '#/components/schemas/InputTokensDetails' + output_tokens: + title: Output Tokens type: integer - maximum: 4096.0 - minimum: 100.0 - title: Max Chunk Size Tokens - default: 800 + output_tokens_details: + $ref: '#/components/schemas/OutputTokensDetails' + total_tokens: + title: Total Tokens + type: integer + required: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage type: object - title: VectorStoreChunkingStrategyStaticConfig - description: Configuration for static chunking strategy. - VectorStoreContent: + Errors: + additionalProperties: true properties: - type: - type: string - const: text - title: Type - text: - type: string - title: Text - embedding: + data: anyOf: - items: - type: number + $ref: '#/components/schemas/BatchError' type: array - type: 'null' - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - title: ChunkMetadata - metadata: + nullable: true + object: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + nullable: true + title: Errors type: object - required: - - type - - text - title: VectorStoreContent - description: Content item from a vector store file or search result. - VectorStoreDeleteResponse: + InputTokensDetails: + additionalProperties: true properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store.deleted - deleted: - type: boolean - title: Deleted - default: true - type: object - required: - - id - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - VectorStoreFileBatchObject: - properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store.file_batch - created_at: + cached_tokens: + title: Cached Tokens type: integer - title: Created At - vector_store_id: - type: string - title: Vector Store Id - status: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - 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. - VectorStoreFileContentResponse: - properties: - object: - type: string - const: vector_store.file_content.page - title: Object - default: vector_store.file_content.page - data: - items: - $ref: '#/components/schemas/VectorStoreContent' - type: array - title: Data - has_more: - type: boolean - title: Has More - default: false - next_page: - anyOf: - - type: string - - type: 'null' + - cached_tokens + title: InputTokensDetails type: object - required: - - data - title: VectorStoreFileContentResponse - description: Represents the parsed content of a vector store file. - VectorStoreFileCounts: + OutputTokensDetails: + additionalProperties: true properties: - completed: - type: integer - title: Completed - cancelled: - type: integer - title: Cancelled - failed: - type: integer - title: Failed - in_progress: - type: integer - title: In Progress - total: + reasoning_tokens: + title: Reasoning Tokens type: integer - title: Total - type: object - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - description: File processing status counts for a vector store. - VectorStoreFileDeleteResponse: - properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store.file.deleted - deleted: - type: boolean - title: Deleted - default: true - type: object required: - - id - title: VectorStoreFileDeleteResponse - description: Response from deleting a vector store file. - VectorStoreFileLastError: - properties: - code: - title: Code - type: string - enum: - - server_error - - rate_limit_exceeded - default: server_error - message: - type: string - title: Message + - reasoning_tokens + title: OutputTokensDetails type: object - required: - - code - - message - title: VectorStoreFileLastError - description: Error information for failed vector store file processing. - VectorStoreFileObject: + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - id: - type: string - title: Id object: - type: string + const: list + default: list title: Object - default: vector_store.file - attributes: - additionalProperties: true - type: object - title: Attributes - chunking_strategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - created_at: - type: integer - title: Created At - last_error: - anyOf: - - $ref: '#/components/schemas/VectorStoreFileLastError' - title: VectorStoreFileLastError - - type: 'null' - title: VectorStoreFileLastError - status: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - 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. - VectorStoreFilesListInBatchResponse: - properties: - object: type: string - title: Object - default: list data: + description: List of batch objects items: - $ref: '#/components/schemas/VectorStoreFileObject' - type: array + $ref: '#/components/schemas/Batch' title: Data + type: array first_id: anyOf: - type: string - type: 'null' + description: ID of the first batch in the list + nullable: true last_id: anyOf: - type: string - type: 'null' + description: ID of the last batch in the list + nullable: true has_more: - type: boolean - title: Has More default: false - type: object + description: Whether there are more batches available + title: Has More + type: boolean required: - data - title: VectorStoreFilesListInBatchResponse - description: Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: + title: ListBatchesResponse + type: object + Benchmark: + description: A benchmark resource for evaluating model performance. properties: - object: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - type: array - title: Data - first_id: - anyOf: - - type: string - - type: 'null' - last_id: + provider_resource_id: anyOf: - type: string - type: 'null' - has_more: - type: boolean - title: Has More - default: false - type: object - required: - - data - title: VectorStoreListFilesResponse - description: Response from listing files in a vector store. - VectorStoreListResponse: - properties: - object: - type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - type: array - title: Data - first_id: - anyOf: - - type: string - - type: 'null' - last_id: - anyOf: - - type: string - - type: 'null' - has_more: - type: boolean - title: Has More - default: false - type: object - required: - - data - title: VectorStoreListResponse - description: Response from listing vector stores. - VectorStoreObject: - properties: - id: + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - title: Id - object: + type: + const: benchmark + default: benchmark + title: Type type: string - title: Object - default: vector_store - created_at: - type: integer - title: Created At - name: - anyOf: - - type: string - - type: 'null' - usage_bytes: - type: integer - title: Usage Bytes - default: 0 - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - status: + dataset_id: + title: Dataset Id type: string - title: Status - default: completed - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - expires_at: - anyOf: - - type: integer - - type: 'null' - last_active_at: - anyOf: - - type: integer - - type: 'null' + scoring_functions: + items: + type: string + title: Scoring Functions + type: array metadata: additionalProperties: true - type: object + description: Metadata for this evaluation task title: Metadata - type: object + type: object required: - - id - - created_at - - file_counts - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreSearchResponse-Output: + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark + type: object + ImageDelta: + description: An image content delta for streaming responses. properties: - file_id: + type: + const: image + default: image + title: Type type: string - title: File Id - filename: + image: + format: binary + title: Image type: string - title: Filename - score: - type: number - title: Score - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - title: string | number | boolean - type: object - - type: 'null' - 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. - VectorStoreSearchResponsePage: + - image + title: ImageDelta + type: object + TextDelta: + description: A text content delta for streaming responses. properties: - object: + type: + const: text + default: text + title: Type + type: string + text: + title: Text type: string - title: Object - default: vector_store.search_results.page - search_query: - items: - type: string - type: array - title: Search Query - data: - items: - $ref: '#/components/schemas/VectorStoreSearchResponse-Output' - type: array - title: Data - has_more: - type: boolean - title: Has More - default: false - next_page: - anyOf: - - type: string - - type: 'null' - type: object required: - - search_query - - data - title: VectorStoreSearchResponsePage - description: Paginated response from searching a vector store. - VersionInfo: + - text + title: TextDelta + type: object + JobStatus: + description: Status of a job execution. + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + type: string + Job: + description: A job execution instance with status tracking. properties: - version: + job_id: + title: Job Id type: string - title: Version - type: object + status: + $ref: '#/components/schemas/JobStatus' required: - - version - title: VersionInfo - description: Version information for the service. - ViolationLevel: - type: string - enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - _URLOrData: + - job_id + - status + title: Job + type: object + MetricInResponse: + description: A metric value included in API responses. properties: - url: + metric: + title: Metric + type: string + value: anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - data: + - type: integer + - type: number + title: integer | number + unit: anyOf: - type: string - type: 'null' - contentEncoding: base64 + nullable: true + required: + - metric + - value + title: MetricInResponse type: object - title: _URLOrData - description: A URL or a base64 encoded string - _eval_benchmarks_benchmark_id_evaluations_Request: + PaginatedResponse: + description: A generic paginated response that follows a simple format. properties: - input_rows: + data: items: additionalProperties: true type: object + title: Data type: array - title: Input Rows - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - type: object - required: - - input_rows - - scoring_functions - - benchmark_config - title: _eval_benchmarks_benchmark_id_evaluations_Request - _inference_rerank_Request: - properties: - model: - type: string - title: Model - query: + has_more: + title: Has More + type: boolean + url: anyOf: - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - items: - items: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - type: array - title: Items - max_num_results: - anyOf: - - type: integer - type: 'null' - type: object + nullable: true required: - - model - - query - - items - title: _inference_rerank_Request - _post_training_preference_optimize_Request: - properties: - job_uuid: - type: string - title: Job Uuid - finetuned_model: - type: string - title: Finetuned Model - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config + - data + - has_more + title: PaginatedResponse type: object - required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: _post_training_preference_optimize_Request - _post_training_supervised_fine_tune_Request: + PostTrainingMetric: + description: Training metrics captured during post-training jobs. properties: - job_uuid: - type: string - title: Job Uuid - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - model: - anyOf: - - type: string - - type: 'null' - description: Model descriptor for training if not in provider config` - checkpoint_dir: - anyOf: - - type: string - - type: 'null' - algorithm_config: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - discriminator: - propertyName: type - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - title: LoraFinetuningConfig | QATFinetuningConfig - - type: 'null' - title: Algorithm Config - 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: - - job_uuid - - training_config - - hyperparam_search_config - - logger_config - title: _post_training_supervised_fine_tune_Request - Error: - description: Error response from the API. Roughly follows RFC 7807. + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + type: object + Checkpoint: + description: Checkpoint created during training runs. properties: - status: - title: Status + identifier: + title: Identifier + type: string + created_at: + format: date-time + title: Created At + type: string + epoch: + title: Epoch type: integer - title: - title: Title + post_training_job_id: + title: Post Training Job Id type: string - detail: - title: Detail + path: + title: Path type: string - instance: + training_metrics: anyOf: - - type: string + - $ref: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric - type: 'null' nullable: true + title: PostTrainingMetric required: - - status - - title - - detail - title: Error + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint type: object - ImageContentItem: - description: A image content item + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: type: - const: image - default: image + const: dialog + default: dialog title: Type type: string - image: - $ref: '#/components/schemas/_URLOrData' - required: - - image - title: ImageContentItem + title: DialogType type: object - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - BuiltinTool: - enum: - - brave_search - - wolfram_alpha - - photogen - - code_interpreter - title: BuiltinTool - type: string - ImageDelta: - description: An image content delta for streaming responses. + Conversation: + description: OpenAI-compatible conversation object. properties: - type: - const: image - default: image - title: Type + id: + description: The unique ID of the conversation. + title: Id type: string - image: - format: binary - title: Image + object: + const: conversation + default: conversation + description: The object type, which is always conversation. + 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. + nullable: true + 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. + nullable: true required: - - image - title: ImageDelta + - id + - created_at + title: Conversation type: object - TextDelta: - description: A text content delta for streaming responses. + ConversationDeletedResource: + description: Response for deleted conversation. properties: - type: - const: text - default: text - title: Type + id: + description: The deleted conversation identifier + title: Id type: string - text: - title: Text + 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: - - text - title: TextDelta + - id + title: ConversationDeletedResource type: object - ToolCall: + ConversationItemCreateRequest: + description: Request body for creating conversation items. properties: - call_id: - title: Call Id - type: string - tool_name: - anyOf: - - $ref: '#/components/schemas/BuiltinTool' - title: BuiltinTool - - type: string - title: BuiltinTool | string - arguments: - title: Arguments + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array + required: + - items + title: ConversationItemCreateRequest + 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: - - call_id - - tool_name - - arguments - title: ToolCall + - id + title: ConversationItemDeletedResource type: object - ToolCallDelta: - description: A tool call content delta for streaming responses. + ConversationItemList: + description: List of conversation items with pagination. properties: - type: - const: tool_call - default: tool_call - title: Type + object: + default: list + description: Object type + title: Object type: string - tool_call: + data: + description: List of conversation items + items: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + title: Data + type: array + first_id: anyOf: - type: string - - $ref: '#/components/schemas/ToolCall' - title: ToolCall - title: string | ToolCall - parse_status: - $ref: '#/components/schemas/ToolCallParseStatus' + - type: 'null' + description: The ID of the first item in the list + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + description: The ID of the last item in the list + nullable: true + has_more: + default: false + description: Whether there are more items available + title: Has More + type: boolean required: - - tool_call - - parse_status - title: ToolCallDelta + - data + title: ConversationItemList type: object - ToolCallParseStatus: - description: Status of tool call parsing during streaming. - enum: - - started - - in_progress - - failed - - succeeded - title: ToolCallParseStatus - type: string - ContentDelta: - discriminator: - mapping: - image: '#/components/schemas/ImageDelta' - text: '#/components/schemas/TextDelta' - tool_call: '#/components/schemas/ToolCallDelta' - propertyName: type - oneOf: - - $ref: '#/components/schemas/TextDelta' - title: TextDelta - - $ref: '#/components/schemas/ImageDelta' - title: ImageDelta - - $ref: '#/components/schemas/ToolCallDelta' - title: ToolCallDelta - title: TextDelta | ImageDelta | ToolCallDelta - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. + ConversationMessage: + description: OpenAI-compatible message item for conversations. properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true + type: object + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string type: - const: grammar - default: grammar + const: message + default: message title: Type type: string - bnf: - additionalProperties: true - title: Bnf - type: object + object: + const: message + default: message + title: Object + type: string required: - - bnf - title: GrammarResponseFormat + - id + - content + - role + - status + title: ConversationMessage type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. + DatasetPurpose: + description: Purpose of the dataset. Each purpose has a required input data schema. + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + title: DatasetPurpose + type: string + Dataset: + description: Dataset resource for storing and accessing training or evaluation data. 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 + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string type: - const: json_schema - default: json_schema + const: dataset + default: dataset title: Type type: string - json_schema: + purpose: + $ref: '#/components/schemas/DatasetPurpose' + source: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + metadata: additionalProperties: true - title: Json Schema + description: Any additional metadata for this dataset + title: Metadata type: object required: - - json_schema - title: JsonSchemaResponseFormat + - identifier + - provider_id + - purpose + - source + title: Dataset type: object - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + Error: + description: Error response from the API. Roughly follows RFC 7807. properties: - role: - const: assistant - default: assistant - title: Role + status: + title: Status + type: integer + title: + title: Title type: string - content: + detail: + title: Detail + type: string + instance: anyOf: - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] nullable: true - name: + required: + - status + - title + - detail + title: Error + type: object + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + InlineProviderSpec: + properties: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - tool_calls: + deprecation_error: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - title: OpenAIAssistantMessageParam - type: object - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. - properties: - role: - const: user - default: user - title: Role - type: string - content: + module: 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' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: + - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: + anyOf: + - type: string + - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: + anyOf: + - type: string + - type: 'null' + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. + nullable: true + description: anyOf: - type: string - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. nullable: true required: - - content - title: OpenAIUserMessageParam + - api + - provider_type + - config_class + title: InlineProviderSpec type: object - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - OpenAIResponseFormatParam: - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - VectorStoreFileStatus: - type: string + ModelType: + description: Enumeration of supported model types in Llama Stack. enum: - - completed - - in_progress - - cancelled - - failed - default: completed - OpenAIResponseInputMessageContent: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - 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. + - llm + - embedding + - rerank + title: ModelType + type: string + Model: + description: A model resource representing an AI model registered in Llama Stack. properties: - content: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier + type: string + provider_resource_id: 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' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - enum: - - system - - developer - - user - - assistant - default: system type: - const: message - default: message + const: model + default: model title: Type type: string - id: + metadata: + additionalProperties: true + description: Any additional metadata for this model + title: Metadata + type: object + model_type: + $ref: '#/components/schemas/ModelType' + default: llm + required: + - identifier + - provider_id + title: Model + type: object + ProviderSpec: + properties: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - status: + deprecation_error: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: + anyOf: + - type: string + - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - type: string - type: 'null' nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array required: - - content - - role - title: OpenAIResponseMessage + - api + - provider_type + - config_class + title: ProviderSpec type: object - OpenAIResponseOutput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseContentPartOutputText: - description: Text content within a streamed response part. + RemoteProviderSpec: properties: - type: - const: output_text - default: output_text - title: Type + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - text: - title: Text + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class type: string - annotations: + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality items: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations + $ref: '#/components/schemas/Api' + title: Api Dependencies type: array - logprobs: + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - - items: - additionalProperties: true - type: object - type: array + - type: string + - type: 'null' + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: + anyOf: + - type: string + - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: + anyOf: + - type: string + - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type + type: string + description: + anyOf: + - type: string - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. nullable: true required: - - text - title: OpenAIResponseContentPartOutputText + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec type: object - OpenAIResponseContentPartReasoningText: - description: Reasoning text emitted as part of a streamed response. + ScoringFn: + description: A scoring function resource for evaluating model outputs. 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 + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string type: - const: reasoning_text - default: reasoning_text + const: scoring_function + default: scoring_function title: Type type: string - text: - title: Text - type: string + description: + anyOf: + - type: string + - type: 'null' + 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: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + params: + anyOf: + - discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + title: Params + nullable: true required: - - text - title: OpenAIResponseContentPartReasoningText + - identifier + - provider_id + - return_type + title: ScoringFn type: object - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseContentPartReasoningSummary: - description: Reasoning summary part in a streamed response. + Shield: + description: A safety shield resource that can be used to check content. properties: - type: - const: summary_text - default: summary_text - title: Type + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - text: - title: Text + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - required: - - text - title: OpenAIResponseContentPartReasoningSummary - type: object - OpenAIResponseObjectStreamResponseCompleted: - description: Streaming event indicating a response has been completed. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' type: - const: response.completed - default: response.completed + const: shield + default: shield title: Type type: string + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true required: - - response - title: OpenAIResponseObjectStreamResponseCompleted + - identifier + - provider_id + title: Shield type: object - OpenAIResponseObjectStreamResponseContentPartAdded: - description: Streaming event for when a new content part is added to a response item. + ToolGroup: + description: A group of related tools managed together. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - item_id: - title: Item Id + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer type: - const: response.content_part.added - default: response.content_part.added + const: tool_group + default: tool_group title: Type type: string + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartAdded + - identifier + - provider_id + title: ToolGroup type: object - OpenAIResponseObjectStreamResponseContentPartDone: - description: Streaming event for when a content part is completed. + ModelCandidate: + description: A model candidate for evaluation. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id + type: + const: model + default: model + title: Type type: string - item_id: - title: Item Id + model: + title: Model type: string - output_index: - title: Output Index - type: integer - part: + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage + - type: 'null' + nullable: true + title: SystemMessage + required: + - model + - sampling_params + title: ModelCandidate + type: object + SamplingParams: + description: Sampling parameters. + properties: + strategy: discriminator: mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer - type: - const: response.content_part.done - default: response.content_part.done - title: Type - type: string - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartDone + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + repetition_penalty: + anyOf: + - type: number + - type: 'null' + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + title: SamplingParams type: object - OpenAIResponseObjectStreamResponseCreated: - description: Streaming event indicating a new response has been created. + SystemMessage: + description: A system message providing instructions or context to the model. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.created - default: response.created - title: Type + role: + const: system + default: system + title: Role type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - - response - title: OpenAIResponseObjectStreamResponseCreated + - content + title: SystemMessage type: object - OpenAIResponseObjectStreamResponseFailed: - description: Streaming event emitted when a response fails. + BenchmarkConfig: + description: A benchmark configuration for evaluation. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.failed - default: response.failed - title: Type - type: string + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + description: Map between scoring function id and parameters for each scoring function you want to run + title: Scoring Params + type: object + num_examples: + anyOf: + - type: integer + - type: 'null' + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + nullable: true required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseFailed + - eval_candidate + title: BenchmarkConfig type: object - OpenAIResponseObjectStreamResponseFileSearchCallCompleted: - description: Streaming event for completed file search calls. + ScoringResult: + description: A scoring result for a single row. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.completed - default: response.file_search_call.completed - title: Type - type: string + score_rows: + items: + additionalProperties: true + type: object + title: Score Rows + type: array + aggregated_results: + additionalProperties: true + title: Aggregated Results + type: object required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - score_rows + - aggregated_results + title: ScoringResult type: object - OpenAIResponseObjectStreamResponseFileSearchCallInProgress: - description: Streaming event for file search calls in progress. + EvaluateResponse: + description: The response from an evaluation. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - title: Type - type: string + generations: + items: + additionalProperties: true + type: object + title: Generations + type: array + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Scores + type: object required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - generations + - scores + title: EvaluateResponse type: object - OpenAIResponseObjectStreamResponseFileSearchCallSearching: - description: Streaming event for file search currently searching. + 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: - item_id: - title: Item Id + anchor: + const: created_at + title: Anchor type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + seconds: + maximum: 2592000 + minimum: 3600 + title: Seconds type: integer - type: - const: response.file_search_call.searching - default: response.file_search_call.searching - title: Type - type: string required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - anchor + - seconds + title: ExpiresAfter type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: - description: Streaming event for incremental function call argument updates. + OpenAIFileObject: + description: OpenAI File object as defined in the OpenAI Files API. properties: - delta: - title: Delta + object: + const: file + default: file + title: Object type: string - item_id: - title: Item Id + id: + title: Id type: string - output_index: - title: Output Index + bytes: + title: Bytes type: integer - sequence_number: - title: Sequence Number + created_at: + title: Created At type: integer - type: - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - title: Type + expires_at: + title: Expires At + type: integer + filename: + title: Filename type: string + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: - description: Streaming event for when function call arguments are completed. + OpenAIFilePurpose: + description: Valid purpose values for OpenAI Files API. + enum: + - assistants + - batch + title: OpenAIFilePurpose + type: string + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. properties: - arguments: - title: Arguments + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - item_id: - title: Item Id + last_id: + title: Last Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.done - default: response.function_call_arguments.done - title: Type + object: + const: list + default: list + title: Object type: string required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse type: object - OpenAIResponseObjectStreamResponseInProgress: - description: Streaming event indicating the response remains in progress. + OpenAIFileDeleteResponse: + description: Response for deleting a file in OpenAI Files API. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.in_progress - default: response.in_progress - title: Type + id: + title: Id type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseInProgress - type: object - OpenAIResponseObjectStreamResponseIncomplete: - description: Streaming event emitted when a response ends in an incomplete state. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.incomplete - default: response.incomplete - title: Type + object: + const: file + default: file + title: Object type: string + deleted: + title: Deleted + type: boolean required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseIncomplete + - id + - deleted + title: OpenAIFileDeleteResponse type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta + const: bf16 + default: bf16 title: Type type: string - required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + title: Bf16QuantizationConfig type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + EmbeddingsResponse: + description: Response containing generated embeddings. properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - title: Type - type: string + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - embeddings + title: EmbeddingsResponse type: object - OpenAIResponseObjectStreamResponseMcpCallCompleted: - description: Streaming event for completed MCP calls. + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. properties: - sequence_number: - title: Sequence Number - type: integer type: - const: response.mcp_call.completed - default: response.mcp_call.completed + const: fp8_mixed + default: fp8_mixed title: Type type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallCompleted + title: Fp8QuantizationConfig type: object - OpenAIResponseObjectStreamResponseMcpCallFailed: - description: Streaming event for failed MCP calls. + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. properties: - sequence_number: - title: Sequence Number - type: integer type: - const: response.mcp_call.failed - default: response.mcp_call.failed + const: int4_mixed + default: int4_mixed title: Type type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallFailed + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig type: object - OpenAIResponseObjectStreamResponseMcpCallInProgress: - description: Streaming event for MCP calls in progress. + OpenAIChatCompletionUsage: + description: Usage information for OpenAI chat completion. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index + prompt_tokens: + title: Prompt Tokens type: integer - sequence_number: - title: Sequence Number + completion_tokens: + title: Completion Tokens type: integer - type: - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - type: object - OpenAIResponseObjectStreamResponseMcpListToolsCompleted: - properties: - sequence_number: - title: Sequence Number + total_tokens: + title: Total Tokens type: integer - type: - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + prompt_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsagePromptTokensDetails + completion_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage type: object - OpenAIResponseObjectStreamResponseMcpListToolsFailed: + OpenAIChatCompletionUsageCompletionTokensDetails: + description: Token details for output tokens in OpenAI chat completion usage. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails type: object - OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + OpenAIChatCompletionUsagePromptTokensDetails: + description: Token details for prompt tokens in OpenAI chat completion usage. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + cached_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsagePromptTokensDetails type: object - OpenAIResponseObjectStreamResponseOutputItemAdded: - description: Streaming event for when a new output item is added to the response. + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. properties: - response_id: - title: Response Id - type: string - item: + message: 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 + 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/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.added - default: response.output_item.added - title: Type + - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + finish_reason: + title: Finish Reason type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemAdded + - message + - finish_reason + - index + title: OpenAIChoice type: object - OpenAIResponseObjectStreamResponseOutputItemDone: - description: Streaming event for when an output item is completed. + OpenAIChoiceLogprobs: + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. properties: - response_id: - title: Response Id + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs + type: object + OpenAICompletionWithInputMessages: + properties: + id: + title: Id type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + 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 - type: - const: response.output_item.done - default: response.output_item.done - title: Type + model: + title: Model type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + title: Input Messages + type: array required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemDone + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages type: object - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: - description: Streaming event for when an annotation is added to output text. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - content_index: - title: Content Index - type: integer - annotation_index: - title: Annotation Index - type: integer - annotation: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.annotation.added - default: response.output_text.annotation.added - title: Type + 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' + nullable: true + logprob: + title: Logprob + type: number + top_logprobs: + items: + $ref: '#/components/schemas/OpenAITopLogProb' + title: Top Logprobs + type: array required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - token + - logprob + - top_logprobs + title: OpenAITokenLogProb type: object - OpenAIResponseObjectStreamResponseOutputTextDelta: - description: Streaming event for incremental text content updates. + 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: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.delta - default: response.output_text.delta - title: Type + token: + title: Token type: string + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + logprob: + title: Logprob + type: number required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDelta + - token + - logprob + title: OpenAITopLogProb type: object - OpenAIResponseObjectStreamResponseOutputTextDone: - description: Streaming event for when text output is completed. + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. properties: - content_index: - title: Content Index - type: integer - text: - title: Text + data: + items: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - item_id: - title: Item Id + last_id: + title: Last Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.done - default: response.output_text.done - title: Type + object: + const: list + default: list + title: Object type: string required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDone + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: - description: Streaming event for when a new reasoning summary part is added. + OpenAIChatCompletion: + description: Response from an OpenAI-compatible chat completion request. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - title: Type + id: + title: Id type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: - description: Streaming event for when a reasoning summary part is completed. - properties: - item_id: - title: Item Id + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index + created: + title: Created type: integer - type: - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - title: Type + model: + title: Model type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - id + - choices + - created + - model + title: OpenAIChatCompletion type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: - description: Streaming event for incremental reasoning summary text updates. + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - title: Type - type: string - required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: - description: Streaming event for when reasoning summary text is completed. - properties: - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - title: Type - type: string - required: - - text - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - type: object - OpenAIResponseObjectStreamResponseReasoningTextDelta: - description: Streaming event for incremental reasoning text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.delta - default: response.reasoning_text.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - type: object - OpenAIResponseObjectStreamResponseReasoningTextDone: - description: Streaming event for when reasoning text is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.done - default: response.reasoning_text.done - title: Type - type: string - required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDone + content: + anyOf: + - type: string + - type: 'null' + nullable: true + refusal: + anyOf: + - type: string + - type: 'null' + nullable: true + role: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + reasoning_content: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIChoiceDelta type: object - OpenAIResponseObjectStreamResponseRefusalDelta: - description: Streaming event for incremental refusal text updates. + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: - content_index: - title: Content Index - type: integer delta: - title: Delta - type: string - item_id: - title: Item Id + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + index: + title: Index type: integer - type: - const: response.refusal.delta - default: response.refusal.delta - title: Type - type: string + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - content_index - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDelta + - finish_reason + - index + title: OpenAIChunkChoice type: object - OpenAIResponseObjectStreamResponseRefusalDone: - description: Streaming event for when refusal text is completed. + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: - content_index: - title: Content Index - type: integer - refusal: - title: Refusal + id: + title: Id type: string - item_id: - title: Item Id + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + created: + title: Created type: integer - type: - const: response.refusal.done - default: response.refusal.done - title: Type + model: + title: Model type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDone + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk type: object - OpenAIResponseObjectStreamResponseWebSearchCallCompleted: - description: Streaming event for completed web search calls. + OpenAIChatCompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible chat completion endpoint. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.completed - default: response.web_search_call.completed - title: Type + model: + title: Model type: string + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + minItems: 1 + title: Messages + type: array + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + function_call: + anyOf: + - type: string + - additionalProperties: true + type: object + - type: 'null' + title: string | object + nullable: true + functions: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + response_format: + anyOf: + - discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: 'null' + title: Response Format + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + tool_choice: + anyOf: + - type: string + - additionalProperties: true + type: object + - type: 'null' + title: string | object + nullable: true + tools: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - type: integer + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseWebSearchCallInProgress: - description: Streaming event for web search calls in progress. + 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: - item_id: - title: Item Id + finish_reason: + title: Finish Reason type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - title: Type + text: + title: Text type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - finish_reason + - text + - index + title: OpenAICompletionChoice type: object - OpenAIResponseObjectStreamResponseWebSearchCallSearching: + OpenAICompletion: + 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: - item_id: - title: Item Id + id: + title: Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + choices: + items: + $ref: '#/components/schemas/OpenAICompletionChoice' + title: Choices + type: array + created: + title: Created type: integer - type: - const: response.web_search_call.searching - default: response.web_search_call.searching - title: Type + model: + title: Model + type: string + object: + const: text_completion + default: text_completion + title: Object type: string required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - id + - choices + - created + - model + title: OpenAICompletion type: object - OpenAIResponseObjectStream: - discriminator: - mapping: - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - title: OpenAIResponseObjectStreamResponseCreated - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - title: OpenAIResponseObjectStreamResponseInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - title: OpenAIResponseObjectStreamResponseOutputItemAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - title: OpenAIResponseObjectStreamResponseOutputItemDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - title: OpenAIResponseObjectStreamResponseOutputTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - title: OpenAIResponseObjectStreamResponseOutputTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - title: OpenAIResponseObjectStreamResponseMcpCallFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - title: OpenAIResponseObjectStreamResponseContentPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - title: OpenAIResponseObjectStreamResponseContentPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - title: OpenAIResponseObjectStreamResponseReasoningTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - title: OpenAIResponseObjectStreamResponseRefusalDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - title: OpenAIResponseObjectStreamResponseRefusalDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - title: OpenAIResponseObjectStreamResponseIncomplete - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - title: OpenAIResponseObjectStreamResponseFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - title: OpenAIResponseObjectStreamResponseCompleted - title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - SpanEndPayload: - description: Payload for a span end event. + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens + properties: + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs + type: object + OpenAICompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible completion endpoint. + properties: + model: + title: Model + type: string + prompt: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - items: + type: integer + type: array + title: list[integer] + - items: + items: + type: integer + type: array + type: array + title: list[array] + title: string | ... (4 variants) + best_of: + anyOf: + - type: integer + - type: 'null' + nullable: true + echo: + anyOf: + - type: boolean + - type: 'null' + nullable: true + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true + suffix: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - model + - prompt + title: OpenAICompletionRequestWithExtraBody + type: object + OpenAIEmbeddingData: + description: A single embedding data object from an OpenAI-compatible embeddings response. + properties: + object: + const: embedding + default: embedding + title: Object + type: string + embedding: + anyOf: + - items: + type: number + type: array + title: list[number] + - type: string + title: list[number] | string + index: + title: Index + type: integer + required: + - embedding + - index + title: OpenAIEmbeddingData + type: object + OpenAIEmbeddingUsage: + description: Usage information for an OpenAI-compatible embeddings response. + properties: + prompt_tokens: + title: Prompt Tokens + type: integer + total_tokens: + title: Total Tokens + type: integer + required: + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage + type: object + OpenAIEmbeddingsRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible embeddings endpoint. + properties: + model: + title: Model + type: string + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + encoding_format: + anyOf: + - type: string + - type: 'null' + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody + type: object + OpenAIEmbeddingsResponse: + description: Response from an OpenAI-compatible embeddings request. + properties: + object: + const: list + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + title: Data + type: array + model: + title: Model + type: string + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' + required: + - data + - model + - usage + title: OpenAIEmbeddingsResponse + type: object + RerankData: + description: A single rerank result from a reranking response. + properties: + index: + title: Index + type: integer + relevance_score: + title: Relevance Score + type: number + required: + - index + - relevance_score + title: RerankData + type: object + RerankResponse: + description: Response from a reranking request. + properties: + data: + items: + $ref: '#/components/schemas/RerankData' + title: Data + type: array + required: + - data + title: RerankResponse + type: object + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object + required: + - logprobs_by_token + title: TokenLogProbs + type: object + ToolResponseMessage: + description: A message representing the result of a tool invocation. + properties: + role: + const: tool + default: tool + title: Role + type: string + call_id: + title: Call Id + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + required: + - call_id + - content + title: ToolResponseMessage + type: object + UserMessage: + description: A message from the user in a chat conversation. + properties: + role: + const: user + default: user + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true + required: + - content + title: UserMessage + type: object + HealthStatus: + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + type: string + HealthInfo: + description: Health status information for the service. + properties: + status: + $ref: '#/components/schemas/HealthStatus' + required: + - status + title: HealthInfo + type: object + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. + 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 + ListRoutesResponse: + description: Response containing a list of all available API routes. properties: - type: - const: span_end - default: span_end - title: Type + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array + required: + - data + title: ListRoutesResponse + type: object + VersionInfo: + description: Version information for the service. + properties: + version: + title: Version type: string - status: - $ref: '#/components/schemas/SpanStatus' required: - - status - title: SpanEndPayload + - version + title: VersionInfo type: object - SpanStartPayload: - description: Payload for a span start event. + OpenAIModel: + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: - type: - const: span_start - default: span_start - title: Type + id: + title: Id type: string - name: - title: Name + object: + const: model + default: model + title: Object type: string - parent_span_id: + created: + title: Created + type: integer + owned_by: + title: Owned By + type: string + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + required: + - id + - created + - owned_by + title: OpenAIModel + type: object + DPOLossType: + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + type: string + DPOAlignmentConfig: + description: Configuration for Direct Preference Optimization (DPO) alignment. + properties: + beta: + title: Beta + type: number + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid + required: + - beta + title: DPOAlignmentConfig + type: object + DatasetFormat: + description: Format of the training dataset. + enum: + - instruct + - dialog + title: DatasetFormat + type: string + DataConfig: + description: Configuration for training data and data loading. + properties: + dataset_id: + title: Dataset Id + type: string + batch_size: + title: Batch Size + type: integer + shuffle: + title: Shuffle + type: boolean + data_format: + $ref: '#/components/schemas/DatasetFormat' + validation_dataset_id: anyOf: - type: string - type: 'null' nullable: true + packed: + anyOf: + - type: boolean + - type: 'null' + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + default: false + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + type: object + EfficiencyConfig: + description: Configuration for memory and compute efficiency optimizations. + properties: + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + default: false + title: EfficiencyConfig + type: object + OptimizerType: + description: Available optimizer algorithms for training. + enum: + - adam + - adamw + - sgd + title: OptimizerType + type: string + OptimizerConfig: + description: Configuration parameters for the optimization algorithm. + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + lr: + title: Lr + type: number + weight_decay: + title: Weight Decay + type: number + num_warmup_steps: + title: Num Warmup Steps + type: integer + required: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + type: object + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. + 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 + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. + properties: + job_uuid: + title: Job Uuid + type: string + log_lines: + items: + type: string + title: Log Lines + type: array + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream + type: object + PostTrainingJobStatusResponse: + description: Status of a finetuning job. + properties: + job_uuid: + title: Job Uuid + type: string + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + started_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + completed_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - name - title: SpanStartPayload + - job_uuid + - status + title: PostTrainingJobStatusResponse type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity + - dpo + title: RLHFAlgorithm type: string - MetricEvent: - description: A metric event containing a measured value. + TrainingConfig: + description: Comprehensive configuration for the training process. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: + n_epochs: + title: N Epochs + type: integer + max_steps_per_epoch: + default: 1 + title: Max Steps Per Epoch + type: integer + gradient_accumulation_steps: + default: 1 + title: Gradient Accumulation Steps + type: integer + max_validation_steps: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object + - type: integer - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: + default: 1 + data_config: anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string + - $ref: '#/components/schemas/DataConfig' + title: DataConfig + - type: 'null' + nullable: true + title: DataConfig + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig + - type: 'null' + nullable: true + title: OptimizerConfig + efficiency_config: + anyOf: + - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig + - type: 'null' + nullable: true + title: EfficiencyConfig + dtype: + anyOf: + - type: string + - type: 'null' + default: bf16 required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent + - n_epochs + title: TrainingConfig type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id + job_uuid: + title: Job Uuid type: string - timestamp: - format: date-time - title: Timestamp + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: structured_log - default: structured_log - title: Type + validation_dataset_id: + title: Validation Dataset Id type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. + Prompt: + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: + prompt: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object + - type: string - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message + description: The system prompt with variable placeholders + nullable: true + version: + description: Version (integer starting at 1, incremented on save) + minimum: 1 + title: Version + type: integer + prompt_id: + description: Unique identifier in format 'pmpt_<48-digit-hash>' + title: Prompt Id type: string - severity: - $ref: '#/components/schemas/LogSeverity' + variables: + description: List of variable names that can be used in the prompt template + items: + type: string + title: Variables + type: array + is_default: + default: false + description: Boolean indicating whether this version is the default version + title: Is Default + type: boolean required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent + - version + - prompt_id + title: Prompt type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. + ProviderInfo: + description: Information about a registered provider including its configuration and health status. properties: - type: - title: Type + api: + title: Api + type: string + provider_id: + title: Provider Id + type: string + provider_type: + title: Provider Type type: string + config: + additionalProperties: true + title: Config + type: object + health: + additionalProperties: true + title: Health + type: object required: - - type - title: ResponseGuardrailSpec + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo type: object - OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. + ModerationObjectResults: + description: A moderation object. properties: - created_at: - title: Created At - type: integer - error: + flagged: + title: Flagged + type: boolean + categories: anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError + - additionalProperties: + type: boolean + type: object - type: 'null' nullable: true - title: OpenAIResponseError + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + nullable: true + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object + required: + - flagged + title: ModerationObjectResults + type: object + ModerationObject: + description: A moderation object. + properties: id: title: Id type: string model: title: Model type: string - object: - const: response - default: response - title: Object - type: string - output: + results: 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output + $ref: '#/components/schemas/ModerationObjectResults' + title: Results type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: + required: + - id + - model + - results + title: ModerationObject + type: object + SafetyViolation: + description: Details of a safety violation detected by content moderation. + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: anyOf: - type: string - type: 'null' nullable: true - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - nullable: true - title: OpenAIResponsePrompt - status: - title: Status - type: string - temperature: + metadata: + additionalProperties: true + title: Metadata + type: object + required: + - violation_level + title: SafetyViolation + type: object + ViolationLevel: + description: Severity level of a safety violation. + enum: + - info + - warn + - error + title: ViolationLevel + type: string + RunShieldResponse: + description: Response from running a safety shield. + properties: + violation: anyOf: - - type: number + - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation - type: 'null' nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: + title: SafetyViolation + title: RunShieldResponse + type: object + ScoreBatchResponse: + description: Response from batch scoring operations on datasets. + properties: + dataset_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - tools: - anyOf: - - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object + required: + - results + title: ScoreBatchResponse + type: object + ScoreResponse: + description: The response from scoring. + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object + required: + - results + title: ScoreResponse + type: object + ToolDef: + description: Tool definition used in runtime contexts. + properties: + toolgroup_id: + anyOf: + - type: string - type: 'null' nullable: true - truncation: + name: + title: Name + type: string + description: anyOf: - type: string - type: 'null' nullable: true - usage: + input_schema: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIResponseUsage - instructions: + output_schema: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - max_tool_calls: + metadata: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' nullable: true - input: + required: + - name + title: ToolDef + type: object + ListToolDefsResponse: + description: Response containing a list of tool definitions. + 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Input + $ref: '#/components/schemas/ToolDef' + title: Data type: array required: - - created_at - - id - - model - - output - - status - - input - title: OpenAIResponseObjectWithInput + - data + title: ListToolDefsResponse type: object - MetricInResponse: - description: A metric value included in API responses. + ToolGroupInput: + description: Input data for registering a tool group. properties: - metric: - title: Metric + toolgroup_id: + title: Toolgroup Id type: string - value: + provider_id: + title: Provider Id + type: string + args: anyOf: - - type: integer - - type: number - title: integer | number - unit: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + mcp_endpoint: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true + title: URL required: - - metric - - value - title: MetricInResponse - type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. - properties: - type: - const: dialog - default: dialog - title: Type - type: string - title: DialogType + - toolgroup_id + - provider_id + title: ToolGroupInput type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. + ToolInvocationResult: + description: Result of a tool invocation. properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. - items: - discriminator: + content: + anyOf: + - type: string + - discriminator: 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array - required: - - items - title: ConversationItemCreateRequest - type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. - properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status - type: string - type: - const: message - default: message - title: Type - type: string - object: - const: message - default: message - title: Object - type: string - required: - - id - - content - - role - - status - title: ConversationMessage - type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). - properties: - type: - const: bf16 - default: bf16 - title: Type - type: string - title: Bf16QuantizationConfig - type: object - EmbeddingsResponse: - description: Response containing generated embeddings. - properties: - embeddings: - items: - items: - type: number - type: array - title: Embeddings - type: array - required: - - embeddings - title: EmbeddingsResponse - type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. - properties: - type: - const: fp8_mixed - default: fp8_mixed - title: Type - type: string - title: Fp8QuantizationConfig - type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. - properties: - type: - const: int4_mixed - default: int4_mixed - title: Type - type: string - scheme: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true + error_message: anyOf: - type: string - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig + nullable: true + error_code: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: ToolInvocationResult type: object - OpenAIChoiceDelta: - description: A delta from an OpenAI-compatible chat completion streaming response. + 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. properties: - content: + chunk_id: anyOf: - type: string - type: 'null' nullable: true - refusal: + document_id: anyOf: - type: string - type: 'null' nullable: true - role: + source: anyOf: - type: string - type: 'null' nullable: true - tool_calls: + created_timestamp: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - type: integer - type: 'null' nullable: true - reasoning_content: + updated_timestamp: + anyOf: + - type: integer + - type: 'null' + nullable: true + chunk_window: anyOf: - type: string - type: 'null' nullable: true - title: OpenAIChoiceDelta + chunk_tokenizer: + anyOf: + - type: string + - type: 'null' + nullable: true + chunk_embedding_model: + anyOf: + - type: string + - type: 'null' + nullable: true + chunk_embedding_dimension: + anyOf: + - type: integer + - type: 'null' + nullable: true + content_token_count: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata_token_count: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: ChunkMetadata type: object - OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + Chunk: + description: A chunk of content that can be inserted into a vector database. properties: content: anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: - $ref: '#/components/schemas/OpenAITokenLogProb' + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - - type: 'null' - nullable: true - refusal: + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: anyOf: - items: - $ref: '#/components/schemas/OpenAITokenLogProb' + type: number type: array - type: 'null' nullable: true - title: OpenAIChoiceLogprobs - type: object - OpenAIChunkChoice: - description: A chunk choice from an OpenAI-compatible chat completion streaming response. - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + chunk_metadata: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true - title: OpenAIChoiceLogprobs + title: ChunkMetadata required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice + - content + - chunk_id + title: Chunk type: object - OpenAIChatCompletionChunk: - description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store file batch with extra_body support. properties: - id: - title: Id - type: string - choices: + file_ids: items: - $ref: '#/components/schemas/OpenAIChunkChoice' - title: Choices + type: string + title: File Ids type: array - object: - const: chat.completion.chunk - default: chat.completion.chunk - title: Object - type: string - created: - title: Created - type: integer - model: - title: Model - type: string - usage: + attributes: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: + anyOf: + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + nullable: true + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + type: object + OpenAICreateVectorStoreRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store with extra_body support. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + file_ids: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: + anyOf: + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChatCompletionUsage - required: - - id - - choices - - created - - model - title: OpenAIChatCompletionChunk + title: OpenAICreateVectorStoreRequestWithExtraBody type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. + QueryChunksResponse: + description: Response from querying chunks in a vector database. 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs - - type: 'null' - nullable: true - title: OpenAIChoiceLogprobs + chunks: + items: + $ref: '#/components/schemas/Chunk' + title: Chunks + type: array + scores: + items: + type: number + title: Scores + type: array required: - - message - - finish_reason - - index - title: OpenAIChoice + - chunks + - scores + title: QueryChunksResponse 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 + VectorStoreContent: + description: Content item from a vector store file or search result. properties: - finish_reason: - title: Finish Reason + type: + const: text + title: Type type: string text: title: Text type: string - index: - title: Index - type: integer - logprobs: + embedding: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - items: + type: number + type: array + - type: 'null' + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + nullable: true + title: ChunkMetadata + metadata: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceLogprobs required: - - finish_reason + - type - text - - index - title: OpenAICompletionChoice + title: VectorStoreContent type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens + VectorStoreCreateRequest: + description: Request to create a vector store. properties: - text_offset: - anyOf: - - items: - type: integer - type: array - - type: 'null' - nullable: true - token_logprobs: + name: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - tokens: + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: anyOf: - - items: - type: string - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - top_logprobs: + chunking_strategy: anyOf: - - items: - additionalProperties: - type: number - type: object - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAICompletionLogprobs + metadata: + additionalProperties: true + title: Metadata + type: object + title: VectorStoreCreateRequest type: object - TokenLogProbs: - description: Log probabilities for generated tokens. + VectorStoreDeleteResponse: + description: Response from deleting a vector store. properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object + id: + title: Id + type: string + object: + default: vector_store.deleted + title: Object + type: string + deleted: + default: true + title: Deleted + type: boolean required: - - logprobs_by_token - title: TokenLogProbs + - id + title: VectorStoreDeleteResponse type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. + VectorStoreFileCounts: + description: File processing status counts for a vector store. properties: - role: - const: tool - default: tool - title: Role + 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 + VectorStoreFileBatchObject: + description: OpenAI Vector Store File Batch object. + properties: + id: + title: Id type: string - call_id: - title: Call Id + object: + default: vector_store.file_batch + title: Object type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + created_at: + title: Created At + type: integer + vector_store_id: + title: Vector Store Id + type: string + status: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' required: - - call_id - - content - title: ToolResponseMessage + - id + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject type: object - UserMessage: - description: A message from the user in a chat conversation. + VectorStoreFileContentResponse: + description: Represents the parsed content of a vector store file. properties: - role: - const: user - default: user - title: Role + object: + const: vector_store.file_content.page + default: vector_store.file_content.page + title: Object type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: + data: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - type: 'null' - title: string | list[ImageContentItem | TextContentItem] nullable: true required: - - content - title: UserMessage + - data + title: VectorStoreFileContentResponse type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. + VectorStoreFileDeleteResponse: + description: Response from deleting a vector store file. properties: - job_uuid: - title: Job Uuid + id: + title: Id type: string - log_lines: - items: - type: string - title: Log Lines - type: array + object: + default: vector_store.file.deleted + title: Object + type: string + deleted: + default: true + title: Deleted + type: boolean required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream + - id + title: VectorStoreFileDeleteResponse type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. + VectorStoreFileLastError: + description: Error information for failed vector store file processing. properties: - job_uuid: - title: Job Uuid + code: + title: Code type: string - finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id + enum: + - server_error + - rate_limit_exceeded + default: server_error + message: + title: Message type: string - validation_dataset_id: - title: Validation Dataset Id + required: + - code + - message + title: VectorStoreFileLastError + type: object + VectorStoreFileObject: + description: OpenAI Vector Store File object. + properties: + id: + title: Id type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - title: Hyperparam Search Config - type: object - logger_config: + object: + default: vector_store.file + title: Object + type: string + attributes: additionalProperties: true - title: Logger Config + title: Attributes type: object + chunking_strategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + created_at: + title: Created At + type: integer + last_error: + anyOf: + - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError + - type: 'null' + nullable: true + title: VectorStoreFileLastError + status: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + vector_store_id: + title: Vector Store Id + type: string required: - - job_uuid - - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - - algorithm_config - - optimizer_config - - training_config - - hyperparam_search_config - - logger_config - title: PostTrainingRLHFRequest + - id + - chunking_strategy + - created_at + - status + - vector_store_id + title: VectorStoreFileObject type: object - ToolGroupInput: - description: Input data for registering a tool group. + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. properties: - toolgroup_id: - title: Toolgroup Id - type: string - provider_id: - title: Provider Id + object: + default: list + title: Object type: string - args: + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - mcp_endpoint: + last_id: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string - type: 'null' nullable: true - title: URL + has_more: + default: false + title: Has More + type: boolean required: - - toolgroup_id - - provider_id - title: ToolGroupInput + - data + title: VectorStoreFilesListInBatchResponse type: object - Chunk: - description: A chunk of content that can be inserted into a vector database. + VectorStoreListFilesResponse: + description: Response from listing files in a vector store. properties: - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id + object: + default: list + title: Object type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - chunk_metadata: + last_id: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' nullable: true - title: ChunkMetadata + has_more: + default: false + title: Has More + type: boolean required: - - content - - chunk_id - title: Chunk + - data + title: VectorStoreListFilesResponse type: object - VectorStoreCreateRequest: - description: Request to create a vector store. + VectorStoreObject: + description: OpenAI Vector Store object. 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' nullable: true - file_ids: - items: - type: string - title: File Ids - type: array + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + default: completed + title: Status + type: string expires_after: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - chunking_strategy: + expires_at: anyOf: - - additionalProperties: true - type: object + - type: integer + - type: 'null' + nullable: true + last_active_at: + anyOf: + - type: integer - type: 'null' nullable: true metadata: additionalProperties: true title: Metadata type: object - title: VectorStoreCreateRequest + required: + - id + - created_at + - file_counts + title: VectorStoreObject + type: object + VectorStoreListResponse: + description: Response from listing vector stores. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + nullable: true + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListResponse type: object VectorStoreModifyRequest: description: Request to modify a vector store. @@ -8926,75 +8540,34 @@ components: - content title: VectorStoreSearchResponse type: object - OpenAIResponseMessageOutputUnion: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - x-stainless-naming: OpenAIResponseMessageOutputOneOf - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse - x-stainless-naming: OpenAIResponseMessageOutputUnion - responses: - BadRequest400: - description: The request was invalid or malformed - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 400 - 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 - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 429 - title: Too Many Requests - detail: You have exceeded the rate limit. Please try again later. - InternalServerError500: - description: The server encountered an unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 500 - title: Internal Server Error - detail: An unexpected error occurred - DefaultError: - description: An error occurred - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + VectorStoreSearchResponsePage: + description: Paginated response from searching a vector store. + properties: + object: + default: vector_store.search_results.page + title: Object + type: string + search_query: + items: + type: string + title: Search Query + type: array + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - search_query + - data + title: VectorStoreSearchResponsePage + type: object diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index 1dad5b55f3..032c4bcaf8 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -17,18 +17,13 @@ paths: tags: - Providers summary: Inspect Provider - description: |- - Get provider. - - Get detailed information about a specific provider. operationId: inspect_provider_v1_providers__provider_id__get responses: '200': - description: A ProviderInfo object containing the provider's details. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ProviderInfo' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -53,18 +48,13 @@ paths: tags: - Providers summary: List Providers - description: |- - List providers. - - List all available providers. operationId: list_providers_v1_providers_get responses: '200': - description: A ListProvidersResponse containing information about all providers. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListProvidersResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -82,134 +72,60 @@ paths: tags: - Agents summary: List Openai Responses - description: List all responses. operationId: list_openai_responses_v1_responses_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 50 - title: Limit - - name: model - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Model - - name: order - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/Order' - - type: 'null' - default: desc - title: Order responses: '200': - description: A ListOpenAIResponseObject. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIResponseObject' + schema: {} '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: - Agents summary: Create Openai Response - description: Create a model response. operationId: create_openai_response_v1_responses_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/_responses_Request' - x-llama-stack-extra-body-params: - guardrails: - $defs: - ResponseGuardrailSpec: - description: |- - Specification for a guardrail to apply during response generation. - - :param type: The type/identifier of the guardrail. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - type: object - anyOf: - - items: - anyOf: - - type: string - - $ref: '#/components/schemas/ResponseGuardrailSpec' - type: array - - type: 'null' - description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. responses: '200': - description: An OpenAIResponseObject. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseObject' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIResponseObjectStream' + schema: {} '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/responses/{response_id}: get: tags: - Agents summary: Get Openai Response - description: Get a model response. operationId: get_openai_response_v1_responses__response_id__get responses: '200': - description: An OpenAIResponseObject. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -233,15 +149,13 @@ paths: tags: - Agents summary: Delete Openai Response - description: Delete a response. operationId: delete_openai_response_v1_responses__response_id__delete responses: '200': - description: An OpenAIDeleteResponseObject + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIDeleteResponseObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -266,95 +180,44 @@ paths: tags: - Agents summary: List Openai Response Input Items - description: List input items. operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/Order' - - type: 'null' - default: desc - title: Order - - name: response_id - in: path - required: true - schema: - type: string - description: 'Path parameter: response_id' - - name: include - in: query - required: false - schema: - anyOf: - - type: array - items: - type: string - - type: 'null' - title: Include responses: '200': - description: An ListOpenAIResponseInputItem. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIResponseInputItem' + schema: {} '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: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' /v1/chat/completions/{completion_id}: get: tags: - Inference summary: Get Chat Completion - description: |- - Get chat completion. - - Describe a chat completion by its ID. operationId: get_chat_completion_v1_chat_completions__completion_id__get responses: '200': - description: A OpenAICompletionWithInputMessages. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -379,122 +242,60 @@ paths: tags: - Inference summary: List Chat Completions - description: List chat completions. operationId: list_chat_completions_v1_chat_completions_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: model - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Model - - name: order - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/Order' - - type: 'null' - default: desc - title: Order responses: '200': - description: A ListOpenAIChatCompletionResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' + schema: {} '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: - Inference summary: Openai Chat Completion - description: |- - Create chat completions. - - Generate an OpenAI-compatible chat completion for the given messages using the specified model. operationId: openai_chat_completion_v1_chat_completions_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody' responses: '200': - description: An OpenAIChatCompletion. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIChatCompletion' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIChatCompletionChunk' + schema: {} '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/completions: post: tags: - Inference summary: Openai Completion - description: |- - Create completion. - - Generate an OpenAI-compatible completion for the given prompt using the specified model. operationId: openai_completion_v1_completions_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' - required: true responses: '200': - description: An OpenAICompletion. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAICompletion' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -512,24 +313,13 @@ paths: tags: - Inference summary: Openai Embeddings - description: |- - Create embeddings. - - Generate OpenAI-compatible embeddings for the given input using the specified model. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIEmbeddingsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -547,18 +337,13 @@ paths: tags: - Inspect summary: Health - description: |- - Get health status. - - Get the current health status of the service. operationId: health_v1_health_get responses: '200': - description: Health information indicating if the service is operational. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/HealthInfo' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -576,61 +361,37 @@ paths: tags: - Inspect summary: List Routes - description: |- - List routes. - - List all available API routes with their methods and implementing providers. operationId: list_routes_v1_inspect_routes_get - parameters: - - name: api_filter - in: query - required: false - schema: - anyOf: - - enum: - - v1 - - v1alpha - - v1beta - - deprecated - type: string - - type: 'null' - title: Api Filter responses: '200': - description: Response containing information about all available routes. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListRoutesResponse' + schema: {} '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/version: get: tags: - Inspect summary: Version - description: |- - Get version. - - Get the version of the service. operationId: version_v1_version_get responses: '200': - description: Version information containing the service version number. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VersionInfo' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -648,15 +409,13 @@ paths: tags: - Batches summary: Cancel Batch - description: Cancel a batch that is in progress. operationId: cancel_batch_v1_batches__batch_id__cancel_post responses: '200': - description: The updated batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -681,88 +440,60 @@ paths: tags: - Batches summary: List Batches - description: List all batches for the current user. operationId: list_batches_v1_batches_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: limit - in: query - required: false - schema: - type: integer - default: 20 - title: Limit responses: '200': - description: A list of batch objects. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListBatchesResponse' + schema: {} '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: - Batches summary: Create Batch - description: Create a new batch for processing multiple API requests. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '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/batches/{batch_id}: get: tags: - Batches summary: Retrieve Batch - description: Retrieve information about a specific batch. operationId: retrieve_batch_v1_batches__batch_id__get responses: '200': - description: The batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -787,17 +518,7 @@ paths: tags: - Vector Io summary: Insert Chunks - description: Insert chunks into a vector database. operationId: insert_chunks_v1_vector_io_insert_post - requestBody: - required: true - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Chunk-Input' - title: Chunks responses: '200': description: Successful Response @@ -805,128 +526,71 @@ paths: application/json: schema: {} '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/{vector_store_id}/files: get: tags: - Vector Io summary: Openai List Files In Vector Store - description: List files in a vector store. operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: filter - in: query - required: false - schema: - title: Filter - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - nullable: true - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - default: desc - title: Order - - name: vector_store_id - in: path - required: true + - name: vector_store_id + in: path + required: true schema: type: string description: 'Path parameter: vector_store_id' - 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: - Vector Io summary: Openai Attach File To Vector Store - description: Attach a file to a vector store. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileObject' + schema: {} '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 @@ -939,15 +603,13 @@ paths: tags: - Vector Io summary: Openai Cancel Vector Store File Batch - description: Cancels a vector store file batch. operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post responses: '200': - description: A VectorStoreFileBatchObject representing the cancelled file batch. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -978,119 +640,60 @@ paths: tags: - Vector Io summary: Openai List Vector Stores - description: Returns a list of vector stores. operationId: openai_list_vector_stores_v1_vector_stores_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - default: desc - title: Order responses: '200': - description: A VectorStoreListResponse containing the list of vector stores. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreListResponse' + schema: {} '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: - Vector Io summary: Openai Create Vector Store - description: |- - Creates a vector store. - - Generate an OpenAI-compatible vector store with the given parameters. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreObject' + schema: {} '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/{vector_store_id}/file_batches: post: tags: - Vector Io summary: Openai Create Vector Store File Batch - description: |- - Create a vector store file batch. - - Generate an OpenAI-compatible vector store file batch for the given vector store. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1115,15 +718,13 @@ paths: tags: - Vector Io summary: Openai Retrieve Vector Store - description: Retrieves a vector store. operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get responses: '200': - description: A VectorStoreObject representing the vector store. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1147,21 +748,13 @@ paths: tags: - Vector Io summary: Openai Update Vector Store - description: Updates a vector store. operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_vector_stores_vector_store_id_Request' - required: true responses: '200': - description: A VectorStoreObject representing the updated vector store. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1185,15 +778,13 @@ paths: tags: - Vector Io summary: Openai Delete Vector Store - description: Delete a vector store. operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete responses: '200': - description: A VectorStoreDeleteResponse indicating the deletion status. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreDeleteResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1218,15 +809,13 @@ paths: tags: - Vector Io summary: Openai Retrieve Vector Store File - description: Retrieves a vector store file. operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get responses: '200': - description: A VectorStoreFileObject representing the file. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1256,21 +845,13 @@ paths: tags: - Vector Io summary: Openai Update Vector Store File - description: Updates a vector store file. operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_vector_stores_vector_store_id_files_file_id_Request' - required: true responses: '200': - description: A VectorStoreFileObject representing the updated file. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1300,15 +881,13 @@ paths: tags: - Vector Io summary: Openai Delete Vector Store File - description: Delete a vector store file. operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete responses: '200': - description: A VectorStoreFileDeleteResponse indicating the deletion status. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileDeleteResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1339,51 +918,26 @@ paths: tags: - Vector Io summary: Openai List Files In Vector Store File Batch - description: Returns a list of vector store files in a batch. operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: filter - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Filter - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - default: desc - title: Order - name: vector_store_id in: path required: true @@ -1396,39 +950,18 @@ paths: schema: type: string description: 'Path parameter: batch_id' - 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}/file_batches/{batch_id}: get: tags: - Vector Io summary: Openai Retrieve Vector Store File Batch - description: Retrieve a vector store file batch. operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get responses: '200': - description: A VectorStoreFileBatchObject representing the file batch. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1459,27 +992,26 @@ paths: tags: - Vector Io summary: Openai Retrieve Vector Store File Contents - description: Retrieves the contents of a vector store file. operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: include_embeddings - in: query - required: false - schema: - anyOf: - - type: boolean - - type: 'null' - default: false - title: Include Embeddings - - name: include_metadata - in: query - required: false - schema: - anyOf: - - type: boolean - - type: 'null' - default: false - title: Include Metadata - name: vector_store_id in: path required: true @@ -1492,48 +1024,18 @@ paths: schema: type: string description: 'Path parameter: file_id' - responses: - '200': - description: File contents, optionally with embeddings and metadata based on query parameters. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileContentResponse' - '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: - Vector Io summary: Openai Search Vector Store - description: |- - Search for chunks in a vector store. - - Searches a vector store for relevant chunks based on a query and optional file attribute filters. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreSearchResponsePage' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1558,21 +1060,13 @@ paths: tags: - Vector Io summary: Query Chunks - description: Query chunks from a vector database. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/QueryChunksResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1590,18 +1084,13 @@ paths: tags: - Models summary: Get Model - description: |- - Get model. - - Get a model by its identifier. operationId: get_model_v1_models__model_id__get responses: '200': - description: A Model. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Model' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1626,15 +1115,13 @@ paths: tags: - Models summary: Openai List Models - description: List models using the OpenAI API. operationId: openai_list_models_v1_models_get responses: '200': - description: A OpenAIListModelsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIListModelsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1652,24 +1139,13 @@ paths: tags: - Safety summary: Run Moderation - description: |- - Create moderation. - - Classifies if text and/or image inputs are potentially harmful. operationId: run_moderation_v1_moderations_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_moderations_Request' - required: true responses: '200': - description: A moderation object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ModerationObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1687,24 +1163,13 @@ paths: tags: - Safety summary: Run Shield - description: |- - Run shield. - - Run a shield. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/RunShieldResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1722,15 +1187,13 @@ paths: tags: - Shields summary: Get Shield - description: Get a shield by its identifier. operationId: get_shield_v1_shields__identifier__get responses: '200': - description: A Shield. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Shield' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1755,15 +1218,13 @@ paths: tags: - Shields summary: List Shields - description: List all shields. operationId: list_shields_v1_shields_get responses: '200': - description: A ListShieldsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListShieldsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1781,21 +1242,13 @@ paths: tags: - Scoring summary: Score - description: Score a list of rows. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ScoreResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1813,21 +1266,13 @@ paths: tags: - Scoring summary: Score Batch - description: Score a batch of rows. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ScoreBatchResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1845,15 +1290,13 @@ paths: tags: - Scoring Functions summary: Get Scoring Function - description: Get a scoring function by its ID. operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': - description: A ScoringFn. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ScoringFn' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1878,41 +1321,37 @@ paths: tags: - Scoring Functions summary: List Scoring Functions - description: List all scoring functions. operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': - description: A ListScoringFunctionsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListScoringFunctionsResponse' + schema: {} '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/tools/{tool_name}: get: tags: - Tool Groups summary: Get Tool - description: Get a tool by its name. operationId: get_tool_v1_tools__tool_name__get responses: '200': - description: A ToolDef. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ToolDef' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1937,15 +1376,13 @@ paths: tags: - Tool Groups summary: Get Tool Group - description: Get a tool group by its ID. operationId: get_tool_group_v1_toolgroups__toolgroup_id__get responses: '200': - description: A ToolGroup. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ToolGroup' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1970,82 +1407,61 @@ paths: tags: - Tool Groups summary: List Tool Groups - description: List tool groups with optional provider. operationId: list_tool_groups_v1_toolgroups_get responses: '200': - description: A ListToolGroupsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListToolGroupsResponse' + schema: {} '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/tools: get: tags: - Tool Groups summary: List Tools - description: List tools with optional tool group. operationId: list_tools_v1_tools_get - parameters: - - name: toolgroup_id - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Toolgroup Id responses: '200': - description: A ListToolDefsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListToolDefsResponse' + schema: {} '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/invoke: post: tags: - Tool Runtime summary: Invoke Tool - description: Run a tool with the given arguments. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ToolInvocationResult' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2063,61 +1479,37 @@ paths: tags: - Tool Runtime summary: List Runtime Tools - description: List all tools in the runtime. operationId: list_runtime_tools_v1_tool_runtime_list_tools_get - parameters: - - name: tool_group_id - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Tool Group Id - - name: mcp_endpoint - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' - title: Mcp Endpoint responses: '200': - description: A ListToolDefsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListToolDefsResponse' + schema: {} '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/files/{file_id}: get: tags: - Files summary: Openai Retrieve File - description: |- - Retrieve file. - - Returns information about a specific file. operationId: openai_retrieve_file_v1_files__file_id__get responses: '200': - description: An OpenAIFileObject containing file information. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIFileObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2141,15 +1533,13 @@ paths: tags: - Files summary: Openai Delete File - description: Delete file. operationId: openai_delete_file_v1_files__file_id__delete responses: '200': - description: An OpenAIFileDeleteResponse indicating successful deletion. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIFileDeleteResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2174,117 +1564,57 @@ paths: tags: - Files summary: Openai List Files - description: |- - List files. - - Returns a list of files that belong to the user's organization. operationId: openai_list_files_v1_files_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 10000 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/Order' - - type: 'null' - default: desc - title: Order - - name: purpose - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/OpenAIFilePurpose' - - type: 'null' - title: Purpose responses: '200': - description: An ListOpenAIFileResponse containing the list of files. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIFileResponse' + schema: {} '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: - Files summary: Openai Upload File - description: |- - Upload file. - - Upload a file that can be used across various endpoints. - - The file upload should be a multipart form request with: - - file: The File object (not file name) to be uploaded. - - purpose: The intended purpose of the uploaded file. - - expires_after: Optional form values describing expiration for the file. operationId: openai_upload_file_v1_files_post - requestBody: - required: true - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/Body_openai_upload_file_v1_files_post' responses: '200': - description: An OpenAIFileObject representing the uploaded file. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIFileObject' + schema: {} '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/files/{file_id}/content: get: tags: - Files summary: Openai Retrieve File Content - description: |- - Retrieve file content. - - Returns the contents of the specified file. operationId: openai_retrieve_file_content_v1_files__file_id__content_get responses: '200': - description: The raw file content as a binary response. + description: Successful Response content: application/json: schema: {} @@ -2312,15 +1642,13 @@ paths: tags: - Prompts summary: List Prompts - description: List all prompts. operationId: list_prompts_v1_prompts_get responses: '200': - description: A ListPromptsResponse containing all prompts. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListPromptsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2337,24 +1665,13 @@ paths: tags: - Prompts summary: Create Prompt - description: |- - Create prompt. - - Create a new prompt. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Prompt' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2372,79 +1689,55 @@ paths: tags: - Prompts summary: Get Prompt - description: |- - Get prompt. - - Get a prompt by its identifier and optional version. operationId: get_prompt_v1_prompts__prompt_id__get - parameters: - - name: version - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - title: Version - - name: prompt_id - in: path - required: true - schema: - type: string - description: 'Path parameter: prompt_id' responses: '200': - description: A Prompt resource. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Prompt' + schema: {} '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' post: tags: - Prompts summary: Update Prompt - description: |- - Update prompt. - - Update an existing prompt (increments version). 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Prompt' + schema: {} '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 @@ -2456,10 +1749,6 @@ paths: tags: - Prompts summary: Delete Prompt - description: |- - Delete prompt. - - Delete a prompt. operationId: delete_prompt_v1_prompts__prompt_id__delete responses: '200': @@ -2468,17 +1757,17 @@ paths: application/json: schema: {} '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 @@ -2491,18 +1780,13 @@ paths: tags: - Prompts summary: List Prompt Versions - description: |- - List prompt versions. - - List all versions of a specific prompt. operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get responses: '200': - description: A ListPromptsResponse containing all versions of the prompt. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListPromptsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2527,24 +1811,13 @@ paths: tags: - Prompts summary: Set Default Version - description: |- - Set prompt version. - - Set which version of a prompt should be the default in get_prompt (latest). 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Prompt' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2569,108 +1842,55 @@ paths: tags: - Conversations summary: List Items - description: |- - List items. - - List items in the conversation. operationId: list_items_v1_conversations__conversation_id__items_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - enum: - - asc - - desc - type: string - - type: 'null' - title: Order - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: include - in: query - required: false - schema: - anyOf: - - type: array - items: - $ref: '#/components/schemas/ConversationItemInclude' - - type: 'null' - title: Include responses: '200': - description: List of conversation items. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationItemList' + schema: {} '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: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' post: tags: - Conversations summary: Add Items - description: |- - Create items. - - Create items in the conversation. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationItemList' + schema: {} '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: conversation_id in: path @@ -2683,24 +1903,13 @@ paths: tags: - Conversations summary: Create Conversation - description: |- - Create a conversation. - - Create a conversation. 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. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Conversation' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2718,18 +1927,13 @@ paths: tags: - Conversations summary: Get Conversation - description: |- - Retrieve a conversation. - - Get a conversation with the given ID. operationId: get_conversation_v1_conversations__conversation_id__get responses: '200': - description: The conversation object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Conversation' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2753,24 +1957,13 @@ paths: tags: - Conversations summary: Update Conversation - description: |- - Update a conversation. - - Update a conversation's metadata with the given ID. operationId: update_conversation_v1_conversations__conversation_id__post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_conversations_conversation_id_Request' - required: true responses: '200': - description: The updated conversation object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Conversation' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2794,18 +1987,13 @@ paths: tags: - Conversations summary: Openai Delete Conversation - description: |- - Delete a conversation. - - Delete a conversation with the given ID. operationId: openai_delete_conversation_v1_conversations__conversation_id__delete responses: '200': - description: The deleted conversation resource. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationDeletedResource' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2830,18 +2018,13 @@ paths: tags: - Conversations summary: Retrieve - description: |- - Retrieve an item. - - Retrieve a conversation item. operationId: retrieve_v1_conversations__conversation_id__items__item_id__get responses: '200': - description: The conversation item. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseMessage' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2871,18 +2054,13 @@ paths: tags: - Conversations summary: Openai Delete Conversation Item - description: |- - Delete an item. - - Delete a conversation item. operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete responses: '200': - description: The deleted item resource. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationItemDeletedResource' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2909,3016 +2087,2744 @@ paths: type: string description: 'Path parameter: item_id' components: + responses: + BadRequest400: + description: The request was invalid or malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 400 + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 429 + title: Too Many Requests + detail: You have exceeded the rate limit. Please try again later. + InternalServerError500: + description: The server encountered an unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 500 + title: Internal Server Error + detail: An unexpected error occurred + DefaultError: + description: An error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/Error' schemas: - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: Types of aggregation functions for scoring results. - AllowedToolsFilter: + ImageContentItem: + description: A image content item properties: - tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' + type: + const: image + default: image + title: Type + type: string + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem type: object - title: AllowedToolsFilter - description: Filter configuration for restricting which MCP tools can be used. - ApprovalFilter: + TextContentItem: + description: A text content item properties: - always: + 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. + properties: + uri: + title: Uri + type: string + required: + - uri + title: URL + type: object + _URLOrData: + description: A URL or a base64 encoded string + properties: + url: anyOf: - - items: - type: string - type: array + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - never: + nullable: true + title: URL + data: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' + contentEncoding: base64 + nullable: true + title: _URLOrData type: object - title: ApprovalFilter - description: Filter configuration for MCP tool approval requirements. - ArrayType: + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + GreedySamplingStrategy: + description: Greedy sampling strategy that selects the highest probability token at each step. properties: type: - type: string - const: array + const: greedy + default: greedy title: Type - default: array + type: string + title: GreedySamplingStrategy type: object - title: ArrayType - description: Parameter type for array values. - BasicScoringFnParams: + TopKSamplingStrategy: + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. properties: type: - type: string - const: basic + const: top_k + default: top_k 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. - Batch: - properties: - id: - type: string - title: Id - completion_window: type: string - title: Completion Window - created_at: + top_k: + minimum: 1 + title: Top K 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: + 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. + properties: + type: + const: top_p + default: top_p + title: Type type: string - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - title: Status - cancelled_at: - anyOf: - - type: integer - - type: 'null' - cancelling_at: + temperature: anyOf: - - type: integer + - type: number + minimum: 0.0 - type: 'null' - completed_at: + top_p: anyOf: - - type: integer + - type: number - type: 'null' - error_file_id: + default: 0.95 + required: + - temperature + title: TopPSamplingStrategy + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + OpenAIChatCompletionContentPartImageParam: + description: Image content part for OpenAI-compatible chat completion messages. + properties: + type: + const: image_url + default: image_url + title: Type + type: string + image_url: + $ref: '#/components/schemas/OpenAIImageURL' + required: + - image_url + title: OpenAIChatCompletionContentPartImageParam + type: object + OpenAIChatCompletionContentPartTextParam: + description: Text content part for OpenAI-compatible chat completion messages. + properties: + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIChatCompletionContentPartTextParam + type: object + OpenAIFile: + properties: + type: + const: file + default: file + title: Type + type: string + file: + $ref: '#/components/schemas/OpenAIFileFile' + required: + - file + title: OpenAIFile + type: object + OpenAIFileFile: + properties: + file_data: anyOf: - type: string - type: 'null' - errors: - anyOf: - - $ref: '#/components/schemas/Errors' - title: Errors - - type: 'null' - title: Errors - expired_at: - anyOf: - - type: integer - - type: 'null' - expires_at: - anyOf: - - type: integer - - type: 'null' - failed_at: - anyOf: - - type: integer - - type: 'null' - finalizing_at: - anyOf: - - type: integer - - type: 'null' - in_progress_at: + nullable: true + file_id: anyOf: - - type: integer + - type: string - type: 'null' - metadata: + nullable: true + filename: anyOf: - - additionalProperties: - type: string - type: object + - type: string - type: 'null' - model: + nullable: true + title: OpenAIFileFile + type: object + OpenAIImageURL: + description: Image URL specification for OpenAI-compatible chat completion messages. + properties: + url: + title: Url + type: string + detail: anyOf: - type: string - type: 'null' - output_file_id: + nullable: true + required: + - url + title: OpenAIImageURL + type: object + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: anyOf: - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - request_counts: + title: string | list[OpenAIChatCompletionContentPartTextParam] + nullable: true + name: anyOf: - - $ref: '#/components/schemas/BatchRequestCounts' - title: BatchRequestCounts + - type: string - type: 'null' - title: BatchRequestCounts - usage: + nullable: true + tool_calls: anyOf: - - $ref: '#/components/schemas/BatchUsage' - title: BatchUsage + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array - type: 'null' - title: BatchUsage - additionalProperties: true + nullable: true + title: OpenAIAssistantMessageParam type: object - required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - BatchError: + OpenAIChatCompletionToolCall: + description: Tool call specification for OpenAI-compatible chat completion responses. properties: - code: + index: + anyOf: + - type: integer + - type: 'null' + nullable: true + id: anyOf: - type: string - type: 'null' - line: + nullable: true + type: + const: function + default: function + title: Type + type: string + function: anyOf: - - type: integer + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction - type: 'null' - message: + nullable: true + title: OpenAIChatCompletionToolCallFunction + title: OpenAIChatCompletionToolCall + type: object + OpenAIChatCompletionToolCallFunction: + description: Function call details for OpenAI-compatible tool calls. + properties: + name: anyOf: - type: string - type: 'null' - param: + nullable: true + arguments: anyOf: - type: string - type: 'null' - additionalProperties: true + nullable: true + title: OpenAIChatCompletionToolCallFunction 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: + OpenAIDeveloperMessageParam: + description: A message from the developer in an OpenAI-compatible chat completion request. properties: - identifier: + role: + const: developer + default: developer + title: Role type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + content: anyOf: - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - 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. - BenchmarkConfig: - properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - scoring_params: - additionalProperties: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: object - title: Scoring Params - description: Map between scoring function id and parameters for each scoring function you want to run - num_examples: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: anyOf: - - type: integer + - type: string - type: 'null' - description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - type: object + nullable: true required: - - eval_candidate - title: BenchmarkConfig - description: A benchmark configuration for evaluation. - Body_openai_upload_file_v1_files_post: + - content + title: OpenAIDeveloperMessageParam + type: object + OpenAISystemMessageParam: + description: A system message providing instructions or context to the model. properties: - file: + role: + const: system + default: system + title: Role type: string - format: binary - title: File - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' - expires_after: + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: anyOf: - - $ref: '#/components/schemas/ExpiresAfter' - title: ExpiresAfter + - type: string - type: 'null' - title: ExpiresAfter - type: object + nullable: true required: - - file - - purpose - title: Body_openai_upload_file_v1_files_post - BooleanType: - properties: - type: - type: string - const: boolean - title: Type - default: boolean - type: object - title: BooleanType - description: Parameter type for boolean values. - ChatCompletionInputType: - properties: - type: - type: string - const: chat_completion_input - title: Type - default: chat_completion_input + - content + title: OpenAISystemMessageParam type: object - title: ChatCompletionInputType - description: Parameter type for chat completion input. - Checkpoint: + OpenAIToolMessageParam: + description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. properties: - identifier: - type: string - title: Identifier - created_at: - type: string - format: date-time - title: Created At - epoch: - type: integer - title: Epoch - post_training_job_id: + role: + const: tool + default: tool + title: Role type: string - title: Post Training Job Id - path: + tool_call_id: + title: Tool Call Id type: string - title: Path - training_metrics: + content: anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' - title: PostTrainingMetric - - type: 'null' - title: PostTrainingMetric - type: object + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - Chunk-Input: + - tool_call_id + - content + title: OpenAIToolMessageParam + type: object + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. properties: + role: + const: user + default: user + title: Role + type: string content: anyOf: - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem discriminator: - propertyName: type mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - chunk_id: - type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - chunk_metadata: + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' - title: ChunkMetadata - type: object + nullable: true required: - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - Chunk-Output: + title: OpenAIUserMessageParam + type: object + OpenAIMessageParam: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + OpenAIJSONSchema: + description: JSON schema specification for OpenAI-compatible structured response format. properties: - content: + name: + title: Name + type: string + description: anyOf: - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - type: array - title: list[ImageContentItem-Output | TextContentItem] - title: string | list[ImageContentItem-Output | TextContentItem] - chunk_id: - type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: + - type: 'null' + strict: anyOf: - - items: - type: number - type: array + - type: boolean - type: 'null' - chunk_metadata: + schema: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - additionalProperties: true + type: object - type: 'null' - title: ChunkMetadata + title: OpenAIJSONSchema + type: object + OpenAIResponseFormatJSONObject: + description: JSON object response format for OpenAI-compatible chat completion requests. + properties: + type: + const: json_object + default: json_object + title: Type + type: string + title: OpenAIResponseFormatJSONObject type: object + OpenAIResponseFormatJSONSchema: + description: JSON schema response format for OpenAI-compatible chat completion requests. + properties: + type: + const: json_schema + default: json_schema + title: Type + type: string + json_schema: + $ref: '#/components/schemas/OpenAIJSONSchema' required: - - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - ChunkMetadata: + - json_schema + title: OpenAIResponseFormatJSONSchema + type: object + OpenAIResponseFormatText: + description: Text response format for OpenAI-compatible chat completion requests. properties: - chunk_id: + type: + const: text + default: text + title: Type + type: string + title: OpenAIResponseFormatText + type: object + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + VectorStoreChunkingStrategyAuto: + description: Automatic chunking strategy for vector store files. + properties: + type: + const: auto + default: auto + title: Type + type: string + title: VectorStoreChunkingStrategyAuto + type: object + VectorStoreChunkingStrategyStatic: + description: Static chunking strategy with configurable parameters. + properties: + type: + const: static + default: static + title: Type + type: string + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + required: + - static + title: VectorStoreChunkingStrategyStatic + type: object + VectorStoreChunkingStrategyStaticConfig: + description: Configuration for static chunking strategy. + 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 + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + VectorStoreFileStatus: + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + OpenAIResponseInputMessageContentFile: + description: File content for input messages in OpenAI response format. + properties: + type: + const: input_file + default: input_file + title: Type + type: string + file_data: anyOf: - type: string - type: 'null' - document_id: + nullable: true + file_id: anyOf: - type: string - type: 'null' - source: + nullable: true + file_url: anyOf: - type: string - type: 'null' - created_timestamp: - anyOf: - - type: integer - - type: 'null' - updated_timestamp: - anyOf: - - type: integer - - type: 'null' - chunk_window: + nullable: true + filename: anyOf: - type: string - type: 'null' - chunk_tokenizer: + nullable: true + title: OpenAIResponseInputMessageContentFile + type: object + OpenAIResponseInputMessageContentImage: + description: Image content for input messages in OpenAI response format. + properties: + detail: + default: auto + title: Detail + type: string + enum: + - low + - high + - auto + type: + const: input_image + default: input_image + title: Type + type: string + file_id: anyOf: - type: string - type: 'null' - chunk_embedding_model: + nullable: true + image_url: anyOf: - type: string - type: 'null' - chunk_embedding_dimension: - anyOf: - - type: integer - - type: 'null' - content_token_count: - anyOf: - - type: integer - - type: 'null' - metadata_token_count: - anyOf: - - type: integer - - type: 'null' + nullable: true + title: OpenAIResponseInputMessageContentImage type: object - title: 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. - CompletionInputType: + OpenAIResponseInputMessageContentText: + description: Text content for input messages in OpenAI response format. properties: + text: + title: Text + type: string type: + const: input_text + default: input_text + title: Type type: string - const: completion_input + required: + - text + title: OpenAIResponseInputMessageContentText + type: object + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + OpenAIResponseAnnotationCitation: + description: URL citation annotation for referencing external web resources. + properties: + type: + const: url_citation + default: url_citation title: Type - default: completion_input + 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 - title: CompletionInputType - description: Parameter type for completion input. - Conversation: + OpenAIResponseAnnotationContainerFileCitation: properties: - id: + type: + const: container_file_citation + default: container_file_citation + title: Type type: string - title: Id - description: The unique ID of the conversation. - object: + container_id: + title: Container Id type: string - const: conversation - title: Object - description: The object type, which is always conversation. - default: conversation - created_at: + 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 - title: Created At - description: The time at which the conversation was created, measured in seconds since the Unix epoch. - 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. - 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. - type: object required: - - id - - created_at - title: Conversation - description: OpenAI-compatible conversation object. - ConversationDeletedResource: + - 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. properties: - id: + type: + const: file_citation + default: file_citation + title: Type type: string - title: Id - description: The deleted conversation identifier - object: + file_id: + title: File Id type: string - title: Object - description: Object type - default: conversation.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true - type: object + filename: + title: Filename + type: string + index: + title: Index + type: integer required: - - id - title: ConversationDeletedResource - description: Response for deleted conversation. - ConversationItemDeletedResource: + - file_id + - filename + - index + title: OpenAIResponseAnnotationFileCitation + type: object + OpenAIResponseAnnotationFilePath: properties: - id: + type: + const: file_path + default: file_path + title: Type type: string - title: Id - description: The deleted item identifier - object: + file_id: + title: File Id type: string - title: Object - description: Object type - default: conversation.item.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true + index: + title: Index + type: integer + required: + - file_id + - index + title: OpenAIResponseAnnotationFilePath type: object + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + OpenAIResponseContentPartRefusal: + description: Refusal content within a streamed response part. + properties: + type: + const: refusal + default: refusal + title: Type + type: string + refusal: + title: Refusal + type: string required: - - id - title: ConversationItemDeletedResource - description: Response for deleted conversation item. - 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: + - refusal + title: OpenAIResponseContentPartRefusal + type: object + OpenAIResponseOutputMessageContentOutputText: properties: - object: + text: + title: Text type: string - title: Object - description: Object type - default: list - data: + type: + const: output_text + default: output_text + title: Type + type: string + annotations: items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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' - title: OpenAIResponseMessage-Output | ... (9 variants) + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations type: array - title: Data - description: List of conversation items - first_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the first item in the list - last_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the last item in the list - 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 + - text + title: OpenAIResponseOutputMessageContentOutputText type: object - required: - - beta - title: DPOAlignmentConfig - description: Configuration for Direct Preference Optimization (DPO) alignment. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + MCPListToolsTool: + description: Tool definition returned by MCP list tools operation. properties: - dataset_id: + input_schema: + additionalProperties: true + title: Input Schema + type: object + name: + title: Name 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: + description: anyOf: - type: string - type: 'null' - packed: - anyOf: - - type: boolean - - type: 'null' - default: false - train_on_input: - anyOf: - - type: boolean - - type: 'null' - default: false - type: object + nullable: true required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: Configuration for training data and data loading. - Dataset: + - input_schema + - name + title: MCPListToolsTool + type: object + OpenAIResponseMCPApprovalRequest: + description: A request for human approval of a tool invocation. properties: - identifier: + arguments: + title: Arguments type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: + id: + title: Id type: string - title: Provider Id - description: ID of the provider that owns this resource - type: + name: + title: Name type: string - const: dataset + server_label: + title: Server Label + type: string + type: + const: mcp_approval_request + default: mcp_approval_request title: Type - default: dataset - purpose: - $ref: '#/components/schemas/DatasetPurpose' - source: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - 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 + type: string required: - - identifier - - provider_id - - purpose - - source - title: Dataset - description: Dataset resource for storing and accessing training or evaluation data. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - 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. - EfficiencyConfig: - properties: - enable_activation_checkpointing: - anyOf: - - type: boolean - - type: 'null' - default: false - enable_activation_offloading: - anyOf: - - type: boolean - - type: 'null' - default: false - memory_efficient_fsdp_wrap: - anyOf: - - type: boolean - - type: 'null' - default: false - fsdp_cpu_offload: - anyOf: - - type: boolean - - type: 'null' - default: false + - arguments + - id + - name + - server_label + title: OpenAIResponseMCPApprovalRequest type: object - title: EfficiencyConfig - description: Configuration for memory and compute efficiency optimizations. - Errors: + 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: - data: + content: anyOf: + - type: string - items: - $ref: '#/components/schemas/BatchError' + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array - - type: 'null' - object: - anyOf: - - type: string - - type: 'null' - 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. - ExpiresAfter: - properties: - anchor: + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role type: string - const: created_at - title: Anchor - seconds: - type: integer - maximum: 2592000.0 - minimum: 3600.0 - title: Seconds - type: object - required: - - anchor - - seconds - title: 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) - GreedySamplingStrategy: - properties: + enum: + - system + - developer + - user + - assistant + default: system type: - type: string - const: greedy + const: message + default: message title: Type - default: greedy - type: object - title: GreedySamplingStrategy - description: Greedy sampling strategy that selects the highest probability token at each step. - HealthInfo: - properties: + type: string + id: + anyOf: + - type: string + - type: 'null' + nullable: true status: - $ref: '#/components/schemas/HealthStatus' - type: object + anyOf: + - type: string + - type: 'null' + nullable: true required: - - status - title: HealthInfo - description: Health status information for 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' + - content + - role + title: OpenAIResponseMessage type: object - required: - - image - title: ImageContentItem - description: A image content item - ImageContentItem-Output: + OpenAIResponseOutputMessageFileSearchToolCall: + description: File search tool call output message for OpenAI responses. properties: - type: + id: + title: Id type: string - const: image + queries: + items: + type: string + title: Queries + type: array + status: + title: Status + type: string + type: + const: file_search_call + default: file_search_call title: Type - default: image - image: - $ref: '#/components/schemas/_URLOrData' - type: object - required: - - image - title: ImageContentItem - description: A image content item - 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 + results: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array + - type: 'null' + nullable: true required: - - job_id + - id + - queries - status - title: Job - description: A job execution instance with status tracking. - JobStatus: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - description: Status of a job execution. - JsonType: + title: OpenAIResponseOutputMessageFileSearchToolCall + type: object + OpenAIResponseOutputMessageFileSearchToolCallResults: + description: Search results returned by the file search operation. properties: - type: + attributes: + additionalProperties: true + title: Attributes + type: object + file_id: + title: File Id type: string - const: json - title: Type - default: json + 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 - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: + OpenAIResponseOutputMessageFunctionToolCall: + description: Function tool call output message for OpenAI responses. properties: - type: + call_id: + title: Call Id type: string - const: llm_as_judge + name: + title: Name + type: string + arguments: + title: Arguments + type: string + type: + const: function_call + default: function_call title: Type - default: llm_as_judge - judge_model: type: string - title: Judge Model - prompt_template: + id: anyOf: - type: string - type: 'null' - 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 + nullable: true + status: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - judge_model - title: LLMAsJudgeScoringFnParams - description: Parameters for LLM-as-judge scoring function configuration. - ListBatchesResponse: - properties: - object: - type: string - const: list - title: Object - default: list - data: - items: - $ref: '#/components/schemas/Batch' - type: array - title: Data - description: List of batch objects - first_id: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + type: object + OpenAIResponseOutputMessageMCPCall: + description: Model Context Protocol (MCP) call output message for OpenAI responses. + 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' - description: ID of the first batch in the list - last_id: + nullable: true + output: anyOf: - type: string - type: 'null' - description: ID of the last batch in the list - has_more: - type: boolean - title: Has More - description: Whether there are more batches available - default: false - type: object + nullable: true required: - - data - title: ListBatchesResponse - description: Response containing a list of batch objects. - ListOpenAIChatCompletionResponse: - properties: - data: - items: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: - type: string - title: First Id - last_id: - type: string - title: Last Id - object: - type: string - const: list - title: Object - default: list + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall type: object - required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIChatCompletionResponse - description: Response from listing OpenAI-compatible chat completions. - ListOpenAIFileResponse: + OpenAIResponseOutputMessageMCPListTools: + description: MCP list tools output message containing available tools from an MCP server. properties: - data: - items: - $ref: '#/components/schemas/OpenAIFileObject' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: + id: + title: Id type: string - title: First Id - last_id: + type: + const: mcp_list_tools + default: mcp_list_tools + title: Type type: string - title: Last Id - object: + server_label: + title: Server Label type: string - const: list - title: Object - default: list - type: object - required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIFileResponse - description: Response for listing files in OpenAI Files API. - ListOpenAIResponseInputItem: - properties: - data: + tools: items: - $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' + $ref: '#/components/schemas/MCPListToolsTool' + title: Tools type: array - title: Data - object: - type: string - const: list - title: Object - default: list - type: object required: - - data - title: ListOpenAIResponseInputItem - description: List container for OpenAI response input items. - ListOpenAIResponseObject: + - id + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools + type: object + OpenAIResponseOutputMessageWebSearchToolCall: + description: Web search tool call output message for OpenAI responses. properties: - data: - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput-Output' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: + id: + title: Id type: string - title: First Id - last_id: + status: + title: Status type: string - title: Last Id - object: + type: + const: web_search_call + default: web_search_call + title: Type type: string - const: list - title: Object - default: list - type: object required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject - description: Paginated list of OpenAI response objects with navigation metadata. - ListPromptsResponse: + - id + - status + title: OpenAIResponseOutputMessageWebSearchToolCall + type: object + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + AllowedToolsFilter: + description: Filter configuration for restricting which MCP tools can be used. properties: - data: - items: - $ref: '#/components/schemas/Prompt' - type: array - title: Data + tool_names: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + title: AllowedToolsFilter type: object - required: - - data - title: ListPromptsResponse - description: Response model to list prompts. - ListProvidersResponse: + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. properties: - data: - items: - $ref: '#/components/schemas/ProviderInfo' - type: array - title: Data + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + title: ApprovalFilter type: object - required: - - data - title: ListProvidersResponse - description: Response containing a list of all available providers. - ListRoutesResponse: + OpenAIResponseInputToolFileSearch: + description: File search tool configuration for OpenAI response inputs. properties: - data: + type: + const: file_search + default: file_search + title: Type + type: string + vector_store_ids: items: - $ref: '#/components/schemas/RouteInfo' + type: string + title: Vector Store Ids type: array - title: Data - type: object - required: - - data - title: ListRoutesResponse - description: Response containing a list of all available API routes. - ListScoringFunctionsResponse: - properties: - data: - items: - $ref: '#/components/schemas/ScoringFn' - 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 - ListToolDefsResponse: - properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - type: array - title: Data - type: object - required: - - data - title: ListToolDefsResponse - description: Response containing a list of tool definitions. - 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. - LoraFinetuningConfig: - properties: - type: - type: string - const: LoRA - title: Type - default: LoRA - lora_attn_modules: - items: - type: string - type: array - title: Lora Attn Modules - apply_lora_to_mlp: - type: boolean - title: Apply Lora To Mlp - apply_lora_to_output: - type: boolean - title: Apply Lora To Output - rank: - type: integer - title: Rank - alpha: - type: integer - title: Alpha - use_dora: + filters: anyOf: - - type: boolean + - additionalProperties: true + type: object - type: 'null' - default: false - quantize_base: + nullable: true + max_num_results: anyOf: - - type: boolean + - maximum: 50 + minimum: 1 + type: integer - type: 'null' - default: false - type: object + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + nullable: true + title: SearchRankingOptions required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - MCPListToolsTool: + - vector_store_ids + title: OpenAIResponseInputToolFileSearch + type: object + OpenAIResponseInputToolFunction: + description: Function tool configuration for OpenAI response inputs. properties: - input_schema: - additionalProperties: true - type: object - title: Input Schema - name: + type: + const: function + default: function + title: Type type: string + name: title: Name + type: string description: anyOf: - type: string - type: 'null' - type: object + nullable: true + parameters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + nullable: true required: - - input_schema - name - title: MCPListToolsTool - description: Tool definition returned by MCP list tools operation. - Model: + - parameters + title: OpenAIResponseInputToolFunction + type: object + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: - identifier: + type: + const: mcp + default: mcp + title: Type type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: + server_label: + title: Server Label type: string - title: Provider Id - description: ID of the provider that owns this resource - type: + server_url: + title: Server Url 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 + headers: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + require_approval: + anyOf: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + title: ApprovalFilter + default: never + title: string | ApprovalFilter + allowed_tools: + anyOf: + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter + - type: 'null' + title: list[string] | AllowedToolsFilter + nullable: true required: - - identifier - - provider_id - title: Model - description: A model resource representing an AI model registered in Llama Stack. - ModelCandidate: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + type: object + OpenAIResponseInputToolWebSearch: + description: Web search tool configuration for OpenAI response inputs. properties: type: - type: string - const: model + default: web_search title: Type - default: model - model: type: string - title: Model - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + search_context_size: anyOf: - - $ref: '#/components/schemas/SystemMessage' - title: SystemMessage + - pattern: ^low|medium|high$ + type: string - type: 'null' - title: SystemMessage + default: medium + title: OpenAIResponseInputToolWebSearch type: object - required: - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType - description: Enumeration of supported model types in Llama Stack. - ModerationObject: + SearchRankingOptions: + description: Options for ranking and filtering search results. properties: - id: - type: string - title: Id - model: - type: string - title: Model - results: - items: - $ref: '#/components/schemas/ModerationObjectResults' - type: array - title: Results + ranker: + anyOf: + - type: string + - type: 'null' + nullable: true + score_threshold: + anyOf: + - type: number + - type: 'null' + default: 0.0 + title: SearchRankingOptions type: object - required: - - id - - model - - results - title: ModerationObject - description: A moderation object. - ModerationObjectResults: - properties: - flagged: - type: boolean - title: Flagged - categories: - anyOf: - - additionalProperties: - type: boolean - type: object - - type: 'null' - category_applied_input_types: - anyOf: - - additionalProperties: - items: - type: string - type: array - type: object - - type: 'null' - category_scores: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - user_message: - anyOf: - - type: string - - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - type: object - required: - - flagged - title: ModerationObjectResults - description: A moderation object. - NumberType: + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. properties: type: - type: string - const: number + const: mcp + default: mcp title: Type - default: number - type: object - title: NumberType - description: Parameter type for numeric values. - ObjectType: - properties: - type: type: string - const: object - title: Type - default: object - type: object - title: ObjectType - description: Parameter type for object values. - OpenAIAssistantMessageParam-Input: - properties: - role: + server_label: + title: Server Label type: string - const: assistant - title: Role - default: assistant - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - tool_calls: + allowed_tools: anyOf: - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: string type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' + title: list[string] | AllowedToolsFilter + nullable: true + required: + - server_label + title: OpenAIResponseToolMCP type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIAssistantMessageParam-Output: + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. properties: - role: + type: + const: output_text + default: output_text + title: Type type: string - const: assistant - title: Role - default: assistant - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIChatCompletion: - properties: - id: + text: + title: Text type: string - title: Id - choices: + annotations: items: - $ref: '#/components/schemas/OpenAIChoice-Output' + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations 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: + logprobs: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage + - items: + additionalProperties: true + type: object + type: array - type: 'null' - title: OpenAIChatCompletionUsage - type: object + nullable: true required: - - id - - choices - - created - - model - title: OpenAIChatCompletion - description: Response from an OpenAI-compatible chat completion request. - OpenAIChatCompletionContentPartImageParam: - properties: - type: - type: string - const: image_url - title: Type - default: image_url - image_url: - $ref: '#/components/schemas/OpenAIImageURL' + - text + title: OpenAIResponseContentPartOutputText type: object - required: - - image_url - title: OpenAIChatCompletionContentPartImageParam - description: Image content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionContentPartTextParam: + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. properties: type: - type: string - const: text + const: reasoning_text + default: reasoning_text title: Type - default: text - text: type: string + text: title: Text - type: object + type: string required: - text - title: OpenAIChatCompletionContentPartTextParam - description: Text content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionRequestWithExtraBody: + title: OpenAIResponseContentPartReasoningText + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. properties: - model: + type: + const: summary_text + default: summary_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningSummary + type: object + OpenAIResponseError: + description: Error details for failed OpenAI response requests. + properties: + code: + title: Code + type: string + message: + title: Message + type: string + required: + - code + - message + title: OpenAIResponseError + type: object + OpenAIResponseObject: + description: Complete OpenAI response object containing generation results and metadata. + properties: + created_at: + title: Created At + type: integer + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + nullable: true + title: OpenAIResponseError + id: + title: Id type: string + model: title: Model - messages: + type: string + object: + const: response + default: response + title: Object + type: string + output: items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' - title: OpenAIUserMessageParam-Input - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' - title: OpenAIAssistantMessageParam-Input - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: 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' - title: OpenAIUserMessageParam-Input | ... (5 variants) + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output type: array - minItems: 1 - title: Messages - frequency_penalty: - anyOf: - - type: number - - type: 'null' - function_call: - anyOf: - - type: string - - additionalProperties: true - type: object - - type: 'null' - title: string | object - functions: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - logit_bias: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - logprobs: - anyOf: - - type: boolean - - type: 'null' - max_completion_tokens: - anyOf: - - type: integer - - type: 'null' - max_tokens: - anyOf: - - type: integer - - type: 'null' - n: - anyOf: - - type: integer - - type: 'null' parallel_tool_calls: - anyOf: - - type: boolean - - type: 'null' - presence_penalty: - anyOf: - - type: number - - type: 'null' - response_format: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - discriminator: - propertyName: type - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - - type: 'null' - title: Response Format - seed: - anyOf: - - type: integer - - type: 'null' - stop: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: anyOf: - type: string - - items: - type: string - type: array - title: list[string] - - type: 'null' - title: string | list[string] - stream: - anyOf: - - type: boolean - type: 'null' - stream_options: + nullable: true + prompt: anyOf: - - additionalProperties: true - type: object + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' + nullable: true + title: OpenAIResponsePrompt + status: + title: Status + type: string temperature: anyOf: - type: number - type: 'null' - tool_choice: + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: anyOf: - - type: string - - additionalProperties: true - type: object + - type: number - type: 'null' - title: string | object + nullable: true tools: anyOf: - items: - additionalProperties: true - type: object + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - top_logprobs: + nullable: true + truncation: anyOf: - - type: integer + - type: string - type: 'null' - top_p: + nullable: true + usage: anyOf: - - type: number + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' - user: + nullable: true + title: OpenAIResponseUsage + instructions: anyOf: - type: string - type: 'null' - additionalProperties: true - type: object - required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible chat completion endpoint. - OpenAIChatCompletionToolCall: - properties: - index: + nullable: true + max_tool_calls: anyOf: - type: integer - type: 'null' - id: - anyOf: - - type: string - - type: 'null' - type: - type: string - const: function - title: Type - default: function - function: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - title: OpenAIChatCompletionToolCallFunction - - type: 'null' - title: OpenAIChatCompletionToolCallFunction + nullable: true + required: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject type: object - title: OpenAIChatCompletionToolCall - description: Tool call specification for OpenAI-compatible chat completion responses. - OpenAIChatCompletionToolCallFunction: + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. properties: - name: - anyOf: - - type: string - - type: 'null' - arguments: - anyOf: - - type: string - - type: 'null' + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.completed + default: response.completed + title: Type + type: string + required: + - response + title: OpenAIResponseObjectStreamResponseCompleted type: object - title: OpenAIChatCompletionToolCallFunction - description: Function call details for OpenAI-compatible tool calls. - OpenAIChatCompletionUsage: + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. properties: - prompt_tokens: + content_index: + title: Content Index type: integer - title: Prompt Tokens - completion_tokens: + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - title: Completion Tokens - total_tokens: + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number type: integer - title: Total Tokens - prompt_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' - title: OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - title: OpenAIChatCompletionUsagePromptTokensDetails - completion_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' - title: OpenAIChatCompletionUsageCompletionTokensDetails - - type: 'null' - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object + type: + const: response.content_part.added + default: response.content_part.added + title: Type + type: string required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - description: Usage information for OpenAI chat completion. - OpenAIChatCompletionUsageCompletionTokensDetails: - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - type: object - title: OpenAIChatCompletionUsageCompletionTokensDetails - description: Token details for output tokens in OpenAI chat completion usage. - OpenAIChatCompletionUsagePromptTokensDetails: - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded type: object - title: OpenAIChatCompletionUsagePromptTokensDetails - description: Token details for prompt tokens in OpenAI chat completion usage. - OpenAIChoice-Output: + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. properties: - message: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' - title: OpenAIUserMessageParam-Output - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' - title: OpenAIAssistantMessageParam-Output - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam-Output | ... (5 variants) + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: 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: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - title: OpenAIChoiceLogprobs-Output - - type: 'null' - title: OpenAIChoiceLogprobs-Output - type: object + type: + const: response.content_part.done + default: response.content_part.done + title: Type + type: string required: - - message - - finish_reason - - index - title: OpenAIChoice - description: A choice from an OpenAI-compatible chat completion response. - OpenAIChoiceLogprobs-Output: - properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone type: object - title: OpenAIChoiceLogprobs - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. - OpenAICompletion: + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. properties: - id: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.created + default: response.created + title: Type type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAICompletionChoice-Output' - type: array - title: Choices - created: + required: + - response + title: OpenAIResponseObjectStreamResponseCreated + type: object + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number type: integer - title: Created - model: + type: + const: response.failed + default: response.failed + title: Type 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. - - :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" - OpenAICompletionChoice-Output: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed + type: object + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. properties: - finish_reason: - type: string - title: Finish Reason - text: + item_id: + title: Item Id type: string - title: Text - index: + output_index: + title: Output Index type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - title: OpenAIChoiceLogprobs-Output - - type: 'null' - title: OpenAIChoiceLogprobs-Output - type: object + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type + type: string required: - - finish_reason - - text - - index - title: 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 - OpenAICompletionRequestWithExtraBody: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. properties: - model: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type type: string - title: Model - prompt: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - items: - type: integer - type: array - title: list[integer] - - items: - items: - type: integer - type: array - type: array - title: list[array] - title: string | ... (4 variants) - best_of: - anyOf: - - type: integer - - type: 'null' - echo: - anyOf: - - type: boolean - - type: 'null' - frequency_penalty: - anyOf: - - type: number - - type: 'null' - logit_bias: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - logprobs: - anyOf: - - type: boolean - - type: 'null' - max_tokens: - anyOf: - - type: integer - - type: 'null' - n: - anyOf: - - type: integer - - type: 'null' - presence_penalty: - anyOf: - - type: number - - type: 'null' - seed: - anyOf: - - type: integer - - type: 'null' - stop: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - type: 'null' - title: string | list[string] - stream: - anyOf: - - type: boolean - - type: 'null' - stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - temperature: - anyOf: - - type: number - - type: 'null' - top_p: - anyOf: - - type: number - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - suffix: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible completion endpoint. - OpenAICompletionWithInputMessages: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. properties: - id: - type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAIChoice-Output' - type: array - title: Choices - object: + item_id: + title: Item Id type: string - const: chat.completion - title: Object - default: chat.completion - created: + output_index: + title: Output Index type: integer - title: Created - model: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type type: string - title: Model - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - title: OpenAIChatCompletionUsage - input_messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' - title: OpenAIUserMessageParam-Output - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' - title: OpenAIAssistantMessageParam-Output - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - 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' - title: OpenAIUserMessageParam-Output | ... (5 variants) - type: array - title: Input Messages - type: object required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. properties: - file_ids: - items: - type: string - type: array - title: File Ids - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - additionalProperties: true - type: object + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + title: Type + type: string required: - - file_ids - title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - description: Request to create a vector store file batch with extra_body support. - OpenAICreateVectorStoreRequestWithExtraBody: - properties: - name: - anyOf: - - type: string - - type: 'null' - file_ids: - anyOf: - - items: - type: string - type: array - - type: 'null' - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - additionalProperties: true + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta type: object - title: OpenAICreateVectorStoreRequestWithExtraBody - description: Request to create a vector store with extra_body support. - OpenAIDeleteResponseObject: + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. properties: - id: + arguments: + title: Arguments type: string - title: Id - object: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type type: string - const: response - title: Object - default: response - deleted: - type: boolean - title: Deleted - default: true - type: object required: - - id - title: OpenAIDeleteResponseObject - description: Response object confirming deletion of an OpenAI response. - OpenAIDeveloperMessageParam: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. properties: - role: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type type: string - const: developer - title: Role - default: developer - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress type: object + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.incomplete + default: response.incomplete + title: Type + type: string required: - - content - title: OpenAIDeveloperMessageParam - description: A message from the developer in an OpenAI-compatible chat completion request. - OpenAIEmbeddingData: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: properties: - object: + delta: + title: Delta type: string - const: embedding - title: Object - default: embedding - embedding: - anyOf: - - items: - type: number - type: array - title: list[number] - - type: string - title: list[number] | string - index: + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - title: Index - type: object + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type + type: string required: - - embedding - - index - title: OpenAIEmbeddingData - description: A single embedding data object from an OpenAI-compatible embeddings response. - OpenAIEmbeddingUsage: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: properties: - prompt_tokens: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - title: Prompt Tokens - total_tokens: + sequence_number: + title: Sequence Number type: integer - title: Total Tokens - type: object + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type + type: string required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage - description: Usage information for an OpenAI-compatible embeddings response. - OpenAIEmbeddingsRequestWithExtraBody: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. properties: - model: - type: string - title: Model - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - encoding_format: - anyOf: - - type: string - - type: 'null' - default: float - dimensions: - anyOf: - - type: integer - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object - required: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody - description: Request parameters for OpenAI-compatible embeddings endpoint. - OpenAIEmbeddingsResponse: - properties: - object: - type: string - const: list - title: Object - default: list - data: - items: - $ref: '#/components/schemas/OpenAIEmbeddingData' - type: array - title: Data - model: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type 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. - OpenAIFile: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. properties: + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: file + const: response.mcp_call.failed + default: response.mcp_call.failed title: Type - default: file - file: - $ref: '#/components/schemas/OpenAIFileFile' - type: object - required: - - file - title: OpenAIFile - OpenAIFileDeleteResponse: - properties: - id: - type: string - title: Id - object: type: string - const: file - title: Object - default: file - deleted: - type: boolean - title: Deleted - type: object required: - - id - - deleted - title: OpenAIFileDeleteResponse - description: Response for deleting a file in OpenAI Files API. - OpenAIFileFile: - properties: - file_data: - anyOf: - - type: string - - type: 'null' - file_id: - anyOf: - - type: string - - type: 'null' - filename: - anyOf: - - type: string - - type: 'null' + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed type: object - title: OpenAIFileFile - OpenAIFileObject: + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. properties: - object: - type: string - const: file - title: Object - default: file - id: + item_id: + title: Item Id type: string - title: Id - bytes: - type: integer - title: Bytes - created_at: + output_index: + title: Output Index type: integer - title: Created At - expires_at: + sequence_number: + title: Sequence Number type: integer - title: Expires At - filename: + type: + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress + title: Type 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. - OpenAIFilePurpose: - type: string - enum: - - assistants - - batch - title: OpenAIFilePurpose - description: Valid purpose values for OpenAI Files API. - OpenAIImageURL: - properties: - url: - type: string - title: Url - detail: - anyOf: - - type: string - - type: 'null' + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress type: object - required: - - url - title: OpenAIImageURL - description: Image URL specification for OpenAI-compatible chat completion messages. - OpenAIJSONSchema: + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: properties: - name: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted type: object - title: OpenAIJSONSchema - description: JSON schema specification for OpenAI-compatible structured response format. - OpenAIListModelsResponse: + OpenAIResponseObjectStreamResponseMcpListToolsFailed: properties: - data: - items: - $ref: '#/components/schemas/OpenAIModel' - type: array - title: Data - type: object + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type + type: string required: - - data - title: OpenAIListModelsResponse - OpenAIModel: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + type: object + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: properties: - id: - type: string - title: Id - object: - type: string - const: model - title: Object - default: model - created: + sequence_number: + title: Sequence Number type: integer - title: Created - owned_by: + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type type: string - title: Owned By - custom_metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object required: - - id - - created - - owned_by - title: OpenAIModel - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata - OpenAIResponseAnnotationCitation: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. properties: - type: + response_id: + title: Response Id type: string - const: url_citation - title: Type - default: url_citation - end_index: + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index type: integer - title: End Index - start_index: + sequence_number: + title: Sequence Number type: integer - title: Start Index - title: - type: string - title: Title - url: + type: + const: response.output_item.added + default: response.output_item.added + title: Type type: string - title: Url - type: object required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation - description: URL citation annotation for referencing external web resources. - OpenAIResponseAnnotationContainerFileCitation: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded + type: object + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. properties: - type: - type: string - const: container_file_citation - title: Type - default: container_file_citation - container_id: + response_id: + title: Response Id type: string - title: Container Id - end_index: + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index type: integer - title: End Index - file_id: - type: string - title: File Id - filename: - type: string - title: Filename - start_index: + sequence_number: + title: Sequence Number 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 + const: response.output_item.done + default: response.output_item.done 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. - OpenAIResponseAnnotationFilePath: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone + type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. properties: - type: - type: string - const: file_path - title: Type - default: file_path - file_id: + item_id: + title: Item Id type: string - title: File Id - index: + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + sequence_number: + title: Sequence Number type: integer - title: Index - type: object - required: - - file_id - - index - title: OpenAIResponseAnnotationFilePath - OpenAIResponseContentPartRefusal: - properties: type: - type: string - const: refusal + const: response.output_text.annotation.added + default: response.output_text.annotation.added title: Type - default: refusal - refusal: type: string - title: Refusal - type: object required: - - refusal - title: OpenAIResponseContentPartRefusal - description: Refusal content within a streamed response part. - OpenAIResponseError: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + type: object + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. properties: - code: + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - title: Code - message: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.delta + default: response.output_text.delta + title: Type type: string - title: Message - type: object required: - - code - - message - title: OpenAIResponseError - description: Error details for failed OpenAI response requests. - OpenAIResponseFormatJSONObject: - properties: - type: - type: string - const: json_object - title: Type - default: json_object + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta type: object - title: OpenAIResponseFormatJSONObject - description: JSON object response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatJSONSchema: + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. properties: - type: + content_index: + title: Content Index + type: integer + text: + title: Text 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. - OpenAIResponseFormatText: - properties: - type: + item_id: + title: Item Id type: string - const: text + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done title: Type - default: text + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone type: object - title: OpenAIResponseFormatText - description: Text response format for OpenAI-compatible chat completion requests. - OpenAIResponseInputFunctionToolCallOutput: + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. properties: - call_id: - type: string - title: Call Id - output: + item_id: + title: Item Id type: string - title: Output + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - type: string - const: function_call_output + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added title: Type - default: function_call_output - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' - type: object + type: string required: - - call_id - - output - title: OpenAIResponseInputFunctionToolCallOutput - description: This represents the output of a function call that gets passed back to the model. - OpenAIResponseInputMessageContentFile: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. properties: - type: + item_id: + title: Item Id type: string - const: input_file + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done title: Type - default: input_file - file_data: - anyOf: - - type: string - - type: 'null' - file_id: - anyOf: - - type: string - - type: 'null' - file_url: - anyOf: - - type: string - - type: 'null' - filename: - anyOf: - - type: string - - type: 'null' + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone type: object - title: OpenAIResponseInputMessageContentFile - description: File content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentImage: + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. properties: - detail: - title: Detail - default: auto + delta: + title: Delta type: string - enum: - - low - - high - - auto - type: + item_id: + title: Item Id type: string - const: input_image + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta title: Type - default: input_image - file_id: - anyOf: - - type: string - - type: 'null' - image_url: - anyOf: - - type: string - - type: 'null' + type: string + required: + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta type: object - title: OpenAIResponseInputMessageContentImage - description: Image content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentText: + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. properties: text: - type: string title: Text - type: type: string - const: input_text + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done title: Type - default: input_text - type: object + type: string required: - text - title: OpenAIResponseInputMessageContentText - description: Text content for input messages in OpenAI response format. - OpenAIResponseInputToolFileSearch: + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. properties: - type: + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - const: file_search - title: Type - default: file_search - vector_store_ids: - items: - type: string - type: array - title: Vector Store Ids - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - max_num_results: - anyOf: - - type: integer - maximum: 50.0 - minimum: 1.0 - - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - title: SearchRankingOptions - type: object - required: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch - description: File search tool configuration for OpenAI response inputs. - OpenAIResponseInputToolFunction: - properties: - type: + item_id: + title: Item Id type: string - const: function + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.delta + default: response.reasoning_text.delta title: Type - default: function - name: type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - parameters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - type: object required: - - name - - parameters - title: OpenAIResponseInputToolFunction - description: Function tool configuration for OpenAI response inputs. - OpenAIResponseInputToolMCP: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. properties: - type: + content_index: + title: Content Index + type: integer + text: + title: Text type: string - const: mcp - title: Type - default: mcp - server_label: + item_id: + title: Item Id type: string - title: Server Label - server_url: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done + title: Type type: string - title: Server Url - headers: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - require_approval: - anyOf: - - type: string - const: always - - type: string - const: never - - $ref: '#/components/schemas/ApprovalFilter' - title: ApprovalFilter - title: string | ApprovalFilter - default: never - allowed_tools: - anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter - - type: 'null' - title: list[string] | AllowedToolsFilter - type: object required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - OpenAIResponseInputToolWebSearch: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone + type: object + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.refusal.delta + default: response.refusal.delta title: Type - default: web_search type: string - enum: - - web_search - - web_search_preview - - web_search_preview_2025_03_11 - - web_search_2025_08_26 - search_context_size: - anyOf: - - type: string - pattern: ^low|medium|high$ - - type: 'null' - default: medium + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta type: object - title: OpenAIResponseInputToolWebSearch - description: Web search tool configuration for OpenAI response inputs. - OpenAIResponseMCPApprovalRequest: + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. properties: - arguments: - type: string - title: Arguments - id: - type: string - title: Id - name: + content_index: + title: Content Index + type: integer + refusal: + title: Refusal type: string - title: Name - server_label: + item_id: + title: Item Id type: string - title: Server Label + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: mcp_approval_request + const: response.refusal.done + default: response.refusal.done title: Type - default: mcp_approval_request - type: object + type: string required: - - arguments - - id - - name - - server_label - title: OpenAIResponseMCPApprovalRequest - description: A request for human approval of a tool invocation. - OpenAIResponseMCPApprovalResponse: + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone + type: object + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. properties: - approval_request_id: + item_id: + title: Item Id type: string - title: Approval Request Id - approve: - type: boolean - title: Approve + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: mcp_approval_response + const: response.web_search_call.completed + default: response.web_search_call.completed title: Type - default: mcp_approval_response - id: - anyOf: - - type: string - - type: 'null' - reason: - anyOf: - - type: string - - type: 'null' - type: object + type: string required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse - description: A response to an MCP approval request. - OpenAIResponseMessage-Input: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. properties: - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role + item_id: + title: Item Id type: string - enum: - - system - - developer - - user - - assistant - default: system + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: message + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress title: Type - default: message - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress type: object + OpenAIResponseObjectStreamResponseWebSearchCallSearching: + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type + type: string 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. - OpenAIResponseMessage-Output: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + type: object + OpenAIResponsePrompt: + description: OpenAI compatible Prompt object that is used in OpenAI responses. properties: - content: + id: + title: Id + type: string + variables: anyOf: - - type: string - - items: + - additionalProperties: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText @@ -5926,3352 +4832,3240 @@ components: title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - type: string - const: message - title: Type - default: message - id: - anyOf: - - type: string + type: object - type: 'null' - status: + nullable: true + version: anyOf: - type: string - type: 'null' - type: object + nullable: true 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: + - id + title: OpenAIResponsePrompt + type: object + OpenAIResponseText: + description: Text response configuration for OpenAI responses. properties: - created_at: - type: integer - title: Created At - error: + format: anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat - type: 'null' - title: OpenAIResponseError - id: - type: string - title: Id - model: - type: string - title: Model - object: + nullable: true + title: OpenAIResponseTextFormat + title: OpenAIResponseText + type: object + OpenAIResponseTextFormat: + description: Configuration for Responses API text format. + properties: + type: + title: Type type: string - const: response - title: Object - default: response - output: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - type: array - title: Output - parallel_tool_calls: - type: boolean - title: Parallel Tool Calls - default: false - previous_response_id: + enum: + - text + - json_schema + - json_object + default: text + name: anyOf: - type: string - type: 'null' - prompt: + schema: anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt + - additionalProperties: true + type: object - type: 'null' - title: OpenAIResponsePrompt - status: - type: string - title: Status - temperature: + description: anyOf: - - type: number + - type: string - type: 'null' - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: + strict: anyOf: - - type: number + - type: boolean - type: 'null' - tools: + title: OpenAIResponseTextFormat + type: object + OpenAIResponseUsage: + description: Usage information for OpenAI response. + 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: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array + - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails - type: 'null' - truncation: + nullable: true + title: OpenAIResponseUsageInputTokensDetails + output_tokens_details: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails - type: 'null' - usage: + nullable: true + title: OpenAIResponseUsageOutputTokensDetails + required: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage + type: object + OpenAIResponseUsageInputTokensDetails: + description: Token details for input tokens in OpenAI response usage. + properties: + cached_tokens: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage + - type: integer - type: 'null' - title: OpenAIResponseUsage - instructions: + nullable: true + title: OpenAIResponseUsageInputTokensDetails + type: object + OpenAIResponseUsageOutputTokensDetails: + description: Token details for output tokens in OpenAI response usage. + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIResponseUsageOutputTokensDetails + type: object + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) + 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' - max_tool_calls: + nullable: true + status: anyOf: - - type: integer + - type: string - type: 'null' - type: object + nullable: true required: - - created_at - - id - - model + - call_id - output - - status - title: OpenAIResponseObject - description: Complete OpenAI response object containing generation results and metadata. - OpenAIResponseObjectWithInput-Output: + title: OpenAIResponseInputFunctionToolCallOutput + type: object + OpenAIResponseMCPApprovalResponse: + description: A response to an MCP approval request. properties: - created_at: - type: integer - title: Created At - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - title: OpenAIResponseError - id: - type: string - title: Id - model: + approval_request_id: + title: Approval Request Id type: string - title: Model - object: + approve: + title: Approve + type: boolean + type: + const: mcp_approval_response + default: mcp_approval_response + title: Type type: string - const: response - title: Object - default: response - output: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - type: array - title: Output - parallel_tool_calls: - type: boolean - title: Parallel Tool Calls - default: false - previous_response_id: - anyOf: - - type: string - - type: 'null' - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt - status: - type: string - title: Status - temperature: - anyOf: - - type: number - - type: 'null' - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - truncation: + id: anyOf: - type: string - type: 'null' - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - title: OpenAIResponseUsage - instructions: + nullable: true + reason: anyOf: - type: string - type: 'null' - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - input: - items: - $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' - type: array - title: Input - type: object + nullable: true required: - - created_at - - id - - model - - output - - status - - input - title: OpenAIResponseObjectWithInput - description: OpenAI response object extended with input context information. - OpenAIResponseOutputMessageContentOutputText: + - approval_request_id + - approve + title: OpenAIResponseMCPApprovalResponse + type: object + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + ArrayType: + description: Parameter type for array values. properties: - text: - type: string - title: Text type: - type: string - const: output_text + const: array + default: array title: Type - default: output_text - annotations: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: 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' - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - type: array - title: Annotations + type: string + title: ArrayType type: object - required: - - text - title: OpenAIResponseOutputMessageContentOutputText - OpenAIResponseOutputMessageFileSearchToolCall: + BooleanType: + description: Parameter type for boolean values. properties: - id: + type: + const: boolean + default: boolean + title: Type type: string - title: Id - queries: - items: - type: string - type: array - title: Queries - status: + title: BooleanType + type: object + ChatCompletionInputType: + description: Parameter type for chat completion input. + properties: + type: + const: chat_completion_input + default: chat_completion_input + title: Type type: string - title: Status + title: ChatCompletionInputType + type: object + CompletionInputType: + description: Parameter type for completion input. + properties: type: + const: completion_input + default: completion_input + title: Type type: string - const: file_search_call + title: CompletionInputType + type: object + JsonType: + description: Parameter type for JSON values. + properties: + type: + const: json + default: json title: Type - default: file_search_call - results: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' - type: array - - type: 'null' + type: string + title: JsonType type: object - required: - - id - - queries - - status - title: OpenAIResponseOutputMessageFileSearchToolCall - description: File search tool call output message for OpenAI responses. - OpenAIResponseOutputMessageFileSearchToolCallResults: + NumberType: + description: Parameter type for numeric values. properties: - attributes: - additionalProperties: true - type: object - title: Attributes - file_id: + type: + const: number + default: number + title: Type type: string - title: File Id - filename: - type: string - title: Filename - score: - type: number - title: Score - text: - type: string - title: Text + title: NumberType type: object - required: - - attributes - - file_id - - filename - - score - - text - title: OpenAIResponseOutputMessageFileSearchToolCallResults - description: Search results returned by the file search operation. - OpenAIResponseOutputMessageFunctionToolCall: + ObjectType: + description: Parameter type for object values. properties: - call_id: - type: string - title: Call Id - name: - type: string - title: Name - arguments: - type: string - title: Arguments type: - type: string - const: function_call + const: object + default: object title: Type - default: function_call - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' + type: string + title: ObjectType type: object - required: - - call_id - - name - - arguments - title: OpenAIResponseOutputMessageFunctionToolCall - description: Function tool call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPCall: + StringType: + description: Parameter type for string values. properties: - id: - type: string - title: Id type: - type: string - const: mcp_call + const: string + default: string title: Type - default: mcp_call - arguments: type: string - title: Arguments - name: - type: string - title: Name - server_label: - type: string - title: Server Label - error: - anyOf: - - type: string - - type: 'null' - output: - anyOf: - - type: string - - type: 'null' + title: StringType type: object - required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - description: Model Context Protocol (MCP) call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPListTools: + UnionType: + description: Parameter type for union values. properties: - id: - type: string - title: Id type: - type: string - const: mcp_list_tools + const: union + default: union title: Type - default: mcp_list_tools - server_label: type: string - title: Server Label - tools: - items: - $ref: '#/components/schemas/MCPListToolsTool' - type: array - title: Tools + title: UnionType type: object - required: - - id - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - description: MCP list tools output message containing available tools from an MCP server. - OpenAIResponseOutputMessageWebSearchToolCall: + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + ConversationItem: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + RowsDataSource: + description: A dataset stored in rows. properties: - id: - type: string - title: Id - status: - type: string - title: Status type: - type: string - const: web_search_call + const: rows + default: rows title: Type - default: web_search_call - type: object - required: - - id - - status - title: OpenAIResponseOutputMessageWebSearchToolCall - description: Web search tool call output message for OpenAI responses. - OpenAIResponsePrompt: - properties: - id: type: string - title: Id - variables: - anyOf: - - additionalProperties: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + rows: + items: + additionalProperties: true type: object - - type: 'null' - version: - anyOf: - - type: string - - type: 'null' - type: object + title: Rows + type: array required: - - id - title: OpenAIResponsePrompt - description: OpenAI compatible Prompt object that is used in OpenAI responses. - OpenAIResponseText: - properties: - format: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseTextFormat' - title: OpenAIResponseTextFormat - - type: 'null' - title: OpenAIResponseTextFormat + - rows + title: RowsDataSource type: object - title: OpenAIResponseText - description: Text response configuration for OpenAI responses. - OpenAIResponseTextFormat: + URIDataSource: + description: A dataset that can be obtained from a URI. properties: type: + const: uri + default: uri title: Type type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' + uri: + title: Uri + type: string + required: + - uri + title: URIDataSource type: object - title: OpenAIResponseTextFormat - description: Configuration for Responses API text format. - OpenAIResponseToolMCP: + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + AggregationFunctionType: + description: Types of aggregation functions for scoring results. + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + type: string + BasicScoringFnParams: + description: Parameters for basic scoring function configuration. properties: type: + const: basic + default: basic + title: Type type: string - const: mcp + aggregation_functions: + description: Aggregation functions to apply to the scores of each row + items: + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array + title: BasicScoringFnParams + type: object + LLMAsJudgeScoringFnParams: + description: Parameters for LLM-as-judge scoring function configuration. + properties: + type: + const: llm_as_judge + default: llm_as_judge title: Type - default: mcp - server_label: type: string - title: Server Label - allowed_tools: + judge_model: + title: Judge Model + type: string + prompt_template: anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter + - type: string - type: 'null' - title: list[string] | AllowedToolsFilter - type: object + nullable: true + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array required: - - server_label - title: OpenAIResponseToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. - OpenAIResponseUsage: + - judge_model + title: LLMAsJudgeScoringFnParams + type: object + RegexParserScoringFnParams: + description: Parameters for regex parser scoring function configuration. properties: - input_tokens: - type: integer - title: Input Tokens - output_tokens: + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array + title: RegexParserScoringFnParams + type: object + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + LoraFinetuningConfig: + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + properties: + type: + const: LoRA + default: LoRA + title: Type + type: string + lora_attn_modules: + items: + type: string + title: Lora Attn Modules + type: array + apply_lora_to_mlp: + title: Apply Lora To Mlp + type: boolean + apply_lora_to_output: + title: Apply Lora To Output + type: boolean + rank: + title: Rank type: integer - title: Output Tokens - total_tokens: + alpha: + title: Alpha type: integer - title: Total Tokens - input_tokens_details: + use_dora: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' - title: OpenAIResponseUsageInputTokensDetails + - type: boolean - type: 'null' - title: OpenAIResponseUsageInputTokensDetails - output_tokens_details: + default: false + quantize_base: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' - title: OpenAIResponseUsageOutputTokensDetails + - type: boolean - type: 'null' - title: OpenAIResponseUsageOutputTokensDetails - type: object + default: false required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - description: Usage information for OpenAI response. - OpenAIResponseUsageInputTokensDetails: - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig type: object - title: OpenAIResponseUsageInputTokensDetails - description: Token details for input tokens in OpenAI response usage. - OpenAIResponseUsageOutputTokensDetails: + QATFinetuningConfig: + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' + type: + const: QAT + default: QAT + title: Type + type: string + quantizer_name: + title: Quantizer Name + type: string + group_size: + title: Group Size + type: integer + required: + - quantizer_name + - group_size + title: QATFinetuningConfig type: object - title: OpenAIResponseUsageOutputTokensDetails - description: Token details for output tokens in OpenAI response usage. - OpenAISystemMessageParam: + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + SpanEndPayload: + description: Payload for a span end event. properties: - role: + type: + const: span_end + default: span_end + title: Type + type: string + status: + $ref: '#/components/schemas/SpanStatus' + required: + - status + title: SpanEndPayload + type: object + SpanStartPayload: + description: Payload for a span start event. + properties: + type: + const: span_start + default: span_start + title: Type type: string - const: system - title: Role - default: system - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] name: + title: Name + type: string + parent_span_id: anyOf: - type: string - type: 'null' - type: object + nullable: true required: - - content - title: OpenAISystemMessageParam - description: A system message providing instructions or context to the model. - OpenAITokenLogProb: + - name + title: SpanStartPayload + type: object + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: - token: + trace_id: + title: Trace Id type: string - title: Token - bytes: + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - - items: - type: integer - type: array + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object - type: 'null' - 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. - - :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 - OpenAIToolMessageParam: - properties: - role: + type: + const: metric + default: metric + title: Type type: string - const: tool - title: Role - default: tool - tool_call_id: + metric: + title: Metric type: string - title: Tool Call Id - content: + value: anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - 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. - OpenAITopLogProb: - properties: - token: + - type: integer + - type: number + title: integer | number + unit: + title: Unit type: string - title: Token - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - 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. - - :token: The token - :bytes: (Optional) The bytes for the token - :logprob: The log probability of the token - OpenAIUserMessageParam-Input: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. properties: - role: + trace_id: + title: Trace Id type: string - const: user - title: Role - default: user - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - - type: string + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object - type: 'null' - type: object + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - OpenAIUserMessageParam-Output: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. properties: - role: + trace_id: + title: Trace Id type: string - const: user - title: Role - default: user - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - - type: string + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object - type: 'null' - type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - 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 + type: + const: unstructured_log + default: unstructured_log + title: Type + type: string + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: Configuration parameters for the optimization algorithm. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: Available optimizer algorithms for training. - Order: - type: string - enum: - - asc - - desc - title: Order - description: Sort order for paginated responses. - OutputTokensDetails: - properties: - reasoning_tokens: - type: integer - title: Reasoning Tokens - additionalProperties: true + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent type: object - required: - - reasoning_tokens - title: OutputTokensDetails - PaginatedResponse: + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. properties: data: items: - additionalProperties: true - type: object - type: array + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage title: Data - has_more: - type: boolean - title: Has More - url: - anyOf: - - type: string - - type: 'null' - type: object + type: array + object: + const: list + default: list + title: Object + type: string required: - data - - has_more - title: PaginatedResponse - description: A generic paginated response that follows a simple format. - PostTrainingJobArtifactsResponse: - properties: - job_uuid: - type: string - title: Job Uuid - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints + title: ListOpenAIResponseInputItem type: object - required: - - job_uuid - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingJobStatusResponse: + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. properties: - job_uuid: - type: string - title: Job Uuid - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: + created_at: + title: Created At + type: integer + error: anyOf: - - type: string - format: date-time + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' - started_at: + nullable: true + title: OpenAIResponseError + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output + type: array + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: anyOf: - type: string - format: date-time - type: 'null' - completed_at: + nullable: true + prompt: anyOf: - - type: string - format: date-time + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' - resources_allocated: + nullable: true + title: OpenAIResponsePrompt + status: + title: Status + type: string + temperature: anyOf: - - additionalProperties: true - type: object + - type: number - type: 'null' - checkpoints: + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + tools: + anyOf: + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + nullable: true + truncation: + anyOf: + - type: string + - type: 'null' + nullable: true + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage + - type: 'null' + nullable: true + title: OpenAIResponseUsage + instructions: + anyOf: + - type: string + - type: 'null' + nullable: true + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + nullable: true + input: items: - $ref: '#/components/schemas/Checkpoint' + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + title: Input type: array - title: Checkpoints - type: object required: - - job_uuid + - created_at + - id + - model + - output - status - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - PostTrainingMetric: - properties: - epoch: - type: integer - title: Epoch - train_loss: - type: number - title: Train Loss - validation_loss: - type: number - title: Validation Loss - perplexity: - type: number - title: Perplexity + - input + title: OpenAIResponseObjectWithInput type: object - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: Training metrics captured during post-training jobs. - Prompt: + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. properties: - prompt: - anyOf: - - type: string - - type: 'null' - description: The system prompt with variable placeholders - 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: + data: items: - type: string + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' + title: Data type: array - title: Variables - description: List of variable names that can be used in the prompt template - is_default: + has_more: + title: Has More 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. - ProviderInfo: - properties: - api: + first_id: + title: First Id type: string - title: Api - provider_id: + last_id: + title: Last Id type: string - title: Provider Id - provider_type: + object: + const: list + default: list + title: Object type: string - title: Provider Type - config: - additionalProperties: true - type: object - title: Config - health: - additionalProperties: true - type: object - title: Health + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject type: object + OpenAIDeleteResponseObject: + description: Response object confirming deletion of an OpenAI response. + properties: + id: + title: Id + type: string + object: + const: response + default: response + title: Object + type: string + deleted: + default: true + title: Deleted + type: boolean required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo - description: Information about a registered provider including its configuration and health status. - QATFinetuningConfig: + - id + title: OpenAIDeleteResponseObject + type: object + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. properties: type: - type: string - const: QAT title: Type - default: QAT - quantizer_name: type: string - title: Quantizer Name - group_size: - type: integer - title: Group Size - type: object required: - - quantizer_name - - group_size - title: QATFinetuningConfig - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - QueryChunksResponse: + - type + title: ResponseGuardrailSpec + type: object + Batch: + additionalProperties: true 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. - RegexParserScoringFnParams: - properties: - type: + id: + title: Id 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. - RerankData: - properties: - index: + completion_window: + title: Completion Window + type: string + created_at: + title: Created At 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. - RerankResponse: - properties: - data: - items: - $ref: '#/components/schemas/RerankData' - type: array - title: Data - type: object - required: - - data - title: RerankResponse - description: Response from a reranking request. - RouteInfo: - properties: - route: + endpoint: + title: Endpoint type: string - title: Route - method: + input_file_id: + title: Input File Id 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. - RowsDataSource: - properties: - type: + object: + const: batch + title: Object 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. - RunShieldResponse: - properties: - violation: + status: + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + title: Status + type: string + cancelled_at: anyOf: - - $ref: '#/components/schemas/SafetyViolation' - title: SafetyViolation + - type: integer - type: 'null' - title: SafetyViolation - type: object - title: RunShieldResponse - description: Response from running a safety shield. - SafetyViolation: - properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - user_message: + nullable: true + cancelling_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + completed_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + error_file_id: anyOf: - type: string - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - type: object - required: - - violation_level - title: SafetyViolation - description: Details of a safety violation detected by content moderation. - SamplingParams: - properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - max_tokens: + nullable: true + errors: + anyOf: + - $ref: '#/components/schemas/Errors' + title: Errors + - type: 'null' + nullable: true + title: Errors + expired_at: anyOf: - type: integer - type: 'null' - repetition_penalty: + nullable: true + expires_at: anyOf: - - type: number + - type: integer - type: 'null' - default: 1.0 - stop: + nullable: true + failed_at: anyOf: - - items: - type: string - type: array + - type: integer - type: 'null' - type: object - title: SamplingParams - description: Sampling parameters. - ScoreBatchResponse: - properties: - dataset_id: + nullable: true + finalizing_at: anyOf: - - type: string + - type: integer - type: 'null' - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results - type: object - required: - - results - title: ScoreBatchResponse - description: Response from batch scoring operations on datasets. - ScoreResponse: - properties: - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results - type: object - required: - - results - title: ScoreResponse - description: The response from scoring. - ScoringFn: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + nullable: true + in_progress_at: anyOf: - - type: string + - type: integer - type: 'null' - description: Unique identifier for this resource in the provider - 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: + nullable: true + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + nullable: true + model: anyOf: - type: string - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - description: Any additional metadata for this definition - return_type: - oneOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - description: The return type of the deterministic function - discriminator: - propertyName: type - mapping: - 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: + nullable: true + output_file_id: anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: string - type: 'null' - title: Params - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval - type: object + nullable: true + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts + - type: 'null' + nullable: true + title: BatchRequestCounts + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage + - type: 'null' + nullable: true + title: BatchUsage required: - - identifier - - provider_id - - return_type - title: ScoringFn - description: A scoring function resource for evaluating model outputs. - ScoringResult: - properties: - score_rows: - items: - additionalProperties: true - type: object - type: array - title: Score Rows - aggregated_results: - additionalProperties: true - type: object - title: Aggregated Results + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch type: object - required: - - score_rows - - aggregated_results - title: ScoringResult - description: A scoring result for a single row. - SearchRankingOptions: + BatchError: + additionalProperties: true properties: - ranker: + code: anyOf: - type: string - type: 'null' - score_threshold: + nullable: true + line: anyOf: - - type: number + - type: integer - type: 'null' - default: 0.0 - type: object - title: SearchRankingOptions - description: Options for ranking and filtering search results. - Shield: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + nullable: true + message: anyOf: - type: string - type: 'null' - description: Unique identifier for this resource in the provider - 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: + nullable: true + param: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + nullable: true + title: BatchError type: object - required: - - identifier - - provider_id - title: Shield - description: A safety shield resource that can be used to check content. - StringType: + BatchRequestCounts: + additionalProperties: true properties: - type: - type: string - const: string - title: Type - default: string + completed: + title: Completed + type: integer + failed: + title: Failed + type: integer + total: + title: Total + type: integer + required: + - completed + - failed + - total + title: BatchRequestCounts type: object - title: StringType - description: Parameter type for string values. - SystemMessage: + BatchUsage: + additionalProperties: true properties: - role: - type: string - const: system - title: Role - default: system - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - type: object + input_tokens: + title: Input Tokens + type: integer + input_tokens_details: + $ref: '#/components/schemas/InputTokensDetails' + output_tokens: + title: Output Tokens + type: integer + output_tokens_details: + $ref: '#/components/schemas/OutputTokensDetails' + total_tokens: + title: Total Tokens + type: integer required: - - content - title: SystemMessage - description: A system message providing instructions or context to the model. - TextContentItem: - properties: - type: - type: string - const: text - title: Type - default: text - text: - type: string - title: Text + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage type: object - required: - - text - title: TextContentItem - description: A text content item - ToolDef: + Errors: + additionalProperties: true properties: - toolgroup_id: + data: anyOf: - - type: string + - items: + $ref: '#/components/schemas/BatchError' + type: array - type: 'null' - name: - type: string - title: Name - description: + nullable: true + object: anyOf: - type: string - type: 'null' - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - output_schema: + nullable: true + title: Errors + type: object + InputTokensDetails: + additionalProperties: true + properties: + cached_tokens: + title: Cached Tokens + type: integer + required: + - cached_tokens + title: InputTokensDetails + type: object + OutputTokensDetails: + additionalProperties: true + properties: + reasoning_tokens: + title: Reasoning Tokens + type: integer + required: + - reasoning_tokens + title: OutputTokensDetails + 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: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - metadata: + description: ID of the first batch in the list + nullable: true + last_id: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - type: object + description: ID of the last batch in the list + nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean required: - - name - title: ToolDef - description: Tool definition used in runtime contexts. - ToolGroup: + - data + title: ListBatchesResponse + type: object + Benchmark: + description: A benchmark resource for evaluating model performance. properties: identifier: - type: string - title: 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 + nullable: true provider_id: - type: string - title: Provider Id description: ID of the provider that owns this resource - type: + title: Provider Id type: string - const: tool_group + type: + const: benchmark + default: benchmark title: Type - default: tool_group - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object + 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 - title: ToolGroup - description: A group of related tools managed together. - ToolInvocationResult: - properties: - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - type: array - title: list[ImageContentItem-Output | TextContentItem] - - type: 'null' - title: string | list[ImageContentItem-Output | TextContentItem] - error_message: - anyOf: - - type: string - - type: 'null' - error_code: - anyOf: - - type: integer - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' + - dataset_id + - scoring_functions + title: Benchmark type: object - title: ToolInvocationResult - description: Result of a tool invocation. - TopKSamplingStrategy: + ImageDelta: + description: An image content delta for streaming responses. properties: type: - type: string - const: top_k + const: image + default: image title: Type - default: top_k - top_k: - type: integer - minimum: 1.0 - title: Top K - type: object + type: string + image: + format: binary + title: Image + type: string required: - - top_k - title: TopKSamplingStrategy - description: Top-k sampling strategy that restricts sampling to the k most likely tokens. - TopPSamplingStrategy: + - image + title: ImageDelta + type: object + TextDelta: + description: A text content delta for streaming responses. properties: type: - type: string - const: top_p + const: text + default: text title: Type - default: top_p - temperature: - anyOf: - - type: number - minimum: 0.0 - - type: 'null' - top_p: - anyOf: - - type: number - - type: 'null' - default: 0.95 + type: string + text: + title: Text + type: string + required: + - text + title: TextDelta type: object + JobStatus: + description: Status of a job execution. + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + type: string + Job: + description: A job execution instance with status tracking. + properties: + job_id: + title: Job Id + type: string + status: + $ref: '#/components/schemas/JobStatus' required: - - temperature - title: TopPSamplingStrategy - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. - TrainingConfig: + - job_id + - status + title: Job + type: object + MetricInResponse: + description: A metric value included in API responses. 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: + metric: + title: Metric + type: string + value: anyOf: - type: integer - - type: 'null' - default: 1 - data_config: - anyOf: - - $ref: '#/components/schemas/DataConfig' - title: DataConfig - - type: 'null' - title: DataConfig - optimizer_config: + - type: number + title: integer | number + unit: anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - title: OptimizerConfig + - type: string - type: 'null' - title: OptimizerConfig - efficiency_config: - anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - title: EfficiencyConfig - - type: 'null' - title: EfficiencyConfig - dtype: + nullable: true + required: + - metric + - value + title: MetricInResponse + type: object + PaginatedResponse: + description: A generic paginated response that follows a simple format. + properties: + data: + items: + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: anyOf: - type: string - type: 'null' - default: bf16 + nullable: true + required: + - data + - has_more + title: PaginatedResponse type: object + PostTrainingMetric: + description: Training metrics captured during post-training jobs. + 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: - - n_epochs - title: TrainingConfig - description: Comprehensive configuration for the training process. - URIDataSource: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + type: object + Checkpoint: + description: Checkpoint created during training runs. properties: - type: + identifier: + title: Identifier type: string - const: uri - title: Type - default: uri - uri: + created_at: + format: date-time + title: Created At type: string - title: Uri - type: object - required: - - uri - title: URIDataSource - description: A dataset that can be obtained from a URI. - URL: - properties: - uri: + epoch: + title: Epoch + type: integer + post_training_job_id: + title: Post Training Job Id type: string - title: Uri - type: object - required: - - uri - title: URL - description: A URL reference to external content. - UnionType: - properties: - type: + path: + title: Path type: string - const: union - title: Type - default: union + training_metrics: + anyOf: + - $ref: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric + - type: 'null' + nullable: true + title: PostTrainingMetric + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint type: object - title: UnionType - description: Parameter type for union values. - VectorStoreChunkingStrategyAuto: + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: type: - type: string - const: auto + const: dialog + default: dialog title: Type - default: auto - type: object - title: VectorStoreChunkingStrategyAuto - description: Automatic chunking strategy for vector store files. - 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. - 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 + title: DialogType type: object - title: VectorStoreChunkingStrategyStaticConfig - description: Configuration for static chunking strategy. - VectorStoreContent: + Conversation: + description: OpenAI-compatible conversation object. properties: - type: + id: + description: The unique ID of the conversation. + title: Id type: string - const: text - title: Type - text: + object: + const: conversation + default: conversation + description: The object type, which is always conversation. + title: Object type: string - title: Text - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - title: ChunkMetadata + 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: true + - additionalProperties: + type: string type: object - type: 'null' - type: object + 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. + nullable: true + 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. + nullable: true required: - - type - - text - title: VectorStoreContent - description: Content item from a vector store file or search result. - VectorStoreDeleteResponse: + - id + - created_at + title: Conversation + type: object + ConversationDeletedResource: + description: Response for deleted conversation. properties: id: - type: string + description: The deleted conversation identifier title: Id - object: type: string + object: + default: conversation.deleted + description: Object type title: Object - default: vector_store.deleted + type: string deleted: - type: boolean - title: Deleted default: true - type: object + description: Whether the object was deleted + title: Deleted + type: boolean required: - id - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - 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: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' + title: ConversationDeletedResource type: object - required: - - id - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject - description: OpenAI Vector Store File Batch object. - VectorStoreFileContentResponse: + ConversationItemCreateRequest: + description: Request body for creating conversation items. properties: - object: - type: string - const: vector_store.file_content.page - title: Object - default: vector_store.file_content.page - data: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. items: - $ref: '#/components/schemas/VectorStoreContent' + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items type: array - title: Data - has_more: - type: boolean - title: Has More - default: false - next_page: - anyOf: - - type: string - - type: 'null' - type: object required: - - data - title: VectorStoreFileContentResponse - description: Represents the parsed content of a vector store file. - 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 + - items + title: ConversationItemCreateRequest type: object - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - description: File processing status counts for a vector store. - VectorStoreFileDeleteResponse: + ConversationItemDeletedResource: + description: Response for deleted conversation item. properties: id: - type: string + description: The deleted item identifier title: Id - object: type: string + object: + default: conversation.item.deleted + description: Object type title: Object - default: vector_store.file.deleted + type: string deleted: - type: boolean - title: Deleted default: true - type: object + description: Whether the object was deleted + title: Deleted + type: boolean required: - id - title: VectorStoreFileDeleteResponse - description: Response from deleting a vector store file. - VectorStoreFileLastError: - properties: - code: - title: Code - type: string - enum: - - server_error - - rate_limit_exceeded - default: server_error - message: - type: string - title: Message + title: ConversationItemDeletedResource type: object - required: - - code - - message - title: VectorStoreFileLastError - description: Error information for failed vector store file processing. - VectorStoreFileObject: + ConversationItemList: + description: List of conversation items with pagination. properties: - id: - type: string - title: Id object: - type: string + default: list + description: Object type title: Object - default: vector_store.file - attributes: - additionalProperties: true - type: object - title: Attributes - chunking_strategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - created_at: - type: integer - title: Created At - last_error: - anyOf: - - $ref: '#/components/schemas/VectorStoreFileLastError' - title: VectorStoreFileLastError - - type: 'null' - title: VectorStoreFileLastError - status: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - 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. - VectorStoreFilesListInBatchResponse: - properties: - object: type: string - title: Object - default: list data: + description: List of conversation items items: - $ref: '#/components/schemas/VectorStoreFileObject' - type: array + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) title: Data + type: array first_id: anyOf: - type: string - type: 'null' + description: The ID of the first item in the list + nullable: true last_id: anyOf: - type: string - type: 'null' + description: The ID of the last item in the list + nullable: true has_more: - type: boolean - title: Has More default: false - type: object + description: Whether there are more items available + title: Has More + type: boolean required: - data - title: VectorStoreFilesListInBatchResponse - description: Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: + title: ConversationItemList + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. properties: - object: + id: + description: unique identifier for this message + title: Id type: string - title: Object - default: list - data: + content: + description: message content items: - $ref: '#/components/schemas/VectorStoreFileObject' - type: array - title: Data - first_id: + additionalProperties: true + type: object + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage + type: object + DatasetPurpose: + description: Purpose of the dataset. Each purpose has a required input data schema. + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + title: DatasetPurpose + type: string + Dataset: + description: Dataset resource for storing and accessing training or evaluation data. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier + type: string + provider_resource_id: anyOf: - type: string - type: 'null' - last_id: + description: Unique identifier for this resource in the provider + nullable: true + 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: '#/components/schemas/DatasetPurpose' + source: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + metadata: + additionalProperties: true + description: Any additional metadata for this dataset + title: Metadata + type: object + required: + - identifier + - provider_id + - purpose + - source + title: Dataset + type: object + Error: + description: Error response from the API. Roughly follows RFC 7807. + properties: + status: + title: Status + type: integer + title: + title: Title + type: string + detail: + title: Detail + type: string + instance: anyOf: - type: string - type: 'null' - has_more: - type: boolean - title: Has More - default: false - type: object + nullable: true required: - - data - title: VectorStoreListFilesResponse - description: Response from listing files in a vector store. - VectorStoreListResponse: + - status + - title + - detail + title: Error + type: object + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + InlineProviderSpec: properties: - object: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - title: Object - default: list - data: + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality items: - $ref: '#/components/schemas/VectorStoreObject' + $ref: '#/components/schemas/Api' + title: Api Dependencies type: array - title: Data - first_id: + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' - last_id: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - type: string - type: 'null' - has_more: - type: boolean - title: Has More - default: false - type: object - required: - - data - title: VectorStoreListResponse - description: Response from listing vector stores. - VectorStoreObject: - properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store - created_at: - type: integer - title: Created At - name: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - type: string - type: 'null' - usage_bytes: - type: integer - title: Usage Bytes - default: 0 - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - status: - type: string - title: Status - default: completed - expires_after: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - expires_at: + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: anyOf: - - type: integer + - type: string - type: 'null' - last_active_at: + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. + nullable: true + description: anyOf: - - type: integer + - type: string + - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true + required: + - api + - provider_type + - config_class + title: InlineProviderSpec + type: object + ModelType: + description: Enumeration of supported model types in Llama Stack. + enum: + - llm + - embedding + - rerank + title: ModelType + type: string + Model: + description: A model resource representing an AI model registered in Llama Stack. + 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 + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string + type: + const: model + default: model + title: Type + type: string metadata: additionalProperties: true - type: object + description: Any additional metadata for this model title: Metadata - type: object + type: object + model_type: + $ref: '#/components/schemas/ModelType' + default: llm required: - - id - - created_at - - file_counts - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreSearchResponse-Output: + - identifier + - provider_id + title: Model + type: object + ProviderSpec: properties: - file_id: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - title: File Id - filename: + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class type: string - title: Filename - score: - type: number - title: Score - attributes: + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - title: string | number | boolean - type: object + - type: string - type: 'null' - 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. - VectorStoreSearchResponsePage: - properties: - object: - type: string - title: Object - default: vector_store.search_results.page - search_query: - items: - type: string - type: array - title: Search Query - data: - items: - $ref: '#/components/schemas/VectorStoreSearchResponse-Output' - type: array - title: Data - has_more: - type: boolean - title: Has More - default: false - next_page: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - type: string - type: 'null' - type: object - required: - - search_query - - data - title: VectorStoreSearchResponsePage - description: Paginated response from searching a vector store. - VersionInfo: - properties: - version: - type: string - title: Version - type: object - required: - - version - title: VersionInfo - description: Version information for the service. - ViolationLevel: - type: string - enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - _URLOrData: - properties: - url: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string - type: 'null' - title: URL - data: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - type: string - type: 'null' - contentEncoding: base64 + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + required: + - api + - provider_type + - config_class + title: ProviderSpec type: object - title: _URLOrData - description: A URL or a base64 encoded string - _batches_Request: + RemoteProviderSpec: properties: - input_file_id: - type: string - title: Input File Id - endpoint: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - title: Endpoint - completion_window: + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class type: string - const: 24h - title: Completion Window - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - idempotency_key: + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' - type: object - required: - - input_file_id - - endpoint - - completion_window - title: _batches_Request - _conversations_Request: - properties: - items: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) - type: array + - type: string - type: 'null' - metadata: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - - additionalProperties: - type: string - type: object + - type: string - type: 'null' - type: object - title: _conversations_Request - _conversations_conversation_id_Request: - properties: - metadata: - additionalProperties: - type: string - type: object - title: Metadata - type: object - required: - - metadata - title: _conversations_conversation_id_Request - _conversations_conversation_id_items_Request: - properties: - items: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) + type: string + title: Pip Packages type: array - title: Items - type: object - required: - - items - title: _conversations_conversation_id_items_Request - _moderations_Request: - properties: - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - model: + provider_data_validator: anyOf: - type: string - type: 'null' - type: object - required: - - input - title: _moderations_Request - _prompts_Request: - properties: - prompt: + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type type: string - title: Prompt - variables: + description: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' - type: object + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true required: - - prompt - title: _prompts_Request - _prompts_prompt_id_Request: + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec + type: object + ScoringFn: + description: A scoring function resource for evaluating model outputs. properties: - prompt: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Prompt - version: - type: integer - title: Version - variables: + provider_resource_id: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' - set_as_default: - type: boolean - title: Set As Default - default: true - type: object - required: - - prompt - - version - title: _prompts_prompt_id_Request - _prompts_prompt_id_set_default_version_Request: - properties: - version: - type: integer - title: Version - type: object - required: - - version - title: _prompts_prompt_id_set_default_version_Request - _responses_Request: - properties: - input: + description: Unique identifier for this resource in the provider + 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: anyOf: - type: string - - items: - $ref: '#/components/schemas/OpenAIResponseMessageInputUnion' - type: array - title: list[OpenAIResponseMessageInputUnion] - title: string | list[OpenAIResponseMessageInputUnion] - model: - type: string - title: Model - prompt: + - type: 'null' + 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: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + params: anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt + - discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' - title: OpenAIResponsePrompt - instructions: + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + title: Params + nullable: true + required: + - identifier + - provider_id + - return_type + title: ScoringFn + type: object + Shield: + description: A safety shield resource that can be used to check content. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier + type: string + provider_resource_id: anyOf: - type: string - type: 'null' - previous_response_id: + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string + type: + const: shield + default: shield + title: Type + type: string + params: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' - conversation: + nullable: true + required: + - identifier + - provider_id + title: Shield + type: object + ToolGroup: + description: A group of related tools managed together. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier + type: string + provider_resource_id: anyOf: - type: string - type: 'null' - store: + description: Unique identifier for this resource in the provider + nullable: true + 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: - - type: boolean + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - default: true - stream: + nullable: true + title: URL + args: anyOf: - - type: boolean + - additionalProperties: true + type: object - type: 'null' - default: false - temperature: + nullable: true + required: + - identifier + - provider_id + title: ToolGroup + type: object + ModelCandidate: + description: A model candidate for evaluation. + properties: + type: + const: model + default: model + title: Type + type: string + model: + title: Model + type: string + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: anyOf: - - type: number + - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage - type: 'null' - text: + nullable: true + title: SystemMessage + required: + - model + - sampling_params + title: ModelCandidate + type: object + SamplingParams: + description: Sampling parameters. + properties: + strategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + max_tokens: anyOf: - - $ref: '#/components/schemas/OpenAIResponseText' - title: OpenAIResponseText + - type: integer - type: 'null' - title: OpenAIResponseText - tools: + nullable: true + repetition_penalty: anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - discriminator: - propertyName: type - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array + - type: number - type: 'null' - include: + default: 1.0 + stop: anyOf: - items: type: string type: array - type: 'null' - max_infer_iters: - anyOf: - - type: integer - - type: 'null' - default: 10 - max_tool_calls: - anyOf: - - type: integer - - type: 'null' + nullable: true + title: SamplingParams type: object - required: - - input - - model - title: _responses_Request - _scoring_score_Request: + SystemMessage: + description: A system message providing instructions or context to the model. properties: - input_rows: - items: - additionalProperties: true - type: object - type: array - title: Input Rows - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - 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: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - 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 - _tool_runtime_invoke_Request: - properties: - tool_name: - type: string - title: Tool Name - kwargs: - additionalProperties: true - type: object - title: Kwargs - type: object - required: - - tool_name - - kwargs - title: _tool_runtime_invoke_Request - _vector_io_query_Request: - properties: - vector_store_id: + role: + const: system + default: system + title: Role type: string - title: Vector Store Id - query: + content: anyOf: - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type + - discriminator: mapping: - image: '#/components/schemas/ImageContentItem-Input' + image: '#/components/schemas/ImageContentItem' text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem discriminator: - propertyName: type mapping: - image: '#/components/schemas/ImageContentItem-Input' + image: '#/components/schemas/ImageContentItem' text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - - vector_store_id - - query - title: _vector_io_query_Request - _vector_stores_vector_store_id_Request: - properties: - name: - anyOf: - - type: string - - type: 'null' - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' + - content + title: SystemMessage type: object - title: _vector_stores_vector_store_id_Request - _vector_stores_vector_store_id_files_Request: + BenchmarkConfig: + description: A benchmark configuration for evaluation. properties: - file_id: - type: string - title: File Id - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: discriminator: - propertyName: type mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + description: Map between scoring function id and parameters for each scoring function you want to run + title: Scoring Params + type: object + num_examples: + anyOf: + - type: integer - type: 'null' - title: Chunking Strategy - type: object + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + nullable: true required: - - file_id - title: _vector_stores_vector_store_id_files_Request - _vector_stores_vector_store_id_files_file_id_Request: + - eval_candidate + title: BenchmarkConfig + type: object + ScoringResult: + description: A scoring result for a single row. properties: - attributes: + score_rows: + items: + additionalProperties: true + type: object + title: Score Rows + type: array + aggregated_results: additionalProperties: true + title: Aggregated Results type: object - title: Attributes - type: object required: - - attributes - title: _vector_stores_vector_store_id_files_file_id_Request - _vector_stores_vector_store_id_search_Request: + - score_rows + - aggregated_results + title: ScoringResult + type: object + EvaluateResponse: + description: The response from an evaluation. properties: - query: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - filters: - anyOf: - - additionalProperties: true + generations: + items: + additionalProperties: true type: object - - type: 'null' - max_num_results: - anyOf: - - type: integer - - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - title: SearchRankingOptions - rewrite_query: - anyOf: - - type: boolean - - type: 'null' - default: false - search_mode: - anyOf: - - type: string - - type: 'null' - default: vector - type: object + title: Generations + type: array + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Scores + type: object required: - - query - title: _vector_stores_vector_store_id_search_Request - Error: - description: Error response from the API. Roughly follows RFC 7807. + - generations + - scores + title: EvaluateResponse + 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: - status: - title: Status - type: integer - title: - title: Title - type: string - detail: - title: Detail + anchor: + const: created_at + title: Anchor type: string - instance: - anyOf: - - type: string - - type: 'null' - nullable: true + seconds: + maximum: 2592000 + minimum: 3600 + title: Seconds + type: integer required: - - status - - title - - detail - title: Error + - anchor + - seconds + title: ExpiresAfter type: object - ImageContentItem: - description: A image content item + OpenAIFileObject: + description: OpenAI File object as defined in the OpenAI Files API. properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/components/schemas/_URLOrData' + 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: '#/components/schemas/OpenAIFilePurpose' required: - - image - title: ImageContentItem + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject type: object - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - BuiltinTool: + OpenAIFilePurpose: + description: Valid purpose values for OpenAI Files API. enum: - - brave_search - - wolfram_alpha - - photogen - - code_interpreter - title: BuiltinTool + - assistants + - batch + title: OpenAIFilePurpose type: string - ImageDelta: - description: An image content delta for streaming responses. + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. properties: - type: - const: image - default: image - title: Type - type: string - image: - format: binary - title: Image + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - required: - - image - title: ImageDelta - type: object - TextDelta: - description: A text content delta for streaming responses. - properties: - type: - const: text - default: text - title: Type + last_id: + title: Last Id type: string - text: - title: Text + object: + const: list + default: list + title: Object type: string required: - - text - title: TextDelta + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse type: object - ToolCall: + OpenAIFileDeleteResponse: + description: Response for deleting a file in OpenAI Files API. properties: - call_id: - title: Call Id + id: + title: Id type: string - tool_name: - anyOf: - - $ref: '#/components/schemas/BuiltinTool' - title: BuiltinTool - - type: string - title: BuiltinTool | string - arguments: - title: Arguments + object: + const: file + default: file + title: Object type: string + deleted: + title: Deleted + type: boolean required: - - call_id - - tool_name - - arguments - title: ToolCall + - id + - deleted + title: OpenAIFileDeleteResponse type: object - ToolCallDelta: - description: A tool call content delta for streaming responses. + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). properties: type: - const: tool_call - default: tool_call + const: bf16 + default: bf16 title: Type type: string - tool_call: - anyOf: - - type: string - - $ref: '#/components/schemas/ToolCall' - title: ToolCall - title: string | ToolCall - parse_status: - $ref: '#/components/schemas/ToolCallParseStatus' + title: Bf16QuantizationConfig + type: object + EmbeddingsResponse: + description: Response containing generated embeddings. + properties: + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array required: - - tool_call - - parse_status - title: ToolCallDelta + - embeddings + title: EmbeddingsResponse type: object - ToolCallParseStatus: - description: Status of tool call parsing during streaming. - enum: - - started - - in_progress - - failed - - succeeded - title: ToolCallParseStatus - type: string - ContentDelta: - discriminator: - mapping: - image: '#/components/schemas/ImageDelta' - text: '#/components/schemas/TextDelta' - tool_call: '#/components/schemas/ToolCallDelta' - propertyName: type - oneOf: - - $ref: '#/components/schemas/TextDelta' - title: TextDelta - - $ref: '#/components/schemas/ImageDelta' - title: ImageDelta - - $ref: '#/components/schemas/ToolCallDelta' - title: ToolCallDelta - title: TextDelta | ImageDelta | ToolCallDelta - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. properties: type: - const: grammar - default: grammar + const: fp8_mixed + default: fp8_mixed title: Type type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat + title: Fp8QuantizationConfig type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. properties: type: - const: json_schema - default: json_schema + const: int4_mixed + default: int4_mixed title: Type type: string - json_schema: - additionalProperties: true - title: Json Schema - type: object - required: - - json_schema - title: JsonSchemaResponseFormat + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig type: object - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIChatCompletionUsage: + description: Usage information for OpenAI chat completion. properties: - role: - const: assistant - default: assistant - title: Role + 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: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsagePromptTokensDetails + completion_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage + type: object + OpenAIChatCompletionUsageCompletionTokensDetails: + description: Token details for output tokens in OpenAI chat completion usage. + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails + type: object + OpenAIChatCompletionUsagePromptTokensDetails: + description: Token details for prompt tokens in OpenAI chat completion usage. + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsagePromptTokensDetails + type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + finish_reason: + title: Finish Reason type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs + 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. + properties: content: anyOf: - - type: string - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + $ref: '#/components/schemas/OpenAITokenLogProb' type: array - title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] nullable: true - name: + refusal: anyOf: - - type: string + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array - type: 'null' nullable: true - tool_calls: + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + title: Input Messages + type: array + required: + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + 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: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: integer type: array - type: 'null' nullable: true - title: OpenAIAssistantMessageParam + logprob: + title: Logprob + type: number + top_logprobs: + items: + $ref: '#/components/schemas/OpenAITopLogProb' + title: Top Logprobs + type: array + required: + - token + - logprob + - top_logprobs + title: OpenAITokenLogProb type: object - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. + 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: - role: - const: user - default: user - title: Role + token: + title: Token type: string - content: + bytes: 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' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: integer type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: - anyOf: - - type: string - type: 'null' nullable: true + logprob: + title: Logprob + type: number required: - - content - title: OpenAIUserMessageParam + - token + - logprob + title: OpenAITopLogProb type: object - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - OpenAIResponseFormatParam: - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - VectorStoreFileStatus: - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - OpenAIResponseInputMessageContent: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - 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. + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. + 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 + OpenAIChatCompletion: + description: Response from an OpenAI-compatible chat completion request. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage + required: + - id + - choices + - created + - model + title: OpenAIChatCompletion + type: object + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. 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' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + - type: 'null' + nullable: true + refusal: + anyOf: + - type: string + - type: 'null' + nullable: true role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - const: message - default: message - title: Type - type: string - id: anyOf: - type: string - type: 'null' nullable: true - status: + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + reasoning_content: anyOf: - type: string - type: 'null' nullable: true + title: OpenAIChoiceDelta + type: object + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. + properties: + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - content - - role - title: OpenAIResponseMessage + - delta + - finish_reason + - index + title: OpenAIChunkChoice type: object - OpenAIResponseOutput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseContentPartOutputText: - description: Text content within a streamed response part. + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: - type: - const: output_text - default: output_text - title: Type + id: + title: Id type: string - text: - title: Text + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object type: string - annotations: + created: + title: Created + type: integer + model: + title: Model + type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage + required: + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk + type: object + OpenAIChatCompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible chat completion endpoint. + properties: + model: + title: Model + type: string + messages: items: discriminator: mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type + 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/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations + - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + minItems: 1 + title: Messages type: array - logprobs: + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + function_call: + anyOf: + - type: string + - additionalProperties: true + type: object + - type: 'null' + title: string | object + nullable: true + functions: anyOf: - items: additionalProperties: true @@ -9279,2396 +8073,1941 @@ components: type: array - type: 'null' nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + response_format: + anyOf: + - discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: 'null' + title: Response Format + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + tool_choice: + anyOf: + - type: string + - additionalProperties: true + type: object + - type: 'null' + title: string | object + nullable: true + tools: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - type: integer + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - text - title: OpenAIResponseContentPartOutputText - type: object - OpenAIResponseContentPartReasoningText: - description: Reasoning text emitted as part of a streamed response. - properties: - type: - const: reasoning_text - default: reasoning_text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIResponseContentPartReasoningText - type: object - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseContentPartReasoningSummary: - description: Reasoning summary part in a streamed response. - properties: - type: - const: summary_text - default: summary_text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIResponseContentPartReasoningSummary - type: object - OpenAIResponseObjectStreamResponseCompleted: - description: Streaming event indicating a response has been completed. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.completed - default: response.completed - title: Type - type: string - required: - - response - title: OpenAIResponseObjectStreamResponseCompleted - type: object - OpenAIResponseObjectStreamResponseContentPartAdded: - description: Streaming event for when a new content part is added to a response item. - properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer - type: - const: response.content_part.added - default: response.content_part.added - title: Type - type: string - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartAdded + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseContentPartDone: - description: Streaming event for when a content part is completed. + 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: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id + finish_reason: + title: Finish Reason type: string - item_id: - title: Item Id + text: + title: Text type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number + index: + title: Index type: integer - type: - const: response.content_part.done - default: response.content_part.done - title: Type - type: string + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartDone + - finish_reason + - text + - index + title: OpenAICompletionChoice type: object - OpenAIResponseObjectStreamResponseCreated: - description: Streaming event indicating a new response has been created. + OpenAICompletion: + 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: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.created - default: response.created - title: Type + id: + title: Id type: string - required: - - response - title: OpenAIResponseObjectStreamResponseCreated - type: object - OpenAIResponseObjectStreamResponseFailed: - description: Streaming event emitted when a response fails. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number + choices: + items: + $ref: '#/components/schemas/OpenAICompletionChoice' + title: Choices + type: array + created: + title: Created type: integer - type: - const: response.failed - default: response.failed - title: Type + model: + title: Model + type: string + object: + const: text_completion + default: text_completion + title: Object type: string required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseFailed + - id + - choices + - created + - model + title: OpenAICompletion type: object - OpenAIResponseObjectStreamResponseFileSearchCallCompleted: - description: Streaming event for completed file search calls. + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.completed - default: response.file_search_call.completed - title: Type + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs + type: object + OpenAICompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible completion endpoint. + properties: + model: + title: Model type: string + prompt: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - items: + type: integer + type: array + title: list[integer] + - items: + items: + type: integer + type: array + type: array + title: list[array] + title: string | ... (4 variants) + best_of: + anyOf: + - type: integer + - type: 'null' + nullable: true + echo: + anyOf: + - type: boolean + - type: 'null' + nullable: true + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true + suffix: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - model + - prompt + title: OpenAICompletionRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseFileSearchCallInProgress: - description: Streaming event for file search calls in progress. + OpenAIEmbeddingData: + description: A single embedding data object from an OpenAI-compatible embeddings response. properties: - item_id: - title: Item Id + object: + const: embedding + default: embedding + title: Object type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + embedding: + anyOf: + - items: + type: number + type: array + title: list[number] + - type: string + title: list[number] | string + index: + title: Index type: integer - type: - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - title: Type - type: string required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - embedding + - index + title: OpenAIEmbeddingData type: object - OpenAIResponseObjectStreamResponseFileSearchCallSearching: - description: Streaming event for file search currently searching. + OpenAIEmbeddingUsage: + description: Usage information for an OpenAI-compatible embeddings response. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index + prompt_tokens: + title: Prompt Tokens type: integer - sequence_number: - title: Sequence Number + total_tokens: + title: Total Tokens type: integer - type: - const: response.file_search_call.searching - default: response.file_search_call.searching - title: Type - type: string required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: - description: Streaming event for incremental function call argument updates. + OpenAIEmbeddingsRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible embeddings endpoint. properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - title: Type + model: + title: Model type: string + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + encoding_format: + anyOf: + - type: string + - type: 'null' + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: - description: Streaming event for when function call arguments are completed. + OpenAIEmbeddingsResponse: + description: Response from an OpenAI-compatible embeddings request. properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id + object: + const: list + default: list + title: Object type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.done - default: response.function_call_arguments.done - title: Type + data: + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + title: Data + type: array + model: + title: Model type: string + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - data + - model + - usage + title: OpenAIEmbeddingsResponse type: object - OpenAIResponseObjectStreamResponseInProgress: - description: Streaming event indicating the response remains in progress. + RerankData: + description: A single rerank result from a reranking response. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number + index: + title: Index type: integer - type: - const: response.in_progress - default: response.in_progress - title: Type - type: string + relevance_score: + title: Relevance Score + type: number required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseInProgress + - index + - relevance_score + title: RerankData type: object - OpenAIResponseObjectStreamResponseIncomplete: - description: Streaming event emitted when a response ends in an incomplete state. + RerankResponse: + description: Response from a reranking request. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.incomplete - default: response.incomplete - title: Type - type: string + data: + items: + $ref: '#/components/schemas/RerankData' + title: Data + type: array required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseIncomplete + - data + title: RerankResponse type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + TokenLogProbs: + description: Log probabilities for generated tokens. properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - title: Type - type: string + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - logprobs_by_token + title: TokenLogProbs type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + ToolResponseMessage: + description: A message representing the result of a tool invocation. properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - title: Type + role: + const: tool + default: tool + title: Role type: string - required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - type: object - OpenAIResponseObjectStreamResponseMcpCallCompleted: - description: Streaming event for completed MCP calls. - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.completed - default: response.mcp_call.completed - title: Type + call_id: + title: Call Id type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - call_id + - content + title: ToolResponseMessage type: object - OpenAIResponseObjectStreamResponseMcpCallFailed: - description: Streaming event for failed MCP calls. + UserMessage: + description: A message from the user in a chat conversation. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.failed - default: response.mcp_call.failed - title: Type + role: + const: user + default: user + title: Role type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallFailed + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true + required: + - content + title: UserMessage type: object - OpenAIResponseObjectStreamResponseMcpCallInProgress: - description: Streaming event for MCP calls in progress. + HealthStatus: + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + type: string + HealthInfo: + description: Health status information for the service. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - title: Type - type: string + status: + $ref: '#/components/schemas/HealthStatus' required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - status + title: HealthInfo type: object - OpenAIResponseObjectStreamResponseMcpListToolsCompleted: + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - title: Type + route: + title: Route type: string + method: + title: Method + type: string + provider_types: + items: + type: string + title: Provider Types + type: array required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - route + - method + - provider_types + title: RouteInfo type: object - OpenAIResponseObjectStreamResponseMcpListToolsFailed: + ListRoutesResponse: + description: Response containing a list of all available API routes. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - title: Type - type: string + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - data + title: ListRoutesResponse type: object - OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + VersionInfo: + description: Version information for the service. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - title: Type + version: + title: Version type: string required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - version + title: VersionInfo type: object - OpenAIResponseObjectStreamResponseOutputItemAdded: - description: Streaming event for when a new output item is added to the response. + OpenAIModel: + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: - response_id: - title: Response Id + id: + title: Id type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + object: + const: model + default: model + title: Object + type: string + created: + title: Created type: integer - type: - const: response.output_item.added - default: response.output_item.added - title: Type + owned_by: + title: Owned By type: string + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemAdded + - id + - created + - owned_by + title: OpenAIModel type: object - OpenAIResponseObjectStreamResponseOutputItemDone: - description: Streaming event for when an output item is completed. + DPOLossType: + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + type: string + DPOAlignmentConfig: + description: Configuration for Direct Preference Optimization (DPO) alignment. properties: - response_id: - title: Response Id - type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.done - default: response.output_item.done - title: Type - type: string + beta: + title: Beta + type: number + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemDone + - beta + title: DPOAlignmentConfig type: object - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: - description: Streaming event for when an annotation is added to output text. + DatasetFormat: + description: Format of the training dataset. + enum: + - instruct + - dialog + title: DatasetFormat + type: string + DataConfig: + description: Configuration for training data and data loading. properties: - item_id: - title: Item Id + dataset_id: + title: Dataset Id type: string - output_index: - title: Output Index - type: integer - content_index: - title: Content Index - type: integer - annotation_index: - title: Annotation Index - type: integer - annotation: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - sequence_number: - title: Sequence Number + batch_size: + title: Batch Size type: integer - type: - const: response.output_text.annotation.added - default: response.output_text.annotation.added - title: Type - type: string + shuffle: + title: Shuffle + type: boolean + data_format: + $ref: '#/components/schemas/DatasetFormat' + validation_dataset_id: + anyOf: + - type: string + - type: 'null' + nullable: true + packed: + anyOf: + - type: boolean + - type: 'null' + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + default: false required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig type: object - OpenAIResponseObjectStreamResponseOutputTextDelta: - description: Streaming event for incremental text content updates. + EfficiencyConfig: + description: Configuration for memory and compute efficiency optimizations. properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + default: false + title: EfficiencyConfig + type: object + OptimizerType: + description: Available optimizer algorithms for training. + enum: + - adam + - adamw + - sgd + title: OptimizerType + type: string + OptimizerConfig: + description: Configuration parameters for the optimization algorithm. + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + lr: + title: Lr + type: number + weight_decay: + title: Weight Decay + type: number + num_warmup_steps: + title: Num Warmup Steps type: integer - type: - const: response.output_text.delta - default: response.output_text.delta - title: Type - type: string required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDelta + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig type: object - OpenAIResponseObjectStreamResponseOutputTextDone: - description: Streaming event for when text output is completed. + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.done - default: response.output_text.done - title: Type + job_uuid: + title: Job Uuid type: string + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDone + - job_uuid + title: PostTrainingJobArtifactsResponse type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: - description: Streaming event for when a new reasoning summary part is added. + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - title: Type - type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: - description: Streaming event for when a reasoning summary part is completed. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - title: Type - type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: - description: Streaming event for incremental reasoning summary text updates. - properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - title: Type + job_uuid: + title: Job Uuid type: string + log_lines: + items: + type: string + title: Log Lines + type: array required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - job_uuid + - log_lines + title: PostTrainingJobLogStream type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: - description: Streaming event for when reasoning summary text is completed. + PostTrainingJobStatusResponse: + description: Status of a finetuning job. properties: - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - title: Type + job_uuid: + title: Job Uuid type: string + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + started_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + completed_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - text - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - job_uuid + - status + title: PostTrainingJobStatusResponse type: object - OpenAIResponseObjectStreamResponseReasoningTextDelta: - description: Streaming event for incremental reasoning text updates. + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + TrainingConfig: + description: Comprehensive configuration for the training process. properties: - content_index: - title: Content Index + n_epochs: + title: N Epochs type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index + max_steps_per_epoch: + default: 1 + title: Max Steps Per Epoch type: integer - sequence_number: - title: Sequence Number + gradient_accumulation_steps: + default: 1 + title: Gradient Accumulation Steps type: integer - type: - const: response.reasoning_text.delta - default: response.reasoning_text.delta - title: Type - type: string + max_validation_steps: + anyOf: + - type: integer + - type: 'null' + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + title: DataConfig + - type: 'null' + nullable: true + title: DataConfig + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig + - type: 'null' + nullable: true + title: OptimizerConfig + efficiency_config: + anyOf: + - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig + - type: 'null' + nullable: true + title: EfficiencyConfig + dtype: + anyOf: + - type: string + - type: 'null' + default: bf16 required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - n_epochs + title: TrainingConfig type: object - OpenAIResponseObjectStreamResponseReasoningTextDone: - description: Streaming event for when reasoning text is completed. + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. properties: - content_index: - title: Content Index - type: integer - text: - title: Text + job_uuid: + title: Job Uuid type: string - item_id: - title: Item Id + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.done - default: response.reasoning_text.done - title: Type + validation_dataset_id: + title: Validation Dataset Id type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDone - type: object - OpenAIResponseObjectStreamResponseRefusalDelta: - description: Streaming event for incremental refusal text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.delta - default: response.refusal.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDelta - type: object - OpenAIResponseObjectStreamResponseRefusalDone: - description: Streaming event for when refusal text is completed. - properties: - content_index: - title: Content Index - type: integer - refusal: - title: Refusal - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.done - default: response.refusal.done - title: Type - type: string - required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDone - type: object - OpenAIResponseObjectStreamResponseWebSearchCallCompleted: - description: Streaming event for completed web search calls. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.completed - default: response.web_search_call.completed - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - type: object - OpenAIResponseObjectStreamResponseWebSearchCallInProgress: - description: Streaming event for web search calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - type: object - OpenAIResponseObjectStreamResponseWebSearchCallSearching: - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.searching - default: response.web_search_call.searching - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - type: object - OpenAIResponseObjectStream: - discriminator: - mapping: - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - title: OpenAIResponseObjectStreamResponseCreated - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - title: OpenAIResponseObjectStreamResponseInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - title: OpenAIResponseObjectStreamResponseOutputItemAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - title: OpenAIResponseObjectStreamResponseOutputItemDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - title: OpenAIResponseObjectStreamResponseOutputTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - title: OpenAIResponseObjectStreamResponseOutputTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - title: OpenAIResponseObjectStreamResponseMcpCallFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - title: OpenAIResponseObjectStreamResponseContentPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - title: OpenAIResponseObjectStreamResponseContentPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - title: OpenAIResponseObjectStreamResponseReasoningTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - title: OpenAIResponseObjectStreamResponseRefusalDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - title: OpenAIResponseObjectStreamResponseRefusalDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - title: OpenAIResponseObjectStreamResponseIncomplete - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - title: OpenAIResponseObjectStreamResponseFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - title: OpenAIResponseObjectStreamResponseCompleted - title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - SpanEndPayload: - description: Payload for a span end event. - properties: - type: - const: span_end - default: span_end - title: Type - type: string - status: - $ref: '#/components/schemas/SpanStatus' - required: - - status - title: SpanEndPayload + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest type: object - SpanStartPayload: - description: Payload for a span start event. + Prompt: + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. properties: - type: - const: span_start - default: span_start - title: Type - type: string - name: - title: Name - type: string - parent_span_id: + prompt: anyOf: - type: string - type: 'null' + description: The system prompt with variable placeholders nullable: true + version: + description: Version (integer starting at 1, incremented on save) + minimum: 1 + title: Version + type: integer + prompt_id: + description: Unique identifier in format 'pmpt_<48-digit-hash>' + title: Prompt Id + type: string + variables: + description: List of variable names that can be used in the prompt template + items: + type: string + title: Variables + type: array + is_default: + default: false + description: Boolean indicating whether this version is the default version + title: Is Default + type: boolean required: - - name - title: SpanStartPayload + - version + - prompt_id + title: Prompt type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. + ProviderInfo: + description: Information about a registered provider including its configuration and health status. properties: - trace_id: - title: Trace Id + api: + title: Api type: string - span_id: - title: Span Id + provider_id: + title: Provider Id type: string - timestamp: - format: date-time - title: Timestamp + provider_type: + title: Provider Type type: string - attributes: + config: + additionalProperties: true + title: Config + type: object + health: + additionalProperties: true + title: Health + type: object + required: + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo + type: object + ModerationObjectResults: + description: A moderation object. + properties: + flagged: + title: Flagged + type: boolean + categories: anyOf: - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) + type: boolean type: object - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: + nullable: true + category_applied_input_types: anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + nullable: true + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent + - flagged + title: ModerationObjectResults type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. + ModerationObject: + description: A moderation object. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id + id: + title: Id type: string - timestamp: - format: date-time - title: Timestamp + model: + title: Model type: string - attributes: + results: + items: + $ref: '#/components/schemas/ModerationObjectResults' + title: Results + type: array + required: + - id + - model + - results + title: ModerationObject + type: object + SafetyViolation: + description: Details of a safety violation detected by content moderation. + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent + - violation_level + title: SafetyViolation type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. + ViolationLevel: + description: Severity level of a safety violation. + enum: + - info + - warn + - error + title: ViolationLevel + type: string + RunShieldResponse: + description: Response from running a safety shield. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: + violation: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object + - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message - type: string - severity: - $ref: '#/components/schemas/LogSeverity' + nullable: true + title: SafetyViolation + title: RunShieldResponse + type: object + ScoreBatchResponse: + description: Response from batch scoring operations on datasets. + properties: + dataset_id: + anyOf: + - type: string + - type: 'null' + nullable: true + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent + - results + title: ScoreBatchResponse type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. + ScoreResponse: + description: The response from scoring. properties: - type: - title: Type - type: string + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object required: - - type - title: ResponseGuardrailSpec + - results + title: ScoreResponse type: object - OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. + ToolDef: + description: Tool definition used in runtime contexts. properties: - created_at: - title: Created At - type: integer - error: + toolgroup_id: anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError + - type: string - type: 'null' nullable: true - title: OpenAIResponseError - id: - title: Id - type: string - model: - title: Model - type: string - object: - const: response - default: response - title: Object + name: + title: Name 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output - type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: + description: anyOf: - type: string - type: 'null' nullable: true - prompt: + input_schema: anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIResponsePrompt - status: - title: Status + output_schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + required: + - name + title: ToolDef + type: object + ListToolDefsResponse: + description: Response containing a list of tool definitions. + properties: + data: + items: + $ref: '#/components/schemas/ToolDef' + title: Data + type: array + required: + - data + title: ListToolDefsResponse + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id type: string - temperature: + provider_id: + title: Provider Id + type: string + args: anyOf: - - type: number + - additionalProperties: true + type: object - type: 'null' nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: + mcp_endpoint: anyOf: - - type: number + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true - tools: + title: URL + required: + - toolgroup_id + - provider_id + title: ToolGroupInput + type: object + ToolInvocationResult: + description: Result of a tool invocation. + properties: + content: anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: discriminator: mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array + title: list[ImageContentItem | TextContentItem] - type: 'null' + title: string | list[ImageContentItem | TextContentItem] nullable: true - truncation: + error_message: anyOf: - type: string - type: 'null' nullable: true - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - nullable: true - title: OpenAIResponseUsage - instructions: + error_code: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - max_tool_calls: + metadata: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Input - type: array - required: - - created_at - - id - - model - - output - - status - - input - title: OpenAIResponseObjectWithInput + title: ToolInvocationResult type: object - MetricInResponse: - description: A metric value included in API responses. + 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. properties: - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: + chunk_id: anyOf: - type: string - type: 'null' nullable: true - required: - - metric - - value - title: MetricInResponse - type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. - properties: - type: - const: dialog - default: dialog - title: Type - type: string - title: DialogType - type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. - properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array - required: - - items - title: ConversationItemCreateRequest - type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. - properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status - type: string - type: - const: message - default: message - title: Type - type: string - object: - const: message - default: message - title: Object - type: string - required: - - id - - content - - role - - status - title: ConversationMessage - type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). - properties: - type: - const: bf16 - default: bf16 - title: Type - type: string - title: Bf16QuantizationConfig - type: object - EmbeddingsResponse: - description: Response containing generated embeddings. - properties: - embeddings: - items: - items: - type: number - type: array - title: Embeddings - type: array - required: - - embeddings - title: EmbeddingsResponse - type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. - properties: - type: - const: fp8_mixed - default: fp8_mixed - title: Type - type: string - title: Fp8QuantizationConfig - type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. - properties: - type: - const: int4_mixed - default: int4_mixed - title: Type - type: string - scheme: + document_id: + anyOf: + - type: string + - type: 'null' + nullable: true + source: anyOf: - type: string - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig - type: object - OpenAIChoiceDelta: - description: A delta from an OpenAI-compatible chat completion streaming response. - properties: - content: + nullable: true + created_timestamp: + anyOf: + - type: integer + - type: 'null' + nullable: true + updated_timestamp: + anyOf: + - type: integer + - type: 'null' + nullable: true + chunk_window: anyOf: - type: string - type: 'null' nullable: true - refusal: + chunk_tokenizer: anyOf: - type: string - type: 'null' nullable: true - role: + chunk_embedding_model: anyOf: - type: string - type: 'null' nullable: true - tool_calls: + chunk_embedding_dimension: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - type: integer - type: 'null' nullable: true - reasoning_content: + content_token_count: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - title: OpenAIChoiceDelta + metadata_token_count: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: ChunkMetadata type: object - OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + Chunk: + description: A chunk of content that can be inserted into a vector database. properties: content: anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: - $ref: '#/components/schemas/OpenAITokenLogProb' + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - - type: 'null' - nullable: true - refusal: + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: anyOf: - items: - $ref: '#/components/schemas/OpenAITokenLogProb' + type: number type: array - type: 'null' nullable: true - title: OpenAIChoiceLogprobs - type: object - OpenAIChunkChoice: - description: A chunk choice from an OpenAI-compatible chat completion streaming response. - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + chunk_metadata: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true - title: OpenAIChoiceLogprobs + title: ChunkMetadata required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice + - content + - chunk_id + title: Chunk type: object - OpenAIChatCompletionChunk: - description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store file batch with extra_body support. properties: - id: - title: Id - type: string - choices: + file_ids: items: - $ref: '#/components/schemas/OpenAIChunkChoice' - title: Choices + type: string + title: File Ids type: array - object: - const: chat.completion.chunk - default: chat.completion.chunk - title: Object - type: string - created: - title: Created - type: integer - model: - title: Model - type: string - usage: + attributes: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChatCompletionUsage + chunking_strategy: + anyOf: + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + nullable: true required: - - id - - choices - - created - - model - title: OpenAIChatCompletionChunk + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. + OpenAICreateVectorStoreRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store with extra_body support. 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + name: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - type: string - type: 'null' nullable: true - title: OpenAIChoiceLogprobs + file_ids: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: + anyOf: + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: OpenAICreateVectorStoreRequestWithExtraBody + type: object + QueryChunksResponse: + description: Response from querying chunks in a vector database. + properties: + chunks: + items: + $ref: '#/components/schemas/Chunk' + title: Chunks + type: array + scores: + items: + type: number + title: Scores + type: array required: - - message - - finish_reason - - index - title: OpenAIChoice + - chunks + - scores + title: QueryChunksResponse 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 + VectorStoreContent: + description: Content item from a vector store file or search result. properties: - finish_reason: - title: Finish Reason + type: + const: text + title: Type type: string text: title: Text type: string - index: - title: Index - type: integer - logprobs: + embedding: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - items: + type: number + type: array + - type: 'null' + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + nullable: true + title: ChunkMetadata + metadata: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceLogprobs required: - - finish_reason + - type - text - - index - title: OpenAICompletionChoice + title: VectorStoreContent type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens + VectorStoreCreateRequest: + description: Request to create a vector store. properties: - text_offset: - anyOf: - - items: - type: integer - type: array - - type: 'null' - nullable: true - token_logprobs: + name: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - tokens: + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: anyOf: - - items: - type: string - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - top_logprobs: + chunking_strategy: anyOf: - - items: - additionalProperties: - type: number - type: object - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAICompletionLogprobs - type: object - TokenLogProbs: - description: Log probabilities for generated tokens. - properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token + metadata: + additionalProperties: true + title: Metadata type: object - required: - - logprobs_by_token - title: TokenLogProbs + title: VectorStoreCreateRequest type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. + VectorStoreDeleteResponse: + description: Response from deleting a vector store. properties: - role: - const: tool - default: tool - title: Role + id: + title: Id type: string - call_id: - title: Call Id + object: + default: vector_store.deleted + title: Object type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + deleted: + default: true + title: Deleted + type: boolean required: - - call_id - - content - title: ToolResponseMessage + - id + title: VectorStoreDeleteResponse type: object - UserMessage: - description: A message from the user in a chat conversation. + VectorStoreFileCounts: + description: File processing status counts for a vector store. properties: - role: - const: user - default: user - title: Role + 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 + VectorStoreFileBatchObject: + description: OpenAI Vector Store File Batch object. + properties: + id: + title: Id type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: + 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: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + required: + - id + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + type: object + VectorStoreFileContentResponse: + description: Represents the parsed content of a vector store file. + properties: + object: + const: vector_store.file_content.page + default: vector_store.file_content.page + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - type: 'null' - title: string | list[ImageContentItem | TextContentItem] nullable: true required: - - content - title: UserMessage + - data + title: VectorStoreFileContentResponse type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. + VectorStoreFileDeleteResponse: + description: Response from deleting a vector store file. properties: - job_uuid: - title: Job Uuid + id: + title: Id type: string - log_lines: - items: - type: string - title: Log Lines - type: array + object: + default: vector_store.file.deleted + title: Object + type: string + deleted: + default: true + title: Deleted + type: boolean required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream + - id + title: VectorStoreFileDeleteResponse type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. + VectorStoreFileLastError: + description: Error information for failed vector store file processing. properties: - job_uuid: - title: Job Uuid - type: string - finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id + code: + title: Code type: string - validation_dataset_id: - title: Validation Dataset Id + enum: + - server_error + - rate_limit_exceeded + default: server_error + message: + title: Message type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - title: Hyperparam Search Config - type: object - logger_config: - additionalProperties: true - title: Logger Config - type: object required: - - job_uuid - - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - - algorithm_config - - optimizer_config - - training_config - - hyperparam_search_config - - logger_config - title: PostTrainingRLHFRequest + - code + - message + title: VectorStoreFileLastError type: object - ToolGroupInput: - description: Input data for registering a tool group. + VectorStoreFileObject: + description: OpenAI Vector Store File object. properties: - toolgroup_id: - title: Toolgroup Id + id: + title: Id type: string - provider_id: - title: Provider Id + object: + default: vector_store.file + title: Object type: string - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: + attributes: + additionalProperties: true + title: Attributes + type: object + chunking_strategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + created_at: + title: Created At + type: integer + last_error: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' nullable: true - title: URL + title: VectorStoreFileLastError + status: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + vector_store_id: + title: Vector Store Id + type: string required: - - toolgroup_id - - provider_id - title: ToolGroupInput + - id + - chunking_strategy + - created_at + - status + - vector_store_id + title: VectorStoreFileObject type: object - Chunk: - description: A chunk of content that can be inserted into a vector database. + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. properties: - content: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id + - type: 'null' + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + 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. + properties: + object: + default: list + title: Object type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - chunk_metadata: + last_id: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' nullable: true - title: ChunkMetadata + has_more: + default: false + title: Has More + type: boolean required: - - content - - chunk_id - title: Chunk + - data + title: VectorStoreListFilesResponse type: object - VectorStoreCreateRequest: - description: Request to create a vector store. + VectorStoreObject: + description: OpenAI Vector Store object. 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' nullable: true - file_ids: - items: - type: string - title: File Ids - type: array + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + default: completed + title: Status + type: string expires_after: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - chunking_strategy: + expires_at: anyOf: - - additionalProperties: true - type: object + - type: integer + - type: 'null' + nullable: true + last_active_at: + anyOf: + - type: integer - type: 'null' nullable: true metadata: additionalProperties: true title: Metadata type: object - title: VectorStoreCreateRequest + required: + - id + - created_at + - file_counts + title: VectorStoreObject + type: object + VectorStoreListResponse: + description: Response from listing vector stores. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + nullable: true + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListResponse type: object VectorStoreModifyRequest: description: Request to modify a vector store. @@ -11762,149 +10101,34 @@ components: - content title: VectorStoreSearchResponse type: object - _safety_run_shield_Request: + VectorStoreSearchResponsePage: + description: Paginated response from searching a vector store. properties: - shield_id: - title: Shield Id + object: + default: vector_store.search_results.page + title: Object type: string - messages: + search_query: 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Messages + type: string + title: Search Query type: array - params: - additionalProperties: true - title: Params - type: object + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - shield_id - - messages - - params - title: _safety_run_shield_Request + - search_query + - data + title: VectorStoreSearchResponsePage type: object - OpenAIResponseMessageOutputUnion: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - x-stainless-naming: OpenAIResponseMessageOutputOneOf - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse - x-stainless-naming: OpenAIResponseMessageOutputUnion - OpenAIResponseMessageInputUnion: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - x-stainless-naming: OpenAIResponseMessageInputOneOf - title: OpenAIResponseMessage-Input | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse - x-stainless-naming: OpenAIResponseMessageInputUnion - responses: - BadRequest400: - description: The request was invalid or malformed - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 400 - 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 - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 429 - title: Too Many Requests - detail: You have exceeded the rate limit. Please try again later. - InternalServerError500: - description: The server encountered an unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 500 - title: Internal Server Error - detail: An unexpected error occurred - DefaultError: - description: An error occurred - content: - application/json: - schema: - $ref: '#/components/schemas/Error' diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index fc83404351..cc0533382a 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -14,1412 +14,980 @@ info: servers: - url: http://any-hosted-llama-stack.com paths: - /v1/batches: + /v1/providers/{provider_id}: get: + tags: + - Providers + summary: Inspect Provider + operationId: inspect_provider_v1_providers__provider_id__get responses: '200': - description: A list of batch objects. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListBatchesResponse' + schema: {} '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: - - Batches - summary: List all batches for the current user. - description: List all batches for the current user. parameters: - - name: after - in: query - description: >- - A cursor for pagination; returns batches after this batch ID. - required: false - schema: - type: string - - name: limit - in: query - description: >- - Number of batches to return (default 20, max 100). - required: true - schema: - type: integer - deprecated: false - post: + - name: provider_id + in: path + required: true + schema: + type: string + description: 'Path parameter: provider_id' + /v1/providers: + get: + tags: + - Providers + summary: List Providers + operationId: list_providers_v1_providers_get responses: '200': - description: The created batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '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: - - Batches - summary: >- - Create a new batch for processing multiple API requests. - description: >- - Create a new batch for processing multiple API requests. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateBatchRequest' - required: true - deprecated: false - /v1/batches/{batch_id}: + /v1/responses: get: + tags: + - Agents + summary: List Openai Responses + operationId: list_openai_responses_v1_responses_get responses: '200': - description: The batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '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: - - Batches - summary: >- - Retrieve information about a specific batch. - description: >- - Retrieve information about a specific batch. - parameters: - - name: batch_id - in: path - description: The ID of the batch to retrieve. - required: true - schema: - type: string - deprecated: false - /v1/batches/{batch_id}/cancel: post: + tags: + - Agents + summary: Create Openai Response + operationId: create_openai_response_v1_responses_post responses: '200': - description: The updated batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '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: - - Batches - summary: Cancel a batch that is in progress. - description: Cancel a batch that is in progress. - parameters: - - name: batch_id - in: path - description: The ID of the batch to cancel. - required: true - schema: - type: string - deprecated: false - /v1/chat/completions: + /v1/responses/{response_id}: get: + tags: + - Agents + summary: Get Openai Response + operationId: get_openai_response_v1_responses__response_id__get responses: '200': - description: A ListOpenAIChatCompletionResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' + schema: {} '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: List chat completions. - description: List chat completions. parameters: - - name: after - in: query - description: >- - The ID of the last chat completion to return. - required: false - schema: - type: string - - name: limit - in: query - description: >- - The maximum number of chat completions to return. - required: false - schema: - type: integer - - name: model - in: query - description: The model to filter by. - required: false - schema: - type: string - - name: order - in: query - description: >- - The order to sort the chat completions by: "asc" or "desc". Defaults to - "desc". - required: false - schema: - $ref: '#/components/schemas/Order' - deprecated: false - post: + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + delete: + tags: + - Agents + summary: Delete Openai Response + operationId: delete_openai_response_v1_responses__response_id__delete responses: '200': - description: An OpenAIChatCompletion. + description: Successful Response content: application/json: - schema: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletion' - - $ref: '#/components/schemas/OpenAIChatCompletionChunk' + schema: {} '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: Create chat completions. - description: >- - Create chat completions. - - Generate an OpenAI-compatible chat completion for the given messages using - the specified model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody' + parameters: + - name: response_id + in: path required: true - deprecated: false - /v1/chat/completions/{completion_id}: + schema: + type: string + description: 'Path parameter: response_id' + /v1/responses/{response_id}/input_items: get: + tags: + - Agents + summary: List Openai Response Input Items + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get responses: '200': - description: A OpenAICompletionWithInputMessages. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + schema: {} '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: Get chat completion. - description: >- - Get chat completion. - - Describe a chat completion by its ID. parameters: - - name: completion_id - in: path - description: ID of the chat completion. - required: true - schema: - type: string - deprecated: false - /v1/completions: - post: + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + /v1/chat/completions/{completion_id}: + get: + tags: + - Inference + summary: Get Chat Completion + operationId: get_chat_completion_v1_chat_completions__completion_id__get responses: '200': - description: An OpenAICompletion. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAICompletion' + schema: {} '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: Create completion. - description: >- - Create completion. - - Generate an OpenAI-compatible completion for the given prompt using the specified - model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' + parameters: + - name: completion_id + in: path required: true - deprecated: false - /v1/conversations: - post: + schema: + type: string + description: 'Path parameter: completion_id' + /v1/chat/completions: + get: + tags: + - Inference + summary: List Chat Completions + operationId: list_chat_completions_v1_chat_completions_get responses: '200': - description: The created conversation object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Conversation' + schema: {} '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' + post: tags: - - Conversations - summary: Create a conversation. - description: >- - Create a conversation. - - Create a conversation. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateConversationRequest' - required: true - deprecated: false - /v1/conversations/{conversation_id}: - get: + - Inference + summary: Openai Chat Completion + operationId: openai_chat_completion_v1_chat_completions_post responses: '200': - description: The conversation object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Conversation' + schema: {} '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: - - Conversations - summary: Retrieve a conversation. - description: >- - Retrieve a conversation. - - Get a conversation with the given ID. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - deprecated: false + /v1/completions: post: + tags: + - Inference + summary: Openai Completion + operationId: openai_completion_v1_completions_post responses: '200': - description: The updated conversation object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Conversation' + schema: {} '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/embeddings: + post: tags: - - Conversations - summary: Update a conversation. - description: >- - Update a conversation. - - Update a conversation's metadata with the given ID. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateConversationRequest' - required: true - deprecated: false - delete: + - Inference + summary: Openai Embeddings + operationId: openai_embeddings_v1_embeddings_post responses: '200': - description: The deleted conversation resource. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationDeletedResource' + schema: {} '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' + /v1alpha/inference/rerank: + post: tags: - - Conversations - summary: Delete a conversation. - description: >- - Delete a conversation. - - Delete a conversation with the given ID. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - deprecated: false - /v1/conversations/{conversation_id}/items: - get: + - Inference + summary: Rerank + operationId: rerank_v1alpha_inference_rerank_post responses: '200': - description: List of conversation items. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationItemList' + schema: {} '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/health: + get: tags: - - Conversations - summary: List items. - description: >- - List items. - - List items in the conversation. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - - name: after - in: query - description: >- - An item ID to list items after, used in pagination. - required: false - schema: - type: string - - name: include - in: query - description: >- - Specify additional output data to include in the response. - required: false - schema: - type: array - items: - 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. - - name: limit - in: query - description: >- - A limit on the number of objects to be returned (1-100, default 20). - required: false - schema: - type: integer - - name: order - in: query - description: >- - The order to return items in (asc or desc, default desc). - required: false - schema: - type: string - enum: - - asc - - desc - deprecated: false - post: + - Inspect + summary: Health + operationId: health_v1_health_get responses: '200': - description: List of created items. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationItemList' + schema: {} '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: - - Conversations - summary: Create items. - description: >- - Create items. - - Create items in the conversation. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AddItemsRequest' - required: true - deprecated: false - /v1/conversations/{conversation_id}/items/{item_id}: + /v1/inspect/routes: get: + tags: + - Inspect + summary: List Routes + operationId: list_routes_v1_inspect_routes_get responses: '200': - description: The conversation item. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationItem' + schema: {} '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/version: + get: tags: - - Conversations - summary: Retrieve an item. - description: >- - Retrieve an item. - - Retrieve a conversation item. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - - name: item_id - in: path - description: The item identifier. - required: true - schema: - type: string - deprecated: false - delete: + - Inspect + summary: Version + operationId: version_v1_version_get responses: '200': - description: The deleted item resource. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ConversationItemDeletedResource' + schema: {} '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: - - Conversations - summary: Delete an item. - description: >- - Delete an item. - - Delete a conversation item. - parameters: - - name: conversation_id - in: path - description: The conversation identifier. - required: true - schema: - type: string - - name: item_id - in: path - description: The item identifier. - required: true - schema: - type: string - deprecated: false - /v1/embeddings: + /v1/batches/{batch_id}/cancel: post: + tags: + - Batches + summary: Cancel Batch + operationId: cancel_batch_v1_batches__batch_id__cancel_post responses: '200': - description: >- - An OpenAIEmbeddingsResponse containing the embeddings. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIEmbeddingsResponse' + schema: {} '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: Create embeddings. - description: >- - Create embeddings. - - Generate OpenAI-compatible embeddings for the given input using the specified - model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' + parameters: + - name: batch_id + in: path required: true - deprecated: false - /v1/files: + schema: + type: string + description: 'Path parameter: batch_id' + /v1/batches: get: + tags: + - Batches + summary: List Batches + operationId: list_batches_v1_batches_get responses: '200': - description: >- - An ListOpenAIFileResponse containing the list of files. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIFileResponse' + schema: {} '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: - - Files - summary: List files. - description: >- - List files. - - Returns a list of files that belong to the user's organization. - parameters: - - name: after - in: query - description: >- - A cursor for use in pagination. `after` is an object ID that defines your - place in the list. For instance, if you make a list request and receive - 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo - in order to fetch the next page of the list. - required: false - schema: - type: string - - name: limit - in: query - description: >- - A limit on the number of objects to be returned. Limit can range between - 1 and 10,000, and the default is 10,000. - required: false - schema: - type: integer - - name: order - in: query - description: >- - Sort order by the `created_at` timestamp of the objects. `asc` for ascending - order and `desc` for descending order. - required: false - schema: - $ref: '#/components/schemas/Order' - - name: purpose - in: query - description: >- - Only return files with the given purpose. - required: false - schema: - $ref: '#/components/schemas/OpenAIFilePurpose' - deprecated: false post: + tags: + - Batches + summary: Create Batch + operationId: create_batch_v1_batches_post responses: '200': - description: >- - An OpenAIFileObject representing the uploaded file. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIFileObject' + schema: {} '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: - - Files - summary: Upload file. - description: >- - Upload file. - - Upload a file that can be used across various endpoints. - - - The file upload should be a multipart form request with: - - - file: The File object (not file name) to be uploaded. - - - purpose: The intended purpose of the uploaded file. - - - expires_after: Optional form values describing expiration for the file. - parameters: [] - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - file: - type: string - format: binary - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' - expires_after: - $ref: '#/components/schemas/ExpiresAfter' - required: - - file - - purpose - required: true - deprecated: false - /v1/files/{file_id}: + /v1/batches/{batch_id}: get: + tags: + - Batches + summary: Retrieve Batch + operationId: retrieve_batch_v1_batches__batch_id__get responses: '200': - description: >- - An OpenAIFileObject containing file information. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIFileObject' + schema: {} '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: - - Files - summary: Retrieve file. - description: >- - Retrieve file. - - Returns information about a specific file. parameters: - - name: file_id - in: path - description: >- - The ID of the file to use for this request. - required: true - schema: - type: string - deprecated: false - delete: + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' + /v1/vector-io/insert: + post: + tags: + - Vector Io + summary: Insert Chunks + operationId: insert_chunks_v1_vector_io_insert_post responses: '200': - description: >- - An OpenAIFileDeleteResponse indicating successful deletion. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIFileDeleteResponse' + schema: {} '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: - - Files - summary: Delete file. - description: Delete file. - parameters: - - name: file_id - in: path - description: >- - The ID of the file to use for this request. - required: true - schema: - type: string - deprecated: false - /v1/files/{file_id}/content: + /v1/vector_stores/{vector_store_id}/files: get: + tags: + - Vector Io + summary: Openai List Files In Vector Store + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get responses: '200': - description: >- - The raw file content as a binary response. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Response' + schema: {} '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: - - Files - summary: Retrieve file content. - description: >- - Retrieve file content. - - Returns the contents of the specified file. parameters: - - name: file_id - in: path - description: >- - The ID of the file to use for this request. - required: true - schema: - type: string - deprecated: false - /v1/health: - get: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + post: + tags: + - Vector Io + summary: Openai Attach File To Vector Store + operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post responses: '200': - description: >- - Health information indicating if the service is operational. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/HealthInfo' + schema: {} '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: 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}/cancel: + post: tags: - - Inspect - summary: Get health status. - description: >- - Get health status. - - Get the current health status of the service. - parameters: [] - deprecated: false - /v1/inspect/routes: - get: + - Vector Io + summary: Openai Cancel Vector Store File Batch + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post responses: '200': - description: >- - Response containing information about all available routes. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListRoutesResponse' + schema: {} '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: - - Inspect - summary: List routes. - description: >- - List routes. - - List all available API routes with their methods and implementing providers. parameters: - - name: api_filter - in: query - description: >- - Optional filter to control which routes are returned. Can be an API level - ('v1', 'v1alpha', 'v1beta') to show non-deprecated routes at that level, - or 'deprecated' to show deprecated routes across all levels. If not specified, - returns all non-deprecated routes. - required: false - schema: - type: string - enum: - - v1 - - v1alpha - - v1beta - - deprecated - deprecated: false - /v1/models: + - 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: get: + tags: + - Vector Io + summary: Openai List Vector Stores + operationId: openai_list_vector_stores_v1_vector_stores_get responses: '200': - description: A OpenAIListModelsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIListModelsResponse' + schema: {} '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: - - Models - summary: List models using the OpenAI API. - description: List models using the OpenAI API. - parameters: [] - deprecated: false post: + tags: + - Vector Io + summary: Openai Create Vector Store + operationId: openai_create_vector_store_v1_vector_stores_post responses: '200': - description: A Model. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Model' + schema: {} '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/vector_stores/{vector_store_id}/file_batches: + post: tags: - - Models - summary: Register model. - description: >- - Register model. - - Register a model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterModelRequest' - required: true - deprecated: true - /v1/models/{model_id}: - get: + - Vector Io + summary: Openai Create Vector Store File Batch + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post responses: '200': - description: A Model. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Model' + schema: {} '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: - - Models - summary: Get model. - description: >- - Get model. - - Get a model by its identifier. parameters: - - name: model_id - in: path - description: The identifier of the model to get. - required: true - schema: - type: string - 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' + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}: + get: tags: - - Models - summary: Unregister model. - description: >- - Unregister model. - - Unregister a model. - parameters: - - name: model_id - in: path - description: >- - The identifier of the model to unregister. - required: true - schema: - type: string - deprecated: true - /v1/moderations: - post: + - Vector Io + summary: Openai Retrieve Vector Store + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get responses: '200': - description: A moderation object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ModerationObject' + schema: {} '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: - - Safety - summary: Create moderation. - description: >- - Create moderation. - - Classifies if text and/or image inputs are potentially harmful. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunModerationRequest' + parameters: + - name: vector_store_id + in: path required: true - deprecated: false - /v1/prompts: - get: + schema: + type: string + description: 'Path parameter: vector_store_id' + post: + tags: + - Vector Io + summary: Openai Update Vector Store + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post responses: '200': - description: >- - A ListPromptsResponse containing all prompts. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListPromptsResponse' + schema: {} '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: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + delete: tags: - - Prompts - summary: List all prompts. - description: List all prompts. - parameters: [] - deprecated: false - post: + - Vector Io + summary: Openai Delete Vector Store + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete responses: '200': - description: The created Prompt resource. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Prompt' + schema: {} '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: - - Prompts - summary: Create prompt. - description: >- - Create prompt. - - Create a new prompt. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreatePromptRequest' + parameters: + - name: vector_store_id + in: path required: true - deprecated: false - /v1/prompts/{prompt_id}: + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}/files/{file_id}: get: + tags: + - Vector Io + summary: Openai Retrieve Vector Store File + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get responses: '200': - description: A Prompt resource. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Prompt' + schema: {} '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: - - Prompts - summary: Get prompt. - description: >- - Get prompt. - - Get a prompt by its identifier and optional version. parameters: - - name: prompt_id - in: path - description: The identifier of the prompt to get. - required: true - schema: - type: string - - name: version - in: query - description: >- - The version of the prompt to get (defaults to latest). - required: false - schema: - type: integer - deprecated: false + - 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' post: + tags: + - Vector Io + summary: Openai Update Vector Store File + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post responses: '200': - description: >- - The updated Prompt resource with incremented version. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Prompt' + schema: {} '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: - - Prompts - summary: Update prompt. - description: >- - Update prompt. - - Update an existing prompt (increments version). parameters: - - name: prompt_id - in: path - description: The identifier of the prompt to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdatePromptRequest' + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + - name: file_id + in: path required: true - deprecated: false + schema: + type: string + description: 'Path parameter: file_id' delete: + tags: + - Vector Io + summary: Openai Delete Vector Store File + operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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: - - Prompts - summary: Delete prompt. - description: >- - Delete prompt. - - Delete a prompt. parameters: - - name: prompt_id - in: path - description: The identifier of the prompt to delete. - required: true - schema: - type: string - deprecated: false - /v1/prompts/{prompt_id}/set-default-version: - post: + - 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}/file_batches/{batch_id}/files: + get: + tags: + - Vector Io + summary: Openai List Files In Vector Store File Batch + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get responses: '200': - description: >- - The prompt with the specified version now set as default. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Prompt' + schema: {} '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: - - Prompts - summary: Set prompt version. - description: >- - Set prompt version. - - Set which version of a prompt should be the default in get_prompt (latest). parameters: - - name: prompt_id - in: path - description: The identifier of the prompt. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SetDefaultVersionRequest' + - name: vector_store_id + in: path required: true - deprecated: false - /v1/prompts/{prompt_id}/versions: - get: - responses: - '200': - description: >- - A ListPromptsResponse containing all versions of the prompt. - content: - application/json: - schema: - $ref: '#/components/schemas/ListPromptsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Prompts - summary: List prompt versions. - description: >- - List prompt versions. - - List all versions of a specific prompt. - parameters: - - name: prompt_id - in: path - description: >- - The identifier of the prompt to list versions for. - required: true - schema: - type: string - deprecated: false - /v1/providers: - get: - responses: - '200': - description: >- - A ListProvidersResponse containing information about all providers. - content: - application/json: - schema: - $ref: '#/components/schemas/ListProvidersResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Providers - summary: List providers. - description: >- - List providers. - - List all available providers. - parameters: [] - deprecated: false - /v1/providers/{provider_id}: + 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}: get: tags: - - Providers - summary: Inspect Provider - description: |- - Get provider. - - Get detailed information about a specific provider. - operationId: inspect_provider_v1_providers__provider_id__get + - Vector Io + summary: Openai Retrieve Vector Store File Batch + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get responses: '200': - description: A ProviderInfo object containing the provider's details. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ProviderInfo' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1433,29 +1001,30 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: provider_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: provider_id' - /v1/providers: + 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}/files/{file_id}/content: get: tags: - - Providers - summary: List Providers - description: |- - List providers. - - List all available providers. - operationId: list_providers_v1_providers_get + - Vector Io + summary: Openai Retrieve Vector Store File Contents + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get responses: '200': - description: A ListProvidersResponse containing information about all providers. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListProvidersResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1468,139 +1037,86 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/responses: - get: - tags: - - Agents - summary: List Openai Responses - description: List all responses. - operationId: list_openai_responses_v1_responses_get parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 50 - title: Limit - - name: model - in: query - required: false + - name: vector_store_id + in: path + required: true schema: - anyOf: - - type: string - - type: 'null' - title: Model - - name: order - in: query - required: false + type: string + description: 'Path parameter: vector_store_id' + - name: file_id + in: path + required: true schema: - anyOf: - - $ref: '#/components/schemas/Order' - - type: 'null' - default: desc - title: Order + type: string + description: 'Path parameter: file_id' + /v1/vector_stores/{vector_store_id}/search: + post: + tags: + - Vector Io + summary: Openai Search Vector Store + operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post responses: '200': - description: A ListOpenAIResponseObject. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIResponseObject' + schema: {} '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/vector-io/query: post: tags: - - Agents - summary: Create Openai Response - description: Create a model response. - operationId: create_openai_response_v1_responses_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/_responses_Request' - x-llama-stack-extra-body-params: - guardrails: - $defs: - ResponseGuardrailSpec: - description: |- - Specification for a guardrail to apply during response generation. - - :param type: The type/identifier of the guardrail. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - type: object - anyOf: - - items: - anyOf: - - type: string - - $ref: '#/components/schemas/ResponseGuardrailSpec' - type: array - - type: 'null' - description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. + - Vector Io + summary: Query Chunks + operationId: query_chunks_v1_vector_io_query_post responses: '200': - description: An OpenAIResponseObject. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseObject' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIResponseObjectStream' + schema: {} '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 - /v1/responses/{response_id}: + $ref: '#/components/responses/DefaultError' + /v1/models/{model_id}: get: tags: - - Agents - summary: Get Openai Response - description: Get a model response. - operationId: get_openai_response_v1_responses__response_id__get + - Models + summary: Get Model + operationId: get_model_v1_models__model_id__get responses: '200': - description: An OpenAIResponseObject. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1614,25 +1130,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: response_id + - name: model_id in: path required: true schema: type: string - description: 'Path parameter: response_id' - delete: + description: 'Path parameter: model_id' + /v1/models: + get: tags: - - Agents - summary: Delete Openai Response - description: Delete a response. - operationId: delete_openai_response_v1_responses__response_id__delete + - Models + summary: Openai List Models + operationId: openai_list_models_v1_models_get responses: '200': - description: An OpenAIDeleteResponseObject + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIDeleteResponseObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1645,107 +1160,42 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: response_id - in: path - required: true - schema: - type: string - description: 'Path parameter: response_id' - /v1/responses/{response_id}/input_items: - get: + /v1/moderations: + post: tags: - - Agents - summary: List Openai Response Input Items - description: List input items. - operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/Order' - - type: 'null' - default: desc - title: Order - - name: response_id - in: path - required: true - schema: - type: string - description: 'Path parameter: response_id' - - name: include - in: query - required: false - schema: - anyOf: - - type: array - items: - type: string - - type: 'null' - title: Include + - Safety + summary: Run Moderation + operationId: run_moderation_v1_moderations_post responses: '200': - description: An ListOpenAIResponseInputItem. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIResponseInputItem' + schema: {} '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 - /v1/chat/completions/{completion_id}: - get: + $ref: '#/components/responses/DefaultError' + /v1/safety/run-shield: + post: tags: - - Inference - summary: Get Chat Completion - description: |- - Get chat completion. - - Describe a chat completion by its ID. - operationId: get_chat_completion_v1_chat_completions__completion_id__get + - Safety + summary: Run Shield + operationId: run_shield_v1_safety_run_shield_post responses: '200': - description: A OpenAICompletionWithInputMessages. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1758,192 +1208,135 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: completion_id - in: path - required: true - schema: - type: string - description: 'Path parameter: completion_id' - /v1/chat/completions: + /v1/shields/{identifier}: get: tags: - - Inference - summary: List Chat Completions - description: List chat completions. - operationId: list_chat_completions_v1_chat_completions_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: model - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Model - - name: order - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/Order' - - type: 'null' - default: desc - title: Order + - Shields + summary: Get Shield + operationId: get_shield_v1_shields__identifier__get responses: '200': - description: A ListOpenAIChatCompletionResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' + schema: {} '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 - post: + $ref: '#/components/responses/DefaultError' + parameters: + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + /v1/shields: + get: tags: - - ScoringFunctions - summary: List all scoring functions. - description: List all scoring functions. - parameters: [] - deprecated: false - post: + - Shields + summary: List Shields + operationId: list_shields_v1_shields_get responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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' + /v1beta/datasetio/append-rows/{dataset_id}: + post: tags: - - ScoringFunctions - summary: Register a scoring function. - description: Register a scoring function. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterScoringFunctionRequest' - required: true - deprecated: true - /v1/scoring-functions/{scoring_fn_id}: - get: + - Datasetio + summary: Append Rows + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post responses: '200': - description: An OpenAIChatCompletion. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIChatCompletion' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIChatCompletionChunk' + schema: {} '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: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - ScoringFunctions - summary: Get a scoring function by its ID. - description: Get a scoring function by its ID. parameters: - - name: scoring_fn_id - in: path - description: The ID of the scoring function to get. - required: true - schema: - type: string - deprecated: false - delete: + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasetio/iterrows/{dataset_id}: + get: + tags: + - Datasetio + summary: Iterrows + operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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: - - ScoringFunctions - summary: Unregister a scoring function. - description: Unregister a scoring function. parameters: - - name: scoring_fn_id - in: path - description: >- - The ID of the scoring function to unregister. - required: true - schema: - type: string - deprecated: true - /v1/scoring/score: - post: - tags: - - Inference - summary: Openai Completion - description: |- - Create completion. - - Generate an OpenAI-compatible completion for the given prompt using the specified model. - operationId: openai_completion_v1_completions_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' + - name: dataset_id + in: path required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasets/{dataset_id}: + get: + tags: + - Datasets + summary: Get Dataset + operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': - description: An OpenAICompletion. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAICompletion' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1956,29 +1349,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/embeddings: - post: - tags: - - Inference - summary: Openai Embeddings - description: |- - Create embeddings. - - Generate OpenAI-compatible embeddings for the given input using the specified model. - operationId: openai_embeddings_v1_embeddings_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' + parameters: + - name: dataset_id + in: path required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasets: + get: + tags: + - Datasets + summary: List Datasets + operationId: list_datasets_v1beta_datasets_get responses: '200': - description: An OpenAIEmbeddingsResponse containing the embeddings. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIEmbeddingsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1991,53 +1380,42 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/inference/rerank: + /v1/scoring/score: post: tags: - - Shields - summary: List all shields. - description: List all shields. - parameters: [] - deprecated: false - post: + - Scoring + summary: Score + operationId: score_v1_scoring_score_post responses: '200': - description: A Shield. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Shield' + schema: {} '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/scoring/score-batch: + post: tags: - - Shields - summary: Register a shield. - description: Register a shield. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterShieldRequest' - required: true - deprecated: true - /v1/shields/{identifier}: - get: + - Scoring + summary: Score Batch + operationId: score_batch_v1_scoring_score_batch_post responses: '200': - description: RerankResponse with indices sorted by relevance score (descending). + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/RerankResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2050,23 +1428,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/health: + /v1/scoring-functions/{scoring_fn_id}: get: tags: - - Inspect - summary: Health - description: |- - Get health status. - - Get the current health status of the service. - operationId: health_v1_health_get + - Scoring Functions + summary: Get Scoring Function + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': - description: Health information indicating if the service is operational. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/HealthInfo' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2079,70 +1452,49 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/inspect/routes: - get: - tags: - - Inspect - summary: List Routes - description: |- - List routes. - - List all available API routes with their methods and implementing providers. - operationId: list_routes_v1_inspect_routes_get parameters: - - name: api_filter - in: query - required: false + - name: scoring_fn_id + in: path + required: true schema: - anyOf: - - enum: - - v1 - - v1alpha - - v1beta - - deprecated - type: string - deprecated: false - delete: + type: string + description: 'Path parameter: scoring_fn_id' + /v1/scoring-functions: + get: + tags: + - Scoring Functions + summary: List Scoring Functions + operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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: - - Shields - summary: Unregister a shield. - description: Unregister a shield. - parameters: - - name: identifier - in: path - description: >- - The identifier of the shield to unregister. - required: true - schema: - type: string - deprecated: true - /v1/tool-runtime/invoke: + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: tags: - - Batches - summary: Cancel Batch - description: Cancel a batch that is in progress. - operationId: cancel_batch_v1_batches__batch_id__cancel_post + - Eval + summary: Evaluate Rows + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post responses: '200': - description: The updated batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2156,169 +1508,196 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: batch_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/batches: + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: get: tags: - - ToolGroups - summary: List tool groups with optional provider. - description: List tool groups with optional provider. - parameters: [] - deprecated: false - post: + - Eval + summary: Job Status + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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: - - ToolGroups - summary: Register a tool group. - description: Register a tool group. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterToolGroupRequest' - required: true - deprecated: true - /v1/toolgroups/{toolgroup_id}: - get: + parameters: + - 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' + delete: + tags: + - Eval + summary: Job Cancel + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete responses: '200': - description: A ToolGroup. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ToolGroup' + schema: {} '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: - - ToolGroups - summary: Get a tool group by its ID. - description: Get a tool group by its ID. parameters: - - name: toolgroup_id - in: path - description: The ID of the tool group to get. - required: true - schema: - type: string - deprecated: false - delete: + - 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' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: + get: + tags: + - Eval + summary: Job Result + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '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: - - ToolGroups - summary: Unregister a tool group. - description: Unregister a tool group. parameters: - - name: toolgroup_id - in: path - description: The ID of the tool group to unregister. - required: true - schema: - type: string - deprecated: true - /v1/tools: - get: + - 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' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs: + post: + tags: + - Eval + summary: Run Eval + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post responses: '200': - description: A list of batch objects. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListBatchesResponse' + schema: {} '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 - post: - tags: - - Batches - summary: Create Batch - description: Create a new batch for processing multiple API requests. - operationId: create_batch_v1_batches_post - requestBody: + $ref: '#/components/responses/DefaultError' + parameters: + - name: benchmark_id + in: path required: true - content: - application/json: - schema: - $ref: '#/components/schemas/_batches_Request' + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}: + get: + tags: + - Benchmarks + summary: Get Benchmark + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': - description: The created batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '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 - /v1/batches/{batch_id}: + $ref: '#/components/responses/DefaultError' + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks: get: tags: - - Batches - summary: Retrieve Batch - description: Retrieve information about a specific batch. - operationId: retrieve_batch_v1_batches__batch_id__get + - Benchmarks + summary: List Benchmarks + operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': - description: The batch object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Batch' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2331,29 +1710,12 @@ paths: 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/vector-io/insert: + /v1alpha/post-training/job/cancel: post: tags: - - Vector Io - summary: Insert Chunks - description: Insert chunks into a vector database. - operationId: insert_chunks_v1_vector_io_insert_post - requestBody: - required: true - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Chunk-Input' - title: Chunks + - Post Training + summary: Cancel Training Job + operationId: cancel_training_job_v1alpha_post_training_job_cancel_post responses: '200': description: Successful Response @@ -2361,149 +1723,77 @@ paths: application/json: schema: {} '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 - /v1/vector_stores/{vector_store_id}/files: + $ref: '#/components/responses/DefaultError' + /v1alpha/post-training/job/artifacts: get: tags: - - Vector Io - summary: Openai List Files In Vector Store - description: List files in a vector store. - operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: filter - in: query - required: false - schema: - title: Filter - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - nullable: true - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - default: desc - title: Order - - name: vector_store_id - in: path - required: true - schema: - type: string - description: 'Path parameter: vector_store_id' + - Post Training + summary: Get Training Job Artifacts + operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get responses: '200': - description: A VectorStoreListFilesResponse containing the list of files. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreListFilesResponse' + schema: {} '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 - post: + $ref: '#/components/responses/DefaultError' + /v1alpha/post-training/job/status: + get: tags: - - Vector Io - summary: Openai Attach File To Vector Store - description: Attach a file to a vector store. - 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' + - Post Training + summary: Get Training Job Status + operationId: get_training_job_status_v1alpha_post_training_job_status_get responses: '200': - description: A VectorStoreFileObject representing the attached file. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileObject' + schema: {} '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 - 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}/cancel: - post: + $ref: '#/components/responses/DefaultError' + /v1alpha/post-training/jobs: + get: tags: - - Vector Io - summary: Openai Cancel Vector Store File Batch - description: Cancels a vector store file batch. - operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post + - Post Training + summary: Get Training Jobs + operationId: get_training_jobs_v1alpha_post_training_jobs_get responses: '200': - description: A VectorStoreFileBatchObject representing the cancelled file batch. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2516,137 +1806,66 @@ 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' - - name: batch_id - in: path - required: true - schema: - type: string - description: 'Path parameter: batch_id' - /v1/vector_stores: - get: + /v1alpha/post-training/preference-optimize: + post: tags: - - Vector Io - summary: Openai List Vector Stores - description: Returns a list of vector stores. - operationId: openai_list_vector_stores_v1_vector_stores_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - default: desc - title: Order + - Post Training + summary: Preference Optimize + operationId: preference_optimize_v1alpha_post_training_preference_optimize_post responses: '200': - description: A VectorStoreListResponse containing the list of vector stores. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreListResponse' + schema: {} '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/supervised-fine-tune: post: tags: - - Vector Io - summary: Openai Create Vector Store - description: |- - Creates a vector store. - - Generate an OpenAI-compatible vector store with the given parameters. - operationId: openai_create_vector_store_v1_vector_stores_post - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAICreateVectorStoreRequestWithExtraBody' + - Post Training + summary: Supervised Fine Tune + operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post responses: '200': - description: A VectorStoreObject representing the created vector store. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreObject' + schema: {} '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 - /v1/vector_stores/{vector_store_id}/file_batches: - post: + $ref: '#/components/responses/DefaultError' + /v1/tools/{tool_name}: + get: tags: - - Vector Io - summary: Openai Create Vector Store File Batch - description: |- - Create a vector store file batch. - - Generate an OpenAI-compatible vector store file batch for the given vector store. - 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 + - Tool Groups + summary: Get Tool + operationId: get_tool_v1_tools__tool_name__get responses: '200': - description: A VectorStoreFileBatchObject representing the created file batch. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2660,26 +1879,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: tool_name in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - /v1/vector_stores/{vector_store_id}: + description: 'Path parameter: tool_name' + /v1/toolgroups/{toolgroup_id}: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store - description: Retrieves a vector store. - operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get + - Tool Groups + summary: Get Tool Group + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get responses: '200': - description: A VectorStoreObject representing the vector store. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2693,31 +1910,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: toolgroup_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - post: + description: 'Path parameter: toolgroup_id' + /v1/toolgroups: + get: tags: - - Vector Io - summary: Openai Update Vector Store - description: Updates a vector store. - operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_vector_stores_vector_store_id_Request' - required: true + - Tool Groups + summary: List Tool Groups + operationId: list_tool_groups_v1_toolgroups_get responses: '200': - description: A VectorStoreObject representing the updated vector store. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2730,26 +1940,18 @@ 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' - delete: + /v1/tools: + get: tags: - - Vector Io - summary: Openai Delete Vector Store - description: Delete a vector store. - operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete + - Tool Groups + summary: List Tools + operationId: list_tools_v1_tools_get responses: '200': - description: A VectorStoreDeleteResponse indicating the deletion status. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreDeleteResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2762,27 +1964,42 @@ 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}/files/{file_id}: + /v1/tool-runtime/invoke: + post: + tags: + - Tool Runtime + summary: Invoke Tool + operationId: invoke_tool_v1_tool_runtime_invoke_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: - - Vector Io - summary: Openai Retrieve Vector Store File - description: Retrieves a vector store file. - operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get + - Tool Runtime + summary: List Runtime Tools + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get responses: '200': - description: A VectorStoreFileObject representing the file. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2795,38 +2012,18 @@ 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' - - name: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' - post: + /v1/files/{file_id}: + get: tags: - - Vector Io - summary: Openai Update Vector Store File - description: Updates a vector store file. - operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_vector_stores_vector_store_id_files_file_id_Request' - required: true + - Files + summary: Openai Retrieve File + operationId: openai_retrieve_file_v1_files__file_id__get responses: '200': - description: A VectorStoreFileObject representing the updated file. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2840,12 +2037,6 @@ paths: 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: file_id in: path required: true @@ -2854,17 +2045,15 @@ paths: description: 'Path parameter: file_id' delete: tags: - - Vector Io - summary: Openai Delete Vector Store File - description: Delete a vector store file. - operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete + - Files + summary: Openai Delete File + operationId: openai_delete_file_v1_files__file_id__delete responses: '200': - description: A VectorStoreFileDeleteResponse indicating the deletion status. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileDeleteResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2878,113 +2067,47 @@ paths: 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: file_id in: path required: true schema: type: string description: 'Path parameter: file_id' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: + /v1/files: get: tags: - - Vector Io - summary: Openai List Files In Vector Store File Batch - description: Returns a list of vector store files in a batch. - operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get - parameters: - - name: after - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: After - - name: before - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Before - - name: filter - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Filter - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - default: 20 - title: Limit - - name: order - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - default: desc - title: Order - - 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' + - Files + summary: Openai List Files + operationId: openai_list_files_v1_files_get responses: '200': - description: A VectorStoreFilesListInBatchResponse containing the list of files in the batch. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' + schema: {} '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 - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: - get: + $ref: '#/components/responses/DefaultError' + post: tags: - - Vector Io - summary: Openai Retrieve Vector Store File Batch - description: Retrieve a vector store file batch. - operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get + - Files + summary: Openai Upload File + operationId: openai_upload_file_v1_files_post responses: '200': - description: A VectorStoreFileBatchObject representing the file batch. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2997,99 +2120,49 @@ 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' - - name: batch_id - in: path - required: true - schema: - type: string - description: 'Path parameter: batch_id' - /v1/vector_stores/{vector_store_id}/files/{file_id}/content: + /v1/files/{file_id}/content: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store File Contents - description: Retrieves the contents of a vector store file. - operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get - parameters: - - name: include_embeddings - in: query - required: false - schema: - anyOf: - - type: boolean - - type: 'null' - default: false - title: Include Embeddings - - name: include_metadata - in: query - required: false - schema: - anyOf: - - type: boolean - - type: 'null' - default: false - title: Include Metadata - - 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' + - Files + summary: Openai Retrieve File Content + operationId: openai_retrieve_file_content_v1_files__file_id__content_get responses: '200': - description: File contents, optionally with embeddings and metadata based on query parameters. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileContentResponse' + schema: {} '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 - /v1/vector_stores/{vector_store_id}/search: - post: - tags: - - Vector Io - summary: Openai Search Vector Store - description: |- - Search for chunks in a vector store. - - Searches a vector store for relevant chunks based on a query and optional file attribute filters. - 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' + $ref: '#/components/responses/DefaultError' + parameters: + - name: file_id + in: path required: true + schema: + type: string + description: 'Path parameter: file_id' + /v1/prompts: + get: + tags: + - Prompts + summary: List Prompts + operationId: list_prompts_v1_prompts_get responses: '200': - description: A VectorStoreSearchResponse containing the search results. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/VectorStoreSearchResponsePage' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3102,33 +2175,17 @@ 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-io/query: post: tags: - - Vector Io - summary: Query Chunks - description: Query chunks from a vector database. - operationId: query_chunks_v1_vector_io_query_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_vector_io_query_Request' - required: true + - Prompts + summary: Create Prompt + operationId: create_prompt_v1_prompts_post responses: '200': - description: A QueryChunksResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/QueryChunksResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3141,23 +2198,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/models/{model_id}: + /v1/prompts/{prompt_id}: get: tags: - - Models - summary: Get Model - description: |- - Get model. - - Get a model by its identifier. - operationId: get_model_v1_models__model_id__get + - Prompts + summary: Get Prompt + operationId: get_prompt_v1_prompts__prompt_id__get responses: '200': - description: A Model. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Model' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3171,26 +2223,23 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: model_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: model_id' - /v1/models: - get: + description: 'Path parameter: prompt_id' + post: tags: - - Models - summary: Openai List Models - description: List models using the OpenAI API. - operationId: openai_list_models_v1_models_get + - Prompts + summary: Update Prompt + operationId: update_prompt_v1_prompts__prompt_id__post responses: '200': - description: A OpenAIListModelsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/OpenAIListModelsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3203,29 +2252,24 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/moderations: - post: - tags: - - Safety - summary: Run Moderation - description: |- - Create moderation. - - Classifies if text and/or image inputs are potentially harmful. - operationId: run_moderation_v1_moderations_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_moderations_Request' + parameters: + - name: prompt_id + in: path required: true + schema: + type: string + description: 'Path parameter: prompt_id' + delete: + tags: + - Prompts + summary: Delete Prompt + operationId: delete_prompt_v1_prompts__prompt_id__delete responses: '200': - description: A moderation object. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ModerationObject' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3238,29 +2282,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/safety/run-shield: - post: - tags: - - Safety - summary: Run Shield - description: |- - Run shield. - - Run a shield. - operationId: run_shield_v1_safety_run_shield_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_safety_run_shield_Request' + parameters: + - name: prompt_id + in: path required: true + schema: + type: string + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/versions: + get: + tags: + - Prompts + summary: List Prompt Versions + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get responses: '200': - description: A RunShieldResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/RunShieldResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3273,20 +2313,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/shields/{identifier}: - get: + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/set-default-version: + post: tags: - - Shields - summary: Get Shield - description: Get a shield by its identifier. - operationId: get_shield_v1_shields__identifier__get + - Prompts + summary: Set Default Version + operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post responses: '200': - description: A Shield. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Shield' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3300,26 +2345,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: identifier + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: identifier' - /v1/shields: + description: 'Path parameter: prompt_id' + /v1/conversations/{conversation_id}/items: get: tags: - - Shields - summary: List Shields - description: List all shields. - operationId: list_shields_v1_shields_get + - Conversations + summary: List Items + operationId: list_items_v1_conversations__conversation_id__items_get responses: '200': - description: A ListShieldsResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ListShieldsResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3332,23 +2375,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1beta/datasetio/append-rows/{dataset_id}: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' post: tags: - - Datasetio - summary: Append Rows - description: Append rows to a dataset. - operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post - requestBody: - content: - application/json: - schema: - items: - additionalProperties: true - type: object - type: array - title: Rows - required: true + - Conversations + summary: Add Items + operationId: add_items_v1_conversations__conversation_id__items_post responses: '200': description: Successful Response @@ -3368,181 +2406,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: dataset_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: dataset_id' - /v1beta/datasetio/iterrows/{dataset_id}: - get: + description: 'Path parameter: conversation_id' + /v1/conversations: + post: tags: - - Datasetio - summary: Iterrows - 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. - operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get - parameters: - - name: limit - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - title: Limit - - name: start_index - in: query - required: false - schema: - anyOf: - - type: integer - - type: 'null' - title: Start Index - - name: dataset_id - in: path - required: true - schema: - type: string - description: 'Path parameter: dataset_id' - responses: - '200': - description: A PaginatedResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedResponse' - '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 - /v1beta/datasets/{dataset_id}: - get: - tags: - - Datasets - summary: Get Dataset - description: Get a dataset by its ID. - operationId: get_dataset_v1beta_datasets__dataset_id__get - 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' - parameters: - - name: dataset_id - in: path - required: true - schema: - type: string - description: 'Path parameter: dataset_id' - /v1beta/datasets: - get: - tags: - - Datasets - summary: List Datasets - description: List all datasets. - operationId: list_datasets_v1beta_datasets_get - responses: - '200': - description: A ListDatasetsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListDatasetsResponse' - '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: - post: - tags: - - Scoring - summary: Score - description: Score a list of rows. - 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: - - Scoring - summary: Score Batch - description: Score a batch of rows. - operationId: score_batch_v1_scoring_score_batch_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_scoring_score_batch_Request' - required: true + - Conversations + summary: Create Conversation + operationId: create_conversation_v1_conversations_post responses: '200': - description: A ScoreBatchResponse. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ScoreBatchResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3555,20 +2436,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring-functions/{scoring_fn_id}: + /v1/conversations/{conversation_id}: get: tags: - - Scoring Functions - summary: Get Scoring Function - description: Get a scoring function by its ID. - operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get + - Conversations + summary: Get Conversation + operationId: get_conversation_v1_conversations__conversation_id__get responses: '200': - description: A ScoringFn. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/ScoringFn' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3582,58 +2461,23 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: scoring_fn_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: scoring_fn_id' - /v1/scoring-functions: - get: - tags: - - Scoring Functions - summary: List Scoring Functions - description: List all scoring functions. - 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 - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + description: 'Path parameter: conversation_id' post: tags: - - Eval - summary: Evaluate Rows - description: Evaluate a list of rows on a benchmark. - operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_eval_benchmarks_benchmark_id_evaluations_Request' - required: true + - Conversations + summary: Update Conversation + operationId: update_conversation_v1_conversations__conversation_id__post responses: '200': - description: EvaluateResponse object containing generations and scores. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3647,26 +2491,23 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: - get: + description: 'Path parameter: conversation_id' + delete: tags: - - Eval - summary: Job Status - description: Get the status of a job. - operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get + - Conversations + summary: Openai Delete Conversation + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete responses: '200': - description: The status of the evaluation job. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/Job' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3680,24 +2521,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id - in: path - required: true - schema: - type: string - description: 'Path parameter: benchmark_id' - - name: job_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: job_id' - delete: + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items/{item_id}: + get: tags: - - Eval - summary: Job Cancel - description: Cancel a job. - operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete + - Conversations + summary: Retrieve + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get responses: '200': description: Successful Response @@ -3717,32 +2552,29 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: benchmark_id' - - name: job_id + description: 'Path parameter: conversation_id' + - name: item_id in: path required: true schema: type: string - description: 'Path parameter: job_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: - get: + description: 'Path parameter: item_id' + delete: tags: - - Eval - summary: Job Result - description: Get the result of a job. - operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get + - Conversations + summary: Openai Delete Conversation Item + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete responses: '200': - description: The result of the job. + description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' + schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3756,7525 +2588,5874 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: benchmark_id' - - name: job_id + description: 'Path parameter: conversation_id' + - name: item_id in: path required: true schema: type: string - description: 'Path parameter: job_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs: - post: - tags: - - Eval - summary: Run Eval - description: Run an evaluation on a benchmark. - operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BenchmarkConfig' - required: true - responses: - '200': - 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': - 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: benchmark_id - in: path - required: true - schema: - type: string - description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks/{benchmark_id}: - get: - tags: - - Benchmarks - summary: Get Benchmark - description: Get a benchmark by its ID. - operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get - responses: - '200': - description: A Benchmark. - content: - application/json: - schema: - $ref: '#/components/schemas/Benchmark' - '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: benchmark_id - in: path - required: true - schema: + description: 'Path parameter: item_id' +components: + responses: + BadRequest400: + description: The request was invalid or malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 400 + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 429 + title: Too Many Requests + detail: You have exceeded the rate limit. Please try again later. + InternalServerError500: + description: The server encountered an unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 500 + title: Internal Server Error + detail: An unexpected error occurred + DefaultError: + description: An error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + schemas: + ImageContentItem: + description: A image content item + properties: + type: + const: image + default: image + title: Type type: string - description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks: - get: - tags: - - Benchmarks - summary: List Benchmarks - description: List all benchmarks. - operationId: list_benchmarks_v1alpha_eval_benchmarks_get - responses: - '200': - description: A ListBenchmarksResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListBenchmarksResponse' - '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 - /v1alpha/post-training/job/cancel: - post: - tags: - - Post Training - summary: Cancel Training Job - description: Cancel a training job. - operationId: cancel_training_job_v1alpha_post_training_job_cancel_post - parameters: - - name: job_uuid - in: query - required: true - schema: + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + TextContentItem: + description: A text content item + properties: + type: + const: text + default: text + title: Type type: string - title: Job Uuid - 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 - /v1alpha/post-training/job/artifacts: - get: - tags: - - Post Training - summary: Get Training Job Artifacts - description: Get the artifacts of a training job. - operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get - parameters: - - name: job_uuid - in: query - required: true - schema: + text: + title: Text type: string - title: Job Uuid - responses: - '200': - description: A PostTrainingJobArtifactsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' - '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 - /v1alpha/post-training/job/status: - get: - tags: - - Post Training - summary: Get Training Job Status - description: Get the status of a training job. - operationId: get_training_job_status_v1alpha_post_training_job_status_get - parameters: - - name: job_uuid - in: query - required: true - schema: + required: + - text + title: TextContentItem + type: object + URL: + description: A URL reference to external content. + properties: + uri: + title: Uri type: string - title: Job Uuid - responses: - '200': - description: A PostTrainingJobStatusResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJobStatusResponse' - '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 - /v1alpha/post-training/jobs: - get: - tags: - - Post Training - summary: Get Training Jobs - description: Get all training jobs. - operationId: get_training_jobs_v1alpha_post_training_jobs_get - responses: - '200': - description: A ListPostTrainingJobsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListPostTrainingJobsResponse' - '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' - /v1alpha/post-training/preference-optimize: - post: - tags: - - Post Training - summary: Preference Optimize - description: Run preference optimization of a model. - operationId: preference_optimize_v1alpha_post_training_preference_optimize_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_post_training_preference_optimize_Request' - required: true - responses: - '200': - description: A PostTrainingJob. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' - '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' - /v1alpha/post-training/supervised-fine-tune: - post: - tags: - - Post Training - summary: Supervised Fine Tune - description: Run supervised fine-tuning of a model. - operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_post_training_supervised_fine_tune_Request' - required: true - responses: - '200': - description: A PostTrainingJob. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' - '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/tools/{tool_name}: - get: - tags: - - Tool Groups - summary: Get Tool - description: Get a tool by its name. - operationId: get_tool_v1_tools__tool_name__get - responses: - '200': - description: A ToolDef. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDef' - '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: tool_name - in: path - required: true - schema: - type: string - description: 'Path parameter: tool_name' - /v1/toolgroups/{toolgroup_id}: - get: - tags: - - Tool Groups - summary: Get Tool Group - description: Get a tool group by its ID. - operationId: get_tool_group_v1_toolgroups__toolgroup_id__get - responses: - '200': - description: A ToolGroup. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolGroup' - '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: toolgroup_id - in: path - required: true - schema: - type: string - description: 'Path parameter: toolgroup_id' - /v1/toolgroups: - get: - tags: - - Tool Groups - summary: List Tool Groups - description: List tool groups with optional provider. - 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 - /v1/tools: - get: - tags: - - Tool Groups - summary: List Tools - description: List tools with optional tool group. - operationId: list_tools_v1_tools_get - parameters: - - name: toolgroup_id - in: query - required: false - schema: + required: + - uri + title: URL + type: object + _URLOrData: + description: A URL or a base64 encoded string + properties: + url: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - 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/tool-runtime/invoke: - post: - tags: - - Tool Runtime - summary: Invoke Tool - description: Run a tool with the given arguments. - 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: - - Tool Runtime - summary: List Runtime Tools - description: List all tools in the runtime. - operationId: list_runtime_tools_v1_tool_runtime_list_tools_get - parameters: - - name: tool_group_id - in: query - required: false - schema: + nullable: true + title: URL + data: anyOf: - type: string - type: 'null' - title: Tool Group Id - - name: mcp_endpoint - in: query - required: false - schema: + contentEncoding: base64 + nullable: true + title: _URLOrData + type: object + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + GreedySamplingStrategy: + description: Greedy sampling strategy that selects the highest probability token at each step. + properties: + type: + const: greedy + default: greedy + title: Type + type: string + title: GreedySamplingStrategy + type: object + TopKSamplingStrategy: + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. + 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. + properties: + type: + const: top_p + default: top_p + title: Type + type: string + temperature: anyOf: - - $ref: '#/components/schemas/URL' + - type: number + minimum: 0.0 - type: 'null' - title: Mcp Endpoint - 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/files/{file_id}: - get: - tags: - - Files - summary: Openai Retrieve File - description: |- - Retrieve file. - - Returns information about a specific file. - operationId: openai_retrieve_file_v1_files__file_id__get - responses: - '200': - description: An OpenAIFileObject containing file information. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIFileObject' - '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: file_id - in: path - required: true - schema: + top_p: + anyOf: + - type: number + - type: 'null' + default: 0.95 + required: + - temperature + title: TopPSamplingStrategy + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type type: string - description: 'Path parameter: file_id' - delete: - tags: - - Files - summary: Openai Delete File - description: Delete file. - operationId: openai_delete_file_v1_files__file_id__delete - responses: - '200': - description: An OpenAIFileDeleteResponse indicating successful deletion. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIFileDeleteResponse' - '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: file_id - in: path - required: true - schema: + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + properties: + type: + const: json_schema + default: json_schema + title: Type type: string - description: 'Path parameter: file_id' - /v1/files: - get: - tags: - - Files - summary: Openai List Files - description: |- - List files. - - Returns a list of files that belong to the user's organization. - operationId: openai_list_files_v1_files_get - parameters: - - name: after - in: query - required: false - schema: + json_schema: + additionalProperties: true + title: Json Schema + type: object + required: + - json_schema + title: JsonSchemaResponseFormat + type: object + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + OpenAIChatCompletionContentPartImageParam: + description: Image content part for OpenAI-compatible chat completion messages. + properties: + type: + const: image_url + default: image_url + title: Type + type: string + image_url: + $ref: '#/components/schemas/OpenAIImageURL' + required: + - image_url + title: OpenAIChatCompletionContentPartImageParam + type: object + OpenAIChatCompletionContentPartTextParam: + description: Text content part for OpenAI-compatible chat completion messages. + properties: + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIChatCompletionContentPartTextParam + type: object + OpenAIFile: + properties: + type: + const: file + default: file + title: Type + type: string + file: + $ref: '#/components/schemas/OpenAIFileFile' + required: + - file + title: OpenAIFile + type: object + OpenAIFileFile: + properties: + file_data: anyOf: - type: string - type: 'null' - title: After - - name: limit - in: query - required: false - schema: + nullable: true + file_id: anyOf: - - type: integer + - type: string - type: 'null' - default: 10000 - title: Limit - - name: order - in: query - required: false - schema: + nullable: true + filename: anyOf: - - $ref: '#/components/schemas/Order' + - type: string - type: 'null' - default: desc - title: Order - - name: purpose - in: query - required: false - schema: + nullable: true + title: OpenAIFileFile + type: object + OpenAIImageURL: + description: Image URL specification for OpenAI-compatible chat completion messages. + properties: + url: + title: Url + type: string + detail: anyOf: - - $ref: '#/components/schemas/OpenAIFilePurpose' + - type: string - type: 'null' - title: Purpose - 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: - - Files - summary: Openai Upload File - description: |- - Upload file. - - Upload a file that can be used across various endpoints. - - The file upload should be a multipart form request with: - - file: The File object (not file name) to be uploaded. - - purpose: The intended purpose of the uploaded file. - - expires_after: Optional form values describing expiration for the file. - operationId: openai_upload_file_v1_files_post - requestBody: - required: true - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/Body_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}/content: - get: - tags: - - Files - summary: Openai Retrieve File Content - description: |- - Retrieve file content. - - Returns the contents of the specified file. - operationId: openai_retrieve_file_content_v1_files__file_id__content_get - responses: - '200': - description: The raw file content as a binary response. - content: - application/json: - schema: {} - '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: file_id - in: path - required: true - schema: + nullable: true + required: + - url + title: OpenAIImageURL + type: object + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + properties: + role: + const: assistant + default: assistant + title: Role type: string - description: 'Path parameter: file_id' - /v1/prompts: - get: - tags: - - Prompts - summary: List Prompts - description: List all prompts. - 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: - - Prompts - summary: Create Prompt - description: |- - Create prompt. - - Create a new prompt. - 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}: - get: - tags: - - Prompts - summary: Get Prompt - description: |- - Get prompt. - - Get a prompt by its identifier and optional version. - operationId: get_prompt_v1_prompts__prompt_id__get - parameters: - - name: version - in: query - required: false - schema: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + nullable: true + name: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + title: OpenAIAssistantMessageParam + type: object + OpenAIChatCompletionToolCall: + description: Tool call specification for OpenAI-compatible chat completion responses. + properties: + index: anyOf: - type: integer - type: 'null' - title: Version - - name: prompt_id - in: path - required: true - schema: + nullable: true + id: + anyOf: + - type: string + - type: 'null' + nullable: true + type: + const: function + default: function + title: Type type: string - description: 'Path parameter: prompt_id' - 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: - - Prompts - summary: Update Prompt - description: |- - Update prompt. - - Update an existing prompt (increments version). - 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: - - name: prompt_id - in: path - required: true - schema: + function: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction + - type: 'null' + nullable: true + title: OpenAIChatCompletionToolCallFunction + title: OpenAIChatCompletionToolCall + type: object + OpenAIChatCompletionToolCallFunction: + description: Function call details for OpenAI-compatible tool calls. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + arguments: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIChatCompletionToolCallFunction + type: object + OpenAIDeveloperMessageParam: + description: A message from the developer in an OpenAI-compatible chat completion request. + properties: + role: + const: developer + default: developer + title: Role type: string - description: 'Path parameter: prompt_id' - delete: - tags: - - Prompts - summary: Delete Prompt - description: |- - Delete prompt. - - Delete a prompt. - operationId: delete_prompt_v1_prompts__prompt_id__delete - 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 - parameters: - - name: prompt_id - in: path - required: true - schema: + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - content + title: OpenAIDeveloperMessageParam + type: object + OpenAISystemMessageParam: + description: A system message providing instructions or context to the model. + properties: + role: + const: system + default: system + title: Role type: string - description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/versions: - get: - tags: - - Prompts - summary: List Prompt Versions - description: |- - List prompt versions. - - List all versions of a specific prompt. - operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get - responses: - '200': - description: A ListPromptsResponse containing all versions of the prompt. - 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' - parameters: - - name: prompt_id - in: path - required: true - schema: + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - content + title: OpenAISystemMessageParam + type: object + OpenAIToolMessageParam: + description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. + properties: + role: + const: tool + default: tool + title: Role + type: string + tool_call_id: + title: Tool Call Id type: string - description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/set-default-version: - post: - tags: - - Prompts - summary: Set Default Version - description: |- - Set prompt version. - - Set which version of a prompt should be the default in get_prompt (latest). - 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: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + required: + - tool_call_id + - content + title: OpenAIToolMessageParam + type: object + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. + properties: + role: + const: user + default: user + title: Role type: string - description: 'Path parameter: prompt_id' - /v1/conversations/{conversation_id}/items: - get: - tags: - - Conversations - summary: List Items - description: |- - List items. - - List items in the conversation. - operationId: list_items_v1_conversations__conversation_id__items_get - parameters: - - name: after - in: query - required: false - schema: + 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' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: anyOf: - type: string - type: 'null' - title: After - - name: limit - in: query - required: false - schema: + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object + OpenAIMessageParam: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + OpenAIJSONSchema: + description: JSON schema specification for OpenAI-compatible structured response format. + properties: + name: + title: Name + type: string + description: anyOf: - - type: integer + - type: string - type: 'null' - title: Limit - - name: order - in: query - required: false - schema: + strict: anyOf: - - enum: - - asc - - desc - type: string + - type: boolean - type: 'null' - title: Order - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: include - in: query - required: false schema: anyOf: - - type: array - items: - $ref: '#/components/schemas/ConversationItemInclude' - - type: 'null' - title: Include - 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: - - Conversations - summary: Add Items - description: |- - Create items. - - Create items in the conversation. - 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: - post: - tags: - - Conversations - summary: Create Conversation - description: |- - Create a conversation. - - Create a conversation. - 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}: - get: - tags: - - Conversations - summary: Get Conversation - description: |- - Retrieve a conversation. - - Get a conversation with the given ID. - operationId: get_conversation_v1_conversations__conversation_id__get - responses: - '200': - description: The 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' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - post: - tags: - - Conversations - summary: Update Conversation - description: |- - Update a conversation. - - Update a conversation's metadata with the given ID. - operationId: update_conversation_v1_conversations__conversation_id__post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/_conversations_conversation_id_Request' - required: true - responses: - '200': - description: The updated 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' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - delete: - tags: - - Conversations - summary: Openai Delete Conversation - description: |- - Delete a conversation. - - Delete a conversation with the given ID. - operationId: openai_delete_conversation_v1_conversations__conversation_id__delete - responses: - '200': - description: The deleted conversation resource. - content: - application/json: - schema: - $ref: '#/components/schemas/ConversationDeletedResource' - '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: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - /v1/conversations/{conversation_id}/items/{item_id}: - get: - tags: - - Conversations - summary: Retrieve - description: |- - Retrieve an item. - - Retrieve a conversation item. - operationId: retrieve_v1_conversations__conversation_id__items__item_id__get - responses: - '200': - description: The conversation item. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseMessage' - '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: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: item_id - in: path - required: true - schema: - type: string - description: 'Path parameter: item_id' - delete: - tags: - - Conversations - summary: Openai Delete Conversation Item - description: |- - Delete an item. - - Delete a conversation item. - operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete - responses: - '200': - description: The deleted item resource. - content: - application/json: - schema: - $ref: '#/components/schemas/ConversationItemDeletedResource' - '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: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: item_id - in: path - required: true - schema: - type: string - description: 'Path parameter: item_id' -components: - schemas: - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: Types of aggregation functions for scoring results. - AllowedToolsFilter: - properties: - tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' - type: object - title: AllowedToolsFilter - description: Filter configuration for restricting which MCP tools can be used. - ApprovalFilter: - properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - never: - anyOf: - - items: - type: string - type: array + - additionalProperties: true + type: object - type: 'null' + title: OpenAIJSONSchema type: object - title: ApprovalFilter - description: Filter configuration for MCP tool approval requirements. - ArrayType: + OpenAIResponseFormatJSONObject: + description: JSON object response format for OpenAI-compatible chat completion requests. properties: type: - type: string - const: array + const: json_object + default: json_object title: Type - default: array + type: string + title: OpenAIResponseFormatJSONObject type: object - title: ArrayType - description: Parameter type for array values. - BasicScoringFnParams: + OpenAIResponseFormatJSONSchema: + description: JSON schema response format for OpenAI-compatible chat completion requests. properties: type: + const: json_schema + default: json_schema + title: Type type: string - const: basic + json_schema: + $ref: '#/components/schemas/OpenAIJSONSchema' + required: + - json_schema + title: OpenAIResponseFormatJSONSchema + type: object + OpenAIResponseFormatText: + description: Text response format for OpenAI-compatible chat completion requests. + properties: + type: + const: text + default: text 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: string + title: OpenAIResponseFormatText type: object - title: BasicScoringFnParams - description: Parameters for basic scoring function configuration. - Batch: + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + VectorStoreChunkingStrategyAuto: + description: Automatic chunking strategy for vector store files. properties: - id: + type: + const: auto + default: auto + title: Type type: string - title: Id - completion_window: + title: VectorStoreChunkingStrategyAuto + type: object + VectorStoreChunkingStrategyStatic: + description: Static chunking strategy with configurable parameters. + properties: + type: + const: static + default: static + title: Type type: string - title: Completion Window - created_at: + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + required: + - static + title: VectorStoreChunkingStrategyStatic + type: object + VectorStoreChunkingStrategyStaticConfig: + description: Configuration for static chunking strategy. + properties: + chunk_overlap_tokens: + default: 400 + title: Chunk Overlap Tokens 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: + max_chunk_size_tokens: + default: 800 + maximum: 4096 + minimum: 100 + title: Max Chunk Size Tokens + type: integer + title: VectorStoreChunkingStrategyStaticConfig + type: object + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + VectorStoreFileStatus: + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + OpenAIResponseInputMessageContentFile: + description: File content for input messages in OpenAI response format. + properties: + type: + const: input_file + default: input_file + title: Type type: string - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - title: Status - cancelled_at: - anyOf: - - type: integer - - type: 'null' - cancelling_at: - anyOf: - - type: integer - - type: 'null' - completed_at: - anyOf: - - type: integer - - type: 'null' - error_file_id: + file_data: anyOf: - type: string - type: 'null' - errors: - anyOf: - - $ref: '#/components/schemas/Errors' - title: Errors - - type: 'null' - title: Errors - expired_at: - anyOf: - - type: integer - - type: 'null' - expires_at: - anyOf: - - type: integer - - type: 'null' - failed_at: - anyOf: - - type: integer - - type: 'null' - finalizing_at: - anyOf: - - type: integer - - type: 'null' - in_progress_at: - anyOf: - - type: integer - - type: 'null' - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - model: + nullable: true + file_id: anyOf: - type: string - type: 'null' - output_file_id: + nullable: true + file_url: anyOf: - type: string - type: 'null' - request_counts: - anyOf: - - $ref: '#/components/schemas/BatchRequestCounts' - title: BatchRequestCounts - - type: 'null' - title: BatchRequestCounts - usage: + nullable: true + filename: anyOf: - - $ref: '#/components/schemas/BatchUsage' - title: BatchUsage + - type: string - type: 'null' - title: BatchUsage - additionalProperties: true + nullable: true + title: OpenAIResponseInputMessageContentFile type: object - required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - BatchError: + OpenAIResponseInputMessageContentImage: + description: Image content for input messages in OpenAI response format. properties: - code: - anyOf: - - type: string - - type: 'null' - line: - anyOf: - - type: integer - - type: 'null' - message: + detail: + default: auto + title: Detail + type: string + enum: + - low + - high + - auto + type: + const: input_image + default: input_image + title: Type + type: string + file_id: anyOf: - type: string - type: 'null' - param: + nullable: true + image_url: anyOf: - type: string - type: 'null' - additionalProperties: true + nullable: true + title: OpenAIResponseInputMessageContentImage type: object - title: BatchError - BatchRequestCounts: + OpenAIResponseInputMessageContentText: + description: Text content for input messages in OpenAI response format. properties: - completed: - type: integer - title: Completed - failed: - type: integer - title: Failed - total: - type: integer - title: Total - additionalProperties: true - type: object + text: + title: Text + type: string + type: + const: input_text + default: input_text + title: Type + type: string required: - - completed - - failed - - total - title: BatchRequestCounts - BatchUsage: + - text + title: OpenAIResponseInputMessageContentText + type: object + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + OpenAIResponseAnnotationCitation: + description: URL citation annotation for referencing external web resources. properties: - input_tokens: - type: integer - title: Input Tokens - input_tokens_details: - $ref: '#/components/schemas/InputTokensDetails' - output_tokens: + type: + const: url_citation + default: url_citation + title: Type + type: string + end_index: + title: End Index type: integer - title: Output Tokens - output_tokens_details: - $ref: '#/components/schemas/OutputTokensDetails' - total_tokens: + start_index: + title: Start Index type: integer - title: Total Tokens - additionalProperties: true - type: object + title: + title: Title + type: string + url: + title: Url + type: string required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage - Benchmark: + - end_index + - start_index + - title + - url + title: OpenAIResponseAnnotationCitation + type: object + OpenAIResponseAnnotationContainerFileCitation: properties: - identifier: + type: + const: container_file_citation + default: container_file_citation + title: Type type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: + container_id: + title: Container Id type: string - title: Provider Id - description: ID of the provider that owns this resource - type: + end_index: + title: End Index + type: integer + file_id: + title: File Id type: string - const: benchmark - title: Type - default: benchmark - dataset_id: + filename: + title: Filename 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 + start_index: + title: Start Index + type: integer required: - - identifier - - provider_id - - dataset_id - - scoring_functions - title: Benchmark - description: A benchmark resource for evaluating model performance. - BenchmarkConfig: - properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - scoring_params: - additionalProperties: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: object - title: Scoring Params - description: Map between scoring function id and parameters for each scoring function you want to run - num_examples: - anyOf: - - type: integer - - type: 'null' - description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + - container_id + - end_index + - file_id + - filename + - start_index + title: OpenAIResponseAnnotationContainerFileCitation type: object - required: - - eval_candidate - title: BenchmarkConfig - description: A benchmark configuration for evaluation. - Body_openai_upload_file_v1_files_post: + OpenAIResponseAnnotationFileCitation: + description: File citation annotation for referencing specific files in response content. properties: - file: + type: + const: file_citation + default: file_citation + title: Type type: string - format: binary - title: File - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' - expires_after: - anyOf: - - $ref: '#/components/schemas/ExpiresAfter' - title: ExpiresAfter - - type: 'null' - title: ExpiresAfter - type: object + file_id: + title: File Id + type: string + filename: + title: Filename + type: string + index: + title: Index + type: integer required: - - file - - purpose - title: Body_openai_upload_file_v1_files_post - BooleanType: + - file_id + - filename + - index + title: OpenAIResponseAnnotationFileCitation + type: object + OpenAIResponseAnnotationFilePath: properties: type: - type: string - const: boolean + const: file_path + default: file_path title: Type - default: boolean + type: string + file_id: + title: File Id + type: string + index: + title: Index + type: integer + required: + - file_id + - index + title: OpenAIResponseAnnotationFilePath type: object - title: BooleanType - description: Parameter type for boolean values. - ChatCompletionInputType: + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + OpenAIResponseContentPartRefusal: + description: Refusal content within a streamed response part. properties: type: - type: string - const: chat_completion_input + const: refusal + default: refusal title: Type - default: chat_completion_input + type: string + refusal: + title: Refusal + type: string + required: + - refusal + title: OpenAIResponseContentPartRefusal type: object - title: ChatCompletionInputType - description: Parameter type for chat completion input. - Checkpoint: + OpenAIResponseOutputMessageContentOutputText: properties: - identifier: + text: + title: Text type: string - title: Identifier - created_at: - type: string - format: date-time - title: Created At - epoch: - type: integer - title: Epoch - post_training_job_id: + type: + const: output_text + default: output_text + title: Type type: string - title: Post Training Job Id - path: + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations + type: array + required: + - text + title: OpenAIResponseOutputMessageContentOutputText + type: object + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + MCPListToolsTool: + description: Tool definition returned by MCP list tools operation. + properties: + input_schema: + additionalProperties: true + title: Input Schema + type: object + name: + title: Name type: string - title: Path - training_metrics: + description: anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' - title: PostTrainingMetric + - type: string - type: 'null' - title: PostTrainingMetric + nullable: true + required: + - input_schema + - name + title: MCPListToolsTool 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: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - Chunk-Input: + - 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 - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + discriminator: mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - chunk_id: + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: + enum: + - system + - developer + - user + - assistant + default: system + type: + const: message + default: message + title: Type + type: string + id: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' - chunk_metadata: + nullable: true + status: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' - title: ChunkMetadata - type: object + nullable: true required: - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - Chunk-Output: + - role + title: OpenAIResponseMessage + type: object + OpenAIResponseOutputMessageFileSearchToolCall: + description: File search tool call output message for OpenAI responses. properties: - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - type: array - title: list[ImageContentItem-Output | TextContentItem] - title: string | list[ImageContentItem-Output | TextContentItem] - chunk_id: + id: + title: Id type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: + 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: - type: number + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - title: ChunkMetadata - type: object + nullable: true required: - - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - ChunkMetadata: + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall + type: object + OpenAIResponseOutputMessageFileSearchToolCallResults: + description: Search results returned by the file search operation. properties: - chunk_id: - anyOf: - - type: string - - type: 'null' - document_id: - anyOf: - - type: string - - type: 'null' - source: - anyOf: - - type: string - - type: 'null' - created_timestamp: - anyOf: - - type: integer - - type: 'null' - updated_timestamp: - anyOf: - - type: integer - - type: 'null' - chunk_window: - anyOf: - - type: string - - type: 'null' - chunk_tokenizer: + 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. + 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' - chunk_embedding_model: + nullable: true + status: anyOf: - type: string - type: 'null' - chunk_embedding_dimension: - anyOf: - - type: integer - - type: 'null' - content_token_count: - anyOf: - - type: integer - - type: 'null' - metadata_token_count: - anyOf: - - type: integer - - type: 'null' + nullable: true + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall type: object - title: 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. - CompletionInputType: + OpenAIResponseOutputMessageMCPCall: + description: Model Context Protocol (MCP) call output message for OpenAI responses. properties: - type: + id: + title: Id type: string - const: completion_input + type: + const: mcp_call + default: mcp_call title: Type - default: completion_input - type: object - title: CompletionInputType - description: Parameter type for completion input. - Conversation: - properties: - id: type: string - title: Id - description: The unique ID of the conversation. - object: + arguments: + title: Arguments 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: + name: + title: Name + type: string + server_label: + title: Server Label + type: string + error: anyOf: - - additionalProperties: - type: string - type: object + - type: string - 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. - items: + nullable: true + output: anyOf: - - items: - additionalProperties: true - type: object - type: array + - type: string - type: 'null' - description: Initial items to include in the conversation context. You may add up to 20 items at a time. - type: object + nullable: true required: - id - - created_at - title: Conversation - description: OpenAI-compatible conversation object. - ConversationDeletedResource: + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + type: object + OpenAIResponseOutputMessageMCPListTools: + description: MCP list tools output message containing available tools from an MCP server. properties: id: - type: string title: Id - description: The deleted conversation identifier - object: type: string - title: Object - description: Object type - default: conversation.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true - type: object + type: + const: mcp_list_tools + default: mcp_list_tools + title: Type + type: string + server_label: + title: Server Label + type: string + tools: + items: + $ref: '#/components/schemas/MCPListToolsTool' + title: Tools + type: array required: - id - title: ConversationDeletedResource - description: Response for deleted conversation. - ConversationItemDeletedResource: + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools + type: object + OpenAIResponseOutputMessageWebSearchToolCall: + description: Web search tool call output message for OpenAI responses. properties: id: - type: string title: Id - description: The deleted item identifier - object: type: string - title: Object - description: Object type - default: conversation.item.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true - type: object + status: + title: Status + type: string + type: + const: web_search_call + default: web_search_call + title: Type + type: string required: - id - title: ConversationItemDeletedResource - description: Response for deleted conversation item. - 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: + - status + title: OpenAIResponseOutputMessageWebSearchToolCall + type: object + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + AllowedToolsFilter: + description: Filter configuration for restricting which MCP tools can be used. properties: - object: - type: string - title: Object - description: Object type - default: list - data: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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' - title: OpenAIResponseMessage-Output | ... (9 variants) - type: array - title: Data - description: List of conversation items - first_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the first item in the list - last_id: + tool_names: anyOf: - - type: string + - items: + type: string + type: array - type: 'null' - description: The ID of the last item in the list - has_more: - type: boolean - title: Has More - description: Whether there are more items available - default: false + nullable: true + title: AllowedToolsFilter type: object - required: - - data - title: ConversationItemList - description: List of conversation items with pagination. - DPOAlignmentConfig: + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. properties: - beta: - type: number - title: Beta - loss_type: - $ref: '#/components/schemas/DPOLossType' - default: sigmoid + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + title: ApprovalFilter type: object - required: - - beta - title: DPOAlignmentConfig - description: Configuration for Direct Preference Optimization (DPO) alignment. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: + OpenAIResponseInputToolFileSearch: + description: File search tool configuration for OpenAI response inputs. properties: - dataset_id: + type: + const: file_search + default: file_search + title: Type 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: + vector_store_ids: + items: + type: string + title: Vector Store Ids + type: array + filters: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' - packed: + nullable: true + max_num_results: anyOf: - - type: boolean + - maximum: 50 + minimum: 1 + type: integer - type: 'null' - default: false - train_on_input: + default: 10 + ranking_options: anyOf: - - type: boolean + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions - type: 'null' - default: false - type: object + nullable: true + title: SearchRankingOptions required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: Configuration for training data and data loading. - Dataset: + - vector_store_ids + title: OpenAIResponseInputToolFileSearch + type: object + OpenAIResponseInputToolFunction: + description: Function tool configuration for OpenAI response inputs. properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: - type: string - title: Provider Id - description: ID of the provider that owns this resource type: - type: string - const: dataset + const: function + default: function title: Type - default: dataset - purpose: - $ref: '#/components/schemas/DatasetPurpose' - source: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - 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. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - 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. - EfficiencyConfig: - properties: - enable_activation_checkpointing: - anyOf: - - type: boolean - - type: 'null' - default: false - enable_activation_offloading: + type: string + name: + title: Name + type: string + description: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - memory_efficient_fsdp_wrap: + nullable: true + parameters: anyOf: - - type: boolean + - additionalProperties: true + type: object - type: 'null' - default: false - fsdp_cpu_offload: + strict: anyOf: - type: boolean - type: 'null' - default: false + nullable: true + required: + - name + - parameters + title: OpenAIResponseInputToolFunction type: object - title: EfficiencyConfig - description: Configuration for memory and compute efficiency optimizations. - Errors: + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: - data: + type: + const: mcp + default: mcp + title: Type + type: string + server_label: + title: Server Label + type: string + server_url: + title: Server Url + type: string + headers: anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array + - additionalProperties: true + type: object - type: 'null' - object: + nullable: true + require_approval: anyOf: - - type: string + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + title: ApprovalFilter + default: never + title: string | ApprovalFilter + allowed_tools: + anyOf: + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - 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 + title: list[string] | AllowedToolsFilter + nullable: true required: - - generations - - scores - title: EvaluateResponse - description: The response from an evaluation. - ExpiresAfter: - properties: - anchor: - type: string - const: created_at - title: Anchor - seconds: - type: integer - maximum: 2592000.0 - minimum: 3600.0 - title: Seconds + - server_label + - server_url + title: OpenAIResponseInputToolMCP type: object - required: - - anchor - - seconds - title: 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) - GreedySamplingStrategy: + OpenAIResponseInputToolWebSearch: + description: Web search tool configuration for OpenAI response inputs. properties: type: - type: string - const: greedy + default: web_search title: Type - default: greedy + type: string + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + search_context_size: + anyOf: + - pattern: ^low|medium|high$ + type: string + - type: 'null' + default: medium + title: OpenAIResponseInputToolWebSearch type: object - title: GreedySamplingStrategy - description: Greedy sampling strategy that selects the highest probability token at each step. - HealthInfo: + SearchRankingOptions: + description: Options for ranking and filtering search results. properties: - status: - $ref: '#/components/schemas/HealthStatus' + ranker: + anyOf: + - type: string + - type: 'null' + nullable: true + score_threshold: + anyOf: + - type: number + - type: 'null' + default: 0.0 + title: SearchRankingOptions type: object - required: - - status - title: HealthInfo - description: Health status information for the service. - HealthStatus: - type: string - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - ImageContentItem-Input: + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. properties: type: - type: string - const: image + const: mcp + default: mcp title: Type - default: image - image: - $ref: '#/components/schemas/_URLOrData' - type: object - required: - - image - title: ImageContentItem - description: A image content item - 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 - InputTokensDetails: - properties: - cached_tokens: - type: integer - title: Cached Tokens - additionalProperties: true - type: object - required: - - cached_tokens - title: InputTokensDetails - Job: - properties: - job_id: + server_label: + title: Server Label type: string - title: Job Id - status: - $ref: '#/components/schemas/JobStatus' - type: object + allowed_tools: + anyOf: + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter + - type: 'null' + title: list[string] | AllowedToolsFilter + nullable: true required: - - job_id - - status - title: Job - description: A job execution instance with status tracking. - JobStatus: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - description: Status of a job execution. - JsonType: - properties: - type: - type: string - const: json - title: Type - default: json + - server_label + title: OpenAIResponseToolMCP type: object - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. properties: type: - type: string - const: llm_as_judge + const: output_text + default: output_text title: Type - default: llm_as_judge - judge_model: type: string - title: Judge Model - prompt_template: - anyOf: - - type: string - - type: 'null' - judge_score_regexes: + text: + title: Text + type: string + annotations: 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. - ListBatchesResponse: - properties: - object: - type: string - const: list - title: Object - default: list - data: - items: - $ref: '#/components/schemas/Batch' + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations type: array - title: Data - description: List of batch objects - first_id: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - last_id: + logprobs: anyOf: - - type: string + - items: + additionalProperties: true + type: object + type: array - type: 'null' - description: ID of the last batch in the list - has_more: - type: boolean - title: Has More - description: Whether there are more batches available - default: false - type: object - required: - - data - title: ListBatchesResponse - description: Response containing a list of batch objects. - ListBenchmarksResponse: - properties: - data: - items: - $ref: '#/components/schemas/Benchmark' - type: array - title: Data - type: object + nullable: true required: - - data - title: ListBenchmarksResponse - ListDatasetsResponse: - properties: - data: - items: - $ref: '#/components/schemas/Dataset' - type: array - title: Data + - text + title: OpenAIResponseContentPartOutputText type: object - required: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - ListOpenAIChatCompletionResponse: + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. properties: - data: - items: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: - type: string - title: First Id - last_id: + type: + const: reasoning_text + default: reasoning_text + title: Type type: string - title: Last Id - object: + text: + title: Text type: string - const: list - title: Object - default: list - type: object required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIChatCompletionResponse - description: Response from listing OpenAI-compatible chat completions. - ListOpenAIFileResponse: + - text + title: OpenAIResponseContentPartReasoningText + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. properties: - data: - items: - $ref: '#/components/schemas/OpenAIFileObject' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: - type: string - title: First Id - last_id: + type: + const: summary_text + default: summary_text + title: Type type: string - title: Last Id - object: + text: + title: Text type: string - const: list - title: Object - default: list - type: object required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIFileResponse - description: Response for listing files in OpenAI Files API. - ListOpenAIResponseInputItem: + - text + title: OpenAIResponseContentPartReasoningSummary + type: object + OpenAIResponseError: + description: Error details for failed OpenAI response requests. properties: - data: - items: - $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' - type: array - title: Data - object: + code: + title: Code + type: string + message: + title: Message type: string - const: list - title: Object - default: list - type: object required: - - data - title: ListOpenAIResponseInputItem - description: List container for OpenAI response input items. - ListOpenAIResponseObject: + - code + - message + title: OpenAIResponseError + type: object + OpenAIResponseObject: + description: Complete OpenAI response object containing generation results and metadata. properties: - data: - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput-Output' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: + created_at: + title: Created At + type: integer + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + nullable: true + title: OpenAIResponseError + id: + title: Id type: string - title: First Id - last_id: + model: + title: Model type: string - title: Last Id object: - type: string - const: list + const: response + default: response title: Object - default: list - type: object - required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject - description: Paginated list of OpenAI response objects with navigation metadata. - 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: + type: string + output: items: - $ref: '#/components/schemas/ProviderInfo' - type: array - title: Data - type: object - required: - - data - title: ListProvidersResponse - description: Response containing a list of all available providers. - 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. - ListScoringFunctionsResponse: - properties: - data: - items: - $ref: '#/components/schemas/ScoringFn' - 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 - ListToolDefsResponse: - properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - type: array - title: Data - type: object - required: - - data - title: ListToolDefsResponse - description: Response containing a list of tool definitions. - 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. - LoraFinetuningConfig: - properties: - type: - type: string - const: LoRA - title: Type - default: LoRA - lora_attn_modules: - items: - type: string + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output type: array - title: Lora Attn Modules - apply_lora_to_mlp: - type: boolean - title: Apply Lora To Mlp - apply_lora_to_output: + parallel_tool_calls: + default: false + title: Parallel Tool Calls type: boolean - title: Apply Lora To Output - rank: - type: integer - title: Rank - alpha: - type: integer - title: Alpha - use_dora: + previous_response_id: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - quantize_base: + nullable: true + prompt: anyOf: - - type: boolean + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' - default: false - type: object - required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - MCPListToolsTool: - properties: - input_schema: - additionalProperties: true - type: object - title: Input Schema - name: + nullable: true + title: OpenAIResponsePrompt + status: + title: Status type: string - title: Name - description: + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + tools: + anyOf: + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + nullable: true + truncation: anyOf: - type: string - type: 'null' - type: object - required: - - input_schema - - name - title: MCPListToolsTool - description: Tool definition returned by MCP list tools operation. - Model: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + nullable: true + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage + - type: 'null' + nullable: true + title: OpenAIResponseUsage + instructions: anyOf: - type: string - type: 'null' - description: Unique identifier for this resource in the provider - 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 + nullable: true + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + nullable: true required: - - identifier - - provider_id - title: Model - description: A model resource representing an AI model registered in Llama Stack. - ModelCandidate: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject + type: object + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' type: - type: string - const: model + const: response.completed + default: response.completed title: Type - default: model - model: type: string - title: Model - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: - anyOf: - - $ref: '#/components/schemas/SystemMessage' - title: SystemMessage - - type: 'null' - title: SystemMessage - type: object required: - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType - description: Enumeration of supported model types in Llama Stack. - ModerationObject: + - response + title: OpenAIResponseObjectStreamResponseCompleted + type: object + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. properties: - id: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id type: string - title: Id - model: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.added + default: response.content_part.added + title: Type 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. - ModerationObjectResults: - properties: - flagged: - type: boolean - title: Flagged - categories: - anyOf: - - additionalProperties: - type: boolean - type: object - - type: 'null' - category_applied_input_types: - anyOf: - - additionalProperties: - items: - type: string - type: array - type: object - - type: 'null' - category_scores: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - user_message: - anyOf: - - type: string - - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded type: object - required: - - flagged - title: ModerationObjectResults - description: A moderation object. - NumberType: + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. properties: - type: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id type: string - const: number + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.done + default: response.content_part.done title: Type - default: number + type: string + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone type: object - title: NumberType - description: Parameter type for numeric values. - ObjectType: + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' type: - type: string - const: object + const: response.created + default: response.created title: Type - default: object - type: object - title: ObjectType - description: Parameter type for object values. - OpenAIAssistantMessageParam-Input: - properties: - role: type: string - const: assistant - title: Role - default: assistant - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' + required: + - response + title: OpenAIResponseObjectStreamResponseCreated type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIAssistantMessageParam-Output: + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. properties: - role: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.failed + default: response.failed + title: Type type: string - const: assistant - title: Role - default: assistant - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIChatCompletion: + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. properties: - id: + item_id: + title: Item Id type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAIChoice-Output' - type: array - title: Choices - object: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type type: string - const: chat.completion - title: Object - default: chat.completion - created: + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - title: Created - model: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type type: string - title: Model - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - title: OpenAIChatCompletionUsage + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress type: object + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type + type: string required: - - id - - choices - - created - - model - title: OpenAIChatCompletion - description: Response from an OpenAI-compatible chat completion request. - OpenAIChatCompletionContentPartImageParam: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + title: Type type: string - const: image_url + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. + properties: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done title: Type - default: image_url - image_url: - $ref: '#/components/schemas/OpenAIImageURL' + type: string + required: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone type: object + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type + type: string required: - - image_url - title: OpenAIChatCompletionContentPartImageParam - description: Image content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionContentPartTextParam: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress + type: object + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer type: + const: response.incomplete + default: response.incomplete + title: Type type: string - const: text + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta title: Type - default: text - text: type: string - title: Text + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + properties: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type + type: string required: - - text - title: OpenAIChatCompletionContentPartTextParam - description: Text content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionRequestWithExtraBody: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. properties: - model: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type type: string - title: Model - messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' - title: OpenAIUserMessageParam-Input - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' - title: OpenAIAssistantMessageParam-Input - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: 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' - title: OpenAIUserMessageParam-Input | ... (5 variants) - type: array - minItems: 1 - title: Messages - frequency_penalty: - anyOf: - - type: number - - type: 'null' - function_call: - anyOf: - - type: string - - additionalProperties: true - type: object - - type: 'null' - title: string | object - functions: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - logit_bias: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - logprobs: - anyOf: - - type: boolean - - type: 'null' - max_completion_tokens: - anyOf: - - type: integer - - type: 'null' - max_tokens: - anyOf: - - type: integer - - type: 'null' - n: - anyOf: - - type: integer - - type: 'null' - parallel_tool_calls: - anyOf: - - type: boolean - - type: 'null' - presence_penalty: - anyOf: - - type: number - - type: 'null' - response_format: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - discriminator: - propertyName: type - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - - type: 'null' - title: Response Format - seed: - anyOf: - - type: integer - - type: 'null' - stop: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - type: 'null' - title: string | list[string] - stream: - anyOf: - - type: boolean - - type: 'null' - stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - temperature: - anyOf: - - type: number - - type: 'null' - tool_choice: - anyOf: - - type: string - - additionalProperties: true - type: object - - type: 'null' - title: string | object - tools: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - top_logprobs: - anyOf: - - type: integer - - type: 'null' - top_p: - anyOf: - - type: number - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible chat completion endpoint. - OpenAIChatCompletionToolCall: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. properties: - index: - anyOf: - - type: integer - - type: 'null' - id: - anyOf: - - type: string - - type: 'null' + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: function + const: response.mcp_call.failed + default: response.mcp_call.failed title: Type - default: function - function: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - title: OpenAIChatCompletionToolCallFunction - - type: 'null' - title: OpenAIChatCompletionToolCallFunction - type: object - title: OpenAIChatCompletionToolCall - description: Tool call specification for OpenAI-compatible chat completion responses. - OpenAIChatCompletionToolCallFunction: - properties: - name: - anyOf: - - type: string - - type: 'null' - arguments: - anyOf: - - type: string - - type: 'null' + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed type: object - title: OpenAIChatCompletionToolCallFunction - description: Function call details for OpenAI-compatible tool calls. - OpenAIChatCompletionUsage: + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. properties: - prompt_tokens: - type: integer - title: Prompt Tokens - completion_tokens: + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - title: Completion Tokens - total_tokens: + sequence_number: + title: Sequence Number type: integer - title: Total Tokens - prompt_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' - title: OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - title: OpenAIChatCompletionUsagePromptTokensDetails - completion_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' - title: OpenAIChatCompletionUsageCompletionTokensDetails - - type: 'null' - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object + type: + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress + title: Type + type: string required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - description: Usage information for OpenAI chat completion. - OpenAIChatCompletionUsageCompletionTokensDetails: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + type: object + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted type: object - title: OpenAIChatCompletionUsageCompletionTokensDetails - description: Token details for output tokens in OpenAI chat completion usage. - OpenAIChatCompletionUsagePromptTokensDetails: + OpenAIResponseObjectStreamResponseMcpListToolsFailed: properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed type: object - title: OpenAIChatCompletionUsagePromptTokensDetails - description: Token details for prompt tokens in OpenAI chat completion usage. - OpenAIChoice-Output: + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: properties: - message: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' - title: OpenAIUserMessageParam-Output - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' - title: OpenAIAssistantMessageParam-Output - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam-Output | ... (5 variants) + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. + properties: + response_id: + title: Response Id + type: string + item: 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: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - title: OpenAIChoiceLogprobs-Output - - type: 'null' - title: OpenAIChoiceLogprobs-Output - type: object + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.added + default: response.output_item.added + title: Type + type: string required: - - message - - finish_reason - - index - title: OpenAIChoice - description: A choice from an OpenAI-compatible chat completion response. - OpenAIChoiceLogprobs-Output: - properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded type: object - title: OpenAIChoiceLogprobs - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. - OpenAICompletion: + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. properties: - id: + response_id: + title: Response Id type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAICompletionChoice-Output' - type: array - title: Choices - created: + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index type: integer - title: Created - model: - type: string - title: Model - object: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done + title: Type 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. - - :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" - OpenAICompletionChoice-Output: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone + type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. properties: - finish_reason: - type: string - title: Finish Reason - text: + item_id: + title: Item Id type: string - title: Text - index: + output_index: + title: Output Index type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - title: OpenAIChoiceLogprobs-Output - - type: 'null' - title: OpenAIChoiceLogprobs-Output - type: object + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.annotation.added + default: response.output_text.annotation.added + title: Type + type: string required: - - finish_reason - - text - - index - title: 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 - OpenAICompletionRequestWithExtraBody: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + type: object + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. properties: - model: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.delta + default: response.output_text.delta + title: Type type: string - title: Model - prompt: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - items: - type: integer - type: array - title: list[integer] - - items: - items: - type: integer - type: array - type: array - title: list[array] - title: string | ... (4 variants) - best_of: - anyOf: - - type: integer - - type: 'null' - echo: - anyOf: - - type: boolean - - type: 'null' - frequency_penalty: - anyOf: - - type: number - - type: 'null' - logit_bias: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - logprobs: - anyOf: - - type: boolean - - type: 'null' - max_tokens: - anyOf: - - type: integer - - type: 'null' - n: - anyOf: - - type: integer - - type: 'null' - presence_penalty: - anyOf: - - type: number - - type: 'null' - seed: - anyOf: - - type: integer - - type: 'null' - stop: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - type: 'null' - title: string | list[string] - stream: - anyOf: - - type: boolean - - type: 'null' - stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - temperature: - anyOf: - - type: number - - type: 'null' - top_p: - anyOf: - - type: number - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - suffix: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible completion endpoint. - OpenAICompletionWithInputMessages: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta + type: object + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. properties: - id: + content_index: + title: Content Index + type: integer + text: + title: Text type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAIChoice-Output' - type: array - title: Choices - object: + item_id: + title: Item Id type: string - const: chat.completion - title: Object - default: chat.completion - created: + output_index: + title: Output Index type: integer - title: Created - model: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done + title: Type type: string - title: Model - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - title: OpenAIChatCompletionUsage - input_messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' - title: OpenAIUserMessageParam-Output - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' - title: OpenAIAssistantMessageParam-Output - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - 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' - title: OpenAIUserMessageParam-Output | ... (5 variants) - type: array - title: Input Messages - type: object - required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - properties: - file_ids: - items: - type: string - type: array - title: File Ids - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - additionalProperties: true - type: object required: - - file_ids - title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - description: Request to create a vector store file batch with extra_body support. - OpenAICreateVectorStoreRequestWithExtraBody: - properties: - name: - anyOf: - - type: string - - type: 'null' - file_ids: - anyOf: - - items: - type: string - type: array - - type: 'null' - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - additionalProperties: true + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone type: object - title: OpenAICreateVectorStoreRequestWithExtraBody - description: Request to create a vector store with extra_body support. - OpenAIDeleteResponseObject: + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. properties: - id: + item_id: + title: Item Id type: string - title: Id - object: + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type type: string - const: response - title: Object - default: response - deleted: - type: boolean - title: Deleted - default: true - type: object required: - - id - title: OpenAIDeleteResponseObject - description: Response object confirming deletion of an OpenAI response. - OpenAIDeveloperMessageParam: - properties: - role: - type: string - const: developer - title: Role - default: developer - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded type: object - required: - - content - title: OpenAIDeveloperMessageParam - description: A message from the developer in an OpenAI-compatible chat completion request. - OpenAIEmbeddingData: + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. properties: - object: + item_id: + title: Item Id type: string - const: embedding - title: Object - default: embedding - embedding: - anyOf: - - items: - type: number - type: array - title: list[number] - - type: string - title: list[number] | string - index: + output_index: + title: Output Index type: integer - title: Index - type: object - required: - - embedding - - index - title: OpenAIEmbeddingData - description: A single embedding data object from an OpenAI-compatible embeddings response. - OpenAIEmbeddingUsage: - properties: - prompt_tokens: + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number type: integer - title: Prompt Tokens - total_tokens: + summary_index: + title: Summary Index type: integer - title: Total Tokens - type: object - required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage - description: Usage information for an OpenAI-compatible embeddings response. - OpenAIEmbeddingsRequestWithExtraBody: - properties: - model: + type: + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done + title: Type type: string - title: Model - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - encoding_format: - anyOf: - - type: string - - type: 'null' - default: float - dimensions: - anyOf: - - type: integer - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object required: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody - description: Request parameters for OpenAI-compatible embeddings endpoint. - OpenAIEmbeddingsResponse: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. properties: - object: + delta: + title: Delta type: string - const: list - title: Object - default: list - data: - items: - $ref: '#/components/schemas/OpenAIEmbeddingData' - type: array - title: Data - model: + item_id: + title: Item Id 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. - OpenAIFile: - properties: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - type: string - const: file + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta title: Type - default: file - file: - $ref: '#/components/schemas/OpenAIFileFile' - type: object - required: - - file - title: OpenAIFile - OpenAIFileDeleteResponse: - properties: - id: - type: string - title: Id - object: type: string - const: file - title: Object - default: file - deleted: - type: boolean - title: Deleted - type: object required: - - id - - deleted - title: OpenAIFileDeleteResponse - description: Response for deleting a file in OpenAI Files API. - OpenAIFileFile: - properties: - file_data: - anyOf: - - type: string - - type: 'null' - file_id: - anyOf: - - type: string - - type: 'null' - filename: - anyOf: - - type: string - - type: 'null' + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta type: object - title: OpenAIFileFile - OpenAIFileObject: + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. properties: - object: + text: + title: Text type: string - const: file - title: Object - default: file - id: + item_id: + title: Item Id type: string - title: Id - bytes: + output_index: + title: Output Index type: integer - title: Bytes - created_at: + sequence_number: + title: Sequence Number type: integer - title: Created At - expires_at: + summary_index: + title: Summary Index 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. - OpenAIFilePurpose: - type: string - enum: - - assistants - - batch - title: OpenAIFilePurpose - description: Valid purpose values for OpenAI Files API. - OpenAIImageURL: - properties: - url: + type: + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done + title: Type type: string - title: Url - detail: - anyOf: - - type: string - - type: 'null' - type: object required: - - url - title: OpenAIImageURL - description: Image URL specification for OpenAI-compatible chat completion messages. - OpenAIJSONSchema: - properties: - name: - type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - title: OpenAIJSONSchema - description: JSON schema specification for OpenAI-compatible structured response format. - OpenAIListModelsResponse: - properties: - data: - items: - $ref: '#/components/schemas/OpenAIModel' - type: array - title: Data + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone type: object - required: - - data - title: OpenAIListModelsResponse - OpenAIModel: + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. properties: - id: - type: string - title: Id - object: - type: string - const: model - title: Object - default: model - created: + content_index: + title: Content Index type: integer - title: Created - owned_by: + delta: + title: Delta type: string - title: Owned By - custom_metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - id - - created - - owned_by - title: OpenAIModel - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata - OpenAIResponseAnnotationCitation: - properties: - type: + item_id: + title: Item Id type: string - const: url_citation - title: Type - default: url_citation - end_index: + output_index: + title: Output Index type: integer - title: End Index - start_index: + sequence_number: + title: Sequence Number 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. - OpenAIResponseAnnotationContainerFileCitation: - properties: type: - type: string - const: container_file_citation + const: response.reasoning_text.delta + default: response.reasoning_text.delta title: Type - default: container_file_citation - container_id: type: string - title: Container Id - end_index: + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. + properties: + content_index: + title: Content Index type: integer - title: End Index - file_id: + text: + title: Text type: string - title: File Id - filename: + item_id: + title: Item Id type: string - title: Filename - start_index: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number 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 + const: response.reasoning_text.done + default: response.reasoning_text.done 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. - OpenAIResponseAnnotationFilePath: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone + type: object + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. properties: - type: + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - const: file_path - title: Type - default: file_path - file_id: + item_id: + title: Item Id type: string - title: File Id - index: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number type: integer - title: Index - type: object - required: - - file_id - - index - title: OpenAIResponseAnnotationFilePath - OpenAIResponseContentPartRefusal: - properties: type: - type: string - const: refusal + const: response.refusal.delta + default: response.refusal.delta title: Type - default: refusal - refusal: type: string - title: Refusal - type: object required: - - refusal - title: OpenAIResponseContentPartRefusal - description: Refusal content within a streamed response part. - OpenAIResponseError: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta + type: object + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. properties: - code: + content_index: + title: Content Index + type: integer + refusal: + title: Refusal type: string - title: Code - message: + item_id: + title: Item Id type: string - title: Message - type: object - required: - - code - - message - title: OpenAIResponseError - description: Error details for failed OpenAI response requests. - OpenAIResponseFormatJSONObject: - properties: + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: json_object + const: response.refusal.done + default: response.refusal.done title: Type - default: json_object + type: string + required: + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone type: object - title: OpenAIResponseFormatJSONObject - description: JSON object response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatJSONSchema: + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. properties: - type: + item_id: + title: Item Id type: string - const: json_schema + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed title: Type - default: json_schema - json_schema: - $ref: '#/components/schemas/OpenAIJSONSchema' - type: object + type: string required: - - json_schema - title: OpenAIResponseFormatJSONSchema - description: JSON schema response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatText: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. properties: - type: + item_id: + title: Item Id type: string - const: text + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress title: Type - default: text + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress type: object - title: OpenAIResponseFormatText - description: Text response format for OpenAI-compatible chat completion requests. - OpenAIResponseInputFunctionToolCallOutput: + OpenAIResponseObjectStreamResponseWebSearchCallSearching: properties: - call_id: - type: string - title: Call Id - output: + item_id: + title: Item Id type: string - title: Output + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - type: string - const: function_call_output + const: response.web_search_call.searching + default: response.web_search_call.searching title: Type - default: function_call_output + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + type: object + OpenAIResponsePrompt: + description: OpenAI compatible Prompt object that is used in OpenAI responses. + properties: id: + title: Id + type: string + variables: anyOf: - - type: string + - additionalProperties: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: object - type: 'null' - status: + nullable: true + version: anyOf: - type: string - type: 'null' - type: object + nullable: true required: - - call_id - - output - title: OpenAIResponseInputFunctionToolCallOutput - description: This represents the output of a function call that gets passed back to the model. - OpenAIResponseInputMessageContentFile: + - id + title: OpenAIResponsePrompt + type: object + OpenAIResponseText: + description: Text response configuration for OpenAI responses. + properties: + format: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat + - type: 'null' + nullable: true + title: OpenAIResponseTextFormat + title: OpenAIResponseText + type: object + OpenAIResponseTextFormat: + description: Configuration for Responses API text format. properties: type: - type: string - const: input_file title: Type - default: input_file - file_data: + type: string + enum: + - text + - json_schema + - json_object + default: text + name: anyOf: - type: string - type: 'null' - file_id: + schema: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' - file_url: + description: anyOf: - type: string - type: 'null' - filename: + strict: anyOf: - - type: string + - type: boolean - type: 'null' + title: OpenAIResponseTextFormat type: object - title: OpenAIResponseInputMessageContentFile - description: File content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentImage: + OpenAIResponseUsage: + description: Usage information for OpenAI response. properties: - detail: - title: Detail - default: auto - type: string - enum: - - low - - high - - auto - type: - type: string - const: input_image - title: Type - default: input_image - file_id: + 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: - - type: string + - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails - type: 'null' - image_url: + nullable: true + title: OpenAIResponseUsageInputTokensDetails + output_tokens_details: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails - type: 'null' + nullable: true + title: OpenAIResponseUsageOutputTokensDetails + required: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage type: object - title: OpenAIResponseInputMessageContentImage - description: Image content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentText: + OpenAIResponseUsageInputTokensDetails: + description: Token details for input tokens in OpenAI response usage. 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. - 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: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - max_num_results: + cached_tokens: anyOf: - type: integer - maximum: 50.0 - minimum: 1.0 - type: 'null' - default: 10 - ranking_options: + nullable: true + title: OpenAIResponseUsageInputTokensDetails + type: object + OpenAIResponseUsageOutputTokensDetails: + description: Token details for output tokens in OpenAI response usage. + properties: + reasoning_tokens: anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions + - type: integer - type: 'null' - title: SearchRankingOptions + nullable: true + title: OpenAIResponseUsageOutputTokensDetails type: object - required: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch - description: File search tool configuration for OpenAI response inputs. - OpenAIResponseInputToolFunction: + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) + OpenAIResponseInputFunctionToolCallOutput: + description: This represents the output of a function call that gets passed back to the model. properties: - type: + call_id: + title: Call Id type: string - const: function + output: + title: Output + type: string + type: + const: function_call_output + default: function_call_output title: Type - default: function - name: type: string - title: Name - description: + id: anyOf: - type: string - type: 'null' - parameters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - strict: + nullable: true + status: anyOf: - - type: boolean + - type: string - type: 'null' - type: object + nullable: true required: - - name - - parameters - title: OpenAIResponseInputToolFunction - description: Function tool configuration for OpenAI response inputs. - OpenAIResponseInputToolMCP: + - call_id + - output + title: OpenAIResponseInputFunctionToolCallOutput + type: object + OpenAIResponseMCPApprovalResponse: + description: A response to an MCP approval request. properties: - type: + approval_request_id: + title: Approval Request Id type: string - const: mcp + approve: + title: Approve + type: boolean + type: + const: mcp_approval_response + default: mcp_approval_response title: Type - default: mcp - server_label: type: string - title: Server Label - server_url: - type: string - title: Server Url - headers: + id: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - require_approval: + nullable: true + reason: anyOf: - type: string - const: always - - type: string - const: never - - $ref: '#/components/schemas/ApprovalFilter' - title: ApprovalFilter - title: string | ApprovalFilter - default: never - allowed_tools: - anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter - type: 'null' - title: list[string] | AllowedToolsFilter - type: object + nullable: true required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - OpenAIResponseInputToolWebSearch: - properties: - type: - title: Type - default: web_search - type: string - enum: - - web_search - - web_search_preview - - web_search_preview_2025_03_11 - - web_search_2025_08_26 - search_context_size: - anyOf: - - type: string - pattern: ^low|medium|high$ - - type: 'null' - default: medium + - approval_request_id + - approve + title: OpenAIResponseMCPApprovalResponse type: object - title: OpenAIResponseInputToolWebSearch - description: Web search tool configuration for OpenAI response inputs. - OpenAIResponseMCPApprovalRequest: + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + ArrayType: + description: Parameter type for array values. 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 + const: array + default: array title: Type - default: mcp_approval_request + type: string + title: ArrayType type: object - required: - - arguments - - id - - name - - server_label - title: OpenAIResponseMCPApprovalRequest - description: A request for human approval of a tool invocation. - OpenAIResponseMCPApprovalResponse: + BooleanType: + description: Parameter type for boolean values. properties: - approval_request_id: - type: string - title: Approval Request Id - approve: - type: boolean - title: Approve type: - type: string - const: mcp_approval_response + const: boolean + default: boolean title: Type - default: mcp_approval_response - id: - anyOf: - - type: string - - type: 'null' - reason: - anyOf: - - type: string - - type: 'null' + type: string + title: BooleanType type: object - required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse - description: A response to an MCP approval request. - OpenAIResponseMessage-Input: + ChatCompletionInputType: + description: Parameter type for chat completion input. properties: - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system type: - type: string - const: message + const: chat_completion_input + default: chat_completion_input title: Type - default: message - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' + type: string + title: ChatCompletionInputType 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. - OpenAIResponseMessage-Output: + CompletionInputType: + description: Parameter type for completion input. properties: - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role + type: + const: completion_input + default: completion_input + title: Type type: string - enum: - - system - - developer - - user - - assistant - default: system + title: CompletionInputType + type: object + JsonType: + description: Parameter type for JSON values. + properties: type: + const: json + default: json + title: Type type: string - const: message + title: JsonType + type: object + NumberType: + description: Parameter type for numeric values. + properties: + type: + const: number + default: number title: Type - default: message - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' + type: string + title: NumberType 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: + ObjectType: + description: Parameter type for object values. properties: - created_at: - type: integer - title: Created At - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - title: OpenAIResponseError - id: + type: + const: object + default: object + title: Type type: string - title: Id - model: + title: ObjectType + type: object + StringType: + description: Parameter type for string values. + properties: + type: + const: string + default: string + title: Type type: string - title: Model - object: + title: StringType + type: object + UnionType: + description: Parameter type for union values. + properties: + type: + const: union + default: union + title: Type type: string - const: response - title: Object - default: response - output: + title: UnionType + type: object + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + ConversationItem: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + RowsDataSource: + description: A dataset stored in rows. + properties: + type: + const: rows + default: rows + title: Type + type: string + rows: items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) + additionalProperties: true + type: object + title: Rows type: array - title: Output - parallel_tool_calls: - type: boolean - title: Parallel Tool Calls - default: false - previous_response_id: - anyOf: - - type: string - - type: 'null' - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt - status: - type: string - title: Status - temperature: - anyOf: - - type: number - - type: 'null' - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - truncation: - anyOf: - - type: string - - type: 'null' - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - title: OpenAIResponseUsage - instructions: - anyOf: - - type: string - - type: 'null' - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - type: object required: - - created_at - - id - - model - - output - - status - title: OpenAIResponseObject - description: Complete OpenAI response object containing generation results and metadata. - OpenAIResponseObjectWithInput-Output: + - rows + title: RowsDataSource + type: object + URIDataSource: + description: A dataset that can be obtained from a URI. properties: - created_at: - type: integer - title: Created At - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - title: OpenAIResponseError - id: + type: + const: uri + default: uri + title: Type type: string - title: Id - model: + uri: + title: Uri type: string - title: Model - object: + required: + - uri + title: URIDataSource + type: object + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + AggregationFunctionType: + description: Types of aggregation functions for scoring results. + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + type: string + BasicScoringFnParams: + description: Parameters for basic scoring function configuration. + properties: + type: + const: basic + default: basic + title: Type type: string - const: response - title: Object - default: response - output: + aggregation_functions: + description: Aggregation functions to apply to the scores of each row items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions type: array - title: Output - parallel_tool_calls: - type: boolean - title: Parallel Tool Calls - default: false - previous_response_id: - anyOf: - - type: string - - type: 'null' - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt - status: + title: BasicScoringFnParams + type: object + LLMAsJudgeScoringFnParams: + description: Parameters for LLM-as-judge scoring function configuration. + properties: + type: + const: llm_as_judge + default: llm_as_judge + title: Type type: string - title: Status - temperature: - anyOf: - - type: number - - type: 'null' - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - truncation: - anyOf: - - type: string - - type: 'null' - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - title: OpenAIResponseUsage - instructions: + judge_model: + title: Judge Model + type: string + prompt_template: anyOf: - type: string - type: 'null' - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - input: + nullable: true + judge_score_regexes: + description: Regexes to extract the answer from generated response items: - $ref: '#/components/schemas/OpenAIResponseMessageOutputUnion' + type: string + title: Judge Score Regexes + type: array + aggregation_functions: + description: Aggregation functions to apply to the scores of each row + items: + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions type: array - title: Input - type: object required: - - created_at - - id - - model - - output - - status - - input - title: OpenAIResponseObjectWithInput - description: OpenAI response object extended with input context information. - OpenAIResponseOutputMessageContentOutputText: + - judge_model + title: LLMAsJudgeScoringFnParams + type: object + RegexParserScoringFnParams: + description: Parameters for regex parser scoring function configuration. properties: - text: - type: string - title: Text type: - type: string - const: output_text + const: regex_parser + default: regex_parser title: Type - default: output_text - annotations: + type: string + parsing_regexes: + description: Regex to extract the answer from generated response items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: 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' - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + type: string + title: Parsing Regexes type: array - title: Annotations + aggregation_functions: + description: Aggregation functions to apply to the scores of each row + items: + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array + title: RegexParserScoringFnParams type: object - required: - - text - title: OpenAIResponseOutputMessageContentOutputText - OpenAIResponseOutputMessageFileSearchToolCall: + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + LoraFinetuningConfig: + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. properties: - id: + type: + const: LoRA + default: LoRA + title: Type type: string - title: Id - queries: + lora_attn_modules: items: type: string + title: Lora Attn Modules type: array - title: Queries - status: - type: string - title: Status - type: - type: string - const: file_search_call - title: Type - default: file_search_call - results: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' - type: array + apply_lora_to_mlp: + title: Apply Lora To Mlp + type: boolean + apply_lora_to_output: + title: Apply Lora To Output + type: boolean + rank: + title: Rank + type: integer + alpha: + title: Alpha + type: integer + use_dora: + anyOf: + - type: boolean - type: 'null' - type: object + default: false + quantize_base: + anyOf: + - type: boolean + - type: 'null' + default: false required: - - id - - queries - - status - title: OpenAIResponseOutputMessageFileSearchToolCall - description: File search tool call output message for OpenAI responses. - OpenAIResponseOutputMessageFileSearchToolCallResults: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + type: object + QATFinetuningConfig: + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: - attributes: - additionalProperties: true - type: object - title: Attributes - file_id: - type: string - title: File Id - filename: + type: + const: QAT + default: QAT + title: Type type: string - title: Filename - score: - type: number - title: Score - text: + quantizer_name: + title: Quantizer Name type: string - title: Text - type: object + group_size: + title: Group Size + type: integer required: - - attributes - - file_id - - filename - - score - - text - title: OpenAIResponseOutputMessageFileSearchToolCallResults - description: Search results returned by the file search operation. - OpenAIResponseOutputMessageFunctionToolCall: + - quantizer_name + - group_size + title: QATFinetuningConfig + type: object + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + SpanEndPayload: + description: Payload for a span end event. properties: - call_id: - type: string - title: Call Id - name: - type: string - title: Name - arguments: - type: string - title: Arguments type: - type: string - const: function_call + const: span_end + default: span_end title: Type - default: function_call - id: - anyOf: - - type: string - - type: 'null' + type: string status: - anyOf: - - type: string - - type: 'null' - type: object + $ref: '#/components/schemas/SpanStatus' required: - - call_id - - name - - arguments - title: OpenAIResponseOutputMessageFunctionToolCall - description: Function tool call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPCall: + - status + title: SpanEndPayload + type: object + SpanStartPayload: + description: Payload for a span start event. properties: - id: - type: string - title: Id type: - type: string - const: mcp_call + const: span_start + default: span_start title: Type - default: mcp_call - arguments: type: string - title: Arguments name: - type: string title: Name - server_label: type: string - title: Server Label - error: - anyOf: - - type: string - - type: 'null' - output: + parent_span_id: anyOf: - type: string - type: 'null' - type: object + nullable: true required: - - id - - arguments - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - description: Model Context Protocol (MCP) call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPListTools: + title: SpanStartPayload + type: object + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: - id: + trace_id: + title: Trace Id type: string - title: Id - type: + span_id: + title: Span Id type: string - const: mcp_list_tools + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: metric + default: metric 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 + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + title: Unit + type: string required: - - id - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - description: MCP list tools output message containing available tools from an MCP server. - OpenAIResponseOutputMessageWebSearchToolCall: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. properties: - id: + trace_id: + title: Trace Id type: string - title: Id - status: + span_id: + title: Span Id 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. - OpenAIResponsePrompt: - properties: - id: + timestamp: + format: date-time + title: Timestamp type: string - title: Id - variables: + attributes: anyOf: - additionalProperties: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - version: - anyOf: - - type: string - - type: 'null' - type: object + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload required: - - id - title: OpenAIResponsePrompt - description: OpenAI compatible Prompt object that is used in OpenAI responses. - OpenAIResponseText: - properties: - format: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseTextFormat' - title: OpenAIResponseTextFormat - - type: 'null' - title: OpenAIResponseTextFormat + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent type: object - title: OpenAIResponseText - description: Text response configuration for OpenAI responses. - OpenAIResponseTextFormat: + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. properties: - type: - title: Type + trace_id: + title: Trace Id type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - - additionalProperties: true + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - type: object - title: OpenAIResponseTextFormat - description: Configuration for Responses API text format. - OpenAIResponseToolMCP: - properties: type: - type: string - const: mcp + const: unstructured_log + default: unstructured_log title: Type - default: mcp - server_label: type: string - title: Server Label - allowed_tools: - anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter - - type: 'null' - title: list[string] | AllowedToolsFilter + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' + required: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + title: Data + type: array + object: + const: list + default: list + title: Object + type: string required: - - server_label - title: OpenAIResponseToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. - OpenAIResponseUsage: + - data + title: ListOpenAIResponseInputItem + type: object + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. properties: - input_tokens: - type: integer - title: Input Tokens - output_tokens: - type: integer - title: Output Tokens - total_tokens: + created_at: + title: Created At type: integer - title: Total Tokens - input_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' - title: OpenAIResponseUsageInputTokensDetails - - type: 'null' - title: OpenAIResponseUsageInputTokensDetails - output_tokens_details: + error: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' - title: OpenAIResponseUsageOutputTokensDetails + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' - title: OpenAIResponseUsageOutputTokensDetails - type: object - required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - description: Usage information for OpenAI response. - OpenAIResponseUsageInputTokensDetails: - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - type: object - title: OpenAIResponseUsageInputTokensDetails - description: Token details for input tokens in OpenAI response usage. - OpenAIResponseUsageOutputTokensDetails: - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - type: object - title: OpenAIResponseUsageOutputTokensDetails - description: Token details for output tokens in OpenAI response usage. - OpenAISystemMessageParam: - properties: - role: + nullable: true + title: OpenAIResponseError + id: + title: Id type: string - const: system - title: Role - default: system - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output + type: array + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: anyOf: - type: string - type: 'null' - type: object - required: - - content - title: OpenAISystemMessageParam - description: A system message providing instructions or context to the model. - OpenAITokenLogProb: - properties: - token: - type: string - title: Token - bytes: + nullable: true + prompt: anyOf: - - items: - type: integer - type: array + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' - 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. - - :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 - OpenAIToolMessageParam: - properties: - role: - type: string - const: tool - title: Role - default: tool - tool_call_id: + nullable: true + title: OpenAIResponsePrompt + status: + title: Status type: string - title: Tool Call Id - content: + temperature: anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - 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. - OpenAITopLogProb: - properties: - token: - type: string - title: Token - bytes: + - type: number + - type: 'null' + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: anyOf: - - items: - type: integer - type: array + - type: number - type: 'null' - 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. - - :token: The token - :bytes: (Optional) The bytes for the token - :logprob: The log probability of the token - OpenAIUserMessageParam-Input: - properties: - role: - type: string - const: user - title: Role - default: user - content: + nullable: true + tools: anyOf: - - type: string - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile discriminator: - propertyName: type mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: + - type: 'null' + nullable: true + truncation: anyOf: - type: string - type: 'null' - type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - OpenAIUserMessageParam-Output: - properties: - role: - type: string - const: user - title: Role - default: user - content: + nullable: true + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage + - type: 'null' + nullable: true + title: OpenAIResponseUsage + instructions: anyOf: - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: + - type: 'null' + nullable: true + max_tool_calls: anyOf: - - type: string + - type: integer - type: 'null' - type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - 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 + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + title: Input + type: array required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: Configuration parameters for the optimization algorithm. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: Available optimizer algorithms for training. - Order: - type: string - enum: - - asc - - desc - title: Order - description: Sort order for paginated responses. - OutputTokensDetails: - properties: - reasoning_tokens: - type: integer - title: Reasoning Tokens - additionalProperties: true + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput type: object - required: - - reasoning_tokens - title: OutputTokensDetails - PaginatedResponse: + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. properties: data: items: - additionalProperties: true - type: object - type: array + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' title: Data + type: array has_more: - type: boolean title: Has More - url: - anyOf: - - type: string - - type: 'null' - type: object + 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 - title: PaginatedResponse - description: A generic paginated response that follows a simple format. - PostTrainingJob: + - first_id + - last_id + title: ListOpenAIResponseObject + type: object + OpenAIDeleteResponseObject: + description: Response object confirming deletion of an OpenAI response. properties: - job_uuid: + id: + title: Id type: string - title: Job Uuid - type: object + object: + const: response + default: response + title: Object + type: string + deleted: + default: true + title: Deleted + type: boolean required: - - job_uuid - title: PostTrainingJob - PostTrainingJobArtifactsResponse: + - id + title: OpenAIDeleteResponseObject + type: object + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. properties: - job_uuid: + type: + title: Type type: string - title: Job Uuid - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints - type: object required: - - job_uuid - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingJobStatusResponse: + - type + title: ResponseGuardrailSpec + type: object + Batch: + additionalProperties: true properties: - job_uuid: + id: + title: Id + type: string + completion_window: + title: Completion Window + type: string + created_at: + title: Created At + type: integer + endpoint: + title: Endpoint + type: string + input_file_id: + title: Input File Id + type: string + object: + const: batch + title: Object type: string - title: Job Uuid status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + title: Status + type: string + cancelled_at: anyOf: - - type: string - format: date-time + - type: integer - type: 'null' - started_at: + nullable: true + cancelling_at: anyOf: - - type: string - format: date-time + - type: integer - type: 'null' + nullable: true completed_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + error_file_id: anyOf: - type: string - format: date-time - type: 'null' - resources_allocated: + nullable: true + errors: anyOf: - - additionalProperties: true - type: object + - $ref: '#/components/schemas/Errors' + title: Errors - type: 'null' - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints - type: object - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - PostTrainingMetric: - properties: - epoch: - type: integer - title: Epoch - train_loss: - type: number - title: Train Loss - validation_loss: - type: number - title: Validation Loss - perplexity: - type: number - title: Perplexity - type: object + nullable: true + title: Errors + expired_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + expires_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + failed_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + finalizing_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + in_progress_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + nullable: true + model: + anyOf: + - type: string + - type: 'null' + nullable: true + output_file_id: + anyOf: + - type: string + - type: 'null' + nullable: true + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts + - type: 'null' + nullable: true + title: BatchRequestCounts + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage + - type: 'null' + nullable: true + title: BatchUsage required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: Training metrics captured during post-training jobs. - Prompt: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + type: object + BatchError: + additionalProperties: true properties: - prompt: + code: anyOf: - type: string - type: 'null' - description: The system prompt with variable placeholders - version: + nullable: true + line: + anyOf: + - type: integer + - type: 'null' + nullable: true + message: + anyOf: + - type: string + - type: 'null' + nullable: true + param: + anyOf: + - type: string + - type: 'null' + nullable: true + title: BatchError + type: object + BatchRequestCounts: + additionalProperties: true + properties: + completed: + title: Completed 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 + failed: + title: Failed + type: integer + total: + title: Total + type: integer + required: + - completed + - failed + - total + title: BatchRequestCounts type: object + BatchUsage: + additionalProperties: true + properties: + input_tokens: + title: Input Tokens + type: integer + input_tokens_details: + $ref: '#/components/schemas/InputTokensDetails' + output_tokens: + title: Output Tokens + type: integer + output_tokens_details: + $ref: '#/components/schemas/OutputTokensDetails' + total_tokens: + title: Total Tokens + type: integer required: - - version - - prompt_id - title: Prompt - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. - ProviderInfo: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage + type: object + Errors: + additionalProperties: true 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 + data: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + nullable: true + object: + anyOf: + - type: string + - type: 'null' + nullable: true + title: Errors type: object - required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo - description: Information about a registered provider including its configuration and health status. - QATFinetuningConfig: + InputTokensDetails: + additionalProperties: true properties: - type: - type: string - const: QAT - title: Type - default: QAT - quantizer_name: - type: string - title: Quantizer Name - group_size: + cached_tokens: + title: Cached Tokens type: integer - title: Group Size - type: object required: - - quantizer_name - - group_size - title: QATFinetuningConfig - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - QueryChunksResponse: - properties: - chunks: - items: - $ref: '#/components/schemas/Chunk-Output' - type: array - title: Chunks - scores: - items: - type: number - type: array - title: Scores + - cached_tokens + title: InputTokensDetails type: object + OutputTokensDetails: + additionalProperties: true + properties: + reasoning_tokens: + title: Reasoning Tokens + type: integer required: - - chunks - - scores - title: QueryChunksResponse - description: Response from querying chunks in a vector database. - RegexParserScoringFnParams: + - reasoning_tokens + title: OutputTokensDetails + type: object + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - type: + object: + const: list + default: list + title: Object 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. - 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. - RerankResponse: - properties: data: + description: List of batch objects items: - $ref: '#/components/schemas/RerankData' - type: array + $ref: '#/components/schemas/Batch' title: Data - type: object + type: array + first_id: + anyOf: + - type: string + - type: 'null' + description: ID of the first batch in the list + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + description: ID of the last batch in the list + nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean required: - data - title: RerankResponse - description: Response from a reranking request. - RouteInfo: + title: ListBatchesResponse + type: object + Benchmark: + description: A benchmark resource for evaluating model performance. properties: - route: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Route - method: + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - title: Method - provider_types: + 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 - title: Provider Types - type: object + metadata: + additionalProperties: true + description: Metadata for this evaluation task + title: Metadata + type: object required: - - route - - method - - provider_types - title: RouteInfo - description: Information about an API route including its path, method, and implementing providers. - RowsDataSource: + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark + type: object + ImageDelta: + description: An image content delta for streaming responses. properties: type: - type: string - const: rows + const: image + default: image title: Type - default: rows - rows: - items: - additionalProperties: true - type: object - type: array - title: Rows - type: object + type: string + image: + format: binary + title: Image + type: string required: - - rows - title: RowsDataSource - description: A dataset stored in rows. - RunShieldResponse: - properties: - violation: - anyOf: - - $ref: '#/components/schemas/SafetyViolation' - title: SafetyViolation - - type: 'null' - title: SafetyViolation + - image + title: ImageDelta type: object - title: RunShieldResponse - description: Response from running a safety shield. - SafetyViolation: + TextDelta: + description: A text content delta for streaming responses. properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - user_message: - anyOf: - - type: string - - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: TextDelta type: object + JobStatus: + description: Status of a job execution. + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + type: string + Job: + description: A job execution instance with status tracking. + properties: + job_id: + title: Job Id + type: string + status: + $ref: '#/components/schemas/JobStatus' required: - - violation_level - title: SafetyViolation - description: Details of a safety violation detected by content moderation. - SamplingParams: + - job_id + - status + title: Job + type: object + MetricInResponse: + description: A metric value included in API responses. properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - max_tokens: + metric: + title: Metric + type: string + value: anyOf: - type: integer - - type: 'null' - repetition_penalty: - anyOf: - type: number - - type: 'null' - default: 1.0 - stop: + title: integer | number + unit: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' + nullable: true + required: + - metric + - value + title: MetricInResponse type: object - title: SamplingParams - description: Sampling parameters. - ScoreBatchResponse: + PaginatedResponse: + description: A generic paginated response that follows a simple format. properties: - dataset_id: + data: + items: + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: anyOf: - type: string - type: 'null' - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results - type: object + nullable: true required: - - results - title: ScoreBatchResponse - description: Response from batch scoring operations on datasets. - ScoreResponse: - properties: - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results + - data + - has_more + title: PaginatedResponse type: object + PostTrainingMetric: + description: Training metrics captured during post-training jobs. + 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: - - results - title: ScoreResponse - description: The response from scoring. - ScoringFn: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + type: object + Checkpoint: + description: Checkpoint created during training runs. properties: identifier: - type: string title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: type: string - title: Provider Id - description: ID of the provider that owns this resource - type: + created_at: + format: date-time + title: Created At type: string - const: scoring_function - title: Type - default: scoring_function - description: - anyOf: - - type: string - - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - description: Any additional metadata for this definition - return_type: - oneOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - description: The return type of the deterministic function - discriminator: - propertyName: type - mapping: - 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: + epoch: + title: Epoch + type: integer + post_training_job_id: + title: Post Training Job Id + type: string + path: + title: Path + type: string + training_metrics: anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - $ref: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric - type: 'null' - title: Params - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval - type: object + nullable: true + title: PostTrainingMetric required: - identifier - - provider_id - - return_type - title: ScoringFn - description: A scoring function resource for evaluating model outputs. - ScoringResult: - properties: - score_rows: - items: - additionalProperties: true - type: object - type: array - title: Score Rows - aggregated_results: - additionalProperties: true - type: object - title: Aggregated Results + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint type: object - required: - - score_rows - - aggregated_results - title: ScoringResult - description: A scoring result for a single row. - SearchRankingOptions: + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: - ranker: - anyOf: - - type: string - - type: 'null' - score_threshold: - anyOf: - - type: number - - type: 'null' - default: 0.0 + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType type: object - title: SearchRankingOptions - description: Options for ranking and filtering search results. - Shield: + Conversation: + description: OpenAI-compatible conversation object. properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: + id: + description: The unique ID of the conversation. + title: Id type: string - title: Provider Id - description: ID of the provider that owns this resource - type: + object: + const: conversation + default: conversation + description: The object type, which is always conversation. + title: Object type: string - const: shield - title: Type - default: shield - params: + 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: true + - additionalProperties: + type: string type: object - type: 'null' - type: object + 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. + nullable: true + 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. + nullable: true required: - - identifier - - provider_id - title: Shield - description: A safety shield resource that can be used to check content. - StringType: - properties: - type: - type: string - const: string - title: Type - default: string + - id + - created_at + title: Conversation type: object - title: StringType - description: Parameter type for string values. - SystemMessage: + ConversationDeletedResource: + description: Response for deleted conversation. properties: - role: + id: + description: The deleted conversation identifier + title: Id type: string - const: system - title: Role - default: system - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem + 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 + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: discriminator: - propertyName: type mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - type: object + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array required: - - content - title: SystemMessage - description: A system message providing instructions or context to the model. - TextContentItem: + - items + title: ConversationItemCreateRequest + type: object + ConversationItemDeletedResource: + description: Response for deleted conversation item. properties: - type: + id: + description: The deleted item identifier + title: Id type: string - const: text - title: Type - default: text - text: + object: + default: conversation.item.deleted + description: Object type + title: Object type: string - title: Text - type: object + deleted: + default: true + description: Whether the object was deleted + title: Deleted + type: boolean required: - - text - title: TextContentItem - description: A text content item - ToolDef: + - id + title: ConversationItemDeletedResource + type: object + ConversationItemList: + description: List of conversation items with pagination. properties: - toolgroup_id: - anyOf: - - type: string - - type: 'null' - name: + object: + default: list + description: Object type + title: Object type: string - title: Name - description: + data: + description: List of conversation items + items: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + title: Data + type: array + first_id: anyOf: - type: string - type: 'null' - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - metadata: + description: The ID of the first item in the list + nullable: true + last_id: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: The ID of the last item in the list + nullable: true + has_more: + default: false + description: Whether there are more items available + title: Has More + type: boolean + required: + - data + title: ConversationItemList type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true + type: object + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string required: - - name - title: ToolDef - description: Tool definition used in runtime contexts. - ToolGroup: + - id + - content + - role + - status + title: ConversationMessage + type: object + DatasetPurpose: + description: Purpose of the dataset. Each purpose has a required input data schema. + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + title: DatasetPurpose + type: string + Dataset: + description: Dataset resource for storing and accessing training or evaluation data. properties: identifier: - type: string - title: 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 + nullable: true provider_id: - type: string - title: Provider Id description: ID of the provider that owns this resource - type: + title: Provider Id type: string - const: tool_group + type: + const: dataset + default: dataset title: Type - default: tool_group - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object + type: string + purpose: + $ref: '#/components/schemas/DatasetPurpose' + source: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + metadata: + additionalProperties: true + description: Any additional metadata for this dataset + title: Metadata + type: object required: - identifier - provider_id - title: ToolGroup - description: A group of related tools managed together. - ToolInvocationResult: + - purpose + - source + title: Dataset + type: object + Error: + description: Error response from the API. Roughly follows RFC 7807. properties: - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - type: array - title: list[ImageContentItem-Output | TextContentItem] - - type: 'null' - title: string | list[ImageContentItem-Output | TextContentItem] - error_message: + status: + title: Status + type: integer + title: + title: Title + type: string + detail: + title: Detail + type: string + instance: anyOf: - type: string - type: 'null' - error_code: - anyOf: - - type: integer - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' + nullable: true + required: + - status + - title + - detail + title: Error type: object - title: ToolInvocationResult - description: Result of a tool invocation. - TopKSamplingStrategy: + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + InlineProviderSpec: properties: - type: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider 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. - TopPSamplingStrategy: - properties: - type: + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class type: string - const: top_p - title: Type - default: top_p - temperature: - anyOf: - - type: number - minimum: 0.0 - - type: 'null' - top_p: + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - - type: number + - type: string - type: 'null' - default: 0.95 - type: object - required: - - temperature - title: TopPSamplingStrategy - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. - 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: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - - type: integer + - type: string - type: 'null' - default: 1 - data_config: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - - $ref: '#/components/schemas/DataConfig' - title: DataConfig + - type: string - type: 'null' - title: DataConfig - optimizer_config: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - title: OptimizerConfig + - type: string - type: 'null' - title: OptimizerConfig - efficiency_config: + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - title: EfficiencyConfig + - type: string - type: 'null' - title: EfficiencyConfig - dtype: + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. + nullable: true + description: anyOf: - type: string - type: 'null' - default: bf16 - type: object + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true required: - - n_epochs - title: TrainingConfig - description: Comprehensive configuration for the training process. - URIDataSource: + - api + - provider_type + - config_class + title: InlineProviderSpec + type: object + ModelType: + description: Enumeration of supported model types in Llama Stack. + enum: + - llm + - embedding + - rerank + title: ModelType + type: string + Model: + description: A model resource representing an AI model registered in Llama Stack. properties: - type: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - const: uri + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string + type: + const: model + default: model title: Type - default: uri - uri: type: string - title: Uri - type: object + metadata: + additionalProperties: true + description: Any additional metadata for this model + title: Metadata + type: object + model_type: + $ref: '#/components/schemas/ModelType' + default: llm required: - - uri - title: URIDataSource - description: A dataset that can be obtained from a URI. - URL: - properties: - uri: - type: string - title: Uri + - identifier + - provider_id + title: Model type: object - required: - - uri - title: URL - description: A URL reference to external content. - UnionType: + ProviderSpec: properties: - type: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - const: union - title: Type - default: union - type: object - title: UnionType - description: Parameter type for union values. - VectorStoreChunkingStrategyAuto: - properties: - type: + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class type: string - const: auto - title: Type - default: auto - type: object - title: VectorStoreChunkingStrategyAuto - description: Automatic chunking strategy for vector store files. - 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. - 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. - VectorStoreContent: - properties: - type: - type: string - const: text - title: Type - text: - type: string - title: Text - embedding: + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' - chunk_metadata: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' - title: ChunkMetadata - metadata: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - type: object - required: - - type - - text - title: VectorStoreContent - description: Content item from a vector store file or search result. - VectorStoreDeleteResponse: - properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store.deleted - deleted: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: + anyOf: + - type: string + - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External type: boolean - title: Deleted - default: true - type: object + deps__: + items: + type: string + title: Deps + type: array required: - - id - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - 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: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' + - api + - provider_type + - config_class + title: ProviderSpec type: object - required: - - id - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject - description: OpenAI Vector Store File Batch object. - VectorStoreFileContentResponse: + RemoteProviderSpec: properties: - object: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - const: vector_store.file_content.page - title: Object - default: vector_store.file_content.page - data: + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality items: - $ref: '#/components/schemas/VectorStoreContent' + $ref: '#/components/schemas/Api' + title: Api Dependencies type: array - title: Data - has_more: - type: boolean - title: Has More + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: + anyOf: + - type: string + - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: + anyOf: + - type: string + - type: 'null' + nullable: true + is_external: default: false - next_page: + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type + type: string + description: anyOf: - type: string - type: 'null' - type: object + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true required: - - data - title: VectorStoreFileContentResponse - description: Represents the parsed content of a vector store file. - 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 + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec type: object - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - description: File processing status counts for a vector store. - VectorStoreFileDeleteResponse: + ScoringFn: + description: A scoring function resource for evaluating model outputs. properties: - id: - type: string - title: Id - object: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Object - default: vector_store.file.deleted - deleted: - type: boolean - title: Deleted - default: true - type: object - required: - - id - title: VectorStoreFileDeleteResponse - description: Response from deleting a vector store file. - VectorStoreFileLastError: - properties: - code: - title: Code + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - enum: - - server_error - - rate_limit_exceeded - default: server_error - message: + type: + const: scoring_function + default: scoring_function + title: Type type: string - title: Message - type: object - required: - - code - - message - title: VectorStoreFileLastError - description: Error information for failed vector store file processing. - VectorStoreFileObject: - properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store.file - attributes: + description: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: additionalProperties: true + description: Any additional metadata for this definition + title: Metadata type: object - title: Attributes - chunking_strategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + return_type: + description: The return type of the deterministic function discriminator: - propertyName: type mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - created_at: - type: integer - title: Created At - last_error: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + params: anyOf: - - $ref: '#/components/schemas/VectorStoreFileLastError' - title: VectorStoreFileLastError + - discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' - title: VectorStoreFileLastError - status: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - usage_bytes: - type: integer - title: Usage Bytes - default: 0 - vector_store_id: - type: string - title: Vector Store Id - type: object + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + title: Params + nullable: true required: - - id - - chunking_strategy - - created_at - - status - - vector_store_id - title: VectorStoreFileObject - description: OpenAI Vector Store File object. - VectorStoreFilesListInBatchResponse: - properties: - object: - type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - type: array - title: Data - first_id: - anyOf: - - type: string - - type: 'null' - last_id: - anyOf: - - type: string - - type: 'null' - has_more: - type: boolean - title: Has More - default: false + - identifier + - provider_id + - return_type + title: ScoringFn type: object - required: - - data - title: VectorStoreFilesListInBatchResponse - description: Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: + Shield: + description: A safety shield resource that can be used to check content. properties: - object: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - type: array - title: Data - first_id: + provider_resource_id: anyOf: - type: string - type: 'null' - last_id: + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string + type: + const: shield + default: shield + title: Type + type: string + params: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' - has_more: - type: boolean - title: Has More - default: false - type: object + nullable: true required: - - data - title: VectorStoreListFilesResponse - description: Response from listing files in a vector store. - VectorStoreListResponse: + - identifier + - provider_id + title: Shield + type: object + ToolGroup: + description: A group of related tools managed together. properties: - object: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - type: array - title: Data - first_id: - anyOf: - - type: string - - type: 'null' - last_id: + provider_resource_id: anyOf: - type: string - type: 'null' - has_more: - type: boolean - title: Has More - default: false - type: object - required: - - data - title: VectorStoreListResponse - description: Response from listing vector stores. - VectorStoreObject: - properties: - id: + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - title: Id - object: + type: + const: tool_group + default: tool_group + title: Type type: string - title: Object - default: vector_store - created_at: - type: integer - title: Created At - name: + mcp_endpoint: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - usage_bytes: - type: integer - title: Usage Bytes - default: 0 - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - status: - type: string - title: Status - default: completed - expires_after: + nullable: true + title: URL + args: anyOf: - additionalProperties: true type: object - type: 'null' - expires_at: - anyOf: - - type: integer - - type: 'null' - last_active_at: - anyOf: - - type: integer - - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - type: object + nullable: true required: - - id - - created_at - - file_counts - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreSearchResponse-Output: - properties: - file_id: - type: string - title: File Id - filename: - type: string - title: Filename - score: - type: number - title: Score - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - title: string | number | boolean - type: object - - type: 'null' - content: - items: - $ref: '#/components/schemas/VectorStoreContent' - type: array - title: Content + - identifier + - provider_id + title: ToolGroup type: object - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - description: Response from searching a vector store. - VectorStoreSearchResponsePage: + ModelCandidate: + description: A model candidate for evaluation. properties: - object: + type: + const: model + default: model + title: Type type: string - title: Object - default: vector_store.search_results.page - search_query: - items: - type: string - type: array - title: Search Query - data: - items: - $ref: '#/components/schemas/VectorStoreSearchResponse-Output' - type: array - title: Data - has_more: - type: boolean - title: Has More - default: false - next_page: + model: + title: Model + type: string + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: anyOf: - - type: string + - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage - type: 'null' - type: object + nullable: true + title: SystemMessage required: - - search_query - - data - title: VectorStoreSearchResponsePage - description: Paginated response from searching a vector store. - VersionInfo: - properties: - version: - type: string - title: Version + - model + - sampling_params + title: ModelCandidate type: object - required: - - version - title: VersionInfo - description: Version information for the service. - ViolationLevel: - type: string - enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - _URLOrData: + SamplingParams: + description: Sampling parameters. properties: - url: + strategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + max_tokens: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: integer - type: 'null' - title: URL - data: + nullable: true + repetition_penalty: anyOf: - - type: string + - type: number - type: 'null' - contentEncoding: base64 - type: object - title: _URLOrData - description: A URL or a base64 encoded string - _batches_Request: - properties: - input_file_id: - type: string - title: Input File Id - endpoint: - type: string - title: Endpoint - completion_window: - type: string - const: 24h - title: Completion Window - metadata: + default: 1.0 + stop: anyOf: - - additionalProperties: + - items: type: string - type: object - - type: 'null' - idempotency_key: - anyOf: - - type: string + type: array - type: 'null' + nullable: true + title: SamplingParams type: object - required: - - input_file_id - - endpoint - - completion_window - title: _batches_Request - _conversations_Request: + SystemMessage: + description: A system message providing instructions or context to the model. properties: - items: + role: + const: system + default: system + title: Role + type: string + content: anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - - type: 'null' - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + required: + - content + title: SystemMessage type: object - title: _conversations_Request - _conversations_conversation_id_Request: + BenchmarkConfig: + description: A benchmark configuration for evaluation. properties: - metadata: + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + scoring_params: additionalProperties: - type: string - type: object - title: Metadata - type: object - required: - - metadata - title: _conversations_conversation_id_Request - _conversations_conversation_id_items_Request: - properties: - items: - items: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) - type: array - title: Items - type: object + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + description: Map between scoring function id and parameters for each scoring function you want to run + title: Scoring Params + type: object + num_examples: + anyOf: + - type: integer + - type: 'null' + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + nullable: true required: - - items - title: _conversations_conversation_id_items_Request - _eval_benchmarks_benchmark_id_evaluations_Request: + - eval_candidate + title: BenchmarkConfig + type: object + ScoringResult: + description: A scoring result for a single row. properties: - input_rows: + score_rows: items: additionalProperties: true type: object + title: Score Rows type: array - title: Input Rows - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - type: object + aggregated_results: + additionalProperties: true + title: Aggregated Results + type: object required: - - input_rows - - scoring_functions - - benchmark_config - title: _eval_benchmarks_benchmark_id_evaluations_Request - _inference_rerank_Request: + - score_rows + - aggregated_results + title: ScoringResult + type: object + EvaluateResponse: + description: The response from an evaluation. properties: - model: - type: string - title: Model - query: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - items: + generations: items: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + additionalProperties: true + type: object + title: Generations type: array - title: Items - max_num_results: - anyOf: - - type: integer - - type: 'null' - type: object + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Scores + type: object required: - - model - - query - - items - title: _inference_rerank_Request - _moderations_Request: - properties: - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - model: - anyOf: - - type: string - - type: 'null' + - generations + - scores + title: EvaluateResponse type: object - required: - - input - title: _moderations_Request - _post_training_preference_optimize_Request: + 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: - job_uuid: - type: string - title: Job Uuid - finetuned_model: + anchor: + const: created_at + title: Anchor type: string - title: Finetuned Model - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - type: object + seconds: + maximum: 2592000 + minimum: 3600 + title: Seconds + type: integer required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: _post_training_preference_optimize_Request - _post_training_supervised_fine_tune_Request: - properties: - job_uuid: - type: string - title: Job Uuid - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - model: - anyOf: - - type: string - - type: 'null' - description: Model descriptor for training if not in provider config` - checkpoint_dir: - anyOf: - - type: string - - type: 'null' - algorithm_config: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - discriminator: - propertyName: type - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - title: LoraFinetuningConfig | QATFinetuningConfig - - type: 'null' - title: Algorithm Config + - anchor + - seconds + title: ExpiresAfter type: object - required: - - job_uuid - - training_config - - hyperparam_search_config - - logger_config - title: _post_training_supervised_fine_tune_Request - _prompts_Request: + OpenAIFileObject: + description: OpenAI File object as defined in the OpenAI Files API. properties: - prompt: + object: + const: file + default: file + title: Object type: string - title: Prompt - variables: - anyOf: - - items: - type: string - type: array - - type: 'null' - type: object - required: - - prompt - title: _prompts_Request - _prompts_prompt_id_Request: - properties: - prompt: + id: + title: Id type: string - title: Prompt - version: + bytes: + title: Bytes type: integer - title: Version - variables: - anyOf: - - items: - type: string - type: array - - type: 'null' - set_as_default: - type: boolean - title: Set As Default - default: true - type: object - required: - - prompt - - version - title: _prompts_prompt_id_Request - _prompts_prompt_id_set_default_version_Request: - properties: - version: + created_at: + title: Created At type: integer - title: Version - type: object + expires_at: + title: Expires At + type: integer + filename: + title: Filename + type: string + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' required: - - version - title: _prompts_prompt_id_set_default_version_Request - _responses_Request: + - 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 + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. properties: - input: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIResponseMessageInputUnion' - type: array - title: list[OpenAIResponseMessageInputUnion] - title: string | list[OpenAIResponseMessageInputUnion] - model: - type: string - title: Model - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt - instructions: - anyOf: - - type: string - - type: 'null' - previous_response_id: - anyOf: - - type: string - - type: 'null' - conversation: - anyOf: - - type: string - - type: 'null' - store: - anyOf: - - type: boolean - - type: 'null' - default: true - stream: - anyOf: - - type: boolean - - type: 'null' - default: false - temperature: - anyOf: - - type: number - - type: 'null' - text: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseText' - title: OpenAIResponseText - - type: 'null' - title: OpenAIResponseText - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - discriminator: - propertyName: type - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - include: - anyOf: - - items: - type: string - type: array - - type: 'null' - max_infer_iters: - anyOf: - - type: integer - - type: 'null' - default: 10 - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - type: object - required: - - input - - model - title: _responses_Request - _scoring_score_Request: - properties: - input_rows: + data: items: - additionalProperties: true - type: object + $ref: '#/components/schemas/OpenAIFileObject' + title: Data type: array - title: Input Rows - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - title: Scoring Functions - type: object + 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: - - input_rows - - scoring_functions - title: _scoring_score_Request - _scoring_score_batch_Request: + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse + type: object + OpenAIFileDeleteResponse: + description: Response for deleting a file in OpenAI Files API. properties: - dataset_id: + id: + title: Id type: string - title: Dataset Id - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - title: Scoring Functions - save_results_dataset: + object: + const: file + default: file + title: Object + type: string + deleted: + title: Deleted type: boolean - title: Save Results Dataset - default: false - type: object required: - - dataset_id - - scoring_functions - title: _scoring_score_batch_Request - _tool_runtime_invoke_Request: + - id + - deleted + title: OpenAIFileDeleteResponse + type: object + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). properties: - tool_name: + type: + const: bf16 + default: bf16 + title: Type type: string - title: Tool Name - kwargs: - additionalProperties: true - type: object - title: Kwargs + title: Bf16QuantizationConfig type: object + EmbeddingsResponse: + description: Response containing generated embeddings. + properties: + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array required: - - tool_name - - kwargs - title: _tool_runtime_invoke_Request - _vector_io_query_Request: + - embeddings + title: EmbeddingsResponse + type: object + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. properties: - vector_store_id: + type: + const: fp8_mixed + default: fp8_mixed + title: Type type: string - title: Vector Store Id - query: + title: Fp8QuantizationConfig + type: object + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. + properties: + type: + const: int4_mixed + default: int4_mixed + title: Type + type: string + scheme: anyOf: - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - params: - anyOf: - - additionalProperties: true - type: object - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig type: object - required: - - vector_store_id - - query - title: _vector_io_query_Request - _vector_stores_vector_store_id_Request: + OpenAIChatCompletionUsage: + description: Usage information for OpenAI chat completion. properties: - name: + 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: - - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' - expires_after: + nullable: true + title: OpenAIChatCompletionUsagePromptTokensDetails + completion_tokens_details: anyOf: - - additionalProperties: true - type: object + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' - metadata: + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage + type: object + OpenAIChatCompletionUsageCompletionTokensDetails: + description: Token details for output tokens in OpenAI chat completion usage. + properties: + reasoning_tokens: anyOf: - - additionalProperties: true - type: object + - type: integer - type: 'null' + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails type: object - title: _vector_stores_vector_store_id_Request - _vector_stores_vector_store_id_files_Request: + OpenAIChatCompletionUsagePromptTokensDetails: + description: Token details for prompt tokens in OpenAI chat completion usage. properties: - file_id: - type: string - title: File Id - attributes: + cached_tokens: anyOf: - - additionalProperties: true - type: object + - type: integer - type: 'null' - chunking_strategy: + nullable: true + title: OpenAIChatCompletionUsagePromptTokensDetails + type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' - title: Chunking Strategy - type: object + nullable: true + title: OpenAIChoiceLogprobs required: - - file_id - title: _vector_stores_vector_store_id_files_Request - _vector_stores_vector_store_id_files_file_id_Request: - properties: - attributes: - additionalProperties: true - type: object - title: Attributes + - message + - finish_reason + - index + title: OpenAIChoice type: object - required: - - attributes - title: _vector_stores_vector_store_id_files_file_id_Request - _vector_stores_vector_store_id_search_Request: + OpenAIChoiceLogprobs: + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. properties: - query: + content: anyOf: - - type: string - items: - type: string + $ref: '#/components/schemas/OpenAITokenLogProb' type: array - title: list[string] - title: string | list[string] - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - max_num_results: - anyOf: - - type: integer - type: 'null' - default: 10 - ranking_options: + nullable: true + refusal: anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array - type: 'null' - title: SearchRankingOptions - rewrite_query: + 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: anyOf: - - type: boolean + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' - default: false - search_mode: + nullable: true + title: OpenAIChatCompletionUsage + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + title: Input Messages + type: array + required: + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + 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: - - type: string + - items: + type: integer + type: array - type: 'null' - default: vector - type: object + nullable: true + logprob: + title: Logprob + type: number + top_logprobs: + items: + $ref: '#/components/schemas/OpenAITopLogProb' + title: Top Logprobs + type: array required: - - query - title: _vector_stores_vector_store_id_search_Request - Error: - description: Error response from the API. Roughly follows RFC 7807. + - 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: - status: - title: Status - type: integer - title: - title: Title - type: string - detail: - title: Detail + token: + title: Token type: string - instance: + bytes: anyOf: - - type: string + - items: + type: integer + type: array - type: 'null' nullable: true + logprob: + title: Logprob + type: number required: - - status - - title - - detail - title: Error + - token + - logprob + title: OpenAITopLogProb type: object - ImageContentItem: - description: A image content item + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. properties: - type: - const: image - default: image - title: Type + 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 - image: - $ref: '#/components/schemas/_URLOrData' required: - - image - title: ImageContentItem - type: object - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - BuiltinTool: - enum: - - brave_search - - wolfram_alpha - - photogen - - code_interpreter - title: BuiltinTool - type: string - ImageDelta: - description: An image content delta for streaming responses. - properties: - type: - const: image - default: image - title: Type - type: string - image: - format: binary - title: Image - type: string - required: - - image - title: ImageDelta + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse type: object - TextDelta: - description: A text content delta for streaming responses. + OpenAIChatCompletion: + description: Response from an OpenAI-compatible chat completion request. properties: - type: - const: text - default: text - title: Type + id: + title: Id type: string - text: - title: Text + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object type: string - required: - - text - title: TextDelta - type: object - ToolCall: - properties: - call_id: - title: Call Id + created: + title: Created + type: integer + model: + title: Model type: string - tool_name: + usage: anyOf: - - $ref: '#/components/schemas/BuiltinTool' - title: BuiltinTool - - type: string - title: BuiltinTool | string - arguments: - title: Arguments - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - call_id - - tool_name - - arguments - title: ToolCall + - id + - choices + - created + - model + title: OpenAIChatCompletion type: object - ToolCallDelta: - description: A tool call content delta for streaming responses. + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. properties: - type: - const: tool_call - default: tool_call - title: Type - type: string - tool_call: + content: anyOf: - type: string - - $ref: '#/components/schemas/ToolCall' - title: ToolCall - title: string | ToolCall - parse_status: - $ref: '#/components/schemas/ToolCallParseStatus' - required: - - tool_call - - parse_status - title: ToolCallDelta - type: object - ToolCallParseStatus: - description: Status of tool call parsing during streaming. - enum: - - started - - in_progress - - failed - - succeeded - title: ToolCallParseStatus - type: string - ContentDelta: - discriminator: - mapping: - image: '#/components/schemas/ImageDelta' - text: '#/components/schemas/TextDelta' - tool_call: '#/components/schemas/ToolCallDelta' - propertyName: type - oneOf: - - $ref: '#/components/schemas/TextDelta' - title: TextDelta - - $ref: '#/components/schemas/ImageDelta' - title: ImageDelta - - $ref: '#/components/schemas/ToolCallDelta' - title: ToolCallDelta - title: TextDelta | ImageDelta | ToolCallDelta - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat - type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. - 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 - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: + - type: 'null' + nullable: true + refusal: anyOf: - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] nullable: true - name: + role: anyOf: - type: string - type: 'null' @@ -11286,320 +8467,222 @@ components: type: array - type: 'null' nullable: true - title: OpenAIAssistantMessageParam - type: object - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. - 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' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: + reasoning_content: anyOf: - type: string - type: 'null' nullable: true - required: - - content - title: OpenAIUserMessageParam + title: OpenAIChoiceDelta type: object - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - OpenAIResponseFormatParam: - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - VectorStoreFileStatus: - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - OpenAIResponseInputMessageContent: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - 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. + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: - content: + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: 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' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs + required: + - delta + - finish_reason + - index + title: OpenAIChunkChoice + type: object + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + properties: + id: + title: Id type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - const: message - default: message - title: Type + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object type: string - id: + created: + title: Created + type: integer + model: + title: Model + type: string + usage: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' nullable: true - status: + title: OpenAIChatCompletionUsage + required: + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk + type: object + OpenAIChatCompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible chat completion endpoint. + properties: + model: + title: Model + type: string + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + minItems: 1 + title: Messages + type: array + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + function_call: anyOf: - type: string + - additionalProperties: true + type: object - type: 'null' + title: string | object nullable: true - required: - - content - - role - title: OpenAIResponseMessage - type: object - OpenAIResponseOutput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseContentPartOutputText: - description: Text content within a streamed response part. - properties: - type: - const: output_text - default: output_text - title: Type - type: string - text: - title: Text - type: string - annotations: - items: - discriminator: + functions: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + response_format: + anyOf: + - discriminator: mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations - type: array - logprobs: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: 'null' + title: Response Format + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + tool_choice: + anyOf: + - type: string + - additionalProperties: true + type: object + - type: 'null' + title: string | object + nullable: true + tools: anyOf: - items: additionalProperties: true @@ -11607,2110 +8690,1274 @@ components: type: array - type: 'null' nullable: true + top_logprobs: + anyOf: + - type: integer + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - text - title: OpenAIResponseContentPartOutputText + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody type: object - OpenAIResponseContentPartReasoningText: - description: Reasoning text emitted as part of a streamed response. + 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: - type: - const: reasoning_text - default: reasoning_text - title: Type + finish_reason: + title: Finish Reason type: string text: title: Text type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: + - finish_reason - text - title: OpenAIResponseContentPartReasoningText + - index + title: OpenAICompletionChoice type: object - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseContentPartReasoningSummary: - description: Reasoning summary part in a streamed response. + OpenAICompletion: + 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: - type: - const: summary_text - default: summary_text - title: Type + id: + title: Id type: string - text: - title: Text + choices: + items: + $ref: '#/components/schemas/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: - - text - title: OpenAIResponseContentPartReasoningSummary + - id + - choices + - created + - model + title: OpenAICompletion type: object - OpenAIResponseObjectStreamResponseCompleted: - description: Streaming event indicating a response has been completed. + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.completed - default: response.completed - title: Type + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs + type: object + OpenAICompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible completion endpoint. + properties: + model: + title: Model type: string + prompt: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - items: + type: integer + type: array + title: list[integer] + - items: + items: + type: integer + type: array + type: array + title: list[array] + title: string | ... (4 variants) + best_of: + anyOf: + - type: integer + - type: 'null' + nullable: true + echo: + anyOf: + - type: boolean + - type: 'null' + nullable: true + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true + suffix: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - response - title: OpenAIResponseObjectStreamResponseCompleted + - model + - prompt + title: OpenAICompletionRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseContentPartAdded: - description: Streaming event for when a new content part is added to a response item. + OpenAIEmbeddingData: + description: A single embedding data object from an OpenAI-compatible embeddings response. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id + object: + const: embedding + default: embedding + title: Object type: string - output_index: - title: Output Index + embedding: + anyOf: + - items: + type: number + type: array + title: list[number] + - type: string + title: list[number] | string + index: + title: Index type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer - type: - const: response.content_part.added - default: response.content_part.added - title: Type - type: string required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartAdded + - embedding + - index + title: OpenAIEmbeddingData type: object - OpenAIResponseObjectStreamResponseContentPartDone: - description: Streaming event for when a content part is completed. + OpenAIEmbeddingUsage: + description: Usage information for an OpenAI-compatible embeddings response. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index + prompt_tokens: + title: Prompt Tokens type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number + total_tokens: + title: Total Tokens type: integer - type: - const: response.content_part.done - default: response.content_part.done - title: Type - type: string required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartDone + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage type: object - OpenAIResponseObjectStreamResponseCreated: - description: Streaming event indicating a new response has been created. + OpenAIEmbeddingsRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible embeddings endpoint. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.created - default: response.created - title: Type + model: + title: Model type: string + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + encoding_format: + anyOf: + - type: string + - type: 'null' + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - response - title: OpenAIResponseObjectStreamResponseCreated + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseFailed: - description: Streaming event emitted when a response fails. + OpenAIEmbeddingsResponse: + description: Response from an OpenAI-compatible embeddings request. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.failed - default: response.failed - title: Type + object: + const: list + default: list + title: Object type: string + data: + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + title: Data + type: array + model: + title: Model + type: string + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseFailed + - data + - model + - usage + title: OpenAIEmbeddingsResponse type: object - OpenAIResponseObjectStreamResponseFileSearchCallCompleted: - description: Streaming event for completed file search calls. + RerankData: + description: A single rerank result from a reranking response. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + index: + title: Index type: integer - type: - const: response.file_search_call.completed - default: response.file_search_call.completed - title: Type - type: string + relevance_score: + title: Relevance Score + type: number required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - index + - relevance_score + title: RerankData type: object - OpenAIResponseObjectStreamResponseFileSearchCallInProgress: - description: Streaming event for file search calls in progress. + RerankResponse: + description: Response from a reranking request. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - title: Type - type: string + data: + items: + $ref: '#/components/schemas/RerankData' + title: Data + type: array required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - data + title: RerankResponse type: object - OpenAIResponseObjectStreamResponseFileSearchCallSearching: - description: Streaming event for file search currently searching. + TokenLogProbs: + description: Log probabilities for generated tokens. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.searching - default: response.file_search_call.searching - title: Type - type: string + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - logprobs_by_token + title: TokenLogProbs type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: - description: Streaming event for incremental function call argument updates. + ToolResponseMessage: + description: A message representing the result of a tool invocation. properties: - delta: - title: Delta + role: + const: tool + default: tool + title: Role type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - title: Type - type: string - required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: - description: Streaming event for when function call arguments are completed. - properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.done - default: response.function_call_arguments.done - title: Type + call_id: + title: Call Id type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - call_id + - content + title: ToolResponseMessage type: object - OpenAIResponseObjectStreamResponseInProgress: - description: Streaming event indicating the response remains in progress. + UserMessage: + description: A message from the user in a chat conversation. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.in_progress - default: response.in_progress - title: Type + role: + const: user + default: user + title: Role type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseInProgress + - content + title: UserMessage type: object - OpenAIResponseObjectStreamResponseIncomplete: - description: Streaming event emitted when a response ends in an incomplete state. + HealthStatus: + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + type: string + HealthInfo: + description: Health status information for the service. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.incomplete - default: response.incomplete - title: Type - type: string + status: + $ref: '#/components/schemas/HealthStatus' required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseIncomplete + - status + title: HealthInfo type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - delta: - title: Delta - type: string - item_id: - title: Item Id + route: + title: Route type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - title: Type + method: + title: Method type: string + provider_types: + items: + type: string + title: Provider Types + type: array required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - route + - method + - provider_types + title: RouteInfo type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + ListRoutesResponse: + description: Response containing a list of all available API routes. properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - title: Type - type: string + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - data + title: ListRoutesResponse type: object - OpenAIResponseObjectStreamResponseMcpCallCompleted: - description: Streaming event for completed MCP calls. - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.completed - default: response.mcp_call.completed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - type: object - OpenAIResponseObjectStreamResponseMcpCallFailed: - description: Streaming event for failed MCP calls. - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.failed - default: response.mcp_call.failed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallFailed - type: object - OpenAIResponseObjectStreamResponseMcpCallInProgress: - description: Streaming event for MCP calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - type: object - OpenAIResponseObjectStreamResponseMcpListToolsCompleted: - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - type: object - OpenAIResponseObjectStreamResponseMcpListToolsFailed: - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - type: object - OpenAIResponseObjectStreamResponseMcpListToolsInProgress: - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - type: object - OpenAIResponseObjectStreamResponseOutputItemAdded: - description: Streaming event for when a new output item is added to the response. - properties: - response_id: - title: Response Id - type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.added - default: response.output_item.added - title: Type - type: string - required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemAdded - type: object - OpenAIResponseObjectStreamResponseOutputItemDone: - description: Streaming event for when an output item is completed. - properties: - response_id: - title: Response Id - type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.done - default: response.output_item.done - title: Type - type: string - required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemDone - type: object - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: - description: Streaming event for when an annotation is added to output text. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - content_index: - title: Content Index - type: integer - annotation_index: - title: Annotation Index - type: integer - annotation: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.annotation.added - default: response.output_text.annotation.added - title: Type - type: string - required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - type: object - OpenAIResponseObjectStreamResponseOutputTextDelta: - description: Streaming event for incremental text content updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.delta - default: response.output_text.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDelta - type: object - OpenAIResponseObjectStreamResponseOutputTextDone: - description: Streaming event for when text output is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.done - default: response.output_text.done - title: Type - type: string - required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDone - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: - description: Streaming event for when a new reasoning summary part is added. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - title: Type - type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: - description: Streaming event for when a reasoning summary part is completed. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - title: Type - type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: - description: Streaming event for incremental reasoning summary text updates. - properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - title: Type - type: string - required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: - description: Streaming event for when reasoning summary text is completed. - properties: - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - title: Type - type: string - required: - - text - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - type: object - OpenAIResponseObjectStreamResponseReasoningTextDelta: - description: Streaming event for incremental reasoning text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.delta - default: response.reasoning_text.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - type: object - OpenAIResponseObjectStreamResponseReasoningTextDone: - description: Streaming event for when reasoning text is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.done - default: response.reasoning_text.done - title: Type - type: string - required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDone - type: object - OpenAIResponseObjectStreamResponseRefusalDelta: - description: Streaming event for incremental refusal text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.delta - default: response.refusal.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDelta - type: object - OpenAIResponseObjectStreamResponseRefusalDone: - description: Streaming event for when refusal text is completed. - properties: - content_index: - title: Content Index - type: integer - refusal: - title: Refusal - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.done - default: response.refusal.done - title: Type - type: string - required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDone - type: object - OpenAIResponseObjectStreamResponseWebSearchCallCompleted: - description: Streaming event for completed web search calls. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.completed - default: response.web_search_call.completed - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - type: object - OpenAIResponseObjectStreamResponseWebSearchCallInProgress: - description: Streaming event for web search calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - type: object - OpenAIResponseObjectStreamResponseWebSearchCallSearching: - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.searching - default: response.web_search_call.searching - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - type: object - OpenAIResponseObjectStream: - discriminator: - mapping: - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - title: OpenAIResponseObjectStreamResponseCreated - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - title: OpenAIResponseObjectStreamResponseInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - title: OpenAIResponseObjectStreamResponseOutputItemAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - title: OpenAIResponseObjectStreamResponseOutputItemDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - title: OpenAIResponseObjectStreamResponseOutputTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - title: OpenAIResponseObjectStreamResponseOutputTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - title: OpenAIResponseObjectStreamResponseMcpCallFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - title: OpenAIResponseObjectStreamResponseContentPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - title: OpenAIResponseObjectStreamResponseContentPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - title: OpenAIResponseObjectStreamResponseReasoningTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - title: OpenAIResponseObjectStreamResponseRefusalDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - title: OpenAIResponseObjectStreamResponseRefusalDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - title: OpenAIResponseObjectStreamResponseIncomplete - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - title: OpenAIResponseObjectStreamResponseFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - title: OpenAIResponseObjectStreamResponseCompleted - title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - SpanEndPayload: - description: Payload for a span end event. + VersionInfo: + description: Version information for the service. properties: - type: - const: span_end - default: span_end - title: Type + version: + title: Version type: string - status: - $ref: '#/components/schemas/SpanStatus' required: - - status - title: SpanEndPayload + - version + title: VersionInfo type: object - SpanStartPayload: - description: Payload for a span start event. + OpenAIModel: + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: - type: - const: span_start - default: span_start - title: Type + id: + title: Id type: string - name: - title: Name + object: + const: model + default: model + title: Object type: string - parent_span_id: + created: + title: Created + type: integer + owned_by: + title: Owned By + type: string + custom_metadata: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true required: - - name - title: SpanStartPayload + - id + - created + - owned_by + title: OpenAIModel type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. + DPOLossType: enum: - - ok - - error - title: SpanStatus + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. + DPOAlignmentConfig: + description: Configuration for Direct Preference Optimization (DPO) alignment. + properties: + beta: + title: Beta + type: number + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid + required: + - beta + title: DPOAlignmentConfig + type: object + DatasetFormat: + description: Format of the training dataset. enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity + - instruct + - dialog + title: DatasetFormat type: string - MetricEvent: - description: A metric event containing a measured value. + DataConfig: + description: Configuration for training data and data loading. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp + dataset_id: + title: Dataset Id type: string - attributes: + batch_size: + title: Batch Size + type: integer + shuffle: + title: Shuffle + type: boolean + data_format: + $ref: '#/components/schemas/DatasetFormat' + validation_dataset_id: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object + - type: string - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: + nullable: true + packed: anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string + - type: boolean + - type: 'null' + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + default: false required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. + EfficiencyConfig: + description: Configuration for memory and compute efficiency optimizations. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: + enable_activation_checkpointing: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object + - type: boolean - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + default: false + title: EfficiencyConfig + type: object + OptimizerType: + description: Available optimizer algorithms for training. + enum: + - adam + - adamw + - sgd + title: OptimizerType + type: string + OptimizerConfig: + description: Configuration parameters for the optimization algorithm. + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + lr: + title: Lr + type: number + weight_decay: + title: Weight Decay + type: number + num_warmup_steps: + title: Num Warmup Steps + type: integer required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message + job_uuid: + title: Job Uuid type: string - severity: - $ref: '#/components/schemas/LogSeverity' + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent + - job_uuid + title: PostTrainingJobArtifactsResponse type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: - type: - title: Type + job_uuid: + title: Job Uuid type: string + log_lines: + items: + type: string + title: Log Lines + type: array required: - - type - title: ResponseGuardrailSpec + - job_uuid + - log_lines + title: PostTrainingJobLogStream type: object - OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. + PostTrainingJobStatusResponse: + description: Status of a finetuning job. properties: - created_at: - title: Created At - type: integer - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - nullable: true - title: OpenAIResponseError - id: - title: Id - type: string - model: - title: Model - type: string - object: - const: response - default: response - title: Object + job_uuid: + title: Job Uuid 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output - type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: anyOf: - - type: string + - format: date-time + type: string - type: 'null' nullable: true - prompt: + started_at: anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt + - format: date-time + type: string - type: 'null' nullable: true - title: OpenAIResponsePrompt - status: - title: Status - type: string - temperature: + completed_at: anyOf: - - type: number + - format: date-time + type: string - type: 'null' nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: + resources_allocated: anyOf: - - type: number + - additionalProperties: true + type: object - type: 'null' nullable: true - tools: + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + TrainingConfig: + description: Comprehensive configuration for the training process. + properties: + n_epochs: + title: N Epochs + type: integer + max_steps_per_epoch: + default: 1 + title: Max Steps Per Epoch + type: integer + gradient_accumulation_steps: + default: 1 + title: Gradient Accumulation Steps + type: integer + max_validation_steps: anyOf: - - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array + - type: integer - type: 'null' - nullable: true - truncation: + default: 1 + data_config: anyOf: - - type: string + - $ref: '#/components/schemas/DataConfig' + title: DataConfig - type: 'null' nullable: true - usage: + title: DataConfig + optimizer_config: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage + - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig - type: 'null' nullable: true - title: OpenAIResponseUsage - instructions: + title: OptimizerConfig + efficiency_config: anyOf: - - type: string + - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig - type: 'null' nullable: true - max_tool_calls: + title: EfficiencyConfig + dtype: anyOf: - - type: integer + - type: string - type: 'null' - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Input - type: array + default: bf16 required: - - created_at - - id - - model - - output - - status - - input - title: OpenAIResponseObjectWithInput + - n_epochs + title: TrainingConfig type: object - MetricInResponse: - description: A metric value included in API responses. + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. properties: - metric: - title: Metric + job_uuid: + title: Job Uuid type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest + type: object + Prompt: + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. + properties: + prompt: anyOf: - type: string - type: 'null' + description: The system prompt with variable placeholders nullable: true + version: + description: Version (integer starting at 1, incremented on save) + minimum: 1 + title: Version + type: integer + prompt_id: + description: Unique identifier in format 'pmpt_<48-digit-hash>' + title: Prompt Id + type: string + variables: + description: List of variable names that can be used in the prompt template + items: + type: string + title: Variables + type: array + is_default: + default: false + description: Boolean indicating whether this version is the default version + title: Is Default + type: boolean required: - - metric - - value - title: MetricInResponse + - version + - prompt_id + title: Prompt type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. + ProviderInfo: + description: Information about a registered provider including its configuration and health status. properties: - type: - const: dialog - default: dialog - title: Type + api: + title: Api type: string - title: DialogType + provider_id: + title: Provider Id + type: string + provider_type: + title: Provider Type + type: string + config: + additionalProperties: true + title: Config + type: object + health: + additionalProperties: true + title: Health + type: object + required: + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. + ModerationObjectResults: + description: A moderation object. properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array + flagged: + title: Flagged + type: boolean + categories: + anyOf: + - additionalProperties: + type: boolean + type: object + - type: 'null' + nullable: true + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + nullable: true + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - items - title: ConversationItemCreateRequest + - flagged + title: ModerationObjectResults type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. + ModerationObject: + description: A moderation object. properties: id: - description: unique identifier for this message title: Id type: string - content: - description: message content + model: + title: Model + type: string + results: items: - additionalProperties: true - type: object - title: Content + $ref: '#/components/schemas/ModerationObjectResults' + title: Results type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status - type: string - type: - const: message - default: message - title: Type - type: string - object: - const: message - default: message - title: Object - type: string required: - id - - content - - role - - status - title: ConversationMessage - type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). - properties: - type: - const: bf16 - default: bf16 - title: Type - type: string - title: Bf16QuantizationConfig + - model + - results + title: ModerationObject type: object - EmbeddingsResponse: - description: Response containing generated embeddings. + SafetyViolation: + description: Details of a safety violation detected by content moderation. properties: - embeddings: - items: - items: - type: number - type: array - title: Embeddings - type: array + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - embeddings - title: EmbeddingsResponse + - violation_level + title: SafetyViolation type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. + ViolationLevel: + description: Severity level of a safety violation. + enum: + - info + - warn + - error + title: ViolationLevel + type: string + RunShieldResponse: + description: Response from running a safety shield. properties: - type: - const: fp8_mixed - default: fp8_mixed - title: Type - type: string - title: Fp8QuantizationConfig + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation + - type: 'null' + nullable: true + title: SafetyViolation + title: RunShieldResponse type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. + ScoreBatchResponse: + description: Response from batch scoring operations on datasets. properties: - type: - const: int4_mixed - default: int4_mixed - title: Type - type: string - scheme: + dataset_id: anyOf: - type: string - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig + nullable: true + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object + required: + - results + title: ScoreBatchResponse type: object - OpenAIChoiceDelta: - description: A delta from an OpenAI-compatible chat completion streaming response. + ScoreResponse: + description: The response from scoring. properties: - content: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object + required: + - results + title: ScoreResponse + type: object + ToolDef: + description: Tool definition used in runtime contexts. + properties: + toolgroup_id: anyOf: - type: string - type: 'null' nullable: true - refusal: + name: + title: Name + type: string + description: anyOf: - type: string - type: 'null' nullable: true - role: + input_schema: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - tool_calls: + output_schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + required: + - name + title: ToolDef + type: object + ListToolDefsResponse: + description: Response containing a list of tool definitions. + properties: + data: + items: + $ref: '#/components/schemas/ToolDef' + title: Data + type: array + required: + - data + title: ListToolDefsResponse + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id + type: string + provider_id: + title: Provider Id + type: string + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL + required: + - toolgroup_id + - provider_id + title: ToolGroupInput + type: object + ToolInvocationResult: + description: Result of a tool invocation. + properties: + content: anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array + title: list[ImageContentItem | TextContentItem] - type: 'null' + title: string | list[ImageContentItem | TextContentItem] nullable: true - reasoning_content: + error_message: anyOf: - type: string - type: 'null' nullable: true - title: OpenAIChoiceDelta + error_code: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: ToolInvocationResult type: object - OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + 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. properties: - content: + chunk_id: anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array + - type: string - type: 'null' nullable: true - refusal: + document_id: anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array + - type: string - type: 'null' nullable: true - title: OpenAIChoiceLogprobs - type: object - OpenAIChunkChoice: - description: A chunk choice from an OpenAI-compatible chat completion streaming response. - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + source: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - type: string - type: 'null' nullable: true - title: OpenAIChoiceLogprobs - required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice - type: object - OpenAIChatCompletionChunk: - description: Chunk from a streaming response to an OpenAI-compatible chat completion request. - properties: - id: - title: Id - type: string - choices: - items: - $ref: '#/components/schemas/OpenAIChunkChoice' - title: Choices - type: array - object: - const: chat.completion.chunk - default: chat.completion.chunk - title: Object - type: string - created: - title: Created - type: integer - model: - title: Model - type: string - usage: + created_timestamp: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage + - type: integer - type: 'null' nullable: true - title: OpenAIChatCompletionUsage - required: - - id - - choices - - created - - model - title: OpenAIChatCompletionChunk - type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + updated_timestamp: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - type: integer - type: 'null' nullable: true - title: OpenAIChoiceLogprobs - required: - - message - - finish_reason - - index - title: OpenAIChoice - 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: + chunk_window: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - type: string - type: 'null' nullable: true - title: OpenAIChoiceLogprobs - required: - - finish_reason - - text - - index - title: OpenAICompletionChoice - type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens - properties: - text_offset: + chunk_tokenizer: anyOf: - - items: - type: integer - type: array + - type: string - type: 'null' nullable: true - token_logprobs: + chunk_embedding_model: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - tokens: + chunk_embedding_dimension: anyOf: - - items: - type: string - type: array + - type: integer - type: 'null' nullable: true - top_logprobs: + content_token_count: anyOf: - - items: - additionalProperties: - type: number - type: object - type: array + - type: integer - type: 'null' nullable: true - title: OpenAICompletionLogprobs - type: object - TokenLogProbs: - description: Log probabilities for generated tokens. - properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs + metadata_token_count: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: ChunkMetadata type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. + Chunk: + description: A chunk of content that can be inserted into a vector database. properties: - role: - const: tool - default: tool - title: Role - type: string - call_id: - title: Call Id - type: string content: anyOf: - type: string @@ -13740,413 +9987,541 @@ components: type: array title: list[ImageContentItem | TextContentItem] title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + nullable: true + title: ChunkMetadata required: - - call_id - content - title: ToolResponseMessage + - chunk_id + title: Chunk type: object - UserMessage: - description: A message from the user in a chat conversation. + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store file batch with extra_body support. properties: - role: - const: user - default: user - title: Role - type: string - content: + file_ids: + items: + type: string + title: File Ids + type: array + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: anyOf: - - type: string - discriminator: mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + nullable: true + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + type: object + OpenAICreateVectorStoreRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store with extra_body support. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + file_ids: + anyOf: - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem + type: string type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: + - type: 'null' + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: anyOf: - - type: string - discriminator: mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' - title: string | list[ImageContentItem | TextContentItem] + title: Chunking Strategy nullable: true - required: - - content - title: UserMessage + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: OpenAICreateVectorStoreRequestWithExtraBody type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. + QueryChunksResponse: + description: Response from querying chunks in a vector database. properties: - job_uuid: - title: Job Uuid - type: string - log_lines: + chunks: items: - type: string - title: Log Lines + $ref: '#/components/schemas/Chunk' + title: Chunks + type: array + scores: + items: + type: number + title: Scores type: array required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream + - chunks + - scores + title: QueryChunksResponse type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. + VectorStoreContent: + description: Content item from a vector store file or search result. properties: - job_uuid: - title: Job Uuid - type: string - finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id + type: + const: text + title: Type type: string - validation_dataset_id: - title: Validation Dataset Id + text: + title: Text type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - title: Hyperparam Search Config - type: object - logger_config: + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + nullable: true + title: ChunkMetadata + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + required: + - type + - text + title: VectorStoreContent + type: object + VectorStoreCreateRequest: + description: Request to create a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: additionalProperties: true - title: Logger Config + title: Metadata type: object - required: - - job_uuid - - training_config - - hyperparam_search_config - - logger_config - title: SupervisedFineTuneRequest - RegisterModelRequest: + title: VectorStoreCreateRequest type: object + VectorStoreDeleteResponse: + description: Response from deleting a vector store. properties: - model_id: - type: string - description: The identifier of the model to register. - provider_model_id: + id: + title: Id type: string - description: >- - The identifier of the model in the provider. - provider_id: + object: + default: vector_store.deleted + title: Object type: string - description: The identifier of the provider. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Any additional metadata for this model. - model_type: - $ref: '#/components/schemas/ModelType' - description: The type of model to register. - additionalProperties: false + deleted: + default: true + title: Deleted + type: boolean + required: + - id + title: VectorStoreDeleteResponse + type: object + VectorStoreFileCounts: + description: File processing status counts for a 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: - - model_id - title: RegisterModelRequest - ParamType: - 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' - discriminator: - propertyName: type - mapping: - string: '#/components/schemas/StringType' - number: '#/components/schemas/NumberType' - boolean: '#/components/schemas/BooleanType' - array: '#/components/schemas/ArrayType' - object: '#/components/schemas/ObjectType' - json: '#/components/schemas/JsonType' - union: '#/components/schemas/UnionType' - chat_completion_input: '#/components/schemas/ChatCompletionInputType' - completion_input: '#/components/schemas/CompletionInputType' - RegisterScoringFunctionRequest: + - completed + - cancelled + - failed + - in_progress + - total + title: VectorStoreFileCounts type: object + VectorStoreFileBatchObject: + description: OpenAI Vector Store File Batch object. properties: - scoring_fn_id: + id: + title: Id type: string - description: >- - The ID of the scoring function to register. - description: + object: + default: vector_store.file_batch + title: Object type: string - description: The description of the scoring function. - return_type: - $ref: '#/components/schemas/ParamType' - description: The return type of the scoring function. - provider_scoring_fn_id: + created_at: + title: Created At + type: integer + vector_store_id: + title: Vector Store Id type: string - description: >- - The ID of the provider scoring function to use for the scoring function. - provider_id: + status: + title: Status type: string - description: >- - The ID of the provider to use for the scoring function. - params: - $ref: '#/components/schemas/ScoringFnParams' - description: >- - The parameters for the scoring function for benchmark eval, these can - be overridden for app eval. - additionalProperties: false + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' required: - - scoring_fn_id - - description - - return_type - title: RegisterScoringFunctionRequest - RegisterShieldRequest: + - id + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject type: object + VectorStoreFileContentResponse: + description: Represents the parsed content of a vector store file. properties: - shield_id: + object: + const: vector_store.file_content.page + default: vector_store.file_content.page + title: Object type: string - description: >- - The identifier of the shield to register. - provider_shield_id: + data: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - data + title: VectorStoreFileContentResponse + type: object + VectorStoreFileDeleteResponse: + description: Response from deleting a vector store file. + properties: + id: + title: Id type: string - description: >- - The identifier of the shield in the provider. - provider_id: + object: + default: vector_store.file.deleted + title: Object type: string - description: The identifier of the provider. - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The parameters of the shield. - additionalProperties: false + deleted: + default: true + title: Deleted + type: boolean required: - - shield_id - title: RegisterShieldRequest - RegisterToolGroupRequest: + - id + title: VectorStoreFileDeleteResponse type: object + VectorStoreFileLastError: + description: Error information for failed vector store file processing. properties: - toolgroup_id: + code: + title: Code type: string - description: The ID of the tool group to register. - provider_id: + enum: + - server_error + - rate_limit_exceeded + default: server_error + message: + title: Message 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 - DataSource: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - RegisterDatasetRequest: + required: + - code + - message + title: VectorStoreFileLastError type: object - ToolGroupInput: - description: Input data for registering a tool group. + VectorStoreFileObject: + description: OpenAI Vector Store File object. properties: - toolgroup_id: - title: Toolgroup Id + id: + title: Id type: string - provider_id: - title: Provider Id + object: + default: vector_store.file + title: Object type: string - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: + attributes: + additionalProperties: true + title: Attributes + type: object + chunking_strategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + created_at: + title: Created At + type: integer + last_error: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' nullable: true - title: URL + title: VectorStoreFileLastError + status: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + vector_store_id: + title: Vector Store Id + type: string required: - - toolgroup_id - - provider_id - title: ToolGroupInput + - id + - chunking_strategy + - created_at + - status + - vector_store_id + title: VectorStoreFileObject type: object - Chunk: - description: A chunk of content that can be inserted into a vector database. + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. properties: - content: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id + - type: 'null' + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + 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. + properties: + object: + default: list + title: Object type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - chunk_metadata: + last_id: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' nullable: true - title: ChunkMetadata + has_more: + default: false + title: Has More + type: boolean required: - - content - - chunk_id - title: Chunk + - data + title: VectorStoreListFilesResponse type: object - VectorStoreCreateRequest: - description: Request to create a vector store. + VectorStoreObject: + description: OpenAI Vector Store object. 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' nullable: true - file_ids: - items: - type: string - title: File Ids - type: array + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + default: completed + title: Status + type: string expires_after: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - chunking_strategy: + expires_at: anyOf: - - additionalProperties: true - type: object + - type: integer + - type: 'null' + nullable: true + last_active_at: + anyOf: + - type: integer - type: 'null' nullable: true metadata: additionalProperties: true title: Metadata type: object - title: VectorStoreCreateRequest + required: + - id + - created_at + - file_counts + title: VectorStoreObject + type: object + VectorStoreListResponse: + description: Response from listing vector stores. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + nullable: true + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListResponse type: object VectorStoreModifyRequest: description: Request to modify a vector store. @@ -14240,149 +10615,34 @@ components: - content title: VectorStoreSearchResponse type: object - _safety_run_shield_Request: + VectorStoreSearchResponsePage: + description: Paginated response from searching a vector store. properties: - shield_id: - title: Shield Id + object: + default: vector_store.search_results.page + title: Object type: string - messages: + search_query: 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Messages + type: string + title: Search Query type: array - params: - additionalProperties: true - title: Params - type: object + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - shield_id - - messages - - params - title: _safety_run_shield_Request + - search_query + - data + title: VectorStoreSearchResponsePage type: object - OpenAIResponseMessageOutputUnion: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - x-stainless-naming: OpenAIResponseMessageOutputOneOf - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse - x-stainless-naming: OpenAIResponseMessageOutputUnion - OpenAIResponseMessageInputUnion: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - x-stainless-naming: OpenAIResponseMessageInputOneOf - title: OpenAIResponseMessage-Input | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse - x-stainless-naming: OpenAIResponseMessageInputUnion - responses: - BadRequest400: - description: The request was invalid or malformed - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 400 - 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 - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 429 - title: Too Many Requests - detail: You have exceeded the rate limit. Please try again later. - InternalServerError500: - description: The server encountered an unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 500 - title: Internal Server Error - detail: An unexpected error occurred - DefaultError: - description: An error occurred - content: - application/json: - schema: - $ref: '#/components/schemas/Error' diff --git a/scripts/openapi_generator/app.py b/scripts/openapi_generator/app.py index 2f3314b94a..bf7f4d70f9 100644 --- a/scripts/openapi_generator/app.py +++ b/scripts/openapi_generator/app.py @@ -13,8 +13,8 @@ from fastapi import FastAPI -from llama_stack.apis.datatypes import Api from llama_stack.core.resolver import api_protocol_map +from llama_stack_api import Api from .state import _protocol_methods_cache diff --git a/scripts/openapi_generator/endpoints.py b/scripts/openapi_generator/endpoints.py index 2ccf073e8c..f3bf1382e0 100644 --- a/scripts/openapi_generator/endpoints.py +++ b/scripts/openapi_generator/endpoints.py @@ -18,7 +18,7 @@ from fastapi import FastAPI from pydantic import Field, create_model -from llama_stack.apis.datatypes import Api +from llama_stack_api import Api from . import app as app_module from .state import _dynamic_models, _extra_body_fields diff --git a/scripts/openapi_generator/schema_collection.py b/scripts/openapi_generator/schema_collection.py index 1cf6935f2e..465fe06927 100644 --- a/scripts/openapi_generator/schema_collection.py +++ b/scripts/openapi_generator/schema_collection.py @@ -31,7 +31,7 @@ def _import_all_modules_in_package(package_name: str) -> list[Any]: that any register_schema() calls at module level are executed. Args: - package_name: The fully qualified package name (e.g., 'llama_stack.apis') + package_name: The fully qualified package name (e.g., 'llama_stack_api') Returns: List of imported module objects @@ -54,7 +54,7 @@ def _import_all_modules_in_package(package_name: str) -> list[Any]: modules.append(module) # If this is a package, also try to import any .py files directly - # (e.g., llama_stack.apis.scoring_functions.scoring_functions) + # (e.g., llama_stack_api.scoring_functions.scoring_functions) if ispkg: try: # Try importing the module file with the same name as the package @@ -113,11 +113,11 @@ def _ensure_json_schema_types_included(openapi_schema: dict[str, Any]) -> dict[s # Dynamically import all modules in packages that might register schemas # This ensures register_schema() calls execute and populate _registered_schemas # Also collect the modules for later scanning of @json_schema_type decorated classes - apis_modules = _import_all_modules_in_package("llama_stack.apis") + apis_modules = _import_all_modules_in_package("llama_stack_api") _import_all_modules_in_package("llama_stack.core.telemetry") # First, handle registered schemas (union types, etc.) - from llama_stack.schema_utils import _registered_schemas + from llama_stack_api.schema_utils import _registered_schemas for schema_type, registration_info in _registered_schemas.items(): schema_name = registration_info["name"] diff --git a/scripts/openapi_generator/schema_filtering.py b/scripts/openapi_generator/schema_filtering.py index 9426d7a21e..108297e9aa 100644 --- a/scripts/openapi_generator/schema_filtering.py +++ b/scripts/openapi_generator/schema_filtering.py @@ -10,7 +10,7 @@ from typing import Any -from llama_stack.apis.version import ( +from llama_stack_api.version import ( LLAMA_STACK_API_V1, LLAMA_STACK_API_V1ALPHA, LLAMA_STACK_API_V1BETA, @@ -25,7 +25,7 @@ def _get_all_json_schema_type_names() -> set[str]: This ensures they are included in filtered schemas even if not directly referenced by paths. """ schema_names = set() - apis_modules = schema_collection._import_all_modules_in_package("llama_stack.apis") + apis_modules = schema_collection._import_all_modules_in_package("llama_stack_api") for module in apis_modules: for attr_name in dir(module): try: @@ -43,7 +43,7 @@ def _get_all_json_schema_type_names() -> set[str]: def _get_explicit_schema_names(openapi_schema: dict[str, Any]) -> set[str]: """Get all registered schema names and @json_schema_type decorated model names.""" - from llama_stack.schema_utils import _registered_schemas + from llama_stack_api.schema_utils import _registered_schemas registered_schema_names = {info["name"] for info in _registered_schemas.values()} json_schema_type_names = _get_all_json_schema_type_names() diff --git a/scripts/openapi_generator/state.py b/scripts/openapi_generator/state.py index b7389f07bf..b1c8f8edd1 100644 --- a/scripts/openapi_generator/state.py +++ b/scripts/openapi_generator/state.py @@ -10,7 +10,7 @@ from typing import Any -from llama_stack.apis.datatypes import Api +from llama_stack_api import Api # Global list to store dynamic models created during endpoint generation _dynamic_models: list[Any] = [] diff --git a/src/llama_stack/core/library_client.py b/src/llama_stack/core/library_client.py index 5f95fcbdd4..d6be7aeca0 100644 --- a/src/llama_stack/core/library_client.py +++ b/src/llama_stack/core/library_client.py @@ -19,7 +19,7 @@ import yaml from fastapi import Response as FastAPIResponse -from llama_stack_api import is_unwrapped_body_param +from llama_stack.core.utils.type_inspection import is_unwrapped_body_param try: from llama_stack_client import ( @@ -51,7 +51,6 @@ from llama_stack.core.utils.config import redact_sensitive_fields from llama_stack.core.utils.context import preserve_contexts_async_generator from llama_stack.core.utils.exec import in_notebook -from llama_stack.core.utils.type_inspection import is_unwrapped_body_param from llama_stack.log import get_logger, setup_logging logger = get_logger(name=__name__, category="core") diff --git a/src/llama_stack_api/__init__.py b/src/llama_stack_api/__init__.py index 19b29301be..fed486cb7b 100644 --- a/src/llama_stack_api/__init__.py +++ b/src/llama_stack_api/__init__.py @@ -388,27 +388,6 @@ ) # Import from strong_typing -from .strong_typing.core import JsonType -from .strong_typing.docstring import Docstring, parse_type -from .strong_typing.inspection import ( - get_signature, - is_generic_list, - is_type_optional, - is_type_union, - is_unwrapped_body_param, - unwrap_generic_list, - unwrap_optional_type, - unwrap_union_types, -) -from .strong_typing.name import python_type_to_name -from .strong_typing.schema import ( - JsonSchemaGenerator, - Schema, - SchemaOptions, - StrictJsonType, - get_schema_identifier, -) -from .strong_typing.serialization import json_dump_string, object_to_json from .tools import ( ListToolDefsResponse, ListToolGroupsResponse, diff --git a/uv.lock b/uv.lock index 2dddcb1c86..e7d7458e3a 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 3 +revision = 2 requires-python = ">=3.12" resolution-markers = [ "(python_full_version >= '3.13' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.13' and sys_platform != 'darwin' and sys_platform != 'linux')", @@ -2176,6 +2176,7 @@ dev = [ { name = "black" }, { name = "mypy" }, { name = "nbval" }, + { name = "openapi-spec-validator", specifier = ">=0.7.2" }, { name = "pre-commit", specifier = ">=4.4.0" }, { name = "pytest", specifier = ">=8.4" }, { name = "pytest-asyncio", specifier = ">=1.0" }, From bb34f7a4d4caf012b2d5109d6c5c54a92859121b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Nov 2025 10:05:49 +0100 Subject: [PATCH 29/46] chore: re-add deprecated routes to the combined spec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Matches https://github.com/llamastack/llama-stack/pull/4156 Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 336 +++++++++++++++++- docs/static/deprecated-llama-stack-spec.yaml | 6 +- .../static/experimental-llama-stack-spec.yaml | 6 +- docs/static/llama-stack-spec.yaml | 6 +- docs/static/stainless-llama-stack-spec.yaml | 336 +++++++++++++++++- scripts/openapi_generator/schema_filtering.py | 6 +- 6 files changed, 676 insertions(+), 20 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index cc0533382a..c8db0a46e0 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -1136,6 +1136,37 @@ paths: schema: type: string description: 'Path parameter: model_id' + delete: + tags: + - Models + summary: Unregister Model + operationId: unregister_model_v1_models__model_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' /v1/models: get: tags: @@ -1160,6 +1191,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Models + summary: Register Model + operationId: register_model_v1_models_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true /v1/moderations: post: tags: @@ -1239,6 +1294,37 @@ paths: schema: type: string description: 'Path parameter: identifier' + delete: + tags: + - Shields + summary: Unregister Shield + operationId: unregister_shield_v1_shields__identifier__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' /v1/shields: get: tags: @@ -1263,6 +1349,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Shields + summary: Register Shield + operationId: register_shield_v1_shields_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true /v1beta/datasetio/append-rows/{dataset_id}: post: tags: @@ -1356,6 +1466,37 @@ paths: schema: type: string description: 'Path parameter: dataset_id' + delete: + tags: + - Datasets + summary: Unregister Dataset + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' /v1beta/datasets: get: tags: @@ -1380,6 +1521,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Datasets + summary: Register Dataset + operationId: register_dataset_v1beta_datasets_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true /v1/scoring/score: post: tags: @@ -1459,6 +1624,37 @@ paths: schema: type: string description: 'Path parameter: scoring_fn_id' + delete: + tags: + - Scoring Functions + summary: Unregister Scoring Function + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' /v1/scoring-functions: get: tags: @@ -1483,6 +1679,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Scoring Functions + summary: Register Scoring Function + operationId: register_scoring_function_v1_scoring_functions_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: tags: @@ -1686,6 +1906,37 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' + delete: + tags: + - Benchmarks + summary: Unregister Benchmark + operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' /v1alpha/eval/benchmarks: get: tags: @@ -1710,6 +1961,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Benchmarks + summary: Register Benchmark + operationId: register_benchmark_v1alpha_eval_benchmarks_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true /v1alpha/post-training/job/cancel: post: tags: @@ -1916,6 +2191,37 @@ paths: schema: type: string description: 'Path parameter: toolgroup_id' + delete: + tags: + - Tool Groups + summary: Unregister Toolgroup + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' /v1/toolgroups: get: tags: @@ -1940,6 +2246,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Tool Groups + summary: Register Tool Group + operationId: register_tool_group_v1_toolgroups_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true /v1/tools: get: tags: @@ -7395,7 +7725,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation @@ -7529,7 +7859,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation @@ -7603,7 +7933,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index e0bb216d72..c3cc89ea19 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -5468,7 +5468,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation @@ -5602,7 +5602,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation @@ -5676,7 +5676,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index b5862cb52c..9f7f48ae77 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -5320,7 +5320,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation @@ -5454,7 +5454,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation @@ -5528,7 +5528,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index 032c4bcaf8..cabc65275d 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -6881,7 +6881,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation @@ -7015,7 +7015,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation @@ -7089,7 +7089,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index cc0533382a..c8db0a46e0 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -1136,6 +1136,37 @@ paths: schema: type: string description: 'Path parameter: model_id' + delete: + tags: + - Models + summary: Unregister Model + operationId: unregister_model_v1_models__model_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' /v1/models: get: tags: @@ -1160,6 +1191,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Models + summary: Register Model + operationId: register_model_v1_models_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true /v1/moderations: post: tags: @@ -1239,6 +1294,37 @@ paths: schema: type: string description: 'Path parameter: identifier' + delete: + tags: + - Shields + summary: Unregister Shield + operationId: unregister_shield_v1_shields__identifier__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' /v1/shields: get: tags: @@ -1263,6 +1349,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Shields + summary: Register Shield + operationId: register_shield_v1_shields_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true /v1beta/datasetio/append-rows/{dataset_id}: post: tags: @@ -1356,6 +1466,37 @@ paths: schema: type: string description: 'Path parameter: dataset_id' + delete: + tags: + - Datasets + summary: Unregister Dataset + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' /v1beta/datasets: get: tags: @@ -1380,6 +1521,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Datasets + summary: Register Dataset + operationId: register_dataset_v1beta_datasets_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true /v1/scoring/score: post: tags: @@ -1459,6 +1624,37 @@ paths: schema: type: string description: 'Path parameter: scoring_fn_id' + delete: + tags: + - Scoring Functions + summary: Unregister Scoring Function + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' /v1/scoring-functions: get: tags: @@ -1483,6 +1679,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Scoring Functions + summary: Register Scoring Function + operationId: register_scoring_function_v1_scoring_functions_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: tags: @@ -1686,6 +1906,37 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' + delete: + tags: + - Benchmarks + summary: Unregister Benchmark + operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' /v1alpha/eval/benchmarks: get: tags: @@ -1710,6 +1961,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Benchmarks + summary: Register Benchmark + operationId: register_benchmark_v1alpha_eval_benchmarks_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true /v1alpha/post-training/job/cancel: post: tags: @@ -1916,6 +2191,37 @@ paths: schema: type: string description: 'Path parameter: toolgroup_id' + delete: + tags: + - Tool Groups + summary: Unregister Toolgroup + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true + parameters: + - name: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' /v1/toolgroups: get: tags: @@ -1940,6 +2246,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + post: + tags: + - Tool Groups + summary: Register Tool Group + operationId: register_tool_group_v1_toolgroups_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true /v1/tools: get: tags: @@ -7395,7 +7725,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation @@ -7529,7 +7859,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation @@ -7603,7 +7933,7 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - + nullable: true pip_packages: description: The pip dependencies needed for this implementation diff --git a/scripts/openapi_generator/schema_filtering.py b/scripts/openapi_generator/schema_filtering.py index 108297e9aa..223e5758eb 100644 --- a/scripts/openapi_generator/schema_filtering.py +++ b/scripts/openapi_generator/schema_filtering.py @@ -276,7 +276,7 @@ def _filter_deprecated_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: 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. + Includes deprecated endpoints. This is used for the combined "stainless" spec. """ filtered_schema = openapi_schema.copy() @@ -299,10 +299,6 @@ def _filter_combined_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: if not isinstance(operation, dict): continue - # Skip deprecated operations - if operation.get("deprecated", False): - continue - filtered_path_item[method] = operation # Only include path if it has at least one operation after filtering From 2785819aa7d367bb61aad978d81a4e0470131ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Nov 2025 10:41:26 +0100 Subject: [PATCH 30/46] fix: remove trailing space from specs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- scripts/openapi_generator/schema_transforms.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/openapi_generator/schema_transforms.py b/scripts/openapi_generator/schema_transforms.py index 165d6af956..0be9874bbe 100644 --- a/scripts/openapi_generator/schema_transforms.py +++ b/scripts/openapi_generator/schema_transforms.py @@ -810,6 +810,16 @@ def _write_yaml_file(file_path: Path, schema: dict[str, Any]) -> None: with open(file_path, "w") as f: yaml.dump(schema, f, default_flow_style=False, sort_keys=False) + # Post-process to remove trailing whitespace from all lines + with open(file_path) as f: + lines = f.readlines() + + # Strip trailing whitespace from each line, preserving newlines + cleaned_lines = [line.rstrip() + "\n" if line.endswith("\n") else line.rstrip() for line in lines] + + with open(file_path, "w") as f: + f.writelines(cleaned_lines) + def _fix_schema_issues(openapi_schema: dict[str, Any]) -> dict[str, Any]: """Fix common schema issues: exclusiveMinimum, null defaults, and add titles to unions.""" From 1b982ff2b67114f6febeec4fd86285b3b60e5e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Nov 2025 11:01:13 +0100 Subject: [PATCH 31/46] chore: re-add missing decorator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- client-sdks/stainless/openapi.yml | 112 ++++++++++++++++++ docs/static/deprecated-llama-stack-spec.yaml | 112 ++++++++++++++++++ .../static/experimental-llama-stack-spec.yaml | 112 ++++++++++++++++++ docs/static/llama-stack-spec.yaml | 112 ++++++++++++++++++ docs/static/stainless-llama-stack-spec.yaml | 112 ++++++++++++++++++ src/llama_stack_api/benchmarks.py | 1 + src/llama_stack_api/datasets.py | 1 + src/llama_stack_api/models.py | 1 + src/llama_stack_api/post_training.py | 2 + src/llama_stack_api/prompts.py | 1 + src/llama_stack_api/providers.py | 1 + src/llama_stack_api/scoring_functions.py | 1 + src/llama_stack_api/shields.py | 1 + src/llama_stack_api/tools.py | 1 + 14 files changed, 570 insertions(+) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index c8db0a46e0..17263c0af1 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -7180,6 +7180,17 @@ components: - scoring_functions title: Benchmark type: object + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + title: Data + type: array + required: + - data + title: ListBenchmarksResponse + type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -7630,6 +7641,18 @@ components: - source title: Dataset type: object + ListDatasetsResponse: + description: Response from listing datasets. + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object Error: description: Error response from the API. Roughly follows RFC 7807. properties: @@ -9612,6 +9635,17 @@ components: - owned_by title: OpenAIModel type: object + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array + required: + - data + title: OpenAIListModelsResponse + type: object DPOLossType: enum: - sigmoid @@ -9701,6 +9735,26 @@ components: default: false title: EfficiencyConfig type: object + PostTrainingJob: + properties: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + title: Data + type: array + required: + - data + title: ListPostTrainingJobsResponse + type: object OptimizerType: description: Available optimizer algorithms for training. enum: @@ -9935,6 +9989,18 @@ components: - prompt_id title: Prompt type: object + ListPromptsResponse: + description: Response model to list prompts. + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array + required: + - data + title: ListPromptsResponse + type: object ProviderInfo: description: Information about a registered provider including its configuration and health status. properties: @@ -9963,6 +10029,18 @@ components: - health title: ProviderInfo type: object + ListProvidersResponse: + description: Response containing a list of all available providers. + properties: + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array + required: + - data + title: ListProvidersResponse + type: object ModerationObjectResults: description: A moderation object. properties: @@ -10092,6 +10170,28 @@ components: - results title: ScoreResponse type: object + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + title: Data + type: array + required: + - data + title: ListScoringFunctionsResponse + type: object + ListShieldsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Shield' + title: Data + type: array + required: + - data + title: ListShieldsResponse + type: object ToolDef: description: Tool definition used in runtime contexts. properties: @@ -10142,6 +10242,18 @@ components: - data title: ListToolDefsResponse type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object ToolGroupInput: description: Input data for registering a tool group. properties: diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index c3cc89ea19..3f7054be02 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -4923,6 +4923,17 @@ components: - scoring_functions title: Benchmark type: object + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + title: Data + type: array + required: + - data + title: ListBenchmarksResponse + type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -5373,6 +5384,18 @@ components: - source title: Dataset type: object + ListDatasetsResponse: + description: Response from listing datasets. + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object Error: description: Error response from the API. Roughly follows RFC 7807. properties: @@ -7355,6 +7378,17 @@ components: - owned_by title: OpenAIModel type: object + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array + required: + - data + title: OpenAIListModelsResponse + type: object DPOLossType: enum: - sigmoid @@ -7444,6 +7478,26 @@ components: default: false title: EfficiencyConfig type: object + PostTrainingJob: + properties: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + title: Data + type: array + required: + - data + title: ListPostTrainingJobsResponse + type: object OptimizerType: description: Available optimizer algorithms for training. enum: @@ -7678,6 +7732,18 @@ components: - prompt_id title: Prompt type: object + ListPromptsResponse: + description: Response model to list prompts. + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array + required: + - data + title: ListPromptsResponse + type: object ProviderInfo: description: Information about a registered provider including its configuration and health status. properties: @@ -7706,6 +7772,18 @@ components: - health title: ProviderInfo type: object + ListProvidersResponse: + description: Response containing a list of all available providers. + properties: + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array + required: + - data + title: ListProvidersResponse + type: object ModerationObjectResults: description: A moderation object. properties: @@ -7835,6 +7913,28 @@ components: - results title: ScoreResponse type: object + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + title: Data + type: array + required: + - data + title: ListScoringFunctionsResponse + type: object + ListShieldsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Shield' + title: Data + type: array + required: + - data + title: ListShieldsResponse + type: object ToolDef: description: Tool definition used in runtime contexts. properties: @@ -7885,6 +7985,18 @@ components: - data title: ListToolDefsResponse type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object ToolGroupInput: description: Input data for registering a tool group. properties: diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index 9f7f48ae77..c4aa9fbb11 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -4775,6 +4775,17 @@ components: - scoring_functions title: Benchmark type: object + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + title: Data + type: array + required: + - data + title: ListBenchmarksResponse + type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -5225,6 +5236,18 @@ components: - source title: Dataset type: object + ListDatasetsResponse: + description: Response from listing datasets. + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object Error: description: Error response from the API. Roughly follows RFC 7807. properties: @@ -7207,6 +7230,17 @@ components: - owned_by title: OpenAIModel type: object + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array + required: + - data + title: OpenAIListModelsResponse + type: object DPOLossType: enum: - sigmoid @@ -7296,6 +7330,26 @@ components: default: false title: EfficiencyConfig type: object + PostTrainingJob: + properties: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + title: Data + type: array + required: + - data + title: ListPostTrainingJobsResponse + type: object OptimizerType: description: Available optimizer algorithms for training. enum: @@ -7530,6 +7584,18 @@ components: - prompt_id title: Prompt type: object + ListPromptsResponse: + description: Response model to list prompts. + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array + required: + - data + title: ListPromptsResponse + type: object ProviderInfo: description: Information about a registered provider including its configuration and health status. properties: @@ -7558,6 +7624,18 @@ components: - health title: ProviderInfo type: object + ListProvidersResponse: + description: Response containing a list of all available providers. + properties: + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array + required: + - data + title: ListProvidersResponse + type: object ModerationObjectResults: description: A moderation object. properties: @@ -7687,6 +7765,28 @@ components: - results title: ScoreResponse type: object + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + title: Data + type: array + required: + - data + title: ListScoringFunctionsResponse + type: object + ListShieldsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Shield' + title: Data + type: array + required: + - data + title: ListShieldsResponse + type: object ToolDef: description: Tool definition used in runtime contexts. properties: @@ -7737,6 +7837,18 @@ components: - data title: ListToolDefsResponse type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object ToolGroupInput: description: Input data for registering a tool group. properties: diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index cabc65275d..a9e8136160 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -6336,6 +6336,17 @@ components: - scoring_functions title: Benchmark type: object + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + title: Data + type: array + required: + - data + title: ListBenchmarksResponse + type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -6786,6 +6797,18 @@ components: - source title: Dataset type: object + ListDatasetsResponse: + description: Response from listing datasets. + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object Error: description: Error response from the API. Roughly follows RFC 7807. properties: @@ -8768,6 +8791,17 @@ components: - owned_by title: OpenAIModel type: object + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array + required: + - data + title: OpenAIListModelsResponse + type: object DPOLossType: enum: - sigmoid @@ -8857,6 +8891,26 @@ components: default: false title: EfficiencyConfig type: object + PostTrainingJob: + properties: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + title: Data + type: array + required: + - data + title: ListPostTrainingJobsResponse + type: object OptimizerType: description: Available optimizer algorithms for training. enum: @@ -9091,6 +9145,18 @@ components: - prompt_id title: Prompt type: object + ListPromptsResponse: + description: Response model to list prompts. + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array + required: + - data + title: ListPromptsResponse + type: object ProviderInfo: description: Information about a registered provider including its configuration and health status. properties: @@ -9119,6 +9185,18 @@ components: - health title: ProviderInfo type: object + ListProvidersResponse: + description: Response containing a list of all available providers. + properties: + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array + required: + - data + title: ListProvidersResponse + type: object ModerationObjectResults: description: A moderation object. properties: @@ -9248,6 +9326,28 @@ components: - results title: ScoreResponse type: object + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + title: Data + type: array + required: + - data + title: ListScoringFunctionsResponse + type: object + ListShieldsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Shield' + title: Data + type: array + required: + - data + title: ListShieldsResponse + type: object ToolDef: description: Tool definition used in runtime contexts. properties: @@ -9298,6 +9398,18 @@ components: - data title: ListToolDefsResponse type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object ToolGroupInput: description: Input data for registering a tool group. properties: diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index c8db0a46e0..17263c0af1 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -7180,6 +7180,17 @@ components: - scoring_functions title: Benchmark type: object + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + title: Data + type: array + required: + - data + title: ListBenchmarksResponse + type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -7630,6 +7641,18 @@ components: - source title: Dataset type: object + ListDatasetsResponse: + description: Response from listing datasets. + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object Error: description: Error response from the API. Roughly follows RFC 7807. properties: @@ -9612,6 +9635,17 @@ components: - owned_by title: OpenAIModel type: object + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array + required: + - data + title: OpenAIListModelsResponse + type: object DPOLossType: enum: - sigmoid @@ -9701,6 +9735,26 @@ components: default: false title: EfficiencyConfig type: object + PostTrainingJob: + properties: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + title: Data + type: array + required: + - data + title: ListPostTrainingJobsResponse + type: object OptimizerType: description: Available optimizer algorithms for training. enum: @@ -9935,6 +9989,18 @@ components: - prompt_id title: Prompt type: object + ListPromptsResponse: + description: Response model to list prompts. + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array + required: + - data + title: ListPromptsResponse + type: object ProviderInfo: description: Information about a registered provider including its configuration and health status. properties: @@ -9963,6 +10029,18 @@ components: - health title: ProviderInfo type: object + ListProvidersResponse: + description: Response containing a list of all available providers. + properties: + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array + required: + - data + title: ListProvidersResponse + type: object ModerationObjectResults: description: A moderation object. properties: @@ -10092,6 +10170,28 @@ components: - results title: ScoreResponse type: object + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + title: Data + type: array + required: + - data + title: ListScoringFunctionsResponse + type: object + ListShieldsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Shield' + title: Data + type: array + required: + - data + title: ListShieldsResponse + type: object ToolDef: description: Tool definition used in runtime contexts. properties: @@ -10142,6 +10242,18 @@ components: - data title: ListToolDefsResponse type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object ToolGroupInput: description: Input data for registering a tool group. properties: diff --git a/src/llama_stack_api/benchmarks.py b/src/llama_stack_api/benchmarks.py index e9ac3a8b84..fdb2ccad43 100644 --- a/src/llama_stack_api/benchmarks.py +++ b/src/llama_stack_api/benchmarks.py @@ -48,6 +48,7 @@ class BenchmarkInput(CommonBenchmarkFields, BaseModel): provider_benchmark_id: str | None = None +@json_schema_type class ListBenchmarksResponse(BaseModel): data: list[Benchmark] diff --git a/src/llama_stack_api/datasets.py b/src/llama_stack_api/datasets.py index 76d787078e..6d707aa8ee 100644 --- a/src/llama_stack_api/datasets.py +++ b/src/llama_stack_api/datasets.py @@ -136,6 +136,7 @@ class DatasetInput(CommonDatasetFields, BaseModel): dataset_id: str +@json_schema_type class ListDatasetsResponse(BaseModel): """Response from listing datasets. diff --git a/src/llama_stack_api/models.py b/src/llama_stack_api/models.py index 833864ec20..98c16b6c25 100644 --- a/src/llama_stack_api/models.py +++ b/src/llama_stack_api/models.py @@ -100,6 +100,7 @@ class OpenAIModel(BaseModel): custom_metadata: dict[str, Any] | None = None +@json_schema_type class OpenAIListModelsResponse(BaseModel): data: list[OpenAIModel] diff --git a/src/llama_stack_api/post_training.py b/src/llama_stack_api/post_training.py index 0cc9277d98..505c8bfd7e 100644 --- a/src/llama_stack_api/post_training.py +++ b/src/llama_stack_api/post_training.py @@ -236,6 +236,7 @@ class PostTrainingRLHFRequest(BaseModel): logger_config: dict[str, Any] +@json_schema_type class PostTrainingJob(BaseModel): job_uuid: str @@ -265,6 +266,7 @@ class PostTrainingJobStatusResponse(BaseModel): checkpoints: list[Checkpoint] = Field(default_factory=list) +@json_schema_type class ListPostTrainingJobsResponse(BaseModel): data: list[PostTrainingJob] diff --git a/src/llama_stack_api/prompts.py b/src/llama_stack_api/prompts.py index 651d03e616..8562e47042 100644 --- a/src/llama_stack_api/prompts.py +++ b/src/llama_stack_api/prompts.py @@ -85,6 +85,7 @@ def generate_prompt_id(cls) -> str: return f"pmpt_{hex_string}" +@json_schema_type class ListPromptsResponse(BaseModel): """Response model to list prompts.""" diff --git a/src/llama_stack_api/providers.py b/src/llama_stack_api/providers.py index 5b555b82fd..88c66f2617 100644 --- a/src/llama_stack_api/providers.py +++ b/src/llama_stack_api/providers.py @@ -31,6 +31,7 @@ class ProviderInfo(BaseModel): health: HealthResponse +@json_schema_type class ListProvidersResponse(BaseModel): """Response containing a list of all available providers. diff --git a/src/llama_stack_api/scoring_functions.py b/src/llama_stack_api/scoring_functions.py index f75336e54d..12051c20cb 100644 --- a/src/llama_stack_api/scoring_functions.py +++ b/src/llama_stack_api/scoring_functions.py @@ -155,6 +155,7 @@ class ScoringFnInput(CommonScoringFnFields, BaseModel): provider_scoring_fn_id: str | None = None +@json_schema_type class ListScoringFunctionsResponse(BaseModel): data: list[ScoringFn] diff --git a/src/llama_stack_api/shields.py b/src/llama_stack_api/shields.py index 2aeb833332..19e412a5ae 100644 --- a/src/llama_stack_api/shields.py +++ b/src/llama_stack_api/shields.py @@ -43,6 +43,7 @@ class ShieldInput(CommonShieldFields): provider_shield_id: str | None = None +@json_schema_type class ListShieldsResponse(BaseModel): data: list[Shield] diff --git a/src/llama_stack_api/tools.py b/src/llama_stack_api/tools.py index ad5edb2b0d..9440dd0312 100644 --- a/src/llama_stack_api/tools.py +++ b/src/llama_stack_api/tools.py @@ -88,6 +88,7 @@ async def get_tool(self, tool_name: str) -> ToolDef: ... async def get_tool_group(self, toolgroup_id: str) -> ToolGroup: ... +@json_schema_type class ListToolGroupsResponse(BaseModel): """Response containing a list of tool groups. From 6de63d5de1d0b1d416591072d24d9ad947b1a222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Nov 2025 11:09:40 +0100 Subject: [PATCH 32/46] chore: revert "fix: remove unregister shield" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 84277988b86428be88ce670bf96b0c6d8f3adb48. Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index fc5bcddcdc..171dd05022 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -353,6 +353,7 @@ resources: list: endpoint: get /v1/shields paginated: false + delete: delete /v1/shields/{identifier} scoring: methods: From 7908a1026a7e0b953b5427955f849d6177af8032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Nov 2025 11:10:48 +0100 Subject: [PATCH 33/46] chore: revert "fix: remove unused endpoint and outdate code" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 7bc9aeaf9c5512460a34266f84352ba09e1cf02b. Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index 171dd05022..89852a8248 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -115,13 +115,18 @@ resources: sampling_params: SamplingParams scoring_result: ScoringResult system_message: SystemMessage + query_result: RAGQueryResult + document: RAGDocument + query_config: RAGQueryConfig toolgroups: models: tool_group: ToolGroup list_tool_groups_response: ListToolGroupsResponse methods: + register: post /v1/toolgroups get: get /v1/toolgroups/{toolgroup_id} list: get /v1/toolgroups + unregister: delete /v1/toolgroups/{toolgroup_id} tools: methods: get: get /v1/tools/{tool_name} @@ -308,6 +313,8 @@ resources: endpoint: get /v1/models paginated: false retrieve: get /v1/models/{model_id} + register: post /v1/models + unregister: delete /v1/models/{model_id} subresources: openai: methods: @@ -353,6 +360,7 @@ resources: list: endpoint: get /v1/shields paginated: false + register: post /v1/shields delete: delete /v1/shields/{identifier} scoring: @@ -365,6 +373,7 @@ resources: list: endpoint: get /v1/scoring-functions paginated: false + register: post /v1/scoring-functions models: scoring_fn: ScoringFn scoring_fn_params: ScoringFnParams From eabd248ea0dcf4f8b7e5d632a263571b21985b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Nov 2025 11:12:35 +0100 Subject: [PATCH 34/46] chore: remove RAG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index 89852a8248..fb96d92c59 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -115,9 +115,6 @@ resources: sampling_params: SamplingParams scoring_result: ScoringResult system_message: SystemMessage - query_result: RAGQueryResult - document: RAGDocument - query_config: RAGQueryConfig toolgroups: models: tool_group: ToolGroup From da37b2a8472a5a4b070ab83362358edcafdaed17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Nov 2025 11:19:12 +0100 Subject: [PATCH 35/46] chore: revert "fix: Exclude deprecated endpoints from stainless config" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 06acbdab6f198bed962b7cd31c52fe1f27913a04. Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index fb96d92c59..1ce52c411a 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -425,6 +425,7 @@ resources: list: endpoint: get /v1alpha/eval/benchmarks paginated: false + register: post /v1alpha/eval/benchmarks models: benchmark: Benchmark list_benchmarks_response: ListBenchmarksResponse @@ -453,10 +454,12 @@ resources: models: list_datasets_response: ListDatasetsResponse methods: + register: post /v1beta/datasets retrieve: get /v1beta/datasets/{dataset_id} list: endpoint: get /v1beta/datasets paginated: false + unregister: delete /v1beta/datasets/{dataset_id} iterrows: get /v1beta/datasetio/iterrows/{dataset_id} appendrows: post /v1beta/datasetio/append-rows/{dataset_id} From 9a36669ef3c7ecd8ec5422cacc597386a5b7311e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Nov 2025 11:20:42 +0100 Subject: [PATCH 36/46] fix: pagination config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit use paginated endpoint for example and mark input_items.list as non-paginated Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index 1ce52c411a..8f875ae356 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -518,7 +518,7 @@ readme: example_requests: default: type: request - endpoint: post /v1/chat/completions + endpoint: get /v1/chat/completions params: &ref_0 {} headline: type: request From 738d4bfd7e26b6141f93ad6d74240e108704306a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Nov 2025 11:55:35 +0100 Subject: [PATCH 37/46] chore: add paginated false to chat/completions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index 8f875ae356..19fc8404eb 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -248,6 +248,7 @@ resources: list: type: http endpoint: get /v1/chat/completions + paginated: false retrieve: type: http endpoint: get /v1/chat/completions/{completion_id} From 3dd252ef3e215cacbbefa0246b9ce9f2cfbf6b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Nov 2025 11:59:13 +0100 Subject: [PATCH 38/46] chore: fix missing endpoint on stainless config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit delete /v1/scoring-functions/{scoring_fn_id} exists in the OpenAPI spec, but isn't specified in the Stainless config, so code will not be generated for it. delete /v1alpha/eval/benchmarks/{benchmark_id} exists in the OpenAPI spec, but isn't specified in the Stainless config, so code will not be generated for it Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index 19fc8404eb..50953a8609 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -372,6 +372,7 @@ resources: endpoint: get /v1/scoring-functions paginated: false register: post /v1/scoring-functions + unregister: delete /v1/scoring-functions/{scoring_fn_id} models: scoring_fn: ScoringFn scoring_fn_params: ScoringFnParams @@ -427,6 +428,7 @@ resources: endpoint: get /v1alpha/eval/benchmarks paginated: false register: post /v1alpha/eval/benchmarks + unregister: delete /v1alpha/eval/benchmarks/{benchmark_id} models: benchmark: Benchmark list_benchmarks_response: ListBenchmarksResponse From c921a3720042148f453b610c95c876938ee48340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Nov 2025 15:08:32 +0100 Subject: [PATCH 39/46] fix: revert "fix: pagination config" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9a36669ef3c7ecd8ec5422cacc597386a5b7311e. Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index 50953a8609..6f7488d214 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -521,7 +521,7 @@ readme: example_requests: default: type: request - endpoint: get /v1/chat/completions + endpoint: post /v1/chat/completions params: &ref_0 {} headline: type: request From 71da65ae1a41e805b7edf71bc12ac8dba3d5eee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Nov 2025 15:21:43 +0100 Subject: [PATCH 40/46] fix: post is paginated not get MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index 6f7488d214..9b26114fe0 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -529,5 +529,5 @@ readme: params: *ref_0 pagination: type: request - endpoint: get /v1/chat/completions + endpoint: post /v1/chat/completions params: {} From 69e1176ff8e222575c558388a24555b8cc14b8b9 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Fri, 14 Nov 2025 10:39:00 -0800 Subject: [PATCH 41/46] Apply a legacy order so we can easily see diff against what was generated --- client-sdks/stainless/openapi.yml | 14124 ++++++++-------- docs/static/deprecated-llama-stack-spec.yaml | 12790 +++++++------- .../static/experimental-llama-stack-spec.yaml | 12854 +++++++------- docs/static/llama-stack-spec.yaml | 13880 +++++++-------- docs/static/stainless-llama-stack-spec.yaml | 14124 ++++++++-------- scripts/openapi_generator/_legacy_order.py | 410 + scripts/openapi_generator/main.py | 1 + .../openapi_generator/schema_transforms.py | 64 + 8 files changed, 34361 insertions(+), 33886 deletions(-) create mode 100644 scripts/openapi_generator/_legacy_order.py diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index aea8747471..d5324828a2 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -14,12 +14,12 @@ info: servers: - url: http://any-hosted-llama-stack.com paths: - /v1/providers/{provider_id}: + /v1/batches: get: tags: - - Providers - summary: Inspect Provider - operationId: inspect_provider_v1_providers__provider_id__get + - Batches + summary: List Batches + operationId: list_batches_v1_batches_get responses: '200': description: Successful Response @@ -38,19 +38,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: provider_id - in: path - required: true - schema: - type: string - description: 'Path parameter: provider_id' - /v1/providers: - get: + post: tags: - - Providers - summary: List Providers - operationId: list_providers_v1_providers_get + - Batches + summary: Create Batch + operationId: create_batch_v1_batches_post responses: '200': description: Successful Response @@ -69,12 +61,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/responses: + /v1/batches/{batch_id}: get: tags: - - Agents - summary: List Openai Responses - operationId: list_openai_responses_v1_responses_get + - Batches + summary: Retrieve Batch + operationId: retrieve_batch_v1_batches__batch_id__get responses: '200': description: Successful Response @@ -93,35 +85,19 @@ paths: 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/batches/{batch_id}/cancel: post: tags: - - Agents - summary: Create Openai Response - operationId: create_openai_response_v1_responses_post - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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/responses/{response_id}: - get: - tags: - - Agents - summary: Get Openai Response - operationId: get_openai_response_v1_responses__response_id__get + - Batches + summary: Cancel Batch + operationId: cancel_batch_v1_batches__batch_id__cancel_post responses: '200': description: Successful Response @@ -141,17 +117,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: response_id + - name: batch_id in: path required: true schema: type: string - description: 'Path parameter: response_id' - delete: + description: 'Path parameter: batch_id' + /v1/chat/completions: + get: tags: - - Agents - summary: Delete Openai Response - operationId: delete_openai_response_v1_responses__response_id__delete + - Inference + summary: List Chat Completions + operationId: list_chat_completions_v1_chat_completions_get responses: '200': description: Successful Response @@ -170,19 +147,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: response_id - in: path - required: true - schema: - type: string - description: 'Path parameter: response_id' - /v1/responses/{response_id}/input_items: - get: + post: tags: - - Agents - summary: List Openai Response Input Items - operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get + - Inference + summary: Openai Chat Completion + operationId: openai_chat_completion_v1_chat_completions_post responses: '200': description: Successful Response @@ -201,13 +170,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: response_id - in: path - required: true - schema: - type: string - description: 'Path parameter: response_id' /v1/chat/completions/{completion_id}: get: tags: @@ -239,12 +201,12 @@ paths: schema: type: string description: 'Path parameter: completion_id' - /v1/chat/completions: - get: + /v1/completions: + post: tags: - Inference - summary: List Chat Completions - operationId: list_chat_completions_v1_chat_completions_get + summary: Openai Completion + operationId: openai_completion_v1_completions_post responses: '200': description: Successful Response @@ -263,11 +225,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + /v1/conversations: post: tags: - - Inference - summary: Openai Chat Completion - operationId: openai_chat_completion_v1_chat_completions_post + - Conversations + summary: Create Conversation + operationId: create_conversation_v1_conversations_post responses: '200': description: Successful Response @@ -286,12 +249,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/completions: - post: + /v1/conversations/{conversation_id}: + get: tags: - - Inference - summary: Openai Completion - operationId: openai_completion_v1_completions_post + - Conversations + summary: Get Conversation + operationId: get_conversation_v1_conversations__conversation_id__get responses: '200': description: Successful Response @@ -310,12 +273,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/embeddings: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' post: tags: - - Inference - summary: Openai Embeddings - operationId: openai_embeddings_v1_embeddings_post + - Conversations + summary: Update Conversation + operationId: update_conversation_v1_conversations__conversation_id__post responses: '200': description: Successful Response @@ -334,12 +303,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/inference/rerank: - post: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + delete: tags: - - Inference - summary: Rerank - operationId: rerank_v1alpha_inference_rerank_post + - Conversations + summary: Openai Delete Conversation + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete responses: '200': description: Successful Response @@ -358,12 +333,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/health: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items: get: tags: - - Inspect - summary: Health - operationId: health_v1_health_get + - Conversations + summary: List Items + operationId: list_items_v1_conversations__conversation_id__items_get responses: '200': description: Successful Response @@ -382,12 +364,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/inspect/routes: - get: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + post: tags: - - Inspect - summary: List Routes - operationId: list_routes_v1_inspect_routes_get + - Conversations + summary: Add Items + operationId: add_items_v1_conversations__conversation_id__items_post responses: '200': description: Successful Response @@ -406,12 +394,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/version: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items/{item_id}: get: tags: - - Inspect - summary: Version - operationId: version_v1_version_get + - Conversations + summary: Retrieve + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get responses: '200': description: Successful Response @@ -430,12 +425,24 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/batches/{batch_id}/cancel: - post: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + - name: item_id + in: path + required: true + schema: + type: string + description: 'Path parameter: item_id' + delete: tags: - - Batches - summary: Cancel Batch - operationId: cancel_batch_v1_batches__batch_id__cancel_post + - Conversations + summary: Openai Delete Conversation Item + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete responses: '200': description: Successful Response @@ -455,18 +462,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: batch_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/batches: - get: + description: 'Path parameter: conversation_id' + - name: item_id + in: path + required: true + schema: + type: string + description: 'Path parameter: item_id' + /v1/embeddings: + post: tags: - - Batches - summary: List Batches - operationId: list_batches_v1_batches_get + - Inference + summary: Openai Embeddings + operationId: openai_embeddings_v1_embeddings_post responses: '200': description: Successful Response @@ -485,12 +498,13 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: + /v1/files: + get: tags: - - Batches - summary: Create Batch - operationId: create_batch_v1_batches_post - responses: + - Files + summary: Openai List Files + operationId: openai_list_files_v1_files_get + responses: '200': description: Successful Response content: @@ -508,12 +522,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/batches/{batch_id}: - get: + post: tags: - - Batches - summary: Retrieve Batch - operationId: retrieve_batch_v1_batches__batch_id__get + - Files + summary: Openai Upload File + operationId: openai_upload_file_v1_files_post responses: '200': description: Successful Response @@ -532,19 +545,12 @@ paths: 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/vector-io/insert: - post: + /v1/files/{file_id}: + get: tags: - - Vector Io - summary: Insert Chunks - operationId: insert_chunks_v1_vector_io_insert_post + - Files + summary: Openai Retrieve File + operationId: openai_retrieve_file_v1_files__file_id__get responses: '200': description: Successful Response @@ -563,12 +569,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector_stores/{vector_store_id}/files: - get: + parameters: + - name: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + delete: tags: - - Vector Io - summary: Openai List Files In Vector Store - operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get + - Files + summary: Openai Delete File + operationId: openai_delete_file_v1_files__file_id__delete responses: '200': description: Successful Response @@ -588,17 +600,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: file_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - post: + description: 'Path parameter: file_id' + /v1/files/{file_id}/content: + get: tags: - - Vector Io - summary: Openai Attach File To Vector Store - operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post + - Files + summary: Openai Retrieve File Content + operationId: openai_retrieve_file_content_v1_files__file_id__content_get responses: '200': description: Successful Response @@ -618,18 +631,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: file_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: - post: + description: 'Path parameter: file_id' + /v1/health: + get: tags: - - Vector Io - summary: Openai Cancel Vector Store File Batch - operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post + - Inspect + summary: Health + operationId: health_v1_health_get responses: '200': description: Successful Response @@ -648,25 +661,12 @@ 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' - - name: batch_id - in: path - required: true - schema: - type: string - description: 'Path parameter: batch_id' - /v1/vector_stores: + /v1/inspect/routes: get: tags: - - Vector Io - summary: Openai List Vector Stores - operationId: openai_list_vector_stores_v1_vector_stores_get + - Inspect + summary: List Routes + operationId: list_routes_v1_inspect_routes_get responses: '200': description: Successful Response @@ -685,11 +685,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: + /v1/models: + get: tags: - - Vector Io - summary: Openai Create Vector Store - operationId: openai_create_vector_store_v1_vector_stores_post + - Models + summary: Openai List Models + operationId: openai_list_models_v1_models_get responses: '200': description: Successful Response @@ -708,12 +709,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector_stores/{vector_store_id}/file_batches: post: tags: - - Vector Io - summary: Openai Create Vector Store File Batch - operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post + - Models + summary: Register Model + operationId: register_model_v1_models_post responses: '200': description: Successful Response @@ -732,19 +732,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}: + deprecated: true + /v1/models/{model_id}: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store - operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get + - Models + summary: Get Model + operationId: get_model_v1_models__model_id__get responses: '200': description: Successful Response @@ -764,17 +758,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: model_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - post: + description: 'Path parameter: model_id' + delete: tags: - - Vector Io - summary: Openai Update Vector Store - operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post + - Models + summary: Unregister Model + operationId: unregister_model_v1_models__model_id__delete responses: '200': description: Successful Response @@ -793,18 +787,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - - name: vector_store_id + - name: model_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - delete: + description: 'Path parameter: model_id' + /v1/moderations: + post: tags: - - Vector Io - summary: Openai Delete Vector Store - operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete + - Safety + summary: Run Moderation + operationId: run_moderation_v1_moderations_post responses: '200': description: Successful Response @@ -823,19 +819,12 @@ 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}/files/{file_id}: + /v1/prompts: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store File - operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get + - Prompts + summary: List Prompts + operationId: list_prompts_v1_prompts_get responses: '200': description: Successful Response @@ -854,24 +843,11 @@ 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' - - name: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' post: tags: - - Vector Io - summary: Openai Update Vector Store File - operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post + - Prompts + summary: Create Prompt + operationId: create_prompt_v1_prompts_post responses: '200': description: Successful Response @@ -890,24 +866,12 @@ 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' - - name: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' - delete: + /v1/prompts/{prompt_id}: + get: tags: - - Vector Io - summary: Openai Delete Vector Store File - operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete + - Prompts + summary: Get Prompt + operationId: get_prompt_v1_prompts__prompt_id__get responses: '200': description: Successful Response @@ -927,24 +891,17 @@ paths: 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: file_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: file_id' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: - get: + description: 'Path parameter: prompt_id' + post: tags: - - Vector Io - summary: Openai List Files In Vector Store File Batch - operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get + - Prompts + summary: Update Prompt + operationId: update_prompt_v1_prompts__prompt_id__post responses: '200': description: Successful Response @@ -964,24 +921,17 @@ paths: 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 + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: - get: + description: 'Path parameter: prompt_id' + delete: tags: - - Vector Io - summary: Openai Retrieve Vector Store File Batch - operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get + - Prompts + summary: Delete Prompt + operationId: delete_prompt_v1_prompts__prompt_id__delete responses: '200': description: Successful Response @@ -1001,24 +951,18 @@ paths: 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 + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/vector_stores/{vector_store_id}/files/{file_id}/content: - get: + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/set-default-version: + post: tags: - - Vector Io - summary: Openai Retrieve Vector Store File Contents - operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get + - Prompts + summary: Set Default Version + operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post responses: '200': description: Successful Response @@ -1038,24 +982,18 @@ paths: 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: file_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: file_id' - /v1/vector_stores/{vector_store_id}/search: - post: + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/versions: + get: tags: - - Vector Io - summary: Openai Search Vector Store - operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post + - Prompts + summary: List Prompt Versions + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get responses: '200': description: Successful Response @@ -1075,42 +1013,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - /v1/vector-io/query: - post: - tags: - - Vector Io - summary: Query Chunks - operationId: query_chunks_v1_vector_io_query_post - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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}: + description: 'Path parameter: prompt_id' + /v1/providers: get: tags: - - Models - summary: Get Model - operationId: get_model_v1_models__model_id__get + - Providers + summary: List Providers + operationId: list_providers_v1_providers_get responses: '200': description: Successful Response @@ -1129,18 +1043,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: model_id - in: path - required: true - schema: - type: string - description: 'Path parameter: model_id' - delete: + /v1/providers/{provider_id}: + get: tags: - - Models - summary: Unregister Model - operationId: unregister_model_v1_models__model_id__delete + - Providers + summary: Inspect Provider + operationId: inspect_provider_v1_providers__provider_id__get responses: '200': description: Successful Response @@ -1159,20 +1067,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true parameters: - - name: model_id + - name: provider_id in: path required: true schema: type: string - description: 'Path parameter: model_id' - /v1/models: + description: 'Path parameter: provider_id' + /v1/responses: get: tags: - - Models - summary: Openai List Models - operationId: openai_list_models_v1_models_get + - Agents + summary: List Openai Responses + operationId: list_openai_responses_v1_responses_get responses: '200': description: Successful Response @@ -1193,9 +1100,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Models - summary: Register Model - operationId: register_model_v1_models_post + - Agents + summary: Create Openai Response + operationId: create_openai_response_v1_responses_post responses: '200': description: Successful Response @@ -1214,13 +1121,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - /v1/moderations: - post: + /v1/responses/{response_id}: + get: tags: - - Safety - summary: Run Moderation - operationId: run_moderation_v1_moderations_post + - Agents + summary: Get Openai Response + operationId: get_openai_response_v1_responses__response_id__get responses: '200': description: Successful Response @@ -1239,12 +1145,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/safety/run-shield: - post: + parameters: + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + delete: tags: - - Safety - summary: Run Shield - operationId: run_shield_v1_safety_run_shield_post + - Agents + summary: Delete Openai Response + operationId: delete_openai_response_v1_responses__response_id__delete responses: '200': description: Successful Response @@ -1263,12 +1175,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/shields/{identifier}: + parameters: + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + /v1/responses/{response_id}/input_items: get: tags: - - Shields - summary: Get Shield - operationId: get_shield_v1_shields__identifier__get + - Agents + summary: List Openai Response Input Items + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get responses: '200': description: Successful Response @@ -1288,17 +1207,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: identifier + - name: response_id in: path required: true schema: type: string - description: 'Path parameter: identifier' - delete: + description: 'Path parameter: response_id' + /v1/safety/run-shield: + post: tags: - - Shields - summary: Unregister Shield - operationId: unregister_shield_v1_shields__identifier__delete + - Safety + summary: Run Shield + operationId: run_shield_v1_safety_run_shield_post responses: '200': description: Successful Response @@ -1317,20 +1237,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - parameters: - - name: identifier - in: path - required: true - schema: - type: string - description: 'Path parameter: identifier' - /v1/shields: + /v1/scoring-functions: get: tags: - - Shields - summary: List Shields - operationId: list_shields_v1_shields_get + - Scoring Functions + summary: List Scoring Functions + operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': description: Successful Response @@ -1351,9 +1263,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Shields - summary: Register Shield - operationId: register_shield_v1_shields_post + - Scoring Functions + summary: Register Scoring Function + operationId: register_scoring_function_v1_scoring_functions_post responses: '200': description: Successful Response @@ -1373,12 +1285,12 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' deprecated: true - /v1beta/datasetio/append-rows/{dataset_id}: - post: + /v1/scoring-functions/{scoring_fn_id}: + get: tags: - - Datasetio - summary: Append Rows - operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post + - Scoring Functions + summary: Get Scoring Function + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': description: Successful Response @@ -1398,18 +1310,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: dataset_id + - name: scoring_fn_id in: path required: true schema: type: string - description: 'Path parameter: dataset_id' - /v1beta/datasetio/iterrows/{dataset_id}: - get: + description: 'Path parameter: scoring_fn_id' + delete: tags: - - Datasetio - summary: Iterrows - operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get + - Scoring Functions + summary: Unregister Scoring Function + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete responses: '200': description: Successful Response @@ -1428,19 +1339,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - - name: dataset_id + - name: scoring_fn_id in: path required: true schema: type: string - description: 'Path parameter: dataset_id' - /v1beta/datasets/{dataset_id}: - get: + description: 'Path parameter: scoring_fn_id' + /v1/scoring/score: + post: tags: - - Datasets - summary: Get Dataset - operationId: get_dataset_v1beta_datasets__dataset_id__get + - Scoring + summary: Score + operationId: score_v1_scoring_score_post responses: '200': description: Successful Response @@ -1459,18 +1371,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: dataset_id - in: path - required: true - schema: - type: string - description: 'Path parameter: dataset_id' - delete: + /v1/scoring/score-batch: + post: tags: - - Datasets - summary: Unregister Dataset - operationId: unregister_dataset_v1beta_datasets__dataset_id__delete + - Scoring + summary: Score Batch + operationId: score_batch_v1_scoring_score_batch_post responses: '200': description: Successful Response @@ -1489,20 +1395,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - parameters: - - name: dataset_id - in: path - required: true - schema: - type: string - description: 'Path parameter: dataset_id' - /v1beta/datasets: + /v1/shields: get: tags: - - Datasets - summary: List Datasets - operationId: list_datasets_v1beta_datasets_get + - Shields + summary: List Shields + operationId: list_shields_v1_shields_get responses: '200': description: Successful Response @@ -1523,9 +1421,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Datasets - summary: Register Dataset - operationId: register_dataset_v1beta_datasets_post + - Shields + summary: Register Shield + operationId: register_shield_v1_shields_post responses: '200': description: Successful Response @@ -1545,12 +1443,12 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' deprecated: true - /v1/scoring/score: - post: + /v1/shields/{identifier}: + get: tags: - - Scoring - summary: Score - operationId: score_v1_scoring_score_post + - Shields + summary: Get Shield + operationId: get_shield_v1_shields__identifier__get responses: '200': description: Successful Response @@ -1569,12 +1467,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring/score-batch: - post: + parameters: + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + delete: tags: - - Scoring - summary: Score Batch - operationId: score_batch_v1_scoring_score_batch_post + - Shields + summary: Unregister Shield + operationId: unregister_shield_v1_shields__identifier__delete responses: '200': description: Successful Response @@ -1593,12 +1497,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring-functions/{scoring_fn_id}: - get: + deprecated: true + parameters: + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + /v1/tool-runtime/invoke: + post: tags: - - Scoring Functions - summary: Get Scoring Function - operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get + - Tool Runtime + summary: Invoke Tool + operationId: invoke_tool_v1_tool_runtime_invoke_post responses: '200': description: Successful Response @@ -1617,18 +1529,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: scoring_fn_id - in: path - required: true - schema: - type: string - description: 'Path parameter: scoring_fn_id' - delete: + /v1/tool-runtime/list-tools: + get: tags: - - Scoring Functions - summary: Unregister Scoring Function - operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete + - Tool Runtime + summary: List Runtime Tools + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get responses: '200': description: Successful Response @@ -1647,20 +1553,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - parameters: - - name: scoring_fn_id - in: path - required: true - schema: - type: string - description: 'Path parameter: scoring_fn_id' - /v1/scoring-functions: + /v1/toolgroups: get: tags: - - Scoring Functions - summary: List Scoring Functions - operationId: list_scoring_functions_v1_scoring_functions_get + - Tool Groups + summary: List Tool Groups + operationId: list_tool_groups_v1_toolgroups_get responses: '200': description: Successful Response @@ -1681,9 +1579,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Scoring Functions - summary: Register Scoring Function - operationId: register_scoring_function_v1_scoring_functions_post + - Tool Groups + summary: Register Tool Group + operationId: register_tool_group_v1_toolgroups_post responses: '200': description: Successful Response @@ -1703,12 +1601,12 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: - post: + /v1/toolgroups/{toolgroup_id}: + get: tags: - - Eval - summary: Evaluate Rows - operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post + - Tool Groups + summary: Get Tool Group + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get responses: '200': description: Successful Response @@ -1728,18 +1626,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id + - name: toolgroup_id in: path required: true schema: type: string - description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: - get: + description: 'Path parameter: toolgroup_id' + delete: tags: - - Eval - summary: Job Status - operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get + - Tool Groups + summary: Unregister Toolgroup + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete responses: '200': description: Successful Response @@ -1758,24 +1655,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - - name: benchmark_id - in: path - required: true - schema: - type: string - description: 'Path parameter: benchmark_id' - - name: job_id + - name: toolgroup_id in: path required: true schema: type: string - description: 'Path parameter: job_id' - delete: + description: 'Path parameter: toolgroup_id' + /v1/tools: + get: tags: - - Eval - summary: Job Cancel - operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete + - Tool Groups + summary: List Tools + operationId: list_tools_v1_tools_get responses: '200': description: Successful Response @@ -1794,25 +1687,12 @@ 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' - - name: job_id - in: path - required: true - schema: - type: string - description: 'Path parameter: job_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: + /v1/tools/{tool_name}: get: tags: - - Eval - summary: Job Result - operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get + - Tool Groups + summary: Get Tool + operationId: get_tool_v1_tools__tool_name__get responses: '200': description: Successful Response @@ -1832,24 +1712,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id - in: path - required: true - schema: - type: string - description: 'Path parameter: benchmark_id' - - name: job_id + - name: tool_name in: path required: true schema: type: string - description: 'Path parameter: job_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs: + description: 'Path parameter: tool_name' + /v1/vector-io/insert: post: tags: - - Eval - summary: Run Eval - operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post + - Vector Io + summary: Insert Chunks + operationId: insert_chunks_v1_vector_io_insert_post responses: '200': description: Successful Response @@ -1868,19 +1742,12 @@ 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}: - get: + /v1/vector-io/query: + post: tags: - - Benchmarks - summary: Get Benchmark - operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get + - Vector Io + summary: Query Chunks + operationId: query_chunks_v1_vector_io_query_post responses: '200': description: Successful Response @@ -1899,18 +1766,12 @@ 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' - delete: + /v1/vector_stores: + get: tags: - - Benchmarks - summary: Unregister Benchmark - operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete + - Vector Io + summary: Openai List Vector Stores + operationId: openai_list_vector_stores_v1_vector_stores_get responses: '200': description: Successful Response @@ -1929,20 +1790,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - parameters: - - name: benchmark_id - in: path - required: true - schema: - type: string - description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks: - get: + post: tags: - - Benchmarks - summary: List Benchmarks - operationId: list_benchmarks_v1alpha_eval_benchmarks_get + - Vector Io + summary: Openai Create Vector Store + operationId: openai_create_vector_store_v1_vector_stores_post responses: '200': description: Successful Response @@ -1961,11 +1813,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: + /v1/vector_stores/{vector_store_id}: + get: tags: - - Benchmarks - summary: Register Benchmark - operationId: register_benchmark_v1alpha_eval_benchmarks_post + - Vector Io + summary: Openai Retrieve Vector Store + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get responses: '200': description: Successful Response @@ -1984,13 +1837,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - /v1alpha/post-training/job/cancel: + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' post: tags: - - Post Training - summary: Cancel Training Job - operationId: cancel_training_job_v1alpha_post_training_job_cancel_post + - Vector Io + summary: Openai Update Vector Store + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post responses: '200': description: Successful Response @@ -2009,12 +1867,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/artifacts: - get: + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + delete: tags: - - Post Training - summary: Get Training Job Artifacts - operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get + - Vector Io + summary: Openai Delete Vector Store + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete responses: '200': description: Successful Response @@ -2033,12 +1897,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/status: - get: - tags: - - Post Training - summary: Get Training Job Status - operationId: get_training_job_status_v1alpha_post_training_job_status_get + 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: + - Vector Io + summary: Openai Create Vector Store File Batch + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post responses: '200': description: Successful Response @@ -2057,12 +1928,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/jobs: + 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: - - Post Training - summary: Get Training Jobs - operationId: get_training_jobs_v1alpha_post_training_jobs_get + - Vector Io + summary: Openai Retrieve Vector Store File Batch + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get responses: '200': description: Successful Response @@ -2081,12 +1959,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/preference-optimize: + 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}/cancel: post: tags: - - Post Training - summary: Preference Optimize - operationId: preference_optimize_v1alpha_post_training_preference_optimize_post + - Vector Io + summary: Openai Cancel Vector Store File Batch + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post responses: '200': description: Successful Response @@ -2105,12 +1996,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/supervised-fine-tune: - post: + 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: - - Post Training - summary: Supervised Fine Tune - operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post + - Vector Io + summary: Openai List Files In Vector Store File Batch + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get responses: '200': description: Successful Response @@ -2129,12 +2033,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tools/{tool_name}: + 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}/files: get: tags: - - Tool Groups - summary: Get Tool - operationId: get_tool_v1_tools__tool_name__get + - Vector Io + summary: Openai List Files In Vector Store + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get responses: '200': description: Successful Response @@ -2154,18 +2071,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: tool_name + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: tool_name' - /v1/toolgroups/{toolgroup_id}: - get: + description: 'Path parameter: vector_store_id' + post: tags: - - Tool Groups - summary: Get Tool Group - operationId: get_tool_group_v1_toolgroups__toolgroup_id__get + - Vector Io + summary: Openai Attach File To Vector Store + operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post responses: '200': description: Successful Response @@ -2185,17 +2101,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: toolgroup_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: toolgroup_id' - delete: + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}/files/{file_id}: + get: tags: - - Tool Groups - summary: Unregister Toolgroup - operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete + - Vector Io + summary: Openai Retrieve Vector Store File + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get responses: '200': description: Successful Response @@ -2214,20 +2131,24 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true parameters: - - name: toolgroup_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: toolgroup_id' - /v1/toolgroups: - get: + description: 'Path parameter: vector_store_id' + - name: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + post: tags: - - Tool Groups - summary: List Tool Groups - operationId: list_tool_groups_v1_toolgroups_get + - Vector Io + summary: Openai Update Vector Store File + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post responses: '200': description: Successful Response @@ -2246,11 +2167,24 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: + 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' + delete: tags: - - Tool Groups - summary: Register Tool Group - operationId: register_tool_group_v1_toolgroups_post + - Vector Io + summary: Openai Delete Vector Store File + operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete responses: '200': description: Successful Response @@ -2269,13 +2203,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - /v1/tools: + 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: - - Tool Groups - summary: List Tools - operationId: list_tools_v1_tools_get + - Vector Io + summary: Openai Retrieve Vector Store File Contents + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get responses: '200': description: Successful Response @@ -2294,12 +2240,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tool-runtime/invoke: + 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}/search: post: tags: - - Tool Runtime - summary: Invoke Tool - operationId: invoke_tool_v1_tool_runtime_invoke_post + - Vector Io + summary: Openai Search Vector Store + operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post responses: '200': description: Successful Response @@ -2318,12 +2277,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tool-runtime/list-tools: + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/version: get: tags: - - Tool Runtime - summary: List Runtime Tools - operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + - Inspect + summary: Version + operationId: version_v1_version_get responses: '200': description: Successful Response @@ -2342,12 +2308,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/files/{file_id}: - get: + /v1beta/datasetio/append-rows/{dataset_id}: + post: tags: - - Files - summary: Openai Retrieve File - operationId: openai_retrieve_file_v1_files__file_id__get + - Datasetio + summary: Append Rows + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post responses: '200': description: Successful Response @@ -2367,17 +2333,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: file_id + - name: dataset_id in: path required: true schema: type: string - description: 'Path parameter: file_id' - delete: + description: 'Path parameter: dataset_id' + /v1beta/datasetio/iterrows/{dataset_id}: + get: tags: - - Files - summary: Openai Delete File - operationId: openai_delete_file_v1_files__file_id__delete + - Datasetio + summary: Iterrows + operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get responses: '200': description: Successful Response @@ -2397,18 +2364,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: file_id + - name: dataset_id in: path required: true schema: type: string - description: 'Path parameter: file_id' - /v1/files: + description: 'Path parameter: dataset_id' + /v1beta/datasets: get: tags: - - Files - summary: Openai List Files - operationId: openai_list_files_v1_files_get + - Datasets + summary: List Datasets + operationId: list_datasets_v1beta_datasets_get responses: '200': description: Successful Response @@ -2429,9 +2396,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Files - summary: Openai Upload File - operationId: openai_upload_file_v1_files_post + - Datasets + summary: Register Dataset + operationId: register_dataset_v1beta_datasets_post responses: '200': description: Successful Response @@ -2450,12 +2417,13 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/files/{file_id}/content: + deprecated: true + /v1beta/datasets/{dataset_id}: get: tags: - - Files - summary: Openai Retrieve File Content - operationId: openai_retrieve_file_content_v1_files__file_id__content_get + - Datasets + summary: Get Dataset + operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': description: Successful Response @@ -2475,18 +2443,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: file_id + - name: dataset_id in: path required: true schema: type: string - description: 'Path parameter: file_id' - /v1/prompts: - get: + description: 'Path parameter: dataset_id' + delete: tags: - - Prompts - summary: List Prompts - operationId: list_prompts_v1_prompts_get + - Datasets + summary: Unregister Dataset + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete responses: '200': description: Successful Response @@ -2505,11 +2472,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: + deprecated: true + parameters: + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1alpha/eval/benchmarks: + get: tags: - - Prompts - summary: Create Prompt - operationId: create_prompt_v1_prompts_post + - Benchmarks + summary: List Benchmarks + operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': description: Successful Response @@ -2528,12 +2504,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/prompts/{prompt_id}: - get: + post: tags: - - Prompts - summary: Get Prompt - operationId: get_prompt_v1_prompts__prompt_id__get + - Benchmarks + summary: Register Benchmark + operationId: register_benchmark_v1alpha_eval_benchmarks_post responses: '200': description: Successful Response @@ -2552,18 +2527,13 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: prompt_id - in: path - required: true - schema: - type: string - description: 'Path parameter: prompt_id' - post: + deprecated: true + /v1alpha/eval/benchmarks/{benchmark_id}: + get: tags: - - Prompts - summary: Update Prompt - operationId: update_prompt_v1_prompts__prompt_id__post + - Benchmarks + summary: Get Benchmark + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': description: Successful Response @@ -2583,17 +2553,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: prompt_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: prompt_id' + description: 'Path parameter: benchmark_id' delete: tags: - - Prompts - summary: Delete Prompt - operationId: delete_prompt_v1_prompts__prompt_id__delete + - Benchmarks + summary: Unregister Benchmark + operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete responses: '200': description: Successful Response @@ -2612,19 +2582,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - - name: prompt_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/versions: - get: + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + post: tags: - - Prompts - summary: List Prompt Versions - operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get + - Eval + summary: Evaluate Rows + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post responses: '200': description: Successful Response @@ -2644,18 +2615,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: prompt_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/set-default-version: + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs: post: tags: - - Prompts - summary: Set Default Version - operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post + - Eval + summary: Run Eval + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post responses: '200': description: Successful Response @@ -2675,18 +2646,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: prompt_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: prompt_id' - /v1/conversations/{conversation_id}/items: + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: get: tags: - - Conversations - summary: List Items - operationId: list_items_v1_conversations__conversation_id__items_get + - Eval + summary: Job Status + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': description: Successful Response @@ -2706,17 +2677,23 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: conversation_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: conversation_id' - post: + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + delete: tags: - - Conversations - summary: Add Items - operationId: add_items_v1_conversations__conversation_id__items_post + - Eval + summary: Job Cancel + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete responses: '200': description: Successful Response @@ -2736,18 +2713,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: conversation_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: conversation_id' - /v1/conversations: - post: + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: + get: tags: - - Conversations - summary: Create Conversation - operationId: create_conversation_v1_conversations_post + - Eval + summary: Job Result + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get responses: '200': description: Successful Response @@ -2766,12 +2749,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/conversations/{conversation_id}: - get: + parameters: + - 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' + /v1alpha/inference/rerank: + post: tags: - - Conversations - summary: Get Conversation - operationId: get_conversation_v1_conversations__conversation_id__get + - Inference + summary: Rerank + operationId: rerank_v1alpha_inference_rerank_post responses: '200': description: Successful Response @@ -2790,18 +2786,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - post: + /v1alpha/post-training/job/artifacts: + get: tags: - - Conversations - summary: Update Conversation - operationId: update_conversation_v1_conversations__conversation_id__post + - Post Training + summary: Get Training Job Artifacts + operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get responses: '200': description: Successful Response @@ -2820,18 +2810,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - delete: + /v1alpha/post-training/job/cancel: + post: tags: - - Conversations - summary: Openai Delete Conversation - operationId: openai_delete_conversation_v1_conversations__conversation_id__delete + - Post Training + summary: Cancel Training Job + operationId: cancel_training_job_v1alpha_post_training_job_cancel_post responses: '200': description: Successful Response @@ -2850,19 +2834,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - /v1/conversations/{conversation_id}/items/{item_id}: + /v1alpha/post-training/job/status: get: tags: - - Conversations - summary: Retrieve - operationId: retrieve_v1_conversations__conversation_id__items__item_id__get + - Post Training + summary: Get Training Job Status + operationId: get_training_job_status_v1alpha_post_training_job_status_get responses: '200': description: Successful Response @@ -2881,24 +2858,60 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: item_id - in: path - required: true - schema: - type: string - description: 'Path parameter: item_id' - delete: + /v1alpha/post-training/jobs: + get: tags: - - Conversations - summary: Openai Delete Conversation Item - operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete + - Post Training + summary: Get Training Jobs + operationId: get_training_jobs_v1alpha_post_training_jobs_get + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + /v1alpha/post-training/preference-optimize: + post: + tags: + - Post Training + summary: Preference Optimize + operationId: preference_optimize_v1alpha_post_training_preference_optimize_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + /v1alpha/post-training/supervised-fine-tune: + post: + tags: + - Post Training + summary: Supervised Fine Tune + operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post responses: '200': description: Successful Response @@ -2917,19 +2930,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: item_id - in: path - required: true - schema: - type: string - description: 'Path parameter: item_id' components: responses: BadRequest400: @@ -2969,211 +2969,252 @@ components: schema: $ref: '#/components/schemas/Error' schemas: - ImageContentItem: - description: A image content item - properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/components/schemas/_URLOrData' - required: - - image - title: ImageContentItem - type: object - TextContentItem: - description: A text content item + Error: + description: Error response from the API. Roughly follows RFC 7807. properties: - type: - const: text - default: text - title: Type + status: + title: Status + type: integer + title: + title: Title type: string - text: - title: Text + detail: + title: Detail type: string + instance: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - text - title: TextContentItem + - status + - title + - detail + title: Error type: object - URL: - description: A URL reference to external content. + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - uri: - title: Uri + object: + const: list + default: list + title: Object type: string - required: - - uri - title: URL - type: object - _URLOrData: - description: A URL or a base64 encoded string - properties: - url: + data: + description: List of batch objects + items: + $ref: '#/components/schemas/Batch' + title: Data + type: array + first_id: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string - type: 'null' + description: ID of the first batch in the list nullable: true - title: URL - data: + last_id: anyOf: - type: string - type: 'null' - contentEncoding: base64 + description: ID of the last batch in the list nullable: true - title: _URLOrData + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean + required: + - data + title: ListBatchesResponse type: object - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - GreedySamplingStrategy: - description: Greedy sampling strategy that selects the highest probability token at each step. + Batch: + additionalProperties: true properties: - type: - const: greedy - default: greedy - title: Type + id: + title: Id type: string - title: GreedySamplingStrategy - type: object - TopKSamplingStrategy: - description: Top-k sampling strategy that restricts sampling to the k most likely tokens. - properties: - type: - const: top_k - default: top_k - title: Type + completion_window: + title: Completion Window type: string - top_k: - minimum: 1 - title: Top K + created_at: + title: Created At 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. - properties: - type: - const: top_p - default: top_p - title: Type + endpoint: + title: Endpoint type: string - temperature: + input_file_id: + title: Input File Id + type: string + object: + const: batch + title: Object + type: string + status: + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + title: Status + type: string + cancelled_at: anyOf: - - type: number - minimum: 0.0 + - type: integer - type: 'null' - top_p: + nullable: true + cancelling_at: anyOf: - - type: number + - type: integer - type: 'null' - default: 0.95 - required: - - temperature - title: TopPSamplingStrategy - type: object - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. + nullable: true + completed_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + error_file_id: + anyOf: + - type: string + - type: 'null' + nullable: true + errors: + anyOf: + - $ref: '#/components/schemas/Errors' + title: Errors + - type: 'null' + nullable: true + title: Errors + expired_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + expires_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + failed_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + finalizing_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + in_progress_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + nullable: true + model: + anyOf: + - type: string + - type: 'null' + nullable: true + output_file_id: + anyOf: + - type: string + - type: 'null' + nullable: true + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts + - type: 'null' + nullable: true + title: BatchRequestCounts + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage + - type: 'null' + nullable: true + title: BatchUsage + required: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + type: object + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. properties: - type: - const: grammar - default: grammar - title: Type + 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 - bnf: - additionalProperties: true - title: Bnf - type: object required: - - bnf - title: GrammarResponseFormat + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: - type: - const: json_schema - default: json_schema - title: Type + role: + const: assistant + default: assistant + title: Role type: string - json_schema: - additionalProperties: true - title: Json Schema - type: object - required: - - json_schema - title: JsonSchemaResponseFormat + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + nullable: true + name: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + title: OpenAIAssistantMessageParam type: object - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat OpenAIChatCompletionContentPartImageParam: description: Image content part for OpenAI-compatible chat completion messages. properties: @@ -3188,6 +3229,21 @@ components: - image_url title: OpenAIChatCompletionContentPartImageParam type: object + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: description: Text content part for OpenAI-compatible chat completion messages. properties: @@ -3203,141 +3259,141 @@ components: - text title: OpenAIChatCompletionContentPartTextParam type: object - OpenAIFile: - properties: - type: - const: file - default: file - title: Type - type: string - file: - $ref: '#/components/schemas/OpenAIFileFile' - required: - - file - title: OpenAIFile - type: object - OpenAIFileFile: + OpenAIChatCompletionToolCall: + description: Tool call specification for OpenAI-compatible chat completion responses. properties: - file_data: + index: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - file_id: + id: anyOf: - type: string - type: 'null' nullable: true - filename: + type: + const: function + default: function + title: Type + type: string + function: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction - type: 'null' nullable: true - title: OpenAIFileFile + title: OpenAIChatCompletionToolCallFunction + title: OpenAIChatCompletionToolCall type: object - OpenAIImageURL: - description: Image URL specification for OpenAI-compatible chat completion messages. + OpenAIChatCompletionToolCallFunction: + description: Function call details for OpenAI-compatible tool calls. properties: - url: - title: Url - type: string - detail: + name: anyOf: - type: string - type: 'null' nullable: true - required: - - url - title: OpenAIImageURL + arguments: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIChatCompletionToolCallFunction type: object - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIChatCompletionUsage: + description: Usage information for OpenAI chat completion. properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - nullable: true - name: + 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: - - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' nullable: true - tool_calls: + title: OpenAIChatCompletionUsagePromptTokensDetails + completion_tokens_details: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' nullable: true - title: OpenAIAssistantMessageParam + title: OpenAIChatCompletionUsageCompletionTokensDetails + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage type: object - OpenAIChatCompletionToolCall: - description: Tool call specification for OpenAI-compatible chat completion responses. + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. properties: - index: - anyOf: - - type: integer - - type: 'null' - nullable: true - id: - anyOf: - - type: string - - type: 'null' - nullable: true - type: - const: function - default: function - title: Type + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + finish_reason: + title: Finish Reason type: string - function: + index: + title: Index + type: integer + logprobs: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - title: OpenAIChatCompletionToolCallFunction + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true - title: OpenAIChatCompletionToolCallFunction - title: OpenAIChatCompletionToolCall + title: OpenAIChoiceLogprobs + required: + - message + - finish_reason + - index + title: OpenAIChoice type: object - OpenAIChatCompletionToolCallFunction: - description: Function call details for OpenAI-compatible tool calls. + OpenAIChoiceLogprobs: + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. properties: - name: + content: anyOf: - - type: string + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array - type: 'null' nullable: true - arguments: + refusal: anyOf: - - type: string + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array - type: 'null' nullable: true - title: OpenAIChatCompletionToolCallFunction + title: OpenAIChoiceLogprobs type: object OpenAIDeveloperMessageParam: description: A message from the developer in an OpenAI-compatible chat completion request. @@ -3364,6 +3420,74 @@ components: - content title: OpenAIDeveloperMessageParam type: object + OpenAIFile: + properties: + type: + const: file + default: file + title: Type + type: string + file: + $ref: '#/components/schemas/OpenAIFileFile' + required: + - file + title: OpenAIFile + type: object + OpenAIFileFile: + properties: + file_data: + anyOf: + - type: string + - type: 'null' + nullable: true + file_id: + anyOf: + - type: string + - type: 'null' + nullable: true + filename: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIFileFile + type: object + OpenAIImageURL: + description: Image URL specification for OpenAI-compatible chat completion messages. + properties: + url: + title: Url + type: string + detail: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - url + title: OpenAIImageURL + type: object + OpenAIMessageParam: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: description: A system message providing instructions or context to the model. properties: @@ -3389,6 +3513,39 @@ components: - 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' + nullable: true + logprob: + title: Logprob + type: number + top_logprobs: + items: + $ref: '#/components/schemas/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. properties: @@ -3413,15 +3570,41 @@ components: - content title: OpenAIToolMessageParam type: object - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. + 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: - role: - const: user - default: user - title: Role + token: + title: Token type: string - content: + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + 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. + properties: + role: + const: user + default: user + title: Role + type: string + content: anyOf: - type: string - items: @@ -3451,27 +3634,6 @@ components: - content title: OpenAIUserMessageParam type: object - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) OpenAIJSONSchema: description: JSON schema specification for OpenAI-compatible structured response format. properties: @@ -3517,16 +3679,6 @@ components: - json_schema title: OpenAIResponseFormatJSONSchema type: object - OpenAIResponseFormatText: - description: Text response format for OpenAI-compatible chat completion requests. - properties: - type: - const: text - default: text - title: Type - type: string - title: OpenAIResponseFormatText - type: object OpenAIResponseFormatParam: discriminator: mapping: @@ -3542,628 +3694,573 @@ components: - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' title: OpenAIResponseFormatJSONObject title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - VectorStoreChunkingStrategyAuto: - description: Automatic chunking strategy for vector store files. - properties: - type: - const: auto - default: auto - title: Type - type: string - title: VectorStoreChunkingStrategyAuto - type: object - VectorStoreChunkingStrategyStatic: - description: Static chunking strategy with configurable parameters. + OpenAIResponseFormatText: + description: Text response format for OpenAI-compatible chat completion requests. properties: type: - const: static - default: static + const: text + default: text title: Type type: string - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' - required: - - static - title: VectorStoreChunkingStrategyStatic - type: object - VectorStoreChunkingStrategyStaticConfig: - description: Configuration for static chunking strategy. - 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 + title: OpenAIResponseFormatText type: object - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - VectorStoreFileStatus: - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - OpenAIResponseInputMessageContentFile: - description: File content for input messages in OpenAI response format. + OpenAIChatCompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible chat completion endpoint. properties: - type: - const: input_file - default: input_file - title: Type + model: + title: Model type: string - file_data: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + minItems: 1 + title: Messages + type: array + frequency_penalty: anyOf: - - type: string + - type: number - type: 'null' nullable: true - file_id: + function_call: anyOf: - type: string + - additionalProperties: true + type: object - type: 'null' + title: string | object nullable: true - file_url: + functions: anyOf: - - type: string + - items: + additionalProperties: true + type: object + type: array - type: 'null' nullable: true - filename: + logit_bias: anyOf: - - type: string + - additionalProperties: + type: number + type: object - type: 'null' nullable: true - title: OpenAIResponseInputMessageContentFile - type: object - OpenAIResponseInputMessageContentImage: - description: Image content for input messages in OpenAI response format. - properties: - detail: - default: auto - title: Detail - type: string - enum: - - low - - high - - auto - type: - const: input_image - default: input_image - title: Type - type: string - file_id: + logprobs: anyOf: - - type: string + - type: boolean - type: 'null' nullable: true - image_url: + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + response_format: + anyOf: + - discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: 'null' + title: Response Format + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + tool_choice: + anyOf: + - type: string + - additionalProperties: true + type: object + - type: 'null' + title: string | object + nullable: true + tools: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - type: integer + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: anyOf: - type: string - type: 'null' nullable: true - title: OpenAIResponseInputMessageContentImage - type: object - OpenAIResponseInputMessageContentText: - description: Text content for input messages in OpenAI response format. - properties: - text: - title: Text - type: string - type: - const: input_text - default: input_text - title: Type - type: string required: - - text - title: OpenAIResponseInputMessageContentText + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody type: object - OpenAIResponseInputMessageContent: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - OpenAIResponseAnnotationCitation: - description: URL citation annotation for referencing external web resources. + OpenAIChatCompletion: + description: Response from an OpenAI-compatible chat completion request. properties: - type: - const: url_citation - default: url_citation - title: Type + id: + title: Id type: string - end_index: - title: End Index - type: integer - start_index: - title: Start Index - type: integer - title: - title: Title + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object type: string - url: - title: Url + created: + title: Created + type: integer + model: + title: Model type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation + - id + - choices + - created + - model + title: OpenAIChatCompletion type: object - OpenAIResponseAnnotationContainerFileCitation: + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: - type: - const: container_file_citation - default: container_file_citation - title: Type + id: + title: Id type: string - container_id: - title: Container Id + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object type: string - end_index: - title: End Index + created: + title: Created type: integer - file_id: - title: File Id - type: string - filename: - title: Filename + model: + title: Model type: string - start_index: - title: Start Index - type: integer + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - container_id - - end_index - - file_id - - filename - - start_index - title: OpenAIResponseAnnotationContainerFileCitation + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk type: object - OpenAIResponseAnnotationFileCitation: - description: File citation annotation for referencing specific files in response content. + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. 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 + content: + anyOf: + - type: string + - type: 'null' + nullable: true + refusal: + anyOf: + - type: string + - type: 'null' + nullable: true + role: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + reasoning_content: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIChoiceDelta type: object - OpenAIResponseAnnotationFilePath: + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: - type: - const: file_path - default: file_path - title: Type - type: string - file_id: - title: File Id + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason type: string index: title: Index type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - file_id + - delta + - finish_reason - index - title: OpenAIResponseAnnotationFilePath + title: OpenAIChunkChoice type: object - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - OpenAIResponseContentPartRefusal: - description: Refusal content within a streamed response part. + OpenAICompletionWithInputMessages: properties: - type: - const: refusal - default: refusal - title: Type - type: string - refusal: - title: Refusal + id: + title: Id type: string - required: - - refusal - title: OpenAIResponseContentPartRefusal - type: object - OpenAIResponseOutputMessageContentOutputText: - properties: - text: - title: Text + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object type: string - type: - const: output_text - default: output_text - title: Type + created: + title: Created + type: integer + model: + title: Model type: string - annotations: + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage + input_messages: items: discriminator: mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type + 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/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations + - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + title: Input Messages type: array required: - - text - title: OpenAIResponseOutputMessageContentOutputText - type: object - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - MCPListToolsTool: - description: Tool definition returned by MCP list tools operation. - properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - input_schema - - name - title: MCPListToolsTool - 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 + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages 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. + OpenAICompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible completion endpoint. properties: - content: + model: + title: Model + type: string + prompt: 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' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: string type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + title: list[string] - items: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: integer type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - const: message - default: message - title: Type - type: string - id: + title: list[integer] + - items: + items: + type: integer + type: array + type: array + title: list[array] + title: string | ... (4 variants) + best_of: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - status: + echo: anyOf: - - type: string + - type: boolean - type: 'null' nullable: true - required: - - content - - role - title: OpenAIResponseMessage - type: object - OpenAIResponseOutputMessageFileSearchToolCall: - description: File search tool call output message for OpenAI responses. - 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: + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + presence_penalty: anyOf: + - type: number + - type: 'null' + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: string type: array + title: list[string] - type: 'null' + title: string | list[string] nullable: true - required: - - id - - queries - - status - title: OpenAIResponseOutputMessageFileSearchToolCall - type: object - OpenAIResponseOutputMessageFileSearchToolCallResults: - description: Search results returned by the file search operation. - 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. - 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: + stream: anyOf: - - type: string + - type: boolean - type: 'null' nullable: true - status: + stream_options: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - required: - - call_id - - name - - arguments - title: OpenAIResponseOutputMessageFunctionToolCall - type: object - OpenAIResponseOutputMessageMCPCall: - description: Model Context Protocol (MCP) call output message for OpenAI responses. - 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: + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: anyOf: - type: string - type: 'null' nullable: true - output: + suffix: anyOf: - type: string - type: 'null' nullable: true required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall + - model + - prompt + title: OpenAICompletionRequestWithExtraBody type: object - OpenAIResponseOutputMessageMCPListTools: - description: MCP list tools output message containing available tools from an MCP server. + OpenAICompletion: + 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 - type: - const: mcp_list_tools - default: mcp_list_tools - title: Type - type: string - server_label: - title: Server Label - type: string - tools: + choices: items: - $ref: '#/components/schemas/MCPListToolsTool' - title: Tools + $ref: '#/components/schemas/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 - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools + - choices + - created + - model + title: OpenAICompletion type: object - OpenAIResponseOutputMessageWebSearchToolCall: - description: Web search tool call output message for OpenAI responses. + 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: - id: - title: Id - type: string - status: - title: Status + finish_reason: + title: Finish Reason type: string - type: - const: web_search_call - default: web_search_call - title: Type + text: + title: Text type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - id - - status - title: OpenAIResponseOutputMessageWebSearchToolCall + - finish_reason + - text + - index + title: OpenAICompletionChoice type: object - OpenAIResponseOutput: + ConversationItem: discriminator: 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' @@ -4178,277 +4275,414 @@ components: title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - AllowedToolsFilter: - description: Filter configuration for restricting which MCP tools can be used. + title: OpenAIResponseMessage | ... (9 variants) + OpenAIResponseAnnotationCitation: + description: URL citation annotation for referencing external web resources. properties: - tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - title: AllowedToolsFilter + 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 - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. + OpenAIResponseAnnotationContainerFileCitation: properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - title: ApprovalFilter + 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 - OpenAIResponseInputToolFileSearch: - description: File search tool configuration for OpenAI response inputs. + OpenAIResponseAnnotationFileCitation: + description: File citation annotation for referencing specific files in response content. properties: type: - const: file_search - default: file_search + const: file_citation + default: file_citation title: Type type: string - vector_store_ids: - items: - type: string - title: Vector Store Ids - type: array - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - max_num_results: - anyOf: - - maximum: 50 - minimum: 1 - type: integer - - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - nullable: true - title: SearchRankingOptions + file_id: + title: File Id + type: string + filename: + title: Filename + type: string + index: + title: Index + type: integer required: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch + - file_id + - filename + - index + title: OpenAIResponseAnnotationFileCitation type: object - OpenAIResponseInputToolFunction: - description: Function tool configuration for OpenAI response inputs. + OpenAIResponseAnnotationFilePath: properties: type: - const: function - default: function + const: file_path + default: file_path title: Type type: string - name: - title: Name + file_id: + title: File Id type: string - description: + index: + title: Index + type: integer + required: + - file_id + - index + title: OpenAIResponseAnnotationFilePath + type: object + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + OpenAIResponseContentPartRefusal: + description: Refusal content within a streamed response part. + 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' nullable: true - parameters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - strict: + status: anyOf: - - type: boolean + - type: string - type: 'null' nullable: true required: - - name - - parameters - title: OpenAIResponseInputToolFunction + - call_id + - output + title: OpenAIResponseInputFunctionToolCallOutput type: object - OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + OpenAIResponseInputMessageContentFile: + description: File content for input messages in OpenAI response format. properties: type: - const: mcp - default: mcp + const: input_file + default: input_file title: Type type: string - server_label: - title: Server Label - type: string - server_url: - title: Server Url - type: string - headers: + file_data: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - authorization: + file_id: anyOf: - type: string - type: 'null' nullable: true - require_approval: - anyOf: - - const: always - type: string - - const: never - type: string - - $ref: '#/components/schemas/ApprovalFilter' - title: ApprovalFilter - default: never - title: string | ApprovalFilter - allowed_tools: + file_url: anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter + - type: string - type: 'null' - title: list[string] | AllowedToolsFilter nullable: true - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP + filename: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIResponseInputMessageContentFile type: object - OpenAIResponseInputToolWebSearch: - description: Web search tool configuration for OpenAI response inputs. + OpenAIResponseInputMessageContentImage: + description: Image content for input messages in OpenAI response format. properties: + detail: + default: auto + title: Detail + type: string + enum: + - low + - high + - auto type: - default: web_search + const: input_image + default: input_image title: Type type: string - enum: - - web_search - - web_search_preview - - web_search_preview_2025_03_11 - - web_search_2025_08_26 - search_context_size: - anyOf: - - pattern: ^low|medium|high$ - type: string - - type: 'null' - default: medium - title: OpenAIResponseInputToolWebSearch - type: object - SearchRankingOptions: - description: Options for ranking and filtering search results. - properties: - ranker: + file_id: anyOf: - type: string - type: 'null' nullable: true - score_threshold: + image_url: anyOf: - - type: number + - type: string - type: 'null' - default: 0.0 - title: SearchRankingOptions + nullable: true + title: OpenAIResponseInputMessageContentImage type: object - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + OpenAIResponseInputMessageContentText: + description: Text content for input messages in OpenAI response format. properties: + text: + title: Text + type: string type: - const: mcp - default: mcp + 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 - allowed_tools: + 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' + nullable: true + reason: + anyOf: + - type: string + - type: 'null' + nullable: true + 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: - type: string + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + const: message + default: message + title: Type + type: string + id: + anyOf: + - type: string + - type: 'null' + nullable: true + status: + anyOf: + - type: string - type: 'null' - title: list[string] | AllowedToolsFilter nullable: true required: - - server_label - title: OpenAIResponseToolMCP + - content + - role + title: OpenAIResponseMessage type: object - OpenAIResponseTool: + OpenAIResponseOutputMessageContent: discriminator: mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseContentPartOutputText: - description: Text content within a streamed response part. + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + OpenAIResponseOutputMessageContentOutputText: properties: + text: + title: Text + type: string type: const: output_text default: output_text title: Type type: string - text: - title: Text - type: string annotations: items: discriminator: @@ -4470,108 +4704,234 @@ components: title: OpenAIResponseAnnotationFileCitation | ... (4 variants) title: Annotations type: array - logprobs: - anyOf: - - items: - additionalProperties: true - type: object + required: + - text + title: OpenAIResponseOutputMessageContentOutputText + type: object + OpenAIResponseOutputMessageFileSearchToolCall: + description: File search tool call output message for OpenAI responses. + 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: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' nullable: true required: - - text - title: OpenAIResponseContentPartOutputText + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall type: object - OpenAIResponseContentPartReasoningText: - description: Reasoning text emitted as part of a streamed response. + OpenAIResponseOutputMessageFunctionToolCall: + description: Function tool call output message for OpenAI responses. properties: + call_id: + title: Call Id + type: string + name: + title: Name + type: string + arguments: + title: Arguments + type: string type: - const: reasoning_text - default: reasoning_text + const: function_call + default: function_call title: Type type: string - text: - title: Text + id: + anyOf: + - type: string + - type: 'null' + nullable: true + status: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + type: object + OpenAIResponseOutputMessageMCPCall: + description: Model Context Protocol (MCP) call output message for OpenAI responses. + 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' + nullable: true + output: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - text - title: OpenAIResponseContentPartReasoningText + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall type: object - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseContentPartReasoningSummary: - description: Reasoning summary part in a streamed response. + OpenAIResponseOutputMessageMCPListTools: + description: MCP list tools output message containing available tools from an MCP server. properties: + id: + title: Id + type: string type: - const: summary_text - default: summary_text + const: mcp_list_tools + default: mcp_list_tools title: Type type: string - text: - title: Text + server_label: + title: Server Label type: string + tools: + items: + $ref: '#/components/schemas/MCPListToolsTool' + title: Tools + type: array required: - - text - title: OpenAIResponseContentPartReasoningSummary + - id + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools type: object - OpenAIResponseError: - description: Error details for failed OpenAI response requests. + OpenAIResponseOutputMessageWebSearchToolCall: + description: Web search tool call output message for OpenAI responses. properties: - code: - title: Code + id: + title: Id type: string - message: - title: Message + status: + title: Status + type: string + type: + const: web_search_call + default: web_search_call + title: Type type: string required: - - code - - message - title: OpenAIResponseError + - id + - status + title: OpenAIResponseOutputMessageWebSearchToolCall type: object - OpenAIResponseObject: - description: Complete OpenAI response object containing generation results and metadata. + 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. + 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 - error: + metadata: anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError + - 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. + nullable: true + 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. nullable: true - title: OpenAIResponseError + required: + - id + - created_at + title: Conversation + type: object + ConversationDeletedResource: + description: Response for deleted conversation. + properties: id: + description: The deleted conversation identifier title: Id type: string - model: - title: Model + 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 + ConversationItemList: + description: List of conversation items with pagination. + properties: object: - const: response - default: response + default: list + description: Object type title: Object type: string - output: + data: + description: List of conversation items items: discriminator: 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' @@ -4586,2079 +4946,737 @@ components: title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output + title: OpenAIResponseMessage | ... (9 variants) + title: Data type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: + first_id: anyOf: - type: string - type: 'null' + description: The ID of the first item in the list nullable: true - prompt: + last_id: anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt + - type: string - type: 'null' + description: The ID of the last item in the list nullable: true - title: OpenAIResponsePrompt - status: - title: Status + has_more: + default: false + description: Whether there are more items available + title: Has More + type: boolean + required: + - data + title: ConversationItemList + type: object + ConversationItemDeletedResource: + description: Response for deleted conversation item. + properties: + id: + description: The deleted item identifier + title: Id type: string - temperature: - anyOf: - - type: number - - type: 'null' - nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - nullable: true - tools: + 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 + OpenAIEmbeddingsRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible embeddings endpoint. + properties: + model: + title: Model + type: string + input: anyOf: + - type: string - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: string type: array - - type: 'null' - nullable: true - truncation: + title: list[string] + title: string | list[string] + encoding_format: anyOf: - type: string - type: 'null' - nullable: true - usage: + default: float + dimensions: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage + - type: integer - type: 'null' nullable: true - title: OpenAIResponseUsage - instructions: + user: anyOf: - type: string - type: 'null' nullable: true - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - nullable: true required: - - created_at - - id - model - - output - - status - title: OpenAIResponseObject + - input + title: OpenAIEmbeddingsRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseCompleted: - description: Streaming event indicating a response has been completed. + OpenAIEmbeddingData: + description: A single embedding data object from an OpenAI-compatible embeddings response. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.completed - default: response.completed - title: Type + object: + const: embedding + default: embedding + title: Object type: string + embedding: + anyOf: + - items: + type: number + type: array + title: list[number] + - type: string + title: list[number] | string + index: + title: Index + type: integer required: - - response - title: OpenAIResponseObjectStreamResponseCompleted + - embedding + - index + title: OpenAIEmbeddingData type: object - OpenAIResponseObjectStreamResponseContentPartAdded: - description: Streaming event for when a new content part is added to a response item. + OpenAIEmbeddingUsage: + description: Usage information for an OpenAI-compatible embeddings response. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index + prompt_tokens: + title: Prompt Tokens type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number + total_tokens: + title: Total Tokens type: integer - type: - const: response.content_part.added - default: response.content_part.added - title: Type - type: string required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartAdded + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage type: object - OpenAIResponseObjectStreamResponseContentPartDone: - description: Streaming event for when a content part is completed. + OpenAIEmbeddingsResponse: + description: Response from an OpenAI-compatible embeddings request. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id + object: + const: list + default: list + title: Object type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer - type: - const: response.content_part.done - default: response.content_part.done - title: Type + data: + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + title: Data + type: array + model: + title: Model type: string + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartDone + - data + - model + - usage + title: OpenAIEmbeddingsResponse type: object - OpenAIResponseObjectStreamResponseCreated: - description: Streaming event indicating a new response has been created. + OpenAIFilePurpose: + description: Valid purpose values for OpenAI Files API. + enum: + - assistants + - batch + title: OpenAIFilePurpose + type: string + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.created - default: response.created - title: Type + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - required: - - response - title: OpenAIResponseObjectStreamResponseCreated - type: object - OpenAIResponseObjectStreamResponseFailed: - description: Streaming event emitted when a response fails. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.failed - default: response.failed - title: Type + last_id: + title: Last Id + type: string + object: + const: list + default: list + title: Object type: string required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseFailed + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse type: object - OpenAIResponseObjectStreamResponseFileSearchCallCompleted: - description: Streaming event for completed file search calls. + OpenAIFileObject: + description: OpenAI File object as defined in the OpenAI Files API. properties: - item_id: - title: Item Id + object: + const: file + default: file + title: Object type: string - output_index: - title: Output Index + id: + title: Id + type: string + bytes: + title: Bytes type: integer - sequence_number: - title: Sequence Number + created_at: + title: Created At type: integer - type: - const: response.file_search_call.completed - default: response.file_search_call.completed - title: Type + expires_at: + title: Expires At + type: integer + filename: + title: Filename type: string + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject type: object - OpenAIResponseObjectStreamResponseFileSearchCallInProgress: - description: Streaming event for file search calls in progress. + 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: - item_id: - title: Item Id + anchor: + const: created_at + title: Anchor type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + seconds: + maximum: 2592000 + minimum: 3600 + title: Seconds type: integer - type: - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - title: Type - type: string required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - anchor + - seconds + title: ExpiresAfter type: object - OpenAIResponseObjectStreamResponseFileSearchCallSearching: - description: Streaming event for file search currently searching. + OpenAIFileDeleteResponse: + description: Response for deleting a file in OpenAI Files API. properties: - item_id: - title: Item Id + id: + title: Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.searching - default: response.file_search_call.searching - title: Type + object: + const: file + default: file + title: Object type: string + deleted: + title: Deleted + type: boolean required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - id + - deleted + title: OpenAIFileDeleteResponse type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: - description: Streaming event for incremental function call argument updates. + HealthInfo: + description: Health status information for the service. properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - title: Type - type: string + status: + $ref: '#/components/schemas/HealthStatus' required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - status + title: HealthInfo type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: - description: Streaming event for when function call arguments are completed. + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id + route: + title: Route type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.done - default: response.function_call_arguments.done - title: Type + method: + title: Method type: string + provider_types: + items: + type: string + title: Provider Types + type: array required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - route + - method + - provider_types + title: RouteInfo type: object - OpenAIResponseObjectStreamResponseInProgress: - description: Streaming event indicating the response remains in progress. + ListRoutesResponse: + description: Response containing a list of all available API routes. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.in_progress - default: response.in_progress - title: Type - type: string + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseInProgress + - data + title: ListRoutesResponse type: object - OpenAIResponseObjectStreamResponseIncomplete: - description: Streaming event emitted when a response ends in an incomplete state. + OpenAIModel: + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number + id: + title: Id + type: string + object: + const: model + default: model + title: Object + type: string + created: + title: Created type: integer - type: - const: response.incomplete - default: response.incomplete - title: Type + owned_by: + title: Owned By type: string + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseIncomplete + - id + - created + - owned_by + title: OpenAIModel type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + OpenAIListModelsResponse: properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - title: Type - type: string + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - data + title: OpenAIListModelsResponse type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + Model: + description: A model resource representing an AI model registered in Llama Stack. properties: - arguments: - title: Arguments + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - item_id: - title: Item Id + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done + const: model + default: model title: Type type: string + metadata: + additionalProperties: true + description: Any additional metadata for this model + title: Metadata + type: object + model_type: + $ref: '#/components/schemas/ModelType' + default: llm required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - identifier + - provider_id + title: Model type: object - OpenAIResponseObjectStreamResponseMcpCallCompleted: - description: Streaming event for completed MCP calls. + ModelType: + description: Enumeration of supported model types in Llama Stack. + enum: + - llm + - embedding + - rerank + title: ModelType + type: string + ModerationObject: + description: A moderation object. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.completed - default: response.mcp_call.completed - title: Type + id: + title: Id + type: string + model: + title: Model type: string + results: + items: + $ref: '#/components/schemas/ModerationObjectResults' + title: Results + type: array required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - id + - model + - results + title: ModerationObject type: object - OpenAIResponseObjectStreamResponseMcpCallFailed: - description: Streaming event for failed MCP calls. + ModerationObjectResults: + description: A moderation object. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.failed - default: response.mcp_call.failed - title: Type - type: string + flagged: + title: Flagged + type: boolean + categories: + anyOf: + - additionalProperties: + type: boolean + type: object + - type: 'null' + nullable: true + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + nullable: true + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallFailed + - flagged + title: ModerationObjectResults type: object - OpenAIResponseObjectStreamResponseMcpCallInProgress: - description: Streaming event for MCP calls in progress. + Prompt: + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + prompt: + anyOf: + - type: string + - type: 'null' + description: The system prompt with variable placeholders + nullable: true + version: + description: Version (integer starting at 1, incremented on save) + minimum: 1 + title: Version type: integer - type: - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - title: Type + prompt_id: + description: Unique identifier in format 'pmpt_<48-digit-hash>' + title: Prompt Id type: string + variables: + description: List of variable names that can be used in the prompt template + items: + type: string + title: Variables + type: array + is_default: + default: false + description: Boolean indicating whether this version is the default version + title: Is Default + type: boolean required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - version + - prompt_id + title: Prompt type: object - OpenAIResponseObjectStreamResponseMcpListToolsCompleted: + ListPromptsResponse: + description: Response model to list prompts. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - title: Type - type: string + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - data + title: ListPromptsResponse type: object - OpenAIResponseObjectStreamResponseMcpListToolsFailed: + ProviderInfo: + description: Information about a registered provider including its configuration and health status. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - title: Type + api: + title: Api + type: string + provider_id: + title: Provider Id + type: string + provider_type: + title: Provider Type type: string + config: + additionalProperties: true + title: Config + type: object + health: + additionalProperties: true + title: Health + type: object required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo type: object - OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + ListProvidersResponse: + description: Response containing a list of all available providers. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - title: Type - type: string + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - data + title: ListProvidersResponse type: object - OpenAIResponseObjectStreamResponseOutputItemAdded: - description: Streaming event for when a new output item is added to the response. + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. properties: - response_id: - title: Response Id + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.added - default: response.output_item.added - title: Type + last_id: + title: Last Id + type: string + object: + const: list + default: list + title: Object type: string required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemAdded + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject type: object - OpenAIResponseObjectStreamResponseOutputItemDone: - description: Streaming event for when an output item is completed. + OpenAIResponseError: + description: Error details for failed OpenAI response requests. properties: - response_id: - title: Response Id + code: + title: Code type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.done - default: response.output_item.done - title: Type + message: + title: Message type: string required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemDone + - code + - message + title: OpenAIResponseError type: object - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: - description: Streaming event for when an annotation is added to output text. + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + OpenAIResponseInputToolFileSearch: + description: File search tool configuration for OpenAI response inputs. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - content_index: - title: Content Index - type: integer - annotation_index: - title: Annotation Index - type: integer - annotation: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.annotation.added - default: response.output_text.annotation.added - title: Type + 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' + nullable: true + max_num_results: + anyOf: + - maximum: 50 + minimum: 1 + type: integer + - type: 'null' + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + nullable: true + title: SearchRankingOptions required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - vector_store_ids + title: OpenAIResponseInputToolFileSearch type: object - OpenAIResponseObjectStreamResponseOutputTextDelta: - description: Streaming event for incremental text content updates. + OpenAIResponseInputToolFunction: + description: Function tool configuration for OpenAI response inputs. properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.output_text.delta - default: response.output_text.delta + const: function + default: function title: Type type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDelta - type: object - OpenAIResponseObjectStreamResponseOutputTextDone: - description: Streaming event for when text output is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.done - default: response.output_text.done - title: Type + name: + title: Name type: string + description: + anyOf: + - type: string + - type: 'null' + nullable: true + parameters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + nullable: true required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDone + - name + - parameters + title: OpenAIResponseInputToolFunction type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: - description: Streaming event for when a new reasoning summary part is added. + OpenAIResponseInputToolWebSearch: + description: Web search tool configuration for OpenAI response inputs. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer type: - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added + default: web_search title: Type type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + search_context_size: + anyOf: + - pattern: ^low|medium|high$ + type: string + - type: 'null' + default: medium + title: OpenAIResponseInputToolWebSearch type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: - description: Streaming event for when a reasoning summary part is completed. + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index + created_at: + title: Created At type: integer - type: - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - title: Type - type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: - description: Streaming event for incremental reasoning summary text updates. - properties: - delta: - title: Delta - type: string - item_id: - title: Item Id + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + nullable: true + title: OpenAIResponseError + id: + title: Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - title: Type + model: + title: Model type: string - required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: - description: Streaming event for when reasoning summary text is completed. - properties: - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - title: Type - type: string - required: - - text - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - type: object - OpenAIResponseObjectStreamResponseReasoningTextDelta: - description: Streaming event for incremental reasoning text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.delta - default: response.reasoning_text.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - type: object - OpenAIResponseObjectStreamResponseReasoningTextDone: - description: Streaming event for when reasoning text is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.done - default: response.reasoning_text.done - title: Type - type: string - required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDone - type: object - OpenAIResponseObjectStreamResponseRefusalDelta: - description: Streaming event for incremental refusal text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.delta - default: response.refusal.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDelta - type: object - OpenAIResponseObjectStreamResponseRefusalDone: - description: Streaming event for when refusal text is completed. - properties: - content_index: - title: Content Index - type: integer - refusal: - title: Refusal - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.done - default: response.refusal.done - title: Type - type: string - required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDone - type: object - OpenAIResponseObjectStreamResponseWebSearchCallCompleted: - description: Streaming event for completed web search calls. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.completed - default: response.web_search_call.completed - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - type: object - OpenAIResponseObjectStreamResponseWebSearchCallInProgress: - description: Streaming event for web search calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - type: object - OpenAIResponseObjectStreamResponseWebSearchCallSearching: - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.searching - default: response.web_search_call.searching - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - type: object - OpenAIResponsePrompt: - description: OpenAI compatible Prompt object that is used in OpenAI responses. - properties: - id: - title: Id - type: string - variables: - anyOf: - - additionalProperties: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: object - - type: 'null' - nullable: true - version: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - id - title: OpenAIResponsePrompt - type: object - OpenAIResponseText: - description: Text response configuration for OpenAI responses. - properties: - format: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseTextFormat' - title: OpenAIResponseTextFormat - - type: 'null' - nullable: true - title: OpenAIResponseTextFormat - title: OpenAIResponseText - type: object - OpenAIResponseTextFormat: - description: Configuration for Responses API text format. - properties: - type: - title: Type - type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - title: OpenAIResponseTextFormat - type: object - OpenAIResponseUsage: - description: Usage information for OpenAI response. - 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: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' - title: OpenAIResponseUsageInputTokensDetails - - type: 'null' - nullable: true - title: OpenAIResponseUsageInputTokensDetails - output_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' - title: OpenAIResponseUsageOutputTokensDetails - - type: 'null' - nullable: true - title: OpenAIResponseUsageOutputTokensDetails - required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - type: object - OpenAIResponseUsageInputTokensDetails: - description: Token details for input tokens in OpenAI response usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageInputTokensDetails - type: object - OpenAIResponseUsageOutputTokensDetails: - description: Token details for output tokens in OpenAI response usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageOutputTokensDetails - type: object - OpenAIResponseObjectStream: - discriminator: - mapping: - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - title: OpenAIResponseObjectStreamResponseCreated - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - title: OpenAIResponseObjectStreamResponseInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - title: OpenAIResponseObjectStreamResponseOutputItemAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - title: OpenAIResponseObjectStreamResponseOutputItemDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - title: OpenAIResponseObjectStreamResponseOutputTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - title: OpenAIResponseObjectStreamResponseOutputTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - title: OpenAIResponseObjectStreamResponseMcpCallFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - title: OpenAIResponseObjectStreamResponseContentPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - title: OpenAIResponseObjectStreamResponseContentPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - title: OpenAIResponseObjectStreamResponseReasoningTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - title: OpenAIResponseObjectStreamResponseRefusalDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - title: OpenAIResponseObjectStreamResponseRefusalDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - title: OpenAIResponseObjectStreamResponseIncomplete - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - title: OpenAIResponseObjectStreamResponseFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - title: OpenAIResponseObjectStreamResponseCompleted - title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) - 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' - nullable: true - status: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - call_id - - output - title: OpenAIResponseInputFunctionToolCallOutput - 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' - nullable: true - reason: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse - type: object - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - ArrayType: - description: Parameter type for array values. - properties: - type: - const: array - default: array - title: Type - type: string - title: ArrayType - type: object - BooleanType: - description: Parameter type for boolean values. - properties: - type: - const: boolean - default: boolean - title: Type - type: string - title: BooleanType - type: object - ChatCompletionInputType: - description: Parameter type for 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. - properties: - type: - const: completion_input - default: completion_input - title: Type - type: string - title: CompletionInputType - type: object - JsonType: - description: Parameter type for JSON values. - properties: - type: - const: json - default: json - title: Type - type: string - title: JsonType - type: object - NumberType: - description: Parameter type for numeric values. - properties: - type: - const: number - default: number - title: Type - type: string - title: NumberType - type: object - ObjectType: - description: Parameter type for object values. - properties: - type: - const: object - default: object - title: Type - type: string - title: ObjectType - type: object - StringType: - description: Parameter type for string values. - properties: - type: - const: string - default: string - title: Type - type: string - title: StringType - type: object - UnionType: - description: Parameter type for union values. - properties: - type: - const: union - default: union - title: Type - type: string - title: UnionType - type: object - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - RowsDataSource: - description: A dataset stored in rows. - 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. - properties: - type: - const: uri - default: uri - title: Type - type: string - uri: - title: Uri - type: string - required: - - uri - title: URIDataSource - type: object - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - AggregationFunctionType: - description: Types of aggregation functions for scoring results. - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - type: string - BasicScoringFnParams: - description: Parameters for basic scoring function configuration. - 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: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions - type: array - title: BasicScoringFnParams - type: object - LLMAsJudgeScoringFnParams: - description: Parameters for LLM-as-judge scoring function configuration. - 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' - nullable: true - 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: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions - type: array - required: - - judge_model - title: LLMAsJudgeScoringFnParams - type: object - RegexParserScoringFnParams: - description: Parameters for regex parser scoring function configuration. - 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: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions - type: array - title: RegexParserScoringFnParams - type: object - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - LoraFinetuningConfig: - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - properties: - type: - const: LoRA - default: LoRA - title: Type - type: string - lora_attn_modules: - items: - type: string - title: Lora Attn Modules - type: array - apply_lora_to_mlp: - title: Apply Lora To Mlp - type: boolean - apply_lora_to_output: - title: Apply Lora To Output - type: boolean - rank: - title: Rank - type: integer - alpha: - title: Alpha - type: integer - use_dora: - anyOf: - - type: boolean - - type: 'null' - default: false - quantize_base: - anyOf: - - type: boolean - - type: 'null' - default: false - required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - type: object - QATFinetuningConfig: - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - properties: - type: - const: QAT - default: QAT - title: Type - type: string - quantizer_name: - title: Quantizer Name - type: string - group_size: - title: Group Size - type: integer - required: - - quantizer_name - - group_size - title: QATFinetuningConfig - type: object - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - SpanEndPayload: - description: Payload for a span end event. - properties: - type: - const: span_end - default: span_end - title: Type - type: string - status: - $ref: '#/components/schemas/SpanStatus' - required: - - status - title: SpanEndPayload - type: object - SpanStartPayload: - description: Payload for a span start event. - properties: - type: - const: span_start - default: span_start - title: Type - type: string - name: - title: Name - type: string - parent_span_id: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - name - title: SpanStartPayload - type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string - required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent - type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent - type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message - type: string - severity: - $ref: '#/components/schemas/LogSeverity' - required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent - type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Data - type: array - object: - const: list - default: list - title: Object - type: string - required: - - data - title: ListOpenAIResponseInputItem - type: object - OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. - properties: - created_at: - title: Created At - type: integer - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - nullable: true - title: OpenAIResponseError - id: - title: Id - type: string - model: - title: Model - type: string - object: - const: response - default: response - title: Object + object: + const: response + default: response + title: Object type: string output: items: @@ -6819,53 +5837,158 @@ components: - input title: OpenAIResponseObjectWithInput type: object - ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + OpenAIResponsePrompt: + description: OpenAI compatible Prompt object that is used in OpenAI responses. properties: - data: - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - title: Data - type: array - has_more: - title: Has More - type: boolean - first_id: - title: First Id + id: + title: Id type: string - last_id: - title: Last Id + variables: + anyOf: + - additionalProperties: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: object + - type: 'null' + nullable: true + version: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - id + title: OpenAIResponsePrompt + type: object + OpenAIResponseText: + description: Text response configuration for OpenAI responses. + properties: + format: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat + - type: 'null' + nullable: true + title: OpenAIResponseTextFormat + title: OpenAIResponseText + type: object + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + properties: + type: + const: mcp + default: mcp + title: Type type: string - object: - const: list - default: list - title: Object + server_label: + title: Server Label type: string + allowed_tools: + anyOf: + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter + - type: 'null' + title: list[string] | AllowedToolsFilter + nullable: true required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject + - server_label + title: OpenAIResponseToolMCP type: object - OpenAIDeleteResponseObject: - description: Response object confirming deletion of an OpenAI response. + OpenAIResponseUsage: + description: Usage information for OpenAI response. properties: - id: - title: Id - type: string - object: - const: response - default: response - title: Object - type: string - deleted: - default: true - title: Deleted - type: boolean + 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: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails + - type: 'null' + nullable: true + title: OpenAIResponseUsageInputTokensDetails + output_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails + - type: 'null' + nullable: true + title: OpenAIResponseUsageOutputTokensDetails required: - - id - title: OpenAIDeleteResponseObject + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage type: object ResponseGuardrailSpec: description: Specification for a guardrail to apply during response generation. @@ -6877,1551 +6000,1444 @@ components: - type title: ResponseGuardrailSpec type: object - Batch: - additionalProperties: true + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: - id: - title: Id - type: string - completion_window: - title: Completion Window - type: string - created_at: - title: Created At - type: integer - endpoint: - title: Endpoint - type: string - input_file_id: - title: Input File Id + type: + const: mcp + default: mcp + title: Type type: string - object: - const: batch - title: Object + server_label: + title: Server Label type: string - status: - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - title: Status + server_url: + title: Server Url type: string - cancelled_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - cancelling_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - completed_at: + headers: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' nullable: true - error_file_id: + authorization: anyOf: - type: string - type: 'null' nullable: true - errors: - anyOf: - - $ref: '#/components/schemas/Errors' - title: Errors - - type: 'null' - nullable: true - title: Errors - expired_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - expires_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - failed_at: + require_approval: anyOf: - - type: integer - - type: 'null' - nullable: true - finalizing_at: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + title: ApprovalFilter + default: never + title: string | ApprovalFilter + allowed_tools: anyOf: - - type: integer + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' + title: list[string] | AllowedToolsFilter nullable: true - in_progress_at: + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + type: object + OpenAIResponseObject: + description: Complete OpenAI response object containing generation results and metadata. + properties: + created_at: + title: Created At + type: integer + error: anyOf: - - type: integer + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' nullable: true - metadata: + title: OpenAIResponseError + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output + type: array + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: anyOf: - - additionalProperties: - type: string - type: object + - type: string - type: 'null' nullable: true - model: + prompt: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' nullable: true - output_file_id: + title: OpenAIResponsePrompt + status: + title: Status + type: string + temperature: anyOf: - - type: string + - type: number - type: 'null' nullable: true - request_counts: + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: anyOf: - - $ref: '#/components/schemas/BatchRequestCounts' - title: BatchRequestCounts + - type: number - type: 'null' nullable: true - title: BatchRequestCounts - usage: + tools: anyOf: - - $ref: '#/components/schemas/BatchUsage' - title: BatchUsage + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array - type: 'null' nullable: true - title: BatchUsage - required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - type: object - BatchError: - additionalProperties: true - properties: - code: + truncation: anyOf: - type: string - type: 'null' nullable: true - line: + usage: anyOf: - - type: integer + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' nullable: true - message: + title: OpenAIResponseUsage + instructions: anyOf: - type: string - type: 'null' nullable: true - param: + max_tool_calls: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - title: BatchError - type: object - BatchRequestCounts: - additionalProperties: true - properties: - completed: - title: Completed - type: integer - failed: - title: Failed - type: integer - total: - title: Total - type: integer - required: - - completed - - failed - - total - title: BatchRequestCounts - type: object - BatchUsage: - additionalProperties: true - properties: - input_tokens: - title: Input Tokens - type: integer - input_tokens_details: - $ref: '#/components/schemas/InputTokensDetails' - output_tokens: - title: Output Tokens - type: integer - output_tokens_details: - $ref: '#/components/schemas/OutputTokensDetails' - total_tokens: - title: Total Tokens - type: integer required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject type: object - Errors: - additionalProperties: true + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. properties: - data: + type: + const: output_text + default: output_text + title: Type + type: string + text: + title: Text + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations + type: array + logprobs: anyOf: - items: - $ref: '#/components/schemas/BatchError' + additionalProperties: true + type: object type: array - type: 'null' nullable: true - object: - anyOf: - - type: string - - type: 'null' - nullable: true - title: Errors + required: + - text + title: OpenAIResponseContentPartOutputText type: object - InputTokensDetails: - additionalProperties: true + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. properties: - cached_tokens: - title: Cached Tokens - type: integer + type: + const: summary_text + default: summary_text + title: Type + type: string + text: + title: Text + type: string required: - - cached_tokens - title: InputTokensDetails + - text + title: OpenAIResponseContentPartReasoningSummary type: object - OutputTokensDetails: - additionalProperties: true + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. properties: - reasoning_tokens: - title: Reasoning Tokens - type: integer + type: + const: reasoning_text + default: reasoning_text + title: Type + type: string + text: + title: Text + type: string required: - - reasoning_tokens - title: OutputTokensDetails + - text + title: OpenAIResponseContentPartReasoningText type: object - ListBatchesResponse: - description: Response containing a list of batch objects. + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. properties: - object: - const: list - default: list - title: Object + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.completed + default: response.completed + title: Type type: string - data: - description: List of batch objects - items: - $ref: '#/components/schemas/Batch' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: ID of the last batch in the list - nullable: true - has_more: - default: false - description: Whether there are more batches available - title: Has More - type: boolean required: - - data - title: ListBatchesResponse + - response + title: OpenAIResponseObjectStreamResponseCompleted type: object - Benchmark: - description: A benchmark resource for evaluating model performance. + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + content_index: + title: Content Index + type: integer + response_id: + title: Response Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer type: - const: benchmark - default: benchmark + const: response.content_part.added + default: response.content_part.added 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 - ListBenchmarksResponse: - properties: - data: - items: - $ref: '#/components/schemas/Benchmark' - title: Data - type: array required: - - data - title: ListBenchmarksResponse + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded type: object - ImageDelta: - description: An image content delta for streaming responses. + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer type: - const: image - default: image + const: response.content_part.done + default: response.content_part.done title: Type type: string - image: - format: binary - title: Image - type: string required: - - image - title: ImageDelta + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone type: object - TextDelta: - description: A text content delta for streaming responses. + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' type: - const: text - default: text + const: response.created + default: response.created title: Type type: string - text: - title: Text - type: string required: - - text - title: TextDelta + - response + title: OpenAIResponseObjectStreamResponseCreated type: object - JobStatus: - description: Status of a job execution. - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string - Job: - description: A job execution instance with status tracking. + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. properties: - job_id: - title: Job Id + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.failed + default: response.failed + title: Type type: string - status: - $ref: '#/components/schemas/JobStatus' required: - - job_id - - status - title: Job + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed type: object - MetricInResponse: - description: A metric value included in API responses. + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. properties: - metric: - title: Metric + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - metric - - value - title: MetricInResponse - type: object - PaginatedResponse: - description: A generic paginated response that follows a simple format. - properties: - data: - items: - additionalProperties: true - type: object - title: Data - type: array - has_more: - title: Has More - type: boolean - url: - anyOf: - - type: string - - type: 'null' - nullable: true required: - - data - - has_more - title: PaginatedResponse + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted type: object - PostTrainingMetric: - description: Training metrics captured during post-training jobs. + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. properties: - epoch: - title: Epoch + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - train_loss: - title: Train Loss - type: number - validation_loss: - title: Validation Loss - type: number - perplexity: - title: Perplexity - type: number + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type + type: string required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress type: object - Checkpoint: - description: Checkpoint created during training runs. + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. properties: - identifier: - title: Identifier - type: string - created_at: - format: date-time - title: Created At + item_id: + title: Item Id type: string - epoch: - title: Epoch + output_index: + title: Output Index type: integer - post_training_job_id: - title: Post Training Job Id - type: string - path: - title: Path + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type type: string - training_metrics: - anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' - title: PostTrainingMetric - - type: 'null' - nullable: true - title: PostTrainingMetric required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: dialog - default: dialog + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta title: Type type: string - title: DialogType + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta type: object - Conversation: - description: OpenAI-compatible conversation object. + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. properties: - id: - description: The unique ID of the conversation. - title: Id + arguments: + title: Arguments type: string - object: - const: conversation - default: conversation - description: The object type, which is always conversation. - title: Object + item_id: + title: Item Id type: string - created_at: - description: The time at which the conversation was created, measured in seconds since the Unix epoch. - title: Created At + output_index: + title: Output Index 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. - nullable: true - 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. - nullable: true + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type + type: string required: - - id - - created_at - title: Conversation + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone type: object - ConversationDeletedResource: - description: Response for deleted conversation. + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. properties: - id: - description: The deleted conversation identifier - title: Id - type: string - object: - default: conversation.deleted - description: Object type - title: Object + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type type: string - deleted: - default: true - description: Whether the object was deleted - title: Deleted - type: boolean required: - - id - title: ConversationDeletedResource + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.incomplete + default: response.incomplete + title: Type + type: string required: - - items - title: ConversationItemCreateRequest + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete type: object - ConversationItemDeletedResource: - description: Response for deleted conversation item. + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: properties: - id: - description: The deleted item identifier - title: Id + delta: + title: Delta type: string - object: - default: conversation.item.deleted - description: Object type - title: Object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type type: string - deleted: - default: true - description: Whether the object was deleted - title: Deleted - type: boolean required: - - id - title: ConversationItemDeletedResource + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta type: object - ConversationItemList: - description: List of conversation items with pagination. + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: properties: - object: - default: list - description: Object type - title: Object + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type type: string - data: - description: List of conversation items - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the first item in the list - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the last item in the list - nullable: true - has_more: - default: false - description: Whether there are more items available - title: Has More - type: boolean required: - - data - title: ConversationItemList + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer type: - const: message - default: message + const: response.mcp_call.failed + default: response.mcp_call.failed title: Type type: string - object: - const: message - default: message - title: Object - type: string required: - - id - - content - - role - - status - title: ConversationMessage + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed type: object - DatasetPurpose: - description: Purpose of the dataset. Each purpose has a required input data schema. - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string - Dataset: - description: Dataset resource for storing and accessing training or evaluation data. + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. 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 - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: dataset - default: dataset + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress title: Type type: string - purpose: - $ref: '#/components/schemas/DatasetPurpose' - source: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - metadata: - additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata - type: object required: - - identifier - - provider_id - - purpose - - source - title: Dataset + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress type: object - ListDatasetsResponse: - description: Response from listing datasets. + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: properties: - data: - items: - $ref: '#/components/schemas/Dataset' - title: Data - type: array + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type + type: string required: - - data - title: ListDatasetsResponse + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted type: object - Error: - description: Error response from the API. Roughly follows RFC 7807. + OpenAIResponseObjectStreamResponseMcpListToolsFailed: properties: - status: - title: Status + sequence_number: + title: Sequence Number type: integer - title: - title: Title - type: string - detail: - title: Detail + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type type: string - instance: - anyOf: - - type: string - - type: 'null' - nullable: true required: - - status - - title - - detail - title: Error + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed type: object - Api: - description: Enumeration of all available APIs in the Llama Stack system. - enum: - - providers - - inference - - safety - - agents - - batches - - vector_io - - datasetio - - scoring - - eval - - post_training - - tool_runtime - - models - - shields - - vector_stores - - datasets - - scoring_functions - - benchmarks - - tool_groups - - files - - prompts - - conversations - - inspect - title: Api - type: string - InlineProviderSpec: + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. + properties: + response_id: + title: Response Id + type: string + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.added + default: response.output_item.added + title: Type type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - container_image: - anyOf: - - type: string - - type: 'null' - description: |2 - - The container image to use for this implementation. If one is provided, pip_packages will be ignored. - If a provider depends on other providers, the dependencies MUST NOT specify a container image. - nullable: true - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true required: - - api - - provider_type - - config_class - title: InlineProviderSpec + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded type: object - ModelType: - description: Enumeration of supported model types in Llama Stack. - enum: - - llm - - embedding - - rerank - title: ModelType - type: string - Model: - description: A model resource representing an AI model registered in Llama Stack. + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + response_id: + title: Response Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done + title: Type + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone + type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. + properties: + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + sequence_number: + title: Sequence Number + type: integer type: - const: model - default: model + const: response.output_text.annotation.added + default: response.output_text.annotation.added title: Type type: string - metadata: - additionalProperties: true - description: Any additional metadata for this model - title: Metadata - type: object - model_type: - $ref: '#/components/schemas/ModelType' - default: llm required: - - identifier - - provider_id - title: Model + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded type: object - ProviderSpec: + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.delta + default: response.output_text.delta + title: Type type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array required: - - api - - provider_type - - config_class - title: ProviderSpec + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta type: object - RemoteProviderSpec: + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type + content_index: + title: Content Index + type: integer + text: + title: Text type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + item_id: + title: Item Id type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - adapter_type: - description: Unique identifier for this adapter - title: Adapter Type + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done + title: Type type: string - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true required: - - api - - provider_type - - config_class - - adapter_type - title: RemoteProviderSpec + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone type: object - ScoringFn: - description: A scoring function resource for evaluating model outputs. + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + item_id: + title: Item Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. + properties: + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: scoring_function - default: scoring_function + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done title: Type type: string - description: - anyOf: - - type: string - - type: 'null' - 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: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - params: - anyOf: - - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval - title: Params - nullable: true required: - - identifier - - provider_id - - return_type - title: ScoringFn + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone type: object - Shield: - description: A safety shield resource that can be used to check content. + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + delta: + title: Delta type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: shield - default: shield + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta title: Type type: string - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true required: - - identifier - - provider_id - title: Shield + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta type: object - ToolGroup: - description: A group of related tools managed together. + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + text: + title: Text type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: tool_group - default: tool_group + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done title: Type type: string - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - nullable: true - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true required: - - identifier - - provider_id - title: ToolGroup + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone type: object - ModelCandidate: - description: A model candidate for evaluation. + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: model - default: model + const: response.reasoning_text.delta + default: response.reasoning_text.delta title: Type type: string - model: - title: Model - type: string - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: - anyOf: - - $ref: '#/components/schemas/SystemMessage' - title: SystemMessage - - type: 'null' - nullable: true - title: SystemMessage required: - - model - - sampling_params - title: ModelCandidate + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta type: object - SamplingParams: - description: Sampling parameters. + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. properties: - strategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - max_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - repetition_penalty: - anyOf: - - type: number - - type: 'null' - default: 1.0 - stop: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - title: SamplingParams + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done + title: Type + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone type: object - SystemMessage: - description: A system message providing instructions or context to the model. + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. properties: - role: - const: system - default: system - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.delta + default: response.refusal.delta + title: Type + type: string required: - - content - title: SystemMessage + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta type: object - BenchmarkConfig: - description: A benchmark configuration for evaluation. + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - scoring_params: - additionalProperties: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - description: Map between scoring function id and parameters for each scoring function you want to run - title: Scoring Params - type: object - num_examples: - anyOf: - - type: integer - - type: 'null' - description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - nullable: true + content_index: + title: Content Index + type: integer + refusal: + title: Refusal + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.done + default: response.refusal.done + title: Type + type: string required: - - eval_candidate - title: BenchmarkConfig + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone type: object - ScoringResult: - description: A scoring result for a single row. + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. properties: - score_rows: - items: - additionalProperties: true - type: object - title: Score Rows - type: array - aggregated_results: - additionalProperties: true - title: Aggregated Results - type: object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type + type: string required: - - score_rows - - aggregated_results - title: ScoringResult + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted type: object - EvaluateResponse: - description: The response from an evaluation. + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. properties: - generations: - items: - additionalProperties: true - type: object - title: Generations - type: array - scores: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Scores - type: object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress + title: Type + type: string required: - - generations - - scores - title: EvaluateResponse + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress 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) + OpenAIResponseObjectStreamResponseWebSearchCallSearching: properties: - anchor: - const: created_at - title: Anchor + item_id: + title: Item Id type: string - seconds: - maximum: 2592000 - minimum: 3600 - title: Seconds + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number type: integer + type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type + type: string required: - - anchor - - seconds - title: ExpiresAfter + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching type: object - OpenAIFileObject: - description: OpenAI File object as defined in the OpenAI Files API. + OpenAIDeleteResponseObject: + description: Response object confirming deletion of an OpenAI response. 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 + object: + const: response + default: response + title: Object type: string - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' + deleted: + default: true + title: Deleted + type: boolean required: - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject + title: OpenAIDeleteResponseObject type: object - OpenAIFilePurpose: - description: Valid purpose values for OpenAI Files API. - enum: - - assistants - - batch - title: OpenAIFilePurpose - type: string - ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. properties: data: items: - $ref: '#/components/schemas/OpenAIFileObject' + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage 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 @@ -8429,1017 +7445,1677 @@ components: type: string required: - data - - has_more - - first_id - - last_id - title: ListOpenAIFileResponse + title: ListOpenAIResponseInputItem type: object - OpenAIFileDeleteResponse: - description: Response for deleting a file in OpenAI Files API. + RunShieldResponse: + description: Response from running a safety shield. properties: - id: - title: Id - type: string - object: - const: file - default: file - title: Object - type: string - deleted: - title: Deleted - type: boolean + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation + - type: 'null' + nullable: true + title: SafetyViolation + title: RunShieldResponse + type: object + SafetyViolation: + description: Details of a safety violation detected by content moderation. + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - id - - deleted - title: OpenAIFileDeleteResponse + - violation_level + title: SafetyViolation type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). + ViolationLevel: + description: Severity level of a safety violation. + enum: + - info + - warn + - error + title: ViolationLevel + type: string + AggregationFunctionType: + description: Types of aggregation functions for scoring results. + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + type: string + ArrayType: + description: Parameter type for array values. properties: type: - const: bf16 - default: bf16 + const: array + default: array title: Type type: string - title: Bf16QuantizationConfig + title: ArrayType type: object - EmbeddingsResponse: - description: Response containing generated embeddings. + BasicScoringFnParams: + description: Parameters for basic scoring function configuration. properties: - embeddings: + type: + const: basic + default: basic + title: Type + type: string + aggregation_functions: + description: Aggregation functions to apply to the scores of each row items: - items: - type: number - type: array - title: Embeddings + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions type: array - required: - - embeddings - title: EmbeddingsResponse + title: BasicScoringFnParams type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. + BooleanType: + description: Parameter type for boolean values. properties: type: - const: fp8_mixed - default: fp8_mixed + const: boolean + default: boolean title: Type type: string - title: Fp8QuantizationConfig + title: BooleanType type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. + ChatCompletionInputType: + description: Parameter type for chat completion input. properties: type: - const: int4_mixed - default: int4_mixed + const: chat_completion_input + default: chat_completion_input title: Type type: string - scheme: - anyOf: - - type: string - - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig + title: ChatCompletionInputType type: object - OpenAIChatCompletionUsage: - description: Usage information for OpenAI chat completion. + CompletionInputType: + description: Parameter type for completion input. 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: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' - title: OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - completion_tokens_details: + type: + const: completion_input + default: completion_input + title: Type + type: string + title: CompletionInputType + type: object + JsonType: + description: Parameter type for JSON values. + properties: + type: + const: json + default: json + title: Type + type: string + title: JsonType + type: object + LLMAsJudgeScoringFnParams: + description: Parameters for LLM-as-judge scoring function configuration. + properties: + type: + const: llm_as_judge + default: llm_as_judge + title: Type + type: string + judge_model: + title: Judge Model + type: string + prompt_template: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' - title: OpenAIChatCompletionUsageCompletionTokensDetails + - type: string - type: 'null' nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage + - judge_model + title: LLMAsJudgeScoringFnParams + type: object + NumberType: + description: Parameter type for numeric values. + properties: + type: + const: number + default: number + title: Type + type: string + title: NumberType + type: object + ObjectType: + description: Parameter type for object values. + properties: + type: + const: object + default: object + title: Type + type: string + title: ObjectType + type: object + RegexParserScoringFnParams: + description: Parameters for regex parser scoring function configuration. + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array + title: RegexParserScoringFnParams type: object - OpenAIChatCompletionUsageCompletionTokensDetails: - description: Token details for output tokens in OpenAI chat completion usage. + ScoringFn: + description: A scoring function resource for evaluating model outputs. properties: - reasoning_tokens: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier + type: string + provider_resource_id: anyOf: - - type: integer + - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object - OpenAIChatCompletionUsagePromptTokensDetails: - description: Token details for prompt tokens in OpenAI chat completion usage. - properties: - cached_tokens: + 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: integer + - type: string - type: 'null' nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - properties: - message: + 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: - assistant: '#/components/schemas/OpenAIAssistantMessageParam' - developer: '#/components/schemas/OpenAIDeveloperMessageParam' - system: '#/components/schemas/OpenAISystemMessageParam' - tool: '#/components/schemas/OpenAIToolMessageParam' - user: '#/components/schemas/OpenAIUserMessageParam' - propertyName: role + 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/OpenAIUserMessageParam' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + - $ref: '#/components/schemas/StringType' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + params: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + title: Params nullable: true - title: OpenAIChoiceLogprobs required: - - message - - finish_reason - - index - title: OpenAIChoice + - identifier + - provider_id + - return_type + title: ScoringFn type: object - OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + StringType: + description: Parameter type for string values. properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - nullable: true - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - nullable: true - title: OpenAIChoiceLogprobs + type: + const: string + default: string + title: Type + type: string + title: StringType type: object - OpenAICompletionWithInputMessages: + UnionType: + description: Parameter type for union values. properties: - id: - title: Id + type: + const: union + default: union + title: Type type: string - choices: + title: UnionType + type: object + ListScoringFunctionsResponse: + properties: + data: items: - $ref: '#/components/schemas/OpenAIChoice' - title: Choices + $ref: '#/components/schemas/ScoringFn' + title: Data 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: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsage - input_messages: + required: + - data + title: ListScoringFunctionsResponse + type: object + ScoreResponse: + description: The response from scoring. + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object + required: + - results + title: ScoreResponse + type: object + ScoringResult: + description: A scoring result for a single row. + properties: + score_rows: 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Input Messages + additionalProperties: true + type: object + title: Score Rows type: array + aggregated_results: + additionalProperties: true + title: Aggregated Results + type: object required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages + - score_rows + - aggregated_results + title: ScoringResult 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 + ScoreBatchResponse: + description: Response from batch scoring operations on datasets. properties: - token: - title: Token - type: string - bytes: + dataset_id: anyOf: - - items: - type: integer - type: array + - type: string - type: 'null' nullable: true - logprob: - title: Logprob - type: number - top_logprobs: - items: - $ref: '#/components/schemas/OpenAITopLogProb' - title: Top Logprobs - type: array + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object required: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb + - results + title: ScoreBatchResponse 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 + Shield: + description: A safety shield resource that can be used to check content. properties: - token: - title: Token + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - bytes: + provider_resource_id: anyOf: - - items: - type: integer - type: array + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string + type: + const: shield + default: shield + title: Type + type: string + params: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - logprob: - title: Logprob - type: number required: - - token - - logprob - title: OpenAITopLogProb + - identifier + - provider_id + title: Shield type: object - ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. + ListShieldsResponse: properties: data: items: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + $ref: '#/components/schemas/Shield' 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 + title: ListShieldsResponse type: object - OpenAIChatCompletion: - description: Response from an OpenAI-compatible chat completion request. + ImageContentItem: + description: A image content item properties: - id: - title: Id + type: + const: image + default: image + title: Type type: string - choices: - items: - $ref: '#/components/schemas/OpenAIChoice' - title: Choices - type: array - object: - const: chat.completion - default: chat.completion - title: Object + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + TextContentItem: + description: A text content item + properties: + type: + const: text + default: text + title: Type type: string - created: - title: Created - type: integer - model: - title: Model + text: + title: Text type: string - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsage required: - - id - - choices - - created - - model - title: OpenAIChatCompletion + - text + title: TextContentItem type: object - OpenAIChoiceDelta: - description: A delta from an OpenAI-compatible chat completion streaming response. + ToolInvocationResult: + description: Result of a tool invocation. properties: content: anyOf: - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true + error_message: + anyOf: + - type: string + - type: 'null' + nullable: true + error_code: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - refusal: + title: ToolInvocationResult + type: object + URL: + description: A URL reference to external content. + properties: + uri: + title: Uri + type: string + required: + - uri + title: URL + type: object + ToolDef: + description: Tool definition used in runtime contexts. + properties: + toolgroup_id: anyOf: - type: string - type: 'null' nullable: true - role: + name: + title: Name + type: string + description: anyOf: - type: string - type: 'null' nullable: true - tool_calls: + input_schema: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - reasoning_content: + output_schema: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceDelta - type: object - OpenAIChunkChoice: - description: A chunk choice from an OpenAI-compatible chat completion streaming response. - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + metadata: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceLogprobs required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice + - name + title: ToolDef type: object - OpenAIChatCompletionChunk: - description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + ListToolDefsResponse: + description: Response containing a list of tool definitions. properties: - id: - title: Id - type: string - choices: + data: items: - $ref: '#/components/schemas/OpenAIChunkChoice' - title: Choices + $ref: '#/components/schemas/ToolDef' + title: Data type: array - object: - const: chat.completion.chunk - default: chat.completion.chunk - title: Object - type: string - created: - title: Created - type: integer - model: - title: Model + required: + - data + title: ListToolDefsResponse + type: object + ToolGroup: + description: A group of related tools managed together. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - usage: + provider_resource_id: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage + - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true - title: OpenAIChatCompletionUsage - required: - - id - - choices - - created - - model - title: OpenAIChatCompletionChunk - type: object - OpenAIChatCompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible chat completion endpoint. - properties: - model: - title: Model + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - minItems: 1 - title: Messages - type: array - frequency_penalty: + type: + const: tool_group + default: tool_group + title: Type + type: string + mcp_endpoint: anyOf: - - type: number + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true - function_call: + title: URL + args: anyOf: - - type: string - additionalProperties: true type: object - type: 'null' - title: string | object nullable: true - functions: + required: + - identifier + - provider_id + title: ToolGroup + type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object + Chunk: + description: A chunk of content that can be inserted into a vector database. + properties: + content: anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: - additionalProperties: true - type: object + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - - type: 'null' - nullable: true - logit_bias: + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: anyOf: - - additionalProperties: + - items: type: number - type: object - - type: 'null' - nullable: true - logprobs: - anyOf: - - type: boolean - - type: 'null' - nullable: true - max_completion_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - max_tokens: - anyOf: - - type: integer + type: array - type: 'null' nullable: true - n: + chunk_metadata: anyOf: - - type: integer + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true - parallel_tool_calls: + title: ChunkMetadata + required: + - content + - chunk_id + 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. + properties: + chunk_id: anyOf: - - type: boolean + - type: string - type: 'null' nullable: true - presence_penalty: + document_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - response_format: + source: anyOf: - - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: string - type: 'null' - title: Response Format nullable: true - seed: + created_timestamp: anyOf: - type: integer - type: 'null' nullable: true - stop: + updated_timestamp: anyOf: - - type: string - - items: - type: string - type: array - title: list[string] + - type: integer - type: 'null' - title: string | list[string] nullable: true - stream: + chunk_window: anyOf: - - type: boolean + - type: string - type: 'null' nullable: true - stream_options: + chunk_tokenizer: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - temperature: + chunk_embedding_model: anyOf: - - type: number + - type: string - type: 'null' nullable: true - tool_choice: + chunk_embedding_dimension: anyOf: - - type: string - - additionalProperties: true - type: object + - type: integer - type: 'null' - title: string | object nullable: true - tools: + content_token_count: anyOf: - - items: - additionalProperties: true - type: object - type: array + - type: integer - type: 'null' nullable: true - top_logprobs: + metadata_token_count: anyOf: - type: integer - type: 'null' nullable: true - top_p: + title: ChunkMetadata + type: object + QueryChunksResponse: + description: Response from querying chunks in a vector database. + properties: + chunks: + items: + $ref: '#/components/schemas/Chunk' + title: Chunks + type: array + scores: + items: + type: number + title: Scores + type: array + required: + - chunks + - scores + title: QueryChunksResponse + type: object + VectorStoreFileCounts: + description: File processing status counts for a 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 + VectorStoreListResponse: + description: Response from listing vector stores. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - user: + last_id: anyOf: - type: string - type: 'null' nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody + - data + title: VectorStoreListResponse 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 + VectorStoreObject: + description: OpenAI Vector Store object. properties: - finish_reason: - title: Finish Reason + id: + title: Id type: string - text: - title: Text + object: + default: vector_store + title: Object type: string - index: - title: Index + created_at: + title: Created At type: integer - logprobs: + name: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - type: string - type: 'null' nullable: true - title: OpenAIChoiceLogprobs + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + default: completed + title: Status + type: string + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + expires_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + last_active_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - finish_reason - - text - - index - title: OpenAICompletionChoice + - id + - created_at + - file_counts + title: VectorStoreObject type: object - OpenAICompletion: - 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" + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + VectorStoreChunkingStrategyAuto: + description: Automatic chunking strategy for vector store files. properties: - id: - title: Id - type: string - choices: - items: - $ref: '#/components/schemas/OpenAICompletionChoice' - title: Choices - type: array - created: - title: Created - type: integer - model: - title: Model + type: + const: auto + default: auto + title: Type type: string - object: - const: text_completion - default: text_completion - title: Object + title: VectorStoreChunkingStrategyAuto + type: object + VectorStoreChunkingStrategyStatic: + description: Static chunking strategy with configurable parameters. + properties: + type: + const: static + default: static + title: Type type: string + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' required: - - id - - choices - - created - - model - title: OpenAICompletion + - static + title: VectorStoreChunkingStrategyStatic type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens + VectorStoreChunkingStrategyStaticConfig: + description: Configuration for static chunking strategy. properties: - text_offset: - anyOf: - - items: - type: integer - type: array - - type: 'null' - nullable: true - token_logprobs: + 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 + OpenAICreateVectorStoreRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store with extra_body support. + properties: + name: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - tokens: + file_ids: anyOf: - items: type: string type: array - type: 'null' nullable: true - top_logprobs: + expires_after: anyOf: - - items: - additionalProperties: - type: number - type: object - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAICompletionLogprobs - type: object - OpenAICompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible completion endpoint. - properties: - model: - title: Model - type: string - prompt: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - items: - type: integer - type: array - title: list[integer] - - items: - items: - type: integer - type: array - type: array - title: list[array] - title: string | ... (4 variants) - best_of: + chunking_strategy: anyOf: - - type: integer + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' + title: Chunking Strategy nullable: true - echo: + metadata: anyOf: - - type: boolean + - additionalProperties: true + type: object - type: 'null' nullable: true - frequency_penalty: + title: OpenAICreateVectorStoreRequestWithExtraBody + type: object + VectorStoreDeleteResponse: + description: Response from deleting a vector store. + 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 + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store file batch with extra_body support. + properties: + file_ids: + items: + type: string + title: File Ids + type: array + attributes: anyOf: - - type: number + - additionalProperties: true + type: object - type: 'null' nullable: true - logit_bias: + chunking_strategy: anyOf: - - additionalProperties: - type: number - type: object + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' + title: Chunking Strategy nullable: true - logprobs: + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + type: object + VectorStoreFileBatchObject: + description: OpenAI Vector Store File Batch object. + 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: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + required: + - id + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + type: object + VectorStoreFileStatus: + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + VectorStoreFileLastError: + description: Error information for failed vector store file processing. + properties: + code: + title: Code + type: string + enum: + - server_error + - rate_limit_exceeded + default: server_error + message: + title: Message + type: string + required: + - code + - message + title: VectorStoreFileLastError + type: object + VectorStoreFileObject: + description: OpenAI Vector Store File object. + 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: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + created_at: + title: Created At + type: integer + last_error: anyOf: - - type: boolean + - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' nullable: true - max_tokens: + title: VectorStoreFileLastError + status: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + 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 + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - n: + last_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - presence_penalty: + 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. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - seed: + last_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - stop: + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListFilesResponse + type: object + VectorStoreFileDeleteResponse: + description: Response from deleting a vector store file. + 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 + VectorStoreContent: + description: Content item from a vector store file or search result. + properties: + type: + const: text + title: Type + type: string + text: + title: Text + type: string + embedding: anyOf: - - type: string - items: - type: string + type: number type: array - title: list[string] - type: 'null' - title: string | list[string] nullable: true - stream: + chunk_metadata: anyOf: - - type: boolean + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true - stream_options: + title: ChunkMetadata + metadata: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - temperature: + required: + - type + - text + title: VectorStoreContent + type: object + VectorStoreFileContentResponse: + description: Represents the parsed content of a vector store file. + properties: + object: + const: vector_store.file_content.page + default: vector_store.file_content.page + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: anyOf: - - type: number + - type: string - type: 'null' nullable: true - top_p: + required: + - data + title: VectorStoreFileContentResponse + type: object + VectorStoreSearchResponse: + description: Response from searching a vector store. + properties: + file_id: + title: File Id + type: string + filename: + title: Filename + type: string + score: + title: Score + type: number + attributes: anyOf: - - type: number + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + title: string | number | boolean + type: object - type: 'null' nullable: true - user: + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Content + type: array + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + type: object + VectorStoreSearchResponsePage: + description: Paginated response from searching a vector store. + properties: + object: + default: vector_store.search_results.page + title: Object + type: string + search_query: + items: + type: string + title: Search Query + type: array + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: anyOf: - type: string - type: 'null' nullable: true - suffix: + required: + - search_query + - data + title: VectorStoreSearchResponsePage + type: object + VersionInfo: + description: Version information for the service. + properties: + version: + title: Version + type: string + required: + - version + title: VersionInfo + type: object + PaginatedResponse: + description: A generic paginated response that follows a simple format. + properties: + data: + items: + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - data + - has_more + title: PaginatedResponse + type: object + Dataset: + description: Dataset resource for storing and accessing training or evaluation data. + 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 nullable: true + 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: '#/components/schemas/DatasetPurpose' + source: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + metadata: + additionalProperties: true + description: Any additional metadata for this dataset + title: Metadata + type: object required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody + - identifier + - provider_id + - purpose + - source + title: Dataset type: object - OpenAIEmbeddingData: - description: A single embedding data object from an OpenAI-compatible embeddings response. + RowsDataSource: + description: A dataset stored in rows. properties: - object: - const: embedding - default: embedding - title: Object + type: + const: rows + default: rows + title: Type type: string - embedding: - anyOf: - - items: - type: number - type: array - title: list[number] - - type: string - title: list[number] | string - index: - title: Index - type: integer + rows: + items: + additionalProperties: true + type: object + title: Rows + type: array required: - - embedding - - index - title: OpenAIEmbeddingData + - rows + title: RowsDataSource type: object - OpenAIEmbeddingUsage: - description: Usage information for an OpenAI-compatible embeddings response. + URIDataSource: + description: A dataset that can be obtained from a URI. properties: - prompt_tokens: - title: Prompt Tokens - type: integer - total_tokens: - title: Total Tokens - type: integer + type: + const: uri + default: uri + title: Type + type: string + uri: + title: Uri + type: string required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage + - uri + title: URIDataSource type: object - OpenAIEmbeddingsRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible embeddings endpoint. + ListDatasetsResponse: + description: Response from listing datasets. properties: - model: - title: Model + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object + Benchmark: + description: A benchmark resource for evaluating model performance. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - encoding_format: - anyOf: - - type: string - - type: 'null' - default: float - dimensions: - anyOf: - - type: integer - - type: 'null' - nullable: true - user: + provider_resource_id: anyOf: - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true + 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: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark type: object - OpenAIEmbeddingsResponse: - description: Response from an OpenAI-compatible embeddings request. + ListBenchmarksResponse: properties: - object: - const: list - default: list - title: Object - type: string data: items: - $ref: '#/components/schemas/OpenAIEmbeddingData' + $ref: '#/components/schemas/Benchmark' title: Data type: array - model: - title: Model - type: string - usage: - $ref: '#/components/schemas/OpenAIEmbeddingUsage' required: - data - - model - - usage - title: OpenAIEmbeddingsResponse + title: ListBenchmarksResponse type: object - RerankData: - description: A single rerank result from a reranking response. + BenchmarkConfig: + description: A benchmark configuration for evaluation. properties: - index: - title: Index - type: integer - relevance_score: - title: Relevance Score - type: number + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + description: Map between scoring function id and parameters for each scoring function you want to run + title: Scoring Params + type: object + num_examples: + anyOf: + - type: integer + - type: 'null' + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + nullable: true required: - - index - - relevance_score - title: RerankData + - eval_candidate + title: BenchmarkConfig type: object - RerankResponse: - description: Response from a reranking request. + GreedySamplingStrategy: + description: Greedy sampling strategy that selects the highest probability token at each step. properties: - data: - items: - $ref: '#/components/schemas/RerankData' - title: Data - type: array + type: + const: greedy + default: greedy + title: Type + type: string + title: GreedySamplingStrategy + type: object + ModelCandidate: + description: A model candidate for evaluation. + properties: + type: + const: model + default: model + title: Type + type: string + model: + title: Model + type: string + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage + - type: 'null' + nullable: true + title: SystemMessage required: - - data - title: RerankResponse + - model + - sampling_params + title: ModelCandidate type: object - TokenLogProbs: - description: Log probabilities for generated tokens. + SamplingParams: + description: Sampling parameters. properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs + strategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + repetition_penalty: + anyOf: + - type: number + - type: 'null' + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + title: SamplingParams type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. + SystemMessage: + description: A system message providing instructions or context to the model. properties: role: - const: tool - default: tool + const: system + default: system title: Role type: string - call_id: - title: Call Id - type: string content: anyOf: - type: string @@ -9470,195 +9146,229 @@ components: title: list[ImageContentItem | TextContentItem] title: string | list[ImageContentItem | TextContentItem] required: - - call_id - content - title: ToolResponseMessage + title: SystemMessage type: object - UserMessage: - description: A message from the user in a chat conversation. + TopKSamplingStrategy: + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. properties: - role: - const: user - default: user - title: Role + type: + const: top_k + default: top_k + title: Type type: string - content: + 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. + properties: + type: + const: top_p + default: top_p + title: Type + type: string + temperature: anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: + - type: number + minimum: 0.0 + - type: 'null' + top_p: anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] + - type: number - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true + default: 0.95 required: - - content - title: UserMessage + - temperature + title: TopPSamplingStrategy type: object - HealthStatus: - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - type: string - HealthInfo: - description: Health status information for the service. + EvaluateResponse: + description: The response from an evaluation. + properties: + generations: + items: + additionalProperties: true + type: object + title: Generations + type: array + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Scores + type: object + required: + - generations + - scores + title: EvaluateResponse + type: object + Job: + description: A job execution instance with status tracking. properties: + job_id: + title: Job Id + type: string status: - $ref: '#/components/schemas/HealthStatus' + $ref: '#/components/schemas/JobStatus' required: + - job_id - status - title: HealthInfo + title: Job type: object - RouteInfo: - description: Information about an API route including its path, method, and implementing providers. + RerankData: + description: A single rerank result from a reranking response. properties: - route: - title: Route - type: string - method: - title: Method - type: string - provider_types: + index: + title: Index + type: integer + relevance_score: + title: Relevance Score + type: number + required: + - index + - relevance_score + title: RerankData + type: object + RerankResponse: + description: Response from a reranking request. + properties: + data: items: - type: string - title: Provider Types + $ref: '#/components/schemas/RerankData' + title: Data type: array required: - - route - - method - - provider_types - title: RouteInfo + - data + title: RerankResponse + type: object + Checkpoint: + description: Checkpoint created during training runs. + 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: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric + - type: 'null' + nullable: true + title: PostTrainingMetric + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint type: object - ListRoutesResponse: - description: Response containing a list of all available API routes. + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. properties: - data: + job_uuid: + title: Job Uuid + type: string + checkpoints: items: - $ref: '#/components/schemas/RouteInfo' - title: Data + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints type: array required: - - data - title: ListRoutesResponse + - job_uuid + title: PostTrainingJobArtifactsResponse type: object - VersionInfo: - description: Version information for the service. + PostTrainingMetric: + description: Training metrics captured during post-training jobs. properties: - version: - title: Version - type: string + 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: - - version - title: VersionInfo + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric type: object - OpenAIModel: - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata + PostTrainingJobStatusResponse: + description: Status of a finetuning job. properties: - id: - title: Id - type: string - object: - const: model - default: model - title: Object - type: string - created: - title: Created - type: integer - owned_by: - title: Owned By + job_uuid: + title: Job Uuid type: string - custom_metadata: + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + started_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + completed_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - id - - created - - owned_by - title: OpenAIModel + - job_uuid + - status + title: PostTrainingJobStatusResponse type: object - OpenAIListModelsResponse: + ListPostTrainingJobsResponse: properties: data: items: - $ref: '#/components/schemas/OpenAIModel' + $ref: '#/components/schemas/PostTrainingJob' title: Data type: array required: - data - title: OpenAIListModelsResponse + title: ListPostTrainingJobsResponse type: object - DPOLossType: - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - type: string DPOAlignmentConfig: description: Configuration for Direct Preference Optimization (DPO) alignment. properties: @@ -9672,12 +9382,13 @@ components: - beta title: DPOAlignmentConfig type: object - DatasetFormat: - description: Format of the training dataset. + DPOLossType: enum: - - instruct - - dialog - title: DatasetFormat + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType type: string DataConfig: description: Configuration for training data and data loading. @@ -9695,1280 +9406,1635 @@ components: $ref: '#/components/schemas/DatasetFormat' validation_dataset_id: anyOf: - - type: string + - type: string + - type: 'null' + nullable: true + packed: + anyOf: + - type: boolean + - type: 'null' + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + default: false + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + type: object + DatasetFormat: + description: Format of the training dataset. + enum: + - instruct + - dialog + title: DatasetFormat + type: string + EfficiencyConfig: + description: Configuration for memory and compute efficiency optimizations. + properties: + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + default: false + title: EfficiencyConfig + type: object + OptimizerConfig: + description: Configuration parameters for the optimization algorithm. + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + lr: + title: Lr + type: number + weight_decay: + title: Weight Decay + type: number + num_warmup_steps: + title: Num Warmup Steps + type: integer + required: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + type: object + OptimizerType: + description: Available optimizer algorithms for training. + enum: + - adam + - adamw + - sgd + title: OptimizerType + type: string + TrainingConfig: + description: Comprehensive configuration for the training process. + properties: + n_epochs: + title: N Epochs + type: integer + max_steps_per_epoch: + default: 1 + title: Max Steps Per Epoch + type: integer + gradient_accumulation_steps: + default: 1 + title: Gradient Accumulation Steps + type: integer + max_validation_steps: + anyOf: + - type: integer + - type: 'null' + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + title: DataConfig + - type: 'null' + nullable: true + title: DataConfig + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig - type: 'null' nullable: true - packed: + title: OptimizerConfig + efficiency_config: anyOf: - - type: boolean + - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig - type: 'null' - default: false - train_on_input: + nullable: true + title: EfficiencyConfig + dtype: anyOf: - - type: boolean + - type: string - type: 'null' - default: false + default: bf16 required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig + - n_epochs + title: TrainingConfig type: object - EfficiencyConfig: - description: Configuration for memory and compute efficiency optimizations. + PostTrainingJob: properties: - enable_activation_checkpointing: - anyOf: - - type: boolean - - type: 'null' - default: false - enable_activation_offloading: - anyOf: - - type: boolean - - type: 'null' - default: false - memory_efficient_fsdp_wrap: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + LoraFinetuningConfig: + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + properties: + type: + const: LoRA + default: LoRA + title: Type + type: string + lora_attn_modules: + items: + type: string + title: Lora Attn Modules + type: array + apply_lora_to_mlp: + title: Apply Lora To Mlp + type: boolean + apply_lora_to_output: + title: Apply Lora To Output + type: boolean + rank: + title: Rank + type: integer + alpha: + title: Alpha + type: integer + use_dora: anyOf: - type: boolean - type: 'null' default: false - fsdp_cpu_offload: + quantize_base: anyOf: - type: boolean - type: 'null' default: false - title: EfficiencyConfig + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig type: object - PostTrainingJob: + QATFinetuningConfig: + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: - job_uuid: - title: Job Uuid + type: + const: QAT + default: QAT + title: Type + type: string + quantizer_name: + title: Quantizer Name type: string + group_size: + title: Group Size + type: integer required: - - job_uuid - title: PostTrainingJob + - quantizer_name + - group_size + title: QATFinetuningConfig type: object - ListPostTrainingJobsResponse: + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + _URLOrData: + description: A URL or a base64 encoded string properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL data: - items: - $ref: '#/components/schemas/PostTrainingJob' - title: Data - type: array + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + nullable: true + title: _URLOrData + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object required: - - data - title: ListPostTrainingJobsResponse + - bnf + title: GrammarResponseFormat type: object - OptimizerType: - description: Available optimizer algorithms for training. - enum: - - adam - - adamw - - sgd - title: OptimizerType - type: string - OptimizerConfig: - description: Configuration parameters for the optimization algorithm. + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. properties: - optimizer_type: - $ref: '#/components/schemas/OptimizerType' - lr: - title: Lr - type: number - weight_decay: - title: Weight Decay - type: number - num_warmup_steps: - title: Num Warmup Steps - type: integer + type: + const: json_schema + default: json_schema + title: Type + type: string + json_schema: + additionalProperties: true + title: Json Schema + type: object required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig + - json_schema + title: JsonSchemaResponseFormat type: object - PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + MCPListToolsTool: + description: Tool definition returned by MCP list tools operation. properties: - job_uuid: - title: Job Uuid + input_schema: + additionalProperties: true + title: Input Schema + type: object + name: + title: Name type: string - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array + description: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - job_uuid - title: PostTrainingJobArtifactsResponse + - input_schema + - name + title: MCPListToolsTool type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. + OpenAIResponseOutputMessageFileSearchToolCallResults: + description: Search results returned by the file search operation. properties: - job_uuid: - title: Job Uuid + 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 - log_lines: - items: - type: string - title: Log Lines - type: array required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream + - attributes + - file_id + - filename + - score + - text + title: OpenAIResponseOutputMessageFileSearchToolCallResults type: object - PostTrainingJobStatusResponse: - description: Status of a finetuning job. + AllowedToolsFilter: + description: Filter configuration for restricting which MCP tools can be used. properties: - job_uuid: - title: Job Uuid - type: string - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - format: date-time - type: string - - type: 'null' - nullable: true - started_at: + tool_names: anyOf: - - format: date-time - type: string + - items: + type: string + type: array - type: 'null' nullable: true - completed_at: + title: AllowedToolsFilter + type: object + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. + properties: + always: anyOf: - - format: date-time - type: string + - items: + type: string + type: array - type: 'null' nullable: true - resources_allocated: + never: anyOf: - - additionalProperties: true - type: object + - items: + type: string + type: array - type: 'null' nullable: true - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse + title: ApprovalFilter type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - TrainingConfig: - description: Comprehensive configuration for the training process. + SearchRankingOptions: + description: Options for ranking and filtering search results. properties: - n_epochs: - title: N Epochs - type: integer - max_steps_per_epoch: - default: 1 - title: Max Steps Per Epoch - type: integer - gradient_accumulation_steps: - default: 1 - title: Gradient Accumulation Steps - type: integer - max_validation_steps: + ranker: anyOf: - - type: integer + - type: string - type: 'null' - default: 1 - data_config: + nullable: true + score_threshold: anyOf: - - $ref: '#/components/schemas/DataConfig' - title: DataConfig + - type: number - type: 'null' - nullable: true - title: DataConfig - optimizer_config: + default: 0.0 + title: SearchRankingOptions + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + OpenAIResponseTextFormat: + description: Configuration for Responses API text format. + properties: + type: + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text + name: anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - title: OptimizerConfig + - type: string - type: 'null' - nullable: true - title: OptimizerConfig - efficiency_config: + schema: anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - title: EfficiencyConfig + - additionalProperties: true + type: object - type: 'null' - nullable: true - title: EfficiencyConfig - dtype: + description: anyOf: - type: string - type: 'null' - default: bf16 - required: - - n_epochs - title: TrainingConfig - type: object - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. - properties: - job_uuid: - title: Job Uuid - type: string - finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id - type: string - validation_dataset_id: - title: Validation Dataset Id - type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - title: Hyperparam Search Config - type: object - logger_config: - additionalProperties: true - title: Logger Config - type: object - required: - - job_uuid - - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - - algorithm_config - - optimizer_config - - training_config - - hyperparam_search_config - - logger_config - title: PostTrainingRLHFRequest + strict: + anyOf: + - type: boolean + - type: 'null' + title: OpenAIResponseTextFormat type: object - Prompt: - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. + OpenAIResponseUsageInputTokensDetails: + description: Token details for input tokens in OpenAI response usage. properties: - prompt: + cached_tokens: anyOf: - - type: string + - type: integer - type: 'null' - description: The system prompt with variable placeholders nullable: true - version: - description: Version (integer starting at 1, incremented on save) - minimum: 1 - title: Version - type: integer - prompt_id: - description: Unique identifier in format 'pmpt_<48-digit-hash>' - title: Prompt Id - type: string - variables: - description: List of variable names that can be used in the prompt template - items: - type: string - title: Variables - type: array - is_default: - default: false - description: Boolean indicating whether this version is the default version - title: Is Default - type: boolean - required: - - version - - prompt_id - title: Prompt + title: OpenAIResponseUsageInputTokensDetails type: object - ListPromptsResponse: - description: Response model to list prompts. + OpenAIResponseUsageOutputTokensDetails: + description: Token details for output tokens in OpenAI response usage. properties: - data: - items: - $ref: '#/components/schemas/Prompt' - title: Data - type: array - required: - - data - title: ListPromptsResponse + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIResponseUsageOutputTokensDetails type: object - ProviderInfo: - description: Information about a registered provider including its configuration and health status. + SpanEndPayload: + description: Payload for a span end event. properties: - api: - title: Api - type: string - provider_id: - title: Provider Id - type: string - provider_type: - title: Provider Type + type: + const: span_end + default: span_end + title: Type type: string - config: - additionalProperties: true - title: Config - type: object - health: - additionalProperties: true - title: Health - type: object + status: + $ref: '#/components/schemas/SpanStatus' required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo + - status + title: SpanEndPayload type: object - ListProvidersResponse: - description: Response containing a list of all available providers. + SpanStartPayload: + description: Payload for a span start event. properties: - data: - items: - $ref: '#/components/schemas/ProviderInfo' - title: Data - type: array + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - data - title: ListProvidersResponse + - name + title: SpanStartPayload type: object - ModerationObjectResults: - description: A moderation object. + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: - flagged: - title: Flagged - type: boolean - categories: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - type: boolean + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - category_applied_input_types: + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - items: - type: string - type: array + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - category_scores: + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - type: number + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - user_message: - anyOf: - - type: string - - type: 'null' - nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - flagged - title: ModerationObjectResults - type: object - ModerationObject: - description: A moderation object. - properties: - id: - title: Id + type: + const: unstructured_log + default: unstructured_log + title: Type type: string - model: - title: Model + message: + title: Message type: string - results: - items: - $ref: '#/components/schemas/ModerationObjectResults' - title: Results - type: array + severity: + $ref: '#/components/schemas/LogSeverity' required: - - id - - model - - results - title: ModerationObject + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent type: object - SafetyViolation: - description: Details of a safety violation detected by content moderation. + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + BatchError: + additionalProperties: true properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - user_message: + code: anyOf: - type: string - type: 'null' nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - violation_level - title: SafetyViolation - type: object - ViolationLevel: - description: Severity level of a safety violation. - enum: - - info - - warn - - error - title: ViolationLevel - type: string - RunShieldResponse: - description: Response from running a safety shield. - properties: - violation: + line: anyOf: - - $ref: '#/components/schemas/SafetyViolation' - title: SafetyViolation + - type: integer - type: 'null' nullable: true - title: SafetyViolation - title: RunShieldResponse - type: object - ScoreBatchResponse: - description: Response from batch scoring operations on datasets. - properties: - dataset_id: + message: anyOf: - type: string - type: 'null' nullable: true - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Results - type: object - required: - - results - title: ScoreBatchResponse + param: + anyOf: + - type: string + - type: 'null' + nullable: true + title: BatchError type: object - ScoreResponse: - description: The response from scoring. + BatchRequestCounts: + additionalProperties: true properties: - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Results - type: object + completed: + title: Completed + type: integer + failed: + title: Failed + type: integer + total: + title: Total + type: integer required: - - results - title: ScoreResponse + - completed + - failed + - total + title: BatchRequestCounts type: object - ListScoringFunctionsResponse: + BatchUsage: + additionalProperties: true properties: - data: - items: - $ref: '#/components/schemas/ScoringFn' - title: Data - type: array + input_tokens: + title: Input Tokens + type: integer + input_tokens_details: + $ref: '#/components/schemas/InputTokensDetails' + output_tokens: + title: Output Tokens + type: integer + output_tokens_details: + $ref: '#/components/schemas/OutputTokensDetails' + total_tokens: + title: Total Tokens + type: integer required: - - data - title: ListScoringFunctionsResponse + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage type: object - ListShieldsResponse: + Errors: + additionalProperties: true properties: data: - items: - $ref: '#/components/schemas/Shield' - title: Data - type: array - required: - - data - title: ListShieldsResponse - type: object - ToolDef: - description: Tool definition used in runtime contexts. - properties: - toolgroup_id: anyOf: - - type: string + - items: + $ref: '#/components/schemas/BatchError' + type: array - type: 'null' nullable: true - name: - title: Name - type: string - description: + object: anyOf: - type: string - type: 'null' nullable: true - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true + title: Errors + type: object + InputTokensDetails: + additionalProperties: true + properties: + cached_tokens: + title: Cached Tokens + type: integer required: - - name - title: ToolDef + - cached_tokens + title: InputTokensDetails type: object - ListToolDefsResponse: - description: Response containing a list of tool definitions. + OutputTokensDetails: + additionalProperties: true properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - title: Data - type: array + reasoning_tokens: + title: Reasoning Tokens + type: integer + required: + - reasoning_tokens + title: OutputTokensDetails + type: object + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string required: - - data - title: ListToolDefsResponse + - image + title: ImageDelta type: object - ListToolGroupsResponse: - description: Response containing a list of tool groups. + TextDelta: + description: A text content delta for streaming responses. properties: - data: - items: - $ref: '#/components/schemas/ToolGroup' - title: Data - type: array + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string required: - - data - title: ListToolGroupsResponse + - text + title: TextDelta type: object - ToolGroupInput: - description: Input data for registering a tool group. + JobStatus: + description: Status of a job execution. + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + type: string + MetricInResponse: + description: A metric value included in API responses. properties: - toolgroup_id: - title: Toolgroup Id - type: string - provider_id: - title: Provider Id + metric: + title: Metric type: string - args: + value: anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: + - type: integer + - type: number + title: integer | number + unit: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string - type: 'null' nullable: true - title: URL required: - - toolgroup_id - - provider_id - title: ToolGroupInput + - metric + - value + title: MetricInResponse type: object - ToolInvocationResult: - description: Result of a tool invocation. + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: - content: - anyOf: - - type: string - - discriminator: + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true - error_message: - anyOf: - - type: string - - type: 'null' - nullable: true - error_code: - anyOf: - - type: integer - - type: 'null' - nullable: true - metadata: - anyOf: - - additionalProperties: true + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array + required: + - items + title: ConversationItemCreateRequest + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true type: object - - type: 'null' - nullable: true - title: ToolInvocationResult + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage 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. + DatasetPurpose: + description: Purpose of the dataset. Each purpose has a required input data schema. + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + title: DatasetPurpose + type: string + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + InlineProviderSpec: properties: - chunk_id: - anyOf: - - type: string - - type: 'null' - nullable: true - document_id: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - source: + deprecation_error: anyOf: - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - created_timestamp: - anyOf: - - type: integer - - type: 'null' - nullable: true - updated_timestamp: - anyOf: - - type: integer - - type: 'null' - nullable: true - chunk_window: + module: anyOf: - type: string - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - chunk_tokenizer: + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - type: string - type: 'null' nullable: true - chunk_embedding_model: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: anyOf: - type: string - type: 'null' + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. nullable: true - chunk_embedding_dimension: - anyOf: - - type: integer - - type: 'null' - nullable: true - content_token_count: - anyOf: - - type: integer - - type: 'null' - nullable: true - metadata_token_count: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: ChunkMetadata - type: object - Chunk: - description: A chunk of content that can be inserted into a vector database. - properties: - content: + description: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id - type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. nullable: true - title: ChunkMetadata required: - - content - - chunk_id - title: Chunk + - api + - provider_type + - config_class + title: InlineProviderSpec type: object - OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store file batch with extra_body support. + ProviderSpec: properties: - file_ids: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality items: - type: string - title: File Ids + $ref: '#/components/schemas/Api' + title: Api Dependencies type: array - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - chunking_strategy: - anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - nullable: true - required: - - file_ids - title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - type: object - OpenAICreateVectorStoreRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store with extra_body support. - properties: - name: + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - file_ids: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - expires_after: + deprecation_error: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - chunking_strategy: + module: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: string - type: 'null' - title: Chunking Strategy + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - metadata: + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - title: OpenAICreateVectorStoreRequestWithExtraBody - type: object - QueryChunksResponse: - description: Response from querying chunks in a vector database. - properties: - chunks: - items: - $ref: '#/components/schemas/Chunk' - title: Chunks - type: array - scores: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: items: - type: number - title: Scores + type: string + title: Deps type: array required: - - chunks - - scores - title: QueryChunksResponse + - api + - provider_type + - config_class + title: ProviderSpec type: object - VectorStoreContent: - description: Content item from a vector store file or search result. + RemoteProviderSpec: properties: - type: - const: text - title: Type + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - text: - title: Text + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class type: string - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - title: ChunkMetadata - metadata: + deprecation_error: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - required: - - type - - text - title: VectorStoreContent - type: object - VectorStoreCreateRequest: - description: Request to create a vector store. - properties: - name: + module: anyOf: - type: string - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - file_ids: + pip_packages: + description: The pip dependencies needed for this implementation items: type: string - title: File Ids + title: Pip Packages type: array - expires_after: + provider_data_validator: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - chunking_strategy: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type + type: string + description: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - title: VectorStoreCreateRequest + required: + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec type: object - VectorStoreDeleteResponse: - description: Response from deleting a vector store. + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). properties: - id: - title: Id - type: string - object: - default: vector_store.deleted - title: Object + type: + const: bf16 + default: bf16 + title: Type type: string - deleted: - default: true - title: Deleted - type: boolean - required: - - id - title: VectorStoreDeleteResponse + title: Bf16QuantizationConfig type: object - VectorStoreFileCounts: - description: File processing status counts for a vector store. + EmbeddingsResponse: + description: Response containing generated embeddings. 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 + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts + - embeddings + title: EmbeddingsResponse type: object - VectorStoreFileBatchObject: - description: OpenAI Vector Store File Batch object. + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. 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: - title: Status + type: + const: fp8_mixed + default: fp8_mixed + title: Type type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - required: - - id - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject + title: Fp8QuantizationConfig type: object - VectorStoreFileContentResponse: - description: Represents the parsed content of a vector store file. + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. properties: - object: - const: vector_store.file_content.page - default: vector_store.file_content.page - title: Object + type: + const: int4_mixed + default: int4_mixed + title: Type type: string - data: - items: - $ref: '#/components/schemas/VectorStoreContent' - title: Data - type: array - has_more: - default: false - title: Has More - type: boolean - next_page: + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig + type: object + OpenAIChatCompletionUsageCompletionTokensDetails: + description: Token details for output tokens in OpenAI chat completion usage. + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails + type: object + OpenAIChatCompletionUsagePromptTokensDetails: + description: Token details for prompt tokens in OpenAI chat completion usage. + properties: + cached_tokens: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - required: - - data - title: VectorStoreFileContentResponse + title: OpenAIChatCompletionUsagePromptTokensDetails type: object - VectorStoreFileDeleteResponse: - description: Response from deleting a vector store file. + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens 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 + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs type: object - VectorStoreFileLastError: - description: Error information for failed vector store file processing. + TokenLogProbs: + description: Log probabilities for generated tokens. properties: - code: - title: Code - type: string - enum: - - server_error - - rate_limit_exceeded - default: server_error - message: - title: Message - type: string + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object required: - - code - - message - title: VectorStoreFileLastError + - logprobs_by_token + title: TokenLogProbs type: object - VectorStoreFileObject: - description: OpenAI Vector Store File object. + ToolResponseMessage: + description: A message representing the result of a tool invocation. properties: - id: - title: Id + role: + const: tool + default: tool + title: Role type: string - object: - default: vector_store.file - title: Object + call_id: + title: Call Id type: string - attributes: - additionalProperties: true - title: Attributes - type: object - chunking_strategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - created_at: - title: Created At - type: integer - last_error: + content: anyOf: - - $ref: '#/components/schemas/VectorStoreFileLastError' - title: VectorStoreFileLastError - - type: 'null' - nullable: true - title: VectorStoreFileLastError - status: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - vector_store_id: - title: Vector Store Id - type: string + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - - id - - chunking_strategy - - created_at - - status - - vector_store_id - title: VectorStoreFileObject + - call_id + - content + title: ToolResponseMessage type: object - VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. + UserMessage: + description: A message from the user in a chat conversation. properties: - object: - default: list - title: Object + role: + const: user + default: user + title: Role type: string - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data - type: array - first_id: + content: anyOf: - type: string - - type: 'null' - nullable: true - last_id: + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: anyOf: - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] - type: 'null' + title: string | list[ImageContentItem | TextContentItem] nullable: true - has_more: - default: false - title: Has More - type: boolean required: - - data - title: VectorStoreFilesListInBatchResponse + - content + title: UserMessage type: object - VectorStoreListFilesResponse: - description: Response from listing files in a vector store. + HealthStatus: + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + type: string + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: - object: - default: list - title: Object + job_uuid: + title: Job Uuid type: string - data: + log_lines: items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data + type: string + title: Log Lines type: array - first_id: + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream + type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. + properties: + job_uuid: + title: Job Uuid + type: string + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id + type: string + provider_id: + title: Provider Id + type: string + args: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - last_id: + mcp_endpoint: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true - has_more: - default: false - title: Has More - type: boolean + title: URL required: - - data - title: VectorStoreListFilesResponse + - toolgroup_id + - provider_id + title: ToolGroupInput type: object - VectorStoreObject: - description: OpenAI Vector Store object. + VectorStoreCreateRequest: + description: Request to create a 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' nullable: true - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - status: - default: completed - title: Status - type: string + file_ids: + items: + type: string + title: File Ids + type: array expires_after: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - expires_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - last_active_at: + chunking_strategy: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' nullable: true metadata: additionalProperties: true title: Metadata type: object - required: - - id - - created_at - - file_counts - title: VectorStoreObject - type: object - VectorStoreListResponse: - description: Response from listing vector stores. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - nullable: true - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListResponse + title: VectorStoreCreateRequest type: object VectorStoreModifyRequest: description: Request to modify a vector store. @@ -11027,69 +11093,3 @@ components: - query title: VectorStoreSearchRequest type: object - VectorStoreSearchResponse: - description: Response from searching a vector store. - 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 - title: string | number | boolean - type: object - - type: 'null' - nullable: true - content: - items: - $ref: '#/components/schemas/VectorStoreContent' - title: Content - type: array - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - type: object - VectorStoreSearchResponsePage: - description: Paginated response from searching a vector store. - properties: - object: - default: vector_store.search_results.page - title: Object - type: string - search_query: - items: - type: string - title: Search Query - type: array - data: - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - title: Data - type: array - has_more: - default: false - title: Has More - type: boolean - next_page: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - search_query - - data - title: VectorStoreSearchResponsePage - type: object diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index a35ba59838..b306799d1a 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -13,6 +13,54 @@ info: servers: - url: http://any-hosted-llama-stack.com paths: + /v1/models: + get: + tags: + - Models + summary: Openai List Models + operationId: openai_list_models_v1_models_get + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: + - Models + summary: Register Model + operationId: register_model_v1_models_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + deprecated: true /v1/models/{model_id}: get: tags: @@ -75,12 +123,12 @@ paths: schema: type: string description: 'Path parameter: model_id' - /v1/models: + /v1/scoring-functions: get: tags: - - Models - summary: Openai List Models - operationId: openai_list_models_v1_models_get + - Scoring Functions + summary: List Scoring Functions + operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': description: Successful Response @@ -101,9 +149,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Models - summary: Register Model - operationId: register_model_v1_models_post + - Scoring Functions + summary: Register Scoring Function + operationId: register_scoring_function_v1_scoring_functions_post responses: '200': description: Successful Response @@ -123,12 +171,12 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' deprecated: true - /v1/shields/{identifier}: + /v1/scoring-functions/{scoring_fn_id}: get: tags: - - Shields - summary: Get Shield - operationId: get_shield_v1_shields__identifier__get + - Scoring Functions + summary: Get Scoring Function + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': description: Successful Response @@ -148,17 +196,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: identifier + - name: scoring_fn_id in: path required: true schema: type: string - description: 'Path parameter: identifier' + description: 'Path parameter: scoring_fn_id' delete: tags: - - Shields - summary: Unregister Shield - operationId: unregister_shield_v1_shields__identifier__delete + - Scoring Functions + summary: Unregister Scoring Function + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete responses: '200': description: Successful Response @@ -179,12 +227,12 @@ paths: $ref: '#/components/responses/DefaultError' deprecated: true parameters: - - name: identifier + - name: scoring_fn_id in: path required: true schema: type: string - description: 'Path parameter: identifier' + description: 'Path parameter: scoring_fn_id' /v1/shields: get: tags: @@ -233,12 +281,12 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' deprecated: true - /v1beta/datasets/{dataset_id}: + /v1/shields/{identifier}: get: tags: - - Datasets - summary: Get Dataset - operationId: get_dataset_v1beta_datasets__dataset_id__get + - Shields + summary: Get Shield + operationId: get_shield_v1_shields__identifier__get responses: '200': description: Successful Response @@ -258,17 +306,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: dataset_id + - name: identifier in: path required: true schema: type: string - description: 'Path parameter: dataset_id' + description: 'Path parameter: identifier' delete: tags: - - Datasets - summary: Unregister Dataset - operationId: unregister_dataset_v1beta_datasets__dataset_id__delete + - Shields + summary: Unregister Shield + operationId: unregister_shield_v1_shields__identifier__delete responses: '200': description: Successful Response @@ -289,18 +337,18 @@ paths: $ref: '#/components/responses/DefaultError' deprecated: true parameters: - - name: dataset_id + - name: identifier in: path required: true schema: type: string - description: 'Path parameter: dataset_id' - /v1beta/datasets: + description: 'Path parameter: identifier' + /v1/toolgroups: get: tags: - - Datasets - summary: List Datasets - operationId: list_datasets_v1beta_datasets_get + - Tool Groups + summary: List Tool Groups + operationId: list_tool_groups_v1_toolgroups_get responses: '200': description: Successful Response @@ -321,9 +369,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Datasets - summary: Register Dataset - operationId: register_dataset_v1beta_datasets_post + - Tool Groups + summary: Register Tool Group + operationId: register_tool_group_v1_toolgroups_post responses: '200': description: Successful Response @@ -343,12 +391,12 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' deprecated: true - /v1/scoring-functions/{scoring_fn_id}: + /v1/toolgroups/{toolgroup_id}: get: tags: - - Scoring Functions - summary: Get Scoring Function - operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get + - Tool Groups + summary: Get Tool Group + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get responses: '200': description: Successful Response @@ -368,17 +416,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: scoring_fn_id + - name: toolgroup_id in: path required: true schema: type: string - description: 'Path parameter: scoring_fn_id' + description: 'Path parameter: toolgroup_id' delete: tags: - - Scoring Functions - summary: Unregister Scoring Function - operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete + - Tool Groups + summary: Unregister Toolgroup + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete responses: '200': description: Successful Response @@ -399,18 +447,18 @@ paths: $ref: '#/components/responses/DefaultError' deprecated: true parameters: - - name: scoring_fn_id + - name: toolgroup_id in: path required: true schema: type: string - description: 'Path parameter: scoring_fn_id' - /v1/scoring-functions: + description: 'Path parameter: toolgroup_id' + /v1beta/datasets: get: tags: - - Scoring Functions - summary: List Scoring Functions - operationId: list_scoring_functions_v1_scoring_functions_get + - Datasets + summary: List Datasets + operationId: list_datasets_v1beta_datasets_get responses: '200': description: Successful Response @@ -431,9 +479,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Scoring Functions - summary: Register Scoring Function - operationId: register_scoring_function_v1_scoring_functions_post + - Datasets + summary: Register Dataset + operationId: register_dataset_v1beta_datasets_post responses: '200': description: Successful Response @@ -453,12 +501,12 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}: + /v1beta/datasets/{dataset_id}: get: tags: - - Benchmarks - summary: Get Benchmark - operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get + - Datasets + summary: Get Dataset + operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': description: Successful Response @@ -478,17 +526,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id + - name: dataset_id in: path required: true schema: type: string - description: 'Path parameter: benchmark_id' + description: 'Path parameter: dataset_id' delete: tags: - - Benchmarks - summary: Unregister Benchmark - operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete + - Datasets + summary: Unregister Dataset + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete responses: '200': description: Successful Response @@ -509,12 +557,12 @@ paths: $ref: '#/components/responses/DefaultError' deprecated: true parameters: - - name: benchmark_id + - name: dataset_id in: path required: true schema: type: string - description: 'Path parameter: benchmark_id' + description: 'Path parameter: dataset_id' /v1alpha/eval/benchmarks: get: tags: @@ -563,12 +611,12 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' deprecated: true - /v1/toolgroups/{toolgroup_id}: + /v1alpha/eval/benchmarks/{benchmark_id}: get: tags: - - Tool Groups - summary: Get Tool Group - operationId: get_tool_group_v1_toolgroups__toolgroup_id__get + - Benchmarks + summary: Get Benchmark + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': description: Successful Response @@ -588,17 +636,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: toolgroup_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: toolgroup_id' + description: 'Path parameter: benchmark_id' delete: tags: - - Tool Groups - summary: Unregister Toolgroup - operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete + - Benchmarks + summary: Unregister Benchmark + operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete responses: '200': description: Successful Response @@ -619,60 +667,12 @@ paths: $ref: '#/components/responses/DefaultError' deprecated: true parameters: - - name: toolgroup_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: toolgroup_id' - /v1/toolgroups: - get: - tags: - - Tool Groups - summary: List Tool Groups - operationId: list_tool_groups_v1_toolgroups_get - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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: - - Tool Groups - summary: Register Tool Group - operationId: register_tool_group_v1_toolgroups_post - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' - deprecated: true + description: 'Path parameter: benchmark_id' components: responses: BadRequest400: @@ -712,302 +712,220 @@ components: schema: $ref: '#/components/schemas/Error' schemas: - ImageContentItem: - description: A image content item + Error: + description: Error response from the API. Roughly follows RFC 7807. properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/components/schemas/_URLOrData' - required: - - image - title: ImageContentItem - type: object - TextContentItem: - description: A text content item - properties: - type: - const: text - default: text - title: Type + status: + title: Status + type: integer + title: + title: Title type: string - text: - title: Text + detail: + title: Detail type: string + instance: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - text - title: TextContentItem + - status + - title + - detail + title: Error type: object - URL: - description: A URL reference to external content. + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - uri: - title: Uri + object: + const: list + default: list + title: Object type: string - required: - - uri - title: URL - type: object - _URLOrData: - description: A URL or a base64 encoded string - properties: - url: + data: + description: List of batch objects + items: + $ref: '#/components/schemas/Batch' + title: Data + type: array + first_id: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string - type: 'null' + description: ID of the first batch in the list nullable: true - title: URL - data: + last_id: anyOf: - type: string - type: 'null' - contentEncoding: base64 + description: ID of the last batch in the list nullable: true - title: _URLOrData + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean + required: + - data + title: ListBatchesResponse type: object - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - GreedySamplingStrategy: - description: Greedy sampling strategy that selects the highest probability token at each step. + Batch: + additionalProperties: true properties: - type: - const: greedy - default: greedy - title: Type + id: + title: Id type: string - title: GreedySamplingStrategy - type: object - TopKSamplingStrategy: - description: Top-k sampling strategy that restricts sampling to the k most likely tokens. - properties: - type: - const: top_k - default: top_k - title: Type + completion_window: + title: Completion Window type: string - top_k: - minimum: 1 - title: Top K + created_at: + title: Created At 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. - properties: - type: - const: top_p - default: top_p - title: Type + endpoint: + title: Endpoint type: string - temperature: + input_file_id: + title: Input File Id + type: string + object: + const: batch + title: Object + type: string + status: + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + title: Status + type: string + cancelled_at: anyOf: - - type: number - minimum: 0.0 + - type: integer - type: 'null' - top_p: + nullable: true + cancelling_at: anyOf: - - type: number + - type: integer - type: 'null' - default: 0.95 - required: - - temperature - title: TopPSamplingStrategy - type: object - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat - type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. - 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 - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIChatCompletionContentPartImageParam: - description: Image content part for OpenAI-compatible chat completion messages. - properties: - type: - const: image_url - default: image_url - title: Type - type: string - image_url: - $ref: '#/components/schemas/OpenAIImageURL' - required: - - image_url - title: OpenAIChatCompletionContentPartImageParam - type: object - OpenAIChatCompletionContentPartTextParam: - description: Text content part for OpenAI-compatible chat completion messages. - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIChatCompletionContentPartTextParam - type: object - OpenAIFile: - properties: - type: - const: file - default: file - title: Type - type: string - file: - $ref: '#/components/schemas/OpenAIFileFile' - required: - - file - title: OpenAIFile - type: object - OpenAIFileFile: - properties: - file_data: + nullable: true + completed_at: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - file_id: + error_file_id: anyOf: - type: string - type: 'null' nullable: true - filename: + errors: + anyOf: + - $ref: '#/components/schemas/Errors' + title: Errors + - type: 'null' + nullable: true + title: Errors + expired_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + expires_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + failed_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + finalizing_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + in_progress_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + nullable: true + model: anyOf: - type: string - type: 'null' nullable: true - title: OpenAIFileFile - type: object - OpenAIImageURL: - description: Image URL specification for OpenAI-compatible chat completion messages. - properties: - url: - title: Url - type: string - detail: + output_file_id: anyOf: - type: string - type: 'null' nullable: true + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts + - type: 'null' + nullable: true + title: BatchRequestCounts + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage + - type: 'null' + nullable: true + title: BatchUsage required: - - url - title: OpenAIImageURL + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + type: object + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. + 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 - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIAssistantMessageParam: description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: @@ -1040,6 +958,50 @@ components: nullable: true title: OpenAIAssistantMessageParam type: object + OpenAIChatCompletionContentPartImageParam: + description: Image content part for OpenAI-compatible chat completion messages. + properties: + type: + const: image_url + default: image_url + title: Type + type: string + image_url: + $ref: '#/components/schemas/OpenAIImageURL' + required: + - image_url + title: OpenAIChatCompletionContentPartImageParam + type: object + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + OpenAIChatCompletionContentPartTextParam: + description: Text content part for OpenAI-compatible chat completion messages. + 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. properties: @@ -1082,35 +1044,197 @@ components: nullable: true title: OpenAIChatCompletionToolCallFunction type: object - OpenAIDeveloperMessageParam: - description: A message from the developer in an OpenAI-compatible chat completion request. + OpenAIChatCompletionUsage: + description: Usage information for OpenAI chat completion. properties: - role: - const: developer - default: developer - title: Role - type: string - content: + 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: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsagePromptTokensDetails + completion_tokens_details: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails required: - - content - title: OpenAIDeveloperMessageParam + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage type: object - OpenAISystemMessageParam: - description: A system message providing instructions or context to the model. + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. properties: - role: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs + 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. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs + type: object + OpenAIDeveloperMessageParam: + description: A message from the developer in an OpenAI-compatible chat completion request. + properties: + role: + const: developer + default: developer + title: Role + type: string + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - content + title: OpenAIDeveloperMessageParam + type: object + OpenAIFile: + properties: + type: + const: file + default: file + title: Type + type: string + file: + $ref: '#/components/schemas/OpenAIFileFile' + required: + - file + title: OpenAIFile + type: object + OpenAIFileFile: + properties: + file_data: + anyOf: + - type: string + - type: 'null' + nullable: true + file_id: + anyOf: + - type: string + - type: 'null' + nullable: true + filename: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIFileFile + type: object + OpenAIImageURL: + description: Image URL specification for OpenAI-compatible chat completion messages. + properties: + url: + title: Url + type: string + detail: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - url + title: OpenAIImageURL + type: object + OpenAIMessageParam: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + OpenAISystemMessageParam: + description: A system message providing instructions or context to the model. + properties: + role: const: system default: system title: Role @@ -1132,6 +1256,39 @@ components: - 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' + nullable: true + logprob: + title: Logprob + type: number + top_logprobs: + items: + $ref: '#/components/schemas/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. properties: @@ -1156,6 +1313,32 @@ components: - 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' + nullable: true + 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. properties: @@ -1194,27 +1377,6 @@ components: - content title: OpenAIUserMessageParam type: object - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) OpenAIJSONSchema: description: JSON schema specification for OpenAI-compatible structured response format. properties: @@ -1260,16 +1422,6 @@ components: - json_schema title: OpenAIResponseFormatJSONSchema type: object - OpenAIResponseFormatText: - description: Text response format for OpenAI-compatible chat completion requests. - properties: - type: - const: text - default: text - title: Type - type: string - title: OpenAIResponseFormatText - type: object OpenAIResponseFormatParam: discriminator: mapping: @@ -1285,628 +1437,573 @@ components: - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' title: OpenAIResponseFormatJSONObject title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - VectorStoreChunkingStrategyAuto: - description: Automatic chunking strategy for vector store files. + OpenAIResponseFormatText: + description: Text response format for OpenAI-compatible chat completion requests. properties: type: - const: auto - default: auto + const: text + default: text title: Type type: string - title: VectorStoreChunkingStrategyAuto + title: OpenAIResponseFormatText type: object - VectorStoreChunkingStrategyStatic: - description: Static chunking strategy with configurable parameters. - properties: - type: - const: static - default: static - title: Type - type: string - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' - required: - - static - title: VectorStoreChunkingStrategyStatic - type: object - VectorStoreChunkingStrategyStaticConfig: - description: Configuration for static chunking strategy. - 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 - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - VectorStoreFileStatus: - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - OpenAIResponseInputMessageContentFile: - description: File content for input messages in OpenAI response format. + OpenAIChatCompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible chat completion endpoint. properties: - type: - const: input_file - default: input_file - title: Type + model: + title: Model type: string - file_data: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + minItems: 1 + title: Messages + type: array + frequency_penalty: anyOf: - - type: string + - type: number - type: 'null' nullable: true - file_id: + function_call: anyOf: - type: string + - additionalProperties: true + type: object - type: 'null' + title: string | object nullable: true - file_url: + functions: anyOf: - - type: string + - items: + additionalProperties: true + type: object + type: array - type: 'null' nullable: true - filename: + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + response_format: + anyOf: + - discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: 'null' + title: Response Format + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: anyOf: - type: string + - items: + type: string + type: array + title: list[string] - type: 'null' + title: string | list[string] nullable: true - title: OpenAIResponseInputMessageContentFile - type: object - OpenAIResponseInputMessageContentImage: - description: Image content for input messages in OpenAI response format. - properties: - detail: - default: auto - title: Detail - type: string - enum: - - low - - high - - auto - type: - const: input_image - default: input_image - title: Type - type: string - file_id: + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + tool_choice: anyOf: - type: string + - additionalProperties: true + type: object + - type: 'null' + title: string | object + nullable: true + tools: + anyOf: + - items: + additionalProperties: true + type: object + type: array - type: 'null' nullable: true - image_url: + top_logprobs: + anyOf: + - type: integer + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: anyOf: - type: string - type: 'null' nullable: true - title: OpenAIResponseInputMessageContentImage + required: + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody type: object - OpenAIResponseInputMessageContentText: - description: Text content for input messages in OpenAI response format. + OpenAIChatCompletion: + description: Response from an OpenAI-compatible chat completion request. properties: - text: - title: Text + id: + title: Id type: string - type: - const: input_text - default: input_text - title: Type + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object type: string - required: - - text - title: OpenAIResponseInputMessageContentText - type: object - OpenAIResponseInputMessageContent: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - OpenAIResponseAnnotationCitation: - description: URL citation annotation for referencing external web resources. - properties: - type: - const: url_citation - default: url_citation - title: Type - type: string - end_index: - title: End Index - type: integer - start_index: - title: Start Index + created: + title: Created type: integer - title: - title: Title - type: string - url: - title: Url + model: + title: Model type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation + - id + - choices + - created + - model + title: OpenAIChatCompletion type: object - OpenAIResponseAnnotationContainerFileCitation: + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: - type: - const: container_file_citation - default: container_file_citation - title: Type + id: + title: Id type: string - container_id: - title: Container Id + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object type: string - end_index: - title: End Index + created: + title: Created type: integer - file_id: - title: File Id - type: string - filename: - title: Filename + model: + title: Model type: string - start_index: - title: Start Index - type: integer + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - container_id - - end_index - - file_id - - filename - - start_index - title: OpenAIResponseAnnotationContainerFileCitation + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk type: object - OpenAIResponseAnnotationFileCitation: - description: File citation annotation for referencing specific files in response content. + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. 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 + content: + anyOf: + - type: string + - type: 'null' + nullable: true + refusal: + anyOf: + - type: string + - type: 'null' + nullable: true + role: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + reasoning_content: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIChoiceDelta type: object - OpenAIResponseAnnotationFilePath: + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: - type: - const: file_path - default: file_path - title: Type - type: string - file_id: - title: File Id + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason type: string index: title: Index type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - file_id + - delta + - finish_reason - index - title: OpenAIResponseAnnotationFilePath + title: OpenAIChunkChoice type: object - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - OpenAIResponseContentPartRefusal: - description: Refusal content within a streamed response part. + OpenAICompletionWithInputMessages: properties: - type: - const: refusal - default: refusal - title: Type - type: string - refusal: - title: Refusal + id: + title: Id type: string - required: - - refusal - title: OpenAIResponseContentPartRefusal - type: object - OpenAIResponseOutputMessageContentOutputText: - properties: - text: - title: Text + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object type: string - type: - const: output_text - default: output_text - title: Type + created: + title: Created + type: integer + model: + title: Model type: string - annotations: + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage + input_messages: items: discriminator: mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + title: Input Messages type: array required: - - text - title: OpenAIResponseOutputMessageContentOutputText + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages type: object - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - MCPListToolsTool: - description: Tool definition returned by MCP list tools operation. + OpenAICompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible completion endpoint. properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name + model: + title: Model type: string - description: + prompt: anyOf: - type: string + - items: + type: string + type: array + title: list[string] + - items: + type: integer + type: array + title: list[integer] + - items: + items: + type: integer + type: array + type: array + title: list[array] + title: string | ... (4 variants) + best_of: + anyOf: + - type: integer - type: 'null' nullable: true - required: - - input_schema - - name - title: MCPListToolsTool - 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: + echo: + anyOf: + - type: boolean + - type: 'null' + nullable: true + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: 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' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: string type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - const: message - default: message - title: Type - type: string - id: + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: anyOf: - type: string - type: 'null' nullable: true - status: + suffix: anyOf: - type: string - type: 'null' nullable: true required: - - content - - role - title: OpenAIResponseMessage + - model + - prompt + title: OpenAICompletionRequestWithExtraBody type: object - OpenAIResponseOutputMessageFileSearchToolCall: - description: File search tool call output message for OpenAI responses. + OpenAICompletion: + 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 - queries: + choices: items: - type: string - title: Queries + $ref: '#/components/schemas/OpenAICompletionChoice' + title: Choices type: array - status: - title: Status + created: + title: Created + type: integer + model: + title: Model type: string - type: - const: file_search_call - default: file_search_call - title: Type + object: + const: text_completion + default: text_completion + title: Object type: string - results: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' - type: array - - type: 'null' - nullable: true required: - id - - queries - - status - title: OpenAIResponseOutputMessageFileSearchToolCall + - choices + - created + - model + title: OpenAICompletion type: object - OpenAIResponseOutputMessageFileSearchToolCallResults: - description: Search results returned by the file search operation. + 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: - attributes: - additionalProperties: true - title: Attributes - type: object - file_id: - title: File Id - type: string - filename: - title: Filename + finish_reason: + title: Finish Reason 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. - 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' - nullable: true - status: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - call_id - - name - - arguments - title: OpenAIResponseOutputMessageFunctionToolCall - type: object - OpenAIResponseOutputMessageMCPCall: - description: Model Context Protocol (MCP) call output message for OpenAI responses. - 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' - nullable: true - output: + index: + title: Index + type: integer + logprobs: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true + title: OpenAIChoiceLogprobs required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - type: object - OpenAIResponseOutputMessageMCPListTools: - description: MCP list tools output message containing available tools from an 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: '#/components/schemas/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. - 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 + - finish_reason + - text + - index + title: OpenAICompletionChoice type: object - OpenAIResponseOutput: + ConversationItem: discriminator: 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' @@ -1921,277 +2018,414 @@ components: title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - AllowedToolsFilter: - description: Filter configuration for restricting which MCP tools can be used. - properties: - tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - title: AllowedToolsFilter - type: object - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. - properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - title: ApprovalFilter - type: object - OpenAIResponseInputToolFileSearch: - description: File search tool configuration for OpenAI response inputs. + title: OpenAIResponseMessage | ... (9 variants) + OpenAIResponseAnnotationCitation: + description: URL citation annotation for referencing external web resources. properties: type: - const: file_search - default: file_search + const: url_citation + default: url_citation title: Type type: string - vector_store_ids: - items: - type: string - title: Vector Store Ids - type: array - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - max_num_results: - anyOf: - - maximum: 50 - minimum: 1 - type: integer - - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - nullable: true - title: SearchRankingOptions + 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: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch + - end_index + - start_index + - title + - url + title: OpenAIResponseAnnotationCitation type: object - OpenAIResponseInputToolFunction: - description: Function tool configuration for OpenAI response inputs. + OpenAIResponseAnnotationContainerFileCitation: properties: type: - const: function - default: function + const: container_file_citation + default: container_file_citation title: Type type: string - name: - title: Name + container_id: + title: Container Id type: string - description: + 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. + 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 + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + OpenAIResponseContentPartRefusal: + description: Refusal content within a streamed response part. + 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' nullable: true - parameters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - strict: + status: anyOf: - - type: boolean + - type: string - type: 'null' nullable: true required: - - name - - parameters - title: OpenAIResponseInputToolFunction + - call_id + - output + title: OpenAIResponseInputFunctionToolCallOutput type: object - OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + OpenAIResponseInputMessageContentFile: + description: File content for input messages in OpenAI response format. properties: type: - const: mcp - default: mcp + const: input_file + default: input_file title: Type type: string - server_label: - title: Server Label - type: string - server_url: - title: Server Url - type: string - headers: + file_data: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - authorization: + file_id: anyOf: - type: string - type: 'null' nullable: true - require_approval: + file_url: anyOf: - - const: always - type: string - - const: never - type: string - - $ref: '#/components/schemas/ApprovalFilter' - title: ApprovalFilter - default: never - title: string | ApprovalFilter - allowed_tools: + - type: string + - type: 'null' + nullable: true + filename: anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter + - type: string - type: 'null' - title: list[string] | AllowedToolsFilter nullable: true - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputMessageContentFile type: object - OpenAIResponseInputToolWebSearch: - description: Web search tool configuration for OpenAI response inputs. + OpenAIResponseInputMessageContentImage: + description: Image content for input messages in OpenAI response format. properties: + detail: + default: auto + title: Detail + type: string + enum: + - low + - high + - auto type: - default: web_search + const: input_image + default: input_image title: Type type: string - enum: - - web_search - - web_search_preview - - web_search_preview_2025_03_11 - - web_search_2025_08_26 - search_context_size: + file_id: anyOf: - - pattern: ^low|medium|high$ - type: string + - type: string - type: 'null' - default: medium - title: OpenAIResponseInputToolWebSearch - type: object - SearchRankingOptions: - description: Options for ranking and filtering search results. - properties: - ranker: + nullable: true + image_url: anyOf: - type: string - type: 'null' nullable: true - score_threshold: - anyOf: - - type: number - - type: 'null' - default: 0.0 - title: SearchRankingOptions + title: OpenAIResponseInputMessageContentImage type: object - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + OpenAIResponseInputMessageContentText: + description: Text content for input messages in OpenAI response format. properties: + text: + title: Text + type: string type: - const: mcp - default: mcp + 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 - allowed_tools: + 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' + nullable: true + reason: + anyOf: + - type: string + - type: 'null' + nullable: true + 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: - type: string + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + const: message + default: message + title: Type + type: string + id: + anyOf: + - type: string + - type: 'null' + nullable: true + status: + anyOf: + - type: string - type: 'null' - title: list[string] | AllowedToolsFilter nullable: true required: - - server_label - title: OpenAIResponseToolMCP + - content + - role + title: OpenAIResponseMessage type: object - OpenAIResponseTool: + OpenAIResponseOutputMessageContent: discriminator: mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseContentPartOutputText: - description: Text content within a streamed response part. + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + OpenAIResponseOutputMessageContentOutputText: properties: + text: + title: Text + type: string type: const: output_text default: output_text title: Type type: string - text: - title: Text - type: string annotations: items: discriminator: @@ -2213,108 +2447,234 @@ components: title: OpenAIResponseAnnotationFileCitation | ... (4 variants) title: Annotations type: array - logprobs: + required: + - text + title: OpenAIResponseOutputMessageContentOutputText + type: object + OpenAIResponseOutputMessageFileSearchToolCall: + description: File search tool call output message for OpenAI responses. + 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: - additionalProperties: true - type: object + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' nullable: true required: - - text - title: OpenAIResponseContentPartOutputText + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall type: object - OpenAIResponseContentPartReasoningText: - description: Reasoning text emitted as part of a streamed response. + OpenAIResponseOutputMessageFunctionToolCall: + description: Function tool call output message for OpenAI responses. properties: - type: - const: reasoning_text - default: reasoning_text - title: Type + call_id: + title: Call Id type: string - text: - title: Text + 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' + nullable: true + status: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - text - title: OpenAIResponseContentPartReasoningText + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall type: object - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseContentPartReasoningSummary: - description: Reasoning summary part in a streamed response. + OpenAIResponseOutputMessageMCPCall: + description: Model Context Protocol (MCP) call output message for OpenAI responses. properties: + id: + title: Id + type: string type: - const: summary_text - default: summary_text + const: mcp_call + default: mcp_call title: Type type: string - text: - title: Text + arguments: + title: Arguments + type: string + name: + title: Name + type: string + server_label: + title: Server Label + type: string + error: + anyOf: + - type: string + - type: 'null' + nullable: true + output: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + type: object + OpenAIResponseOutputMessageMCPListTools: + description: MCP list tools output message containing available tools from an 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: '#/components/schemas/MCPListToolsTool' + title: Tools + type: array required: - - text - title: OpenAIResponseContentPartReasoningSummary + - id + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools type: object - OpenAIResponseError: - description: Error details for failed OpenAI response requests. + OpenAIResponseOutputMessageWebSearchToolCall: + description: Web search tool call output message for OpenAI responses. properties: - code: - title: Code + id: + title: Id type: string - message: - title: Message + status: + title: Status + type: string + type: + const: web_search_call + default: web_search_call + title: Type type: string required: - - code - - message - title: OpenAIResponseError + - id + - status + title: OpenAIResponseOutputMessageWebSearchToolCall type: object - OpenAIResponseObject: - description: Complete OpenAI response object containing generation results and metadata. + 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. + 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 - error: + metadata: anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError + - 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. nullable: true - title: OpenAIResponseError + 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. + nullable: true + required: + - id + - created_at + title: Conversation + type: object + ConversationDeletedResource: + description: Response for deleted conversation. + properties: id: + description: The deleted conversation identifier title: Id type: string - model: - title: Model + 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 + ConversationItemList: + description: List of conversation items with pagination. + properties: object: - const: response - default: response + default: list + description: Object type title: Object type: string - output: + data: + description: List of conversation items items: discriminator: 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' @@ -2329,2074 +2689,732 @@ components: title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output + title: OpenAIResponseMessage | ... (9 variants) + title: Data type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: + first_id: anyOf: - type: string - type: 'null' + description: The ID of the first item in the list nullable: true - prompt: + last_id: anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt + - type: string - type: 'null' + description: The ID of the last item in the list nullable: true - title: OpenAIResponsePrompt - status: - title: Status + has_more: + default: false + description: Whether there are more items available + title: Has More + type: boolean + required: + - data + title: ConversationItemList + type: object + ConversationItemDeletedResource: + description: Response for deleted conversation item. + properties: + id: + description: The deleted item identifier + title: Id type: string - temperature: - anyOf: - - type: number - - type: 'null' - nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - nullable: true - tools: - anyOf: - - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) + 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 + OpenAIEmbeddingsRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible embeddings endpoint. + properties: + model: + title: Model + type: string + input: + anyOf: + - type: string + - items: + type: string type: array - - type: 'null' - nullable: true - truncation: + title: list[string] + title: string | list[string] + encoding_format: anyOf: - type: string - type: 'null' - nullable: true - usage: + default: float + dimensions: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage + - type: integer - type: 'null' nullable: true - title: OpenAIResponseUsage - instructions: + user: anyOf: - type: string - type: 'null' nullable: true - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - nullable: true required: - - created_at - - id - model - - output - - status - title: OpenAIResponseObject + - input + title: OpenAIEmbeddingsRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseCompleted: - description: Streaming event indicating a response has been completed. + OpenAIEmbeddingData: + description: A single embedding data object from an OpenAI-compatible embeddings response. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.completed - default: response.completed - title: Type + object: + const: embedding + default: embedding + title: Object type: string + embedding: + anyOf: + - items: + type: number + type: array + title: list[number] + - type: string + title: list[number] | string + index: + title: Index + type: integer required: - - response - title: OpenAIResponseObjectStreamResponseCompleted + - embedding + - index + title: OpenAIEmbeddingData type: object - OpenAIResponseObjectStreamResponseContentPartAdded: - description: Streaming event for when a new content part is added to a response item. + OpenAIEmbeddingUsage: + description: Usage information for an OpenAI-compatible embeddings response. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index + prompt_tokens: + title: Prompt Tokens type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number + total_tokens: + title: Total Tokens type: integer - type: - const: response.content_part.added - default: response.content_part.added - title: Type - type: string required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartAdded + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage type: object - OpenAIResponseObjectStreamResponseContentPartDone: - description: Streaming event for when a content part is completed. + OpenAIEmbeddingsResponse: + description: Response from an OpenAI-compatible embeddings request. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id + object: + const: list + default: list + title: Object type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer - type: - const: response.content_part.done - default: response.content_part.done - title: Type + data: + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + title: Data + type: array + model: + title: Model type: string + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartDone + - data + - model + - usage + title: OpenAIEmbeddingsResponse type: object - OpenAIResponseObjectStreamResponseCreated: - description: Streaming event indicating a new response has been created. + OpenAIFilePurpose: + description: Valid purpose values for OpenAI Files API. + enum: + - assistants + - batch + title: OpenAIFilePurpose + type: string + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.created - default: response.created - title: Type + 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: - - response - title: OpenAIResponseObjectStreamResponseCreated - type: object - OpenAIResponseObjectStreamResponseFailed: - description: Streaming event emitted when a response fails. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.failed - default: response.failed - title: Type - type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseFailed + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse type: object - OpenAIResponseObjectStreamResponseFileSearchCallCompleted: - description: Streaming event for completed file search calls. + OpenAIFileObject: + description: OpenAI File object as defined in the OpenAI Files API. properties: - item_id: - title: Item Id + object: + const: file + default: file + title: Object type: string - output_index: - title: Output Index + id: + title: Id + type: string + bytes: + title: Bytes type: integer - sequence_number: - title: Sequence Number + created_at: + title: Created At type: integer - type: - const: response.file_search_call.completed - default: response.file_search_call.completed - title: Type + expires_at: + title: Expires At + type: integer + filename: + title: Filename type: string + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject type: object - OpenAIResponseObjectStreamResponseFileSearchCallInProgress: - description: Streaming event for file search calls in progress. + 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: - item_id: - title: Item Id + anchor: + const: created_at + title: Anchor type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + seconds: + maximum: 2592000 + minimum: 3600 + title: Seconds type: integer - type: - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - title: Type - type: string required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - anchor + - seconds + title: ExpiresAfter type: object - OpenAIResponseObjectStreamResponseFileSearchCallSearching: - description: Streaming event for file search currently searching. + OpenAIFileDeleteResponse: + description: Response for deleting a file in OpenAI Files API. properties: - item_id: - title: Item Id + id: + title: Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.searching - default: response.file_search_call.searching - title: Type + object: + const: file + default: file + title: Object type: string + deleted: + title: Deleted + type: boolean required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - id + - deleted + title: OpenAIFileDeleteResponse type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: - description: Streaming event for incremental function call argument updates. + HealthInfo: + description: Health status information for the service. properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - title: Type - type: string + status: + $ref: '#/components/schemas/HealthStatus' required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - status + title: HealthInfo type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: - description: Streaming event for when function call arguments are completed. + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id + route: + title: Route type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.done - default: response.function_call_arguments.done - title: Type + method: + title: Method type: string + provider_types: + items: + type: string + title: Provider Types + type: array required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - route + - method + - provider_types + title: RouteInfo type: object - OpenAIResponseObjectStreamResponseInProgress: - description: Streaming event indicating the response remains in progress. + ListRoutesResponse: + description: Response containing a list of all available API routes. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.in_progress - default: response.in_progress - title: Type - type: string + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseInProgress + - data + title: ListRoutesResponse type: object - OpenAIResponseObjectStreamResponseIncomplete: - description: Streaming event emitted when a response ends in an incomplete state. + OpenAIModel: + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.incomplete - default: response.incomplete - title: Type + id: + title: Id type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseIncomplete - type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: - properties: - delta: - title: Delta + object: + const: model + default: model + title: Object type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + created: + title: Created type: integer - type: - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - title: Type + owned_by: + title: Owned By type: string + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - id + - created + - owned_by + title: OpenAIModel type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + OpenAIListModelsResponse: properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - title: Type - type: string + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - data + title: OpenAIListModelsResponse type: object - OpenAIResponseObjectStreamResponseMcpCallCompleted: - description: Streaming event for completed MCP calls. + Model: + description: A model resource representing an AI model registered in Llama Stack. properties: - sequence_number: - title: Sequence Number - type: integer + 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 + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string type: - const: response.mcp_call.completed - default: response.mcp_call.completed + const: model + default: model title: Type type: string + metadata: + additionalProperties: true + description: Any additional metadata for this model + title: Metadata + type: object + model_type: + $ref: '#/components/schemas/ModelType' + default: llm required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - identifier + - provider_id + title: Model type: object - OpenAIResponseObjectStreamResponseMcpCallFailed: - description: Streaming event for failed MCP calls. + ModelType: + description: Enumeration of supported model types in Llama Stack. + enum: + - llm + - embedding + - rerank + title: ModelType + type: string + ModerationObject: + description: A moderation object. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.failed - default: response.mcp_call.failed - title: Type + id: + title: Id type: string + model: + title: Model + type: string + results: + items: + $ref: '#/components/schemas/ModerationObjectResults' + title: Results + type: array required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallFailed + - id + - model + - results + title: ModerationObject type: object - OpenAIResponseObjectStreamResponseMcpCallInProgress: - description: Streaming event for MCP calls in progress. + ModerationObjectResults: + description: A moderation object. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - title: Type - type: string + flagged: + title: Flagged + type: boolean + categories: + anyOf: + - additionalProperties: + type: boolean + type: object + - type: 'null' + nullable: true + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + nullable: true + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - flagged + title: ModerationObjectResults type: object - OpenAIResponseObjectStreamResponseMcpListToolsCompleted: + Prompt: + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. properties: - sequence_number: - title: Sequence Number + prompt: + anyOf: + - type: string + - type: 'null' + description: The system prompt with variable placeholders + nullable: true + version: + description: Version (integer starting at 1, incremented on save) + minimum: 1 + title: Version type: integer - type: - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - title: Type + prompt_id: + description: Unique identifier in format 'pmpt_<48-digit-hash>' + title: Prompt Id type: string + variables: + description: List of variable names that can be used in the prompt template + items: + type: string + title: Variables + type: array + is_default: + default: false + description: Boolean indicating whether this version is the default version + title: Is Default + type: boolean required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - version + - prompt_id + title: Prompt type: object - OpenAIResponseObjectStreamResponseMcpListToolsFailed: + ListPromptsResponse: + description: Response model to list prompts. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - title: Type - type: string + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - data + title: ListPromptsResponse type: object - OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + ProviderInfo: + description: Information about a registered provider including its configuration and health status. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - title: Type + api: + title: Api type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - type: object - OpenAIResponseObjectStreamResponseOutputItemAdded: - description: Streaming event for when a new output item is added to the response. - properties: - response_id: - title: Response Id + provider_id: + title: Provider Id type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.added - default: response.output_item.added - title: Type + provider_type: + title: Provider Type type: string + config: + additionalProperties: true + title: Config + type: object + health: + additionalProperties: true + title: Health + type: object required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemAdded + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo type: object - OpenAIResponseObjectStreamResponseOutputItemDone: - description: Streaming event for when an output item is completed. + ListProvidersResponse: + description: Response containing a list of all available providers. properties: - response_id: - title: Response Id - type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.done - default: response.output_item.done - title: Type - type: string + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemDone + - data + title: ListProvidersResponse type: object - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: - description: Streaming event for when an annotation is added to output text. + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. properties: - item_id: - title: Item Id + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - output_index: - title: Output Index - type: integer - content_index: - title: Content Index - type: integer - annotation_index: - title: Annotation Index - type: integer - annotation: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.annotation.added - default: response.output_text.annotation.added - title: Type + last_id: + title: Last Id + type: string + object: + const: list + default: list + title: Object type: string required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject type: object - OpenAIResponseObjectStreamResponseOutputTextDelta: - description: Streaming event for incremental text content updates. + OpenAIResponseError: + description: Error details for failed OpenAI response requests. properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id + code: + title: Code type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.delta - default: response.output_text.delta - title: Type + message: + title: Message type: string required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDelta + - code + - message + title: OpenAIResponseError type: object - OpenAIResponseObjectStreamResponseOutputTextDone: - description: Streaming event for when text output is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.done - default: response.output_text.done - title: Type - type: string - required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDone - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: - description: Streaming event for when a new reasoning summary part is added. + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + OpenAIResponseInputToolFileSearch: + description: File search tool configuration for OpenAI response inputs. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer type: - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added + 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' + nullable: true + max_num_results: + anyOf: + - maximum: 50 + minimum: 1 + type: integer + - type: 'null' + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + nullable: true + title: SearchRankingOptions required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - vector_store_ids + title: OpenAIResponseInputToolFileSearch type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: - description: Streaming event for when a reasoning summary part is completed. + OpenAIResponseInputToolFunction: + description: Function tool configuration for OpenAI response inputs. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer type: - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done + const: function + default: function title: Type type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: - description: Streaming event for incremental reasoning summary text updates. - properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - title: Type + name: + title: Name type: string + description: + anyOf: + - type: string + - type: 'null' + nullable: true + parameters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + nullable: true required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - name + - parameters + title: OpenAIResponseInputToolFunction type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: - description: Streaming event for when reasoning summary text is completed. + OpenAIResponseInputToolWebSearch: + description: Web search tool configuration for OpenAI response inputs. properties: - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer type: - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done + default: web_search title: Type type: string - required: - - text - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + search_context_size: + anyOf: + - pattern: ^low|medium|high$ + type: string + - type: 'null' + default: medium + title: OpenAIResponseInputToolWebSearch type: object - OpenAIResponseObjectStreamResponseReasoningTextDelta: - description: Streaming event for incremental reasoning text updates. + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. properties: - content_index: - title: Content Index + created_at: + title: Created At type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + nullable: true + title: OpenAIResponseError + id: + title: Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.delta - default: response.reasoning_text.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - type: object - OpenAIResponseObjectStreamResponseReasoningTextDone: - description: Streaming event for when reasoning text is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.done - default: response.reasoning_text.done - title: Type - type: string - required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDone - type: object - OpenAIResponseObjectStreamResponseRefusalDelta: - description: Streaming event for incremental refusal text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.delta - default: response.refusal.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDelta - type: object - OpenAIResponseObjectStreamResponseRefusalDone: - description: Streaming event for when refusal text is completed. - properties: - content_index: - title: Content Index - type: integer - refusal: - title: Refusal - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.done - default: response.refusal.done - title: Type - type: string - required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDone - type: object - OpenAIResponseObjectStreamResponseWebSearchCallCompleted: - description: Streaming event for completed web search calls. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.completed - default: response.web_search_call.completed - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - type: object - OpenAIResponseObjectStreamResponseWebSearchCallInProgress: - description: Streaming event for web search calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - type: object - OpenAIResponseObjectStreamResponseWebSearchCallSearching: - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.searching - default: response.web_search_call.searching - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - type: object - OpenAIResponsePrompt: - description: OpenAI compatible Prompt object that is used in OpenAI responses. - properties: - id: - title: Id - type: string - variables: - anyOf: - - additionalProperties: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: object - - type: 'null' - nullable: true - version: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - id - title: OpenAIResponsePrompt - type: object - OpenAIResponseText: - description: Text response configuration for OpenAI responses. - properties: - format: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseTextFormat' - title: OpenAIResponseTextFormat - - type: 'null' - nullable: true - title: OpenAIResponseTextFormat - title: OpenAIResponseText - type: object - OpenAIResponseTextFormat: - description: Configuration for Responses API text format. - properties: - type: - title: Type - type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - title: OpenAIResponseTextFormat - type: object - OpenAIResponseUsage: - description: Usage information for OpenAI response. - 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: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' - title: OpenAIResponseUsageInputTokensDetails - - type: 'null' - nullable: true - title: OpenAIResponseUsageInputTokensDetails - output_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' - title: OpenAIResponseUsageOutputTokensDetails - - type: 'null' - nullable: true - title: OpenAIResponseUsageOutputTokensDetails - required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - type: object - OpenAIResponseUsageInputTokensDetails: - description: Token details for input tokens in OpenAI response usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageInputTokensDetails - type: object - OpenAIResponseUsageOutputTokensDetails: - description: Token details for output tokens in OpenAI response usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageOutputTokensDetails - type: object - OpenAIResponseObjectStream: - discriminator: - mapping: - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - title: OpenAIResponseObjectStreamResponseCreated - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - title: OpenAIResponseObjectStreamResponseInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - title: OpenAIResponseObjectStreamResponseOutputItemAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - title: OpenAIResponseObjectStreamResponseOutputItemDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - title: OpenAIResponseObjectStreamResponseOutputTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - title: OpenAIResponseObjectStreamResponseOutputTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - title: OpenAIResponseObjectStreamResponseMcpCallFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - title: OpenAIResponseObjectStreamResponseContentPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - title: OpenAIResponseObjectStreamResponseContentPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - title: OpenAIResponseObjectStreamResponseReasoningTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - title: OpenAIResponseObjectStreamResponseRefusalDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - title: OpenAIResponseObjectStreamResponseRefusalDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - title: OpenAIResponseObjectStreamResponseIncomplete - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - title: OpenAIResponseObjectStreamResponseFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - title: OpenAIResponseObjectStreamResponseCompleted - title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) - 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' - nullable: true - status: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - call_id - - output - title: OpenAIResponseInputFunctionToolCallOutput - 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' - nullable: true - reason: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse - type: object - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - ArrayType: - description: Parameter type for array values. - properties: - type: - const: array - default: array - title: Type - type: string - title: ArrayType - type: object - BooleanType: - description: Parameter type for boolean values. - properties: - type: - const: boolean - default: boolean - title: Type - type: string - title: BooleanType - type: object - ChatCompletionInputType: - description: Parameter type for 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. - properties: - type: - const: completion_input - default: completion_input - title: Type - type: string - title: CompletionInputType - type: object - JsonType: - description: Parameter type for JSON values. - properties: - type: - const: json - default: json - title: Type - type: string - title: JsonType - type: object - NumberType: - description: Parameter type for numeric values. - properties: - type: - const: number - default: number - title: Type - type: string - title: NumberType - type: object - ObjectType: - description: Parameter type for object values. - properties: - type: - const: object - default: object - title: Type - type: string - title: ObjectType - type: object - StringType: - description: Parameter type for string values. - properties: - type: - const: string - default: string - title: Type - type: string - title: StringType - type: object - UnionType: - description: Parameter type for union values. - properties: - type: - const: union - default: union - title: Type - type: string - title: UnionType - type: object - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - RowsDataSource: - description: A dataset stored in rows. - 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. - properties: - type: - const: uri - default: uri - title: Type - type: string - uri: - title: Uri - type: string - required: - - uri - title: URIDataSource - type: object - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - AggregationFunctionType: - description: Types of aggregation functions for scoring results. - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - type: string - BasicScoringFnParams: - description: Parameters for basic scoring function configuration. - 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: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions - type: array - title: BasicScoringFnParams - type: object - LLMAsJudgeScoringFnParams: - description: Parameters for LLM-as-judge scoring function configuration. - 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' - nullable: true - 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: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions - type: array - required: - - judge_model - title: LLMAsJudgeScoringFnParams - type: object - RegexParserScoringFnParams: - description: Parameters for regex parser scoring function configuration. - 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: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions - type: array - title: RegexParserScoringFnParams - type: object - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - LoraFinetuningConfig: - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - properties: - type: - const: LoRA - default: LoRA - title: Type - type: string - lora_attn_modules: - items: - type: string - title: Lora Attn Modules - type: array - apply_lora_to_mlp: - title: Apply Lora To Mlp - type: boolean - apply_lora_to_output: - title: Apply Lora To Output - type: boolean - rank: - title: Rank - type: integer - alpha: - title: Alpha - type: integer - use_dora: - anyOf: - - type: boolean - - type: 'null' - default: false - quantize_base: - anyOf: - - type: boolean - - type: 'null' - default: false - required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - type: object - QATFinetuningConfig: - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - properties: - type: - const: QAT - default: QAT - title: Type - type: string - quantizer_name: - title: Quantizer Name - type: string - group_size: - title: Group Size - type: integer - required: - - quantizer_name - - group_size - title: QATFinetuningConfig - type: object - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - SpanEndPayload: - description: Payload for a span end event. - properties: - type: - const: span_end - default: span_end - title: Type - type: string - status: - $ref: '#/components/schemas/SpanStatus' - required: - - status - title: SpanEndPayload - type: object - SpanStartPayload: - description: Payload for a span start event. - properties: - type: - const: span_start - default: span_start - title: Type - type: string - name: - title: Name - type: string - parent_span_id: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - name - title: SpanStartPayload - type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string - required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent - type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent - type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message - type: string - severity: - $ref: '#/components/schemas/LogSeverity' - required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent - type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Data - type: array - object: - const: list - default: list - title: Object - type: string - required: - - data - title: ListOpenAIResponseInputItem - type: object - OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. - properties: - created_at: - title: Created At - type: integer - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - nullable: true - title: OpenAIResponseError - id: - title: Id - type: string - model: - title: Model + model: + title: Model type: string object: const: response @@ -4562,53 +3580,158 @@ components: - input title: OpenAIResponseObjectWithInput type: object - ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + OpenAIResponsePrompt: + description: OpenAI compatible Prompt object that is used in OpenAI responses. properties: - data: - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - title: Data - type: array - has_more: - title: Has More - type: boolean - first_id: - title: First Id + id: + title: Id type: string - last_id: - title: Last Id + variables: + anyOf: + - additionalProperties: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: object + - type: 'null' + nullable: true + version: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - id + title: OpenAIResponsePrompt + type: object + OpenAIResponseText: + description: Text response configuration for OpenAI responses. + properties: + format: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat + - type: 'null' + nullable: true + title: OpenAIResponseTextFormat + title: OpenAIResponseText + type: object + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + properties: + type: + const: mcp + default: mcp + title: Type type: string - object: - const: list - default: list - title: Object + server_label: + title: Server Label type: string + allowed_tools: + anyOf: + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter + - type: 'null' + title: list[string] | AllowedToolsFilter + nullable: true required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject + - server_label + title: OpenAIResponseToolMCP type: object - OpenAIDeleteResponseObject: - description: Response object confirming deletion of an OpenAI response. + OpenAIResponseUsage: + description: Usage information for OpenAI response. properties: - id: - title: Id - type: string - object: - const: response - default: response - title: Object - type: string - deleted: - default: true - title: Deleted - type: boolean + 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: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails + - type: 'null' + nullable: true + title: OpenAIResponseUsageInputTokensDetails + output_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails + - type: 'null' + nullable: true + title: OpenAIResponseUsageOutputTokensDetails required: - - id - title: OpenAIDeleteResponseObject + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage type: object ResponseGuardrailSpec: description: Specification for a guardrail to apply during response generation. @@ -4620,1551 +3743,1444 @@ components: - type title: ResponseGuardrailSpec type: object - Batch: - additionalProperties: true + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: - id: - title: Id - type: string - completion_window: - title: Completion Window - type: string - created_at: - title: Created At - type: integer - endpoint: - title: Endpoint - type: string - input_file_id: - title: Input File Id + type: + const: mcp + default: mcp + title: Type type: string - object: - const: batch - title: Object + server_label: + title: Server Label type: string - status: - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - title: Status + server_url: + title: Server Url type: string - cancelled_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - cancelling_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - completed_at: + headers: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' nullable: true - error_file_id: + authorization: anyOf: - type: string - type: 'null' nullable: true - errors: - anyOf: - - $ref: '#/components/schemas/Errors' - title: Errors - - type: 'null' - nullable: true - title: Errors - expired_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - expires_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - failed_at: + require_approval: anyOf: - - type: integer - - type: 'null' - nullable: true - finalizing_at: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + title: ApprovalFilter + default: never + title: string | ApprovalFilter + allowed_tools: anyOf: - - type: integer + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' + title: list[string] | AllowedToolsFilter nullable: true - in_progress_at: + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + type: object + OpenAIResponseObject: + description: Complete OpenAI response object containing generation results and metadata. + properties: + created_at: + title: Created At + type: integer + error: anyOf: - - type: integer + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' nullable: true - metadata: + title: OpenAIResponseError + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output + type: array + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: anyOf: - - additionalProperties: - type: string - type: object + - type: string - type: 'null' nullable: true - model: + prompt: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' nullable: true - output_file_id: + title: OpenAIResponsePrompt + status: + title: Status + type: string + temperature: anyOf: - - type: string + - type: number - type: 'null' nullable: true - request_counts: + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: anyOf: - - $ref: '#/components/schemas/BatchRequestCounts' - title: BatchRequestCounts + - type: number - type: 'null' nullable: true - title: BatchRequestCounts - usage: + tools: anyOf: - - $ref: '#/components/schemas/BatchUsage' - title: BatchUsage + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array - type: 'null' nullable: true - title: BatchUsage - required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - type: object - BatchError: - additionalProperties: true - properties: - code: + truncation: anyOf: - type: string - type: 'null' nullable: true - line: + usage: anyOf: - - type: integer + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' nullable: true - message: + title: OpenAIResponseUsage + instructions: anyOf: - type: string - type: 'null' nullable: true - param: + max_tool_calls: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - title: BatchError - type: object - BatchRequestCounts: - additionalProperties: true - properties: - completed: - title: Completed - type: integer - failed: - title: Failed - type: integer - total: - title: Total - type: integer - required: - - completed - - failed - - total - title: BatchRequestCounts - type: object - BatchUsage: - additionalProperties: true - properties: - input_tokens: - title: Input Tokens - type: integer - input_tokens_details: - $ref: '#/components/schemas/InputTokensDetails' - output_tokens: - title: Output Tokens - type: integer - output_tokens_details: - $ref: '#/components/schemas/OutputTokensDetails' - total_tokens: - title: Total Tokens - type: integer required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject type: object - Errors: - additionalProperties: true + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. properties: - data: + type: + const: output_text + default: output_text + title: Type + type: string + text: + title: Text + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations + type: array + logprobs: anyOf: - items: - $ref: '#/components/schemas/BatchError' + additionalProperties: true + type: object type: array - type: 'null' nullable: true - object: - anyOf: - - type: string - - type: 'null' - nullable: true - title: Errors + required: + - text + title: OpenAIResponseContentPartOutputText type: object - InputTokensDetails: - additionalProperties: true + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. properties: - cached_tokens: - title: Cached Tokens - type: integer + type: + const: summary_text + default: summary_text + title: Type + type: string + text: + title: Text + type: string required: - - cached_tokens - title: InputTokensDetails + - text + title: OpenAIResponseContentPartReasoningSummary type: object - OutputTokensDetails: - additionalProperties: true + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. properties: - reasoning_tokens: - title: Reasoning Tokens - type: integer + type: + const: reasoning_text + default: reasoning_text + title: Type + type: string + text: + title: Text + type: string required: - - reasoning_tokens - title: OutputTokensDetails + - text + title: OpenAIResponseContentPartReasoningText type: object - ListBatchesResponse: - description: Response containing a list of batch objects. + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. properties: - object: - const: list - default: list - title: Object + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.completed + default: response.completed + title: Type type: string - data: - description: List of batch objects - items: - $ref: '#/components/schemas/Batch' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: ID of the last batch in the list - nullable: true - has_more: - default: false - description: Whether there are more batches available - title: Has More - type: boolean required: - - data - title: ListBatchesResponse + - response + title: OpenAIResponseObjectStreamResponseCompleted type: object - Benchmark: - description: A benchmark resource for evaluating model performance. + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + content_index: + title: Content Index + type: integer + response_id: + title: Response Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer type: - const: benchmark - default: benchmark + const: response.content_part.added + default: response.content_part.added 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 - ListBenchmarksResponse: - properties: - data: - items: - $ref: '#/components/schemas/Benchmark' - title: Data - type: array required: - - data - title: ListBenchmarksResponse + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded type: object - ImageDelta: - description: An image content delta for streaming responses. + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer type: - const: image - default: image + const: response.content_part.done + default: response.content_part.done title: Type type: string - image: - format: binary - title: Image - type: string required: - - image - title: ImageDelta + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone type: object - TextDelta: - description: A text content delta for streaming responses. + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' type: - const: text - default: text + const: response.created + default: response.created title: Type type: string - text: - title: Text - type: string required: - - text - title: TextDelta + - response + title: OpenAIResponseObjectStreamResponseCreated type: object - JobStatus: - description: Status of a job execution. - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string - Job: - description: A job execution instance with status tracking. + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. properties: - job_id: - title: Job Id + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.failed + default: response.failed + title: Type type: string - status: - $ref: '#/components/schemas/JobStatus' required: - - job_id - - status - title: Job + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed type: object - MetricInResponse: - description: A metric value included in API responses. + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. properties: - metric: - title: Metric + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - metric - - value - title: MetricInResponse - type: object - PaginatedResponse: - description: A generic paginated response that follows a simple format. - properties: - data: - items: - additionalProperties: true - type: object - title: Data - type: array - has_more: - title: Has More - type: boolean - url: - anyOf: - - type: string - - type: 'null' - nullable: true required: - - data - - has_more - title: PaginatedResponse + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted type: object - PostTrainingMetric: - description: Training metrics captured during post-training jobs. + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. properties: - epoch: - title: Epoch + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - train_loss: - title: Train Loss - type: number - validation_loss: - title: Validation Loss - type: number - perplexity: - title: Perplexity - type: number + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type + type: string required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress type: object - Checkpoint: - description: Checkpoint created during training runs. + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. properties: - identifier: - title: Identifier - type: string - created_at: - format: date-time - title: Created At + item_id: + title: Item Id type: string - epoch: - title: Epoch + output_index: + title: Output Index type: integer - post_training_job_id: - title: Post Training Job Id - type: string - path: - title: Path + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type type: string - training_metrics: - anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' - title: PostTrainingMetric - - type: 'null' - nullable: true - title: PostTrainingMetric required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: dialog - default: dialog + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta title: Type type: string - title: DialogType + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta type: object - Conversation: - description: OpenAI-compatible conversation object. + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. properties: - id: - description: The unique ID of the conversation. - title: Id + arguments: + title: Arguments type: string - object: - const: conversation - default: conversation - description: The object type, which is always conversation. - title: Object + item_id: + title: Item Id type: string - created_at: - description: The time at which the conversation was created, measured in seconds since the Unix epoch. - title: Created At + output_index: + title: Output Index 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. - nullable: true - 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. - nullable: true + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type + type: string required: - - id - - created_at - title: Conversation + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone type: object - ConversationDeletedResource: - description: Response for deleted conversation. + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. properties: - id: - description: The deleted conversation identifier - title: Id - type: string - object: - default: conversation.deleted - description: Object type - title: Object + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type type: string - deleted: - default: true - description: Whether the object was deleted - title: Deleted - type: boolean required: - - id - title: ConversationDeletedResource + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.incomplete + default: response.incomplete + title: Type + type: string required: - - items - title: ConversationItemCreateRequest + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete type: object - ConversationItemDeletedResource: - description: Response for deleted conversation item. + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: properties: - id: - description: The deleted item identifier - title: Id + delta: + title: Delta type: string - object: - default: conversation.item.deleted - description: Object type - title: Object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type type: string - deleted: - default: true - description: Whether the object was deleted - title: Deleted - type: boolean required: - - id - title: ConversationItemDeletedResource + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta type: object - ConversationItemList: - description: List of conversation items with pagination. + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: properties: - object: - default: list - description: Object type - title: Object + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type type: string - data: - description: List of conversation items - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the first item in the list - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the last item in the list - nullable: true - has_more: - default: false - description: Whether there are more items available - title: Has More - type: boolean required: - - data - title: ConversationItemList + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer type: - const: message - default: message + const: response.mcp_call.failed + default: response.mcp_call.failed title: Type type: string - object: - const: message - default: message - title: Object - type: string required: - - id - - content - - role - - status - title: ConversationMessage + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed type: object - DatasetPurpose: - description: Purpose of the dataset. Each purpose has a required input data schema. - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string - Dataset: - description: Dataset resource for storing and accessing training or evaluation data. + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. 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 - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: dataset - default: dataset + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress title: Type type: string - purpose: - $ref: '#/components/schemas/DatasetPurpose' - source: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - metadata: - additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata - type: object required: - - identifier - - provider_id - - purpose - - source - title: Dataset + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress type: object - ListDatasetsResponse: - description: Response from listing datasets. + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: properties: - data: - items: - $ref: '#/components/schemas/Dataset' - title: Data - type: array + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type + type: string required: - - data - title: ListDatasetsResponse + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted type: object - Error: - description: Error response from the API. Roughly follows RFC 7807. + OpenAIResponseObjectStreamResponseMcpListToolsFailed: properties: - status: - title: Status + sequence_number: + title: Sequence Number type: integer - title: - title: Title - type: string - detail: - title: Detail + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type type: string - instance: - anyOf: - - type: string - - type: 'null' - nullable: true required: - - status - - title - - detail - title: Error + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed type: object - Api: - description: Enumeration of all available APIs in the Llama Stack system. - enum: - - providers - - inference - - safety - - agents - - batches - - vector_io - - datasetio - - scoring - - eval - - post_training - - tool_runtime - - models - - shields - - vector_stores - - datasets - - scoring_functions - - benchmarks - - tool_groups - - files - - prompts - - conversations - - inspect - title: Api - type: string - InlineProviderSpec: + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. + properties: + response_id: + title: Response Id + type: string + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.added + default: response.output_item.added + title: Type type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - container_image: - anyOf: - - type: string - - type: 'null' - description: |2 - - The container image to use for this implementation. If one is provided, pip_packages will be ignored. - If a provider depends on other providers, the dependencies MUST NOT specify a container image. - nullable: true - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true required: - - api - - provider_type - - config_class - title: InlineProviderSpec + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded type: object - ModelType: - description: Enumeration of supported model types in Llama Stack. - enum: - - llm - - embedding - - rerank - title: ModelType - type: string - Model: - description: A model resource representing an AI model registered in Llama Stack. + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + response_id: + title: Response Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done + title: Type + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone + type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. + properties: + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + sequence_number: + title: Sequence Number + type: integer type: - const: model - default: model + const: response.output_text.annotation.added + default: response.output_text.annotation.added title: Type type: string - metadata: - additionalProperties: true - description: Any additional metadata for this model - title: Metadata - type: object - model_type: - $ref: '#/components/schemas/ModelType' - default: llm required: - - identifier - - provider_id - title: Model + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded type: object - ProviderSpec: + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.delta + default: response.output_text.delta + title: Type type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array required: - - api - - provider_type - - config_class - title: ProviderSpec + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta type: object - RemoteProviderSpec: + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type + content_index: + title: Content Index + type: integer + text: + title: Text type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + item_id: + title: Item Id type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - adapter_type: - description: Unique identifier for this adapter - title: Adapter Type + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done + title: Type type: string - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true required: - - api - - provider_type - - config_class - - adapter_type - title: RemoteProviderSpec + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone type: object - ScoringFn: - description: A scoring function resource for evaluating model outputs. + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + item_id: + title: Item Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. + properties: + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: scoring_function - default: scoring_function + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done title: Type type: string - description: - anyOf: - - type: string - - type: 'null' - 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: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - params: - anyOf: - - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval - title: Params - nullable: true required: - - identifier - - provider_id - - return_type - title: ScoringFn + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone type: object - Shield: - description: A safety shield resource that can be used to check content. + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + delta: + title: Delta type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: shield - default: shield + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta title: Type type: string - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true required: - - identifier - - provider_id - title: Shield + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta type: object - ToolGroup: - description: A group of related tools managed together. + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + text: + title: Text type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: tool_group - default: tool_group + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done title: Type type: string - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - nullable: true - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true required: - - identifier - - provider_id - title: ToolGroup + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone type: object - ModelCandidate: - description: A model candidate for evaluation. + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: model - default: model + const: response.reasoning_text.delta + default: response.reasoning_text.delta title: Type type: string - model: - title: Model - type: string - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: - anyOf: - - $ref: '#/components/schemas/SystemMessage' - title: SystemMessage - - type: 'null' - nullable: true - title: SystemMessage required: - - model - - sampling_params - title: ModelCandidate + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta type: object - SamplingParams: - description: Sampling parameters. + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. properties: - strategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - max_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - repetition_penalty: - anyOf: - - type: number - - type: 'null' - default: 1.0 - stop: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - title: SamplingParams + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done + title: Type + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone type: object - SystemMessage: - description: A system message providing instructions or context to the model. + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. properties: - role: - const: system - default: system - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.delta + default: response.refusal.delta + title: Type + type: string required: - - content - title: SystemMessage + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta type: object - BenchmarkConfig: - description: A benchmark configuration for evaluation. + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - scoring_params: - additionalProperties: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - description: Map between scoring function id and parameters for each scoring function you want to run - title: Scoring Params - type: object - num_examples: - anyOf: - - type: integer - - type: 'null' - description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - nullable: true + content_index: + title: Content Index + type: integer + refusal: + title: Refusal + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.done + default: response.refusal.done + title: Type + type: string required: - - eval_candidate - title: BenchmarkConfig + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone type: object - ScoringResult: - description: A scoring result for a single row. + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. properties: - score_rows: - items: - additionalProperties: true - type: object - title: Score Rows - type: array - aggregated_results: - additionalProperties: true - title: Aggregated Results - type: object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type + type: string required: - - score_rows - - aggregated_results - title: ScoringResult + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted type: object - EvaluateResponse: - description: The response from an evaluation. + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. properties: - generations: - items: - additionalProperties: true - type: object - title: Generations - type: array - scores: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Scores - type: object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress + title: Type + type: string required: - - generations - - scores - title: EvaluateResponse + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress 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) + OpenAIResponseObjectStreamResponseWebSearchCallSearching: properties: - anchor: - const: created_at - title: Anchor + item_id: + title: Item Id type: string - seconds: - maximum: 2592000 - minimum: 3600 - title: Seconds + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number type: integer + type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type + type: string required: - - anchor - - seconds - title: ExpiresAfter + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching type: object - OpenAIFileObject: - description: OpenAI File object as defined in the OpenAI Files API. + OpenAIDeleteResponseObject: + description: Response object confirming deletion of an OpenAI response. 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 + object: + const: response + default: response + title: Object type: string - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' + deleted: + default: true + title: Deleted + type: boolean required: - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject + title: OpenAIDeleteResponseObject type: object - OpenAIFilePurpose: - description: Valid purpose values for OpenAI Files API. - enum: - - assistants - - batch - title: OpenAIFilePurpose - type: string - ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. properties: data: items: - $ref: '#/components/schemas/OpenAIFileObject' + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage 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 @@ -6172,1017 +5188,1677 @@ components: type: string required: - data - - has_more - - first_id - - last_id - title: ListOpenAIFileResponse + title: ListOpenAIResponseInputItem type: object - OpenAIFileDeleteResponse: - description: Response for deleting a file in OpenAI Files API. + RunShieldResponse: + description: Response from running a safety shield. properties: - id: - title: Id - type: string - object: - const: file - default: file - title: Object - type: string - deleted: - title: Deleted - type: boolean + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation + - type: 'null' + nullable: true + title: SafetyViolation + title: RunShieldResponse + type: object + SafetyViolation: + description: Details of a safety violation detected by content moderation. + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - id - - deleted - title: OpenAIFileDeleteResponse + - violation_level + title: SafetyViolation type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). + ViolationLevel: + description: Severity level of a safety violation. + enum: + - info + - warn + - error + title: ViolationLevel + type: string + AggregationFunctionType: + description: Types of aggregation functions for scoring results. + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + type: string + ArrayType: + description: Parameter type for array values. properties: type: - const: bf16 - default: bf16 + const: array + default: array title: Type type: string - title: Bf16QuantizationConfig + title: ArrayType type: object - EmbeddingsResponse: - description: Response containing generated embeddings. + BasicScoringFnParams: + description: Parameters for basic scoring function configuration. properties: - embeddings: + type: + const: basic + default: basic + title: Type + type: string + aggregation_functions: + description: Aggregation functions to apply to the scores of each row items: - items: - type: number - type: array - title: Embeddings + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions type: array - required: - - embeddings - title: EmbeddingsResponse + title: BasicScoringFnParams type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. + BooleanType: + description: Parameter type for boolean values. properties: type: - const: fp8_mixed - default: fp8_mixed + const: boolean + default: boolean title: Type type: string - title: Fp8QuantizationConfig + title: BooleanType type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. + ChatCompletionInputType: + description: Parameter type for chat completion input. properties: type: - const: int4_mixed - default: int4_mixed + const: chat_completion_input + default: chat_completion_input title: Type type: string - scheme: - anyOf: - - type: string - - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig + title: ChatCompletionInputType type: object - OpenAIChatCompletionUsage: - description: Usage information for OpenAI chat completion. + CompletionInputType: + description: Parameter type for completion input. 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: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' - title: OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - completion_tokens_details: + type: + const: completion_input + default: completion_input + title: Type + type: string + title: CompletionInputType + type: object + JsonType: + description: Parameter type for JSON values. + properties: + type: + const: json + default: json + title: Type + type: string + title: JsonType + type: object + LLMAsJudgeScoringFnParams: + description: Parameters for LLM-as-judge scoring function configuration. + properties: + type: + const: llm_as_judge + default: llm_as_judge + title: Type + type: string + judge_model: + title: Judge Model + type: string + prompt_template: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' - title: OpenAIChatCompletionUsageCompletionTokensDetails + - type: string - type: 'null' nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage + - judge_model + title: LLMAsJudgeScoringFnParams + type: object + NumberType: + description: Parameter type for numeric values. + properties: + type: + const: number + default: number + title: Type + type: string + title: NumberType + type: object + ObjectType: + description: Parameter type for object values. + properties: + type: + const: object + default: object + title: Type + type: string + title: ObjectType + type: object + RegexParserScoringFnParams: + description: Parameters for regex parser scoring function configuration. + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array + title: RegexParserScoringFnParams type: object - OpenAIChatCompletionUsageCompletionTokensDetails: - description: Token details for output tokens in OpenAI chat completion usage. + ScoringFn: + description: A scoring function resource for evaluating model outputs. properties: - reasoning_tokens: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier + type: string + provider_resource_id: anyOf: - - type: integer + - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object - OpenAIChatCompletionUsagePromptTokensDetails: - description: Token details for prompt tokens in OpenAI chat completion usage. - properties: - cached_tokens: + 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: integer + - type: string - type: 'null' nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - properties: - message: + 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: - assistant: '#/components/schemas/OpenAIAssistantMessageParam' - developer: '#/components/schemas/OpenAIDeveloperMessageParam' - system: '#/components/schemas/OpenAISystemMessageParam' - tool: '#/components/schemas/OpenAIToolMessageParam' - user: '#/components/schemas/OpenAIUserMessageParam' - propertyName: role + 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/OpenAIUserMessageParam' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + - $ref: '#/components/schemas/StringType' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + params: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + title: Params nullable: true - title: OpenAIChoiceLogprobs required: - - message - - finish_reason - - index - title: OpenAIChoice + - identifier + - provider_id + - return_type + title: ScoringFn type: object - OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + StringType: + description: Parameter type for string values. properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - nullable: true - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - nullable: true - title: OpenAIChoiceLogprobs + type: + const: string + default: string + title: Type + type: string + title: StringType type: object - OpenAICompletionWithInputMessages: + UnionType: + description: Parameter type for union values. properties: - id: - title: Id + type: + const: union + default: union + title: Type type: string - choices: + title: UnionType + type: object + ListScoringFunctionsResponse: + properties: + data: items: - $ref: '#/components/schemas/OpenAIChoice' - title: Choices + $ref: '#/components/schemas/ScoringFn' + title: Data 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: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsage - input_messages: + required: + - data + title: ListScoringFunctionsResponse + type: object + ScoreResponse: + description: The response from scoring. + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object + required: + - results + title: ScoreResponse + type: object + ScoringResult: + description: A scoring result for a single row. + properties: + score_rows: 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Input Messages + additionalProperties: true + type: object + title: Score Rows type: array + aggregated_results: + additionalProperties: true + title: Aggregated Results + type: object required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages + - score_rows + - aggregated_results + title: ScoringResult 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 + ScoreBatchResponse: + description: Response from batch scoring operations on datasets. properties: - token: - title: Token - type: string - bytes: + dataset_id: anyOf: - - items: - type: integer - type: array + - type: string - type: 'null' nullable: true - logprob: - title: Logprob - type: number - top_logprobs: - items: - $ref: '#/components/schemas/OpenAITopLogProb' - title: Top Logprobs - type: array + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object required: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb + - results + title: ScoreBatchResponse 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 + Shield: + description: A safety shield resource that can be used to check content. properties: - token: - title: Token + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - bytes: + provider_resource_id: anyOf: - - items: - type: integer - type: array + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string + type: + const: shield + default: shield + title: Type + type: string + params: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - logprob: - title: Logprob - type: number required: - - token - - logprob - title: OpenAITopLogProb + - identifier + - provider_id + title: Shield type: object - ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. + ListShieldsResponse: properties: data: items: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + $ref: '#/components/schemas/Shield' 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 + title: ListShieldsResponse type: object - OpenAIChatCompletion: - description: Response from an OpenAI-compatible chat completion request. + ImageContentItem: + description: A image content item properties: - id: - title: Id + type: + const: image + default: image + title: Type type: string - choices: - items: - $ref: '#/components/schemas/OpenAIChoice' - title: Choices - type: array - object: - const: chat.completion - default: chat.completion - title: Object + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + TextContentItem: + description: A text content item + properties: + type: + const: text + default: text + title: Type type: string - created: - title: Created - type: integer - model: - title: Model + text: + title: Text type: string - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsage required: - - id - - choices - - created - - model - title: OpenAIChatCompletion + - text + title: TextContentItem type: object - OpenAIChoiceDelta: - description: A delta from an OpenAI-compatible chat completion streaming response. + ToolInvocationResult: + description: Result of a tool invocation. properties: content: anyOf: - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true + error_message: + anyOf: + - type: string + - type: 'null' + nullable: true + error_code: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - refusal: + title: ToolInvocationResult + type: object + URL: + description: A URL reference to external content. + properties: + uri: + title: Uri + type: string + required: + - uri + title: URL + type: object + ToolDef: + description: Tool definition used in runtime contexts. + properties: + toolgroup_id: anyOf: - type: string - type: 'null' nullable: true - role: + name: + title: Name + type: string + description: anyOf: - type: string - type: 'null' nullable: true - tool_calls: + input_schema: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - reasoning_content: + output_schema: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceDelta - type: object - OpenAIChunkChoice: - description: A chunk choice from an OpenAI-compatible chat completion streaming response. - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + metadata: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceLogprobs required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice + - name + title: ToolDef type: object - OpenAIChatCompletionChunk: - description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + ListToolDefsResponse: + description: Response containing a list of tool definitions. properties: - id: - title: Id - type: string - choices: + data: items: - $ref: '#/components/schemas/OpenAIChunkChoice' - title: Choices + $ref: '#/components/schemas/ToolDef' + title: Data type: array - object: - const: chat.completion.chunk - default: chat.completion.chunk - title: Object - type: string - created: - title: Created - type: integer - model: - title: Model + required: + - data + title: ListToolDefsResponse + type: object + ToolGroup: + description: A group of related tools managed together. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - usage: + provider_resource_id: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage + - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true - title: OpenAIChatCompletionUsage - required: - - id - - choices - - created - - model - title: OpenAIChatCompletionChunk - type: object - OpenAIChatCompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible chat completion endpoint. - properties: - model: - title: Model + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - minItems: 1 - title: Messages - type: array - frequency_penalty: + type: + const: tool_group + default: tool_group + title: Type + type: string + mcp_endpoint: anyOf: - - type: number + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true - function_call: + title: URL + args: anyOf: - - type: string - additionalProperties: true type: object - type: 'null' - title: string | object nullable: true - functions: + required: + - identifier + - provider_id + title: ToolGroup + type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object + Chunk: + description: A chunk of content that can be inserted into a vector database. + properties: + content: anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: - additionalProperties: true - type: object + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - - type: 'null' - nullable: true - logit_bias: + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: anyOf: - - additionalProperties: + - items: type: number - type: object - - type: 'null' - nullable: true - logprobs: - anyOf: - - type: boolean - - type: 'null' - nullable: true - max_completion_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - max_tokens: - anyOf: - - type: integer + type: array - type: 'null' nullable: true - n: + chunk_metadata: anyOf: - - type: integer + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true - parallel_tool_calls: + title: ChunkMetadata + required: + - content + - chunk_id + 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. + properties: + chunk_id: anyOf: - - type: boolean + - type: string - type: 'null' nullable: true - presence_penalty: + document_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - response_format: + source: anyOf: - - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: string - type: 'null' - title: Response Format nullable: true - seed: + created_timestamp: anyOf: - type: integer - type: 'null' nullable: true - stop: + updated_timestamp: anyOf: - - type: string - - items: - type: string - type: array - title: list[string] + - type: integer - type: 'null' - title: string | list[string] nullable: true - stream: + chunk_window: anyOf: - - type: boolean + - type: string - type: 'null' nullable: true - stream_options: + chunk_tokenizer: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - temperature: + chunk_embedding_model: anyOf: - - type: number + - type: string - type: 'null' nullable: true - tool_choice: + chunk_embedding_dimension: anyOf: - - type: string - - additionalProperties: true - type: object + - type: integer - type: 'null' - title: string | object nullable: true - tools: + content_token_count: anyOf: - - items: - additionalProperties: true - type: object - type: array + - type: integer - type: 'null' nullable: true - top_logprobs: + metadata_token_count: anyOf: - type: integer - type: 'null' nullable: true - top_p: + title: ChunkMetadata + type: object + QueryChunksResponse: + description: Response from querying chunks in a vector database. + properties: + chunks: + items: + $ref: '#/components/schemas/Chunk' + title: Chunks + type: array + scores: + items: + type: number + title: Scores + type: array + required: + - chunks + - scores + title: QueryChunksResponse + type: object + VectorStoreFileCounts: + description: File processing status counts for a 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 + VectorStoreListResponse: + description: Response from listing vector stores. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - user: + last_id: anyOf: - type: string - type: 'null' nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody + - data + title: VectorStoreListResponse 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 + VectorStoreObject: + description: OpenAI Vector Store object. properties: - finish_reason: - title: Finish Reason + id: + title: Id type: string - text: - title: Text + object: + default: vector_store + title: Object type: string - index: - title: Index + created_at: + title: Created At type: integer - logprobs: + name: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - type: string - type: 'null' nullable: true - title: OpenAIChoiceLogprobs + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + default: completed + title: Status + type: string + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + expires_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + last_active_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - finish_reason - - text - - index - title: OpenAICompletionChoice + - id + - created_at + - file_counts + title: VectorStoreObject type: object - OpenAICompletion: - 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" + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + VectorStoreChunkingStrategyAuto: + description: Automatic chunking strategy for vector store files. properties: - id: - title: Id - type: string - choices: - items: - $ref: '#/components/schemas/OpenAICompletionChoice' - title: Choices - type: array - created: - title: Created - type: integer - model: - title: Model + type: + const: auto + default: auto + title: Type type: string - object: - const: text_completion - default: text_completion - title: Object + title: VectorStoreChunkingStrategyAuto + type: object + VectorStoreChunkingStrategyStatic: + description: Static chunking strategy with configurable parameters. + properties: + type: + const: static + default: static + title: Type type: string + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' required: - - id - - choices - - created - - model - title: OpenAICompletion + - static + title: VectorStoreChunkingStrategyStatic type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens + VectorStoreChunkingStrategyStaticConfig: + description: Configuration for static chunking strategy. properties: - text_offset: - anyOf: - - items: - type: integer - type: array - - type: 'null' - nullable: true - token_logprobs: + 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 + OpenAICreateVectorStoreRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store with extra_body support. + properties: + name: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - tokens: + file_ids: anyOf: - items: type: string type: array - type: 'null' nullable: true - top_logprobs: + expires_after: anyOf: - - items: - additionalProperties: - type: number - type: object - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAICompletionLogprobs - type: object - OpenAICompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible completion endpoint. - properties: - model: - title: Model - type: string - prompt: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - items: - type: integer - type: array - title: list[integer] - - items: - items: - type: integer - type: array - type: array - title: list[array] - title: string | ... (4 variants) - best_of: + chunking_strategy: anyOf: - - type: integer + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' + title: Chunking Strategy nullable: true - echo: + metadata: anyOf: - - type: boolean + - additionalProperties: true + type: object - type: 'null' nullable: true - frequency_penalty: + title: OpenAICreateVectorStoreRequestWithExtraBody + type: object + VectorStoreDeleteResponse: + description: Response from deleting a vector store. + 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 + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store file batch with extra_body support. + properties: + file_ids: + items: + type: string + title: File Ids + type: array + attributes: anyOf: - - type: number + - additionalProperties: true + type: object - type: 'null' nullable: true - logit_bias: + chunking_strategy: anyOf: - - additionalProperties: - type: number - type: object + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' + title: Chunking Strategy nullable: true - logprobs: + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + type: object + VectorStoreFileBatchObject: + description: OpenAI Vector Store File Batch object. + 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: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + required: + - id + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + type: object + VectorStoreFileStatus: + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + VectorStoreFileLastError: + description: Error information for failed vector store file processing. + properties: + code: + title: Code + type: string + enum: + - server_error + - rate_limit_exceeded + default: server_error + message: + title: Message + type: string + required: + - code + - message + title: VectorStoreFileLastError + type: object + VectorStoreFileObject: + description: OpenAI Vector Store File object. + 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: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + created_at: + title: Created At + type: integer + last_error: anyOf: - - type: boolean + - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' nullable: true - max_tokens: + title: VectorStoreFileLastError + status: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + 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 + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - n: + last_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - presence_penalty: + 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. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - seed: + last_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - stop: + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListFilesResponse + type: object + VectorStoreFileDeleteResponse: + description: Response from deleting a vector store file. + 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 + VectorStoreContent: + description: Content item from a vector store file or search result. + properties: + type: + const: text + title: Type + type: string + text: + title: Text + type: string + embedding: anyOf: - - type: string - items: - type: string + type: number type: array - title: list[string] - type: 'null' - title: string | list[string] nullable: true - stream: + chunk_metadata: anyOf: - - type: boolean + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true - stream_options: + title: ChunkMetadata + metadata: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - temperature: + required: + - type + - text + title: VectorStoreContent + type: object + VectorStoreFileContentResponse: + description: Represents the parsed content of a vector store file. + properties: + object: + const: vector_store.file_content.page + default: vector_store.file_content.page + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: anyOf: - - type: number + - type: string - type: 'null' nullable: true - top_p: + required: + - data + title: VectorStoreFileContentResponse + type: object + VectorStoreSearchResponse: + description: Response from searching a vector store. + properties: + file_id: + title: File Id + type: string + filename: + title: Filename + type: string + score: + title: Score + type: number + attributes: anyOf: - - type: number + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + title: string | number | boolean + type: object - type: 'null' nullable: true - user: + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Content + type: array + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + type: object + VectorStoreSearchResponsePage: + description: Paginated response from searching a vector store. + properties: + object: + default: vector_store.search_results.page + title: Object + type: string + search_query: + items: + type: string + title: Search Query + type: array + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: anyOf: - type: string - type: 'null' nullable: true - suffix: + required: + - search_query + - data + title: VectorStoreSearchResponsePage + type: object + VersionInfo: + description: Version information for the service. + properties: + version: + title: Version + type: string + required: + - version + title: VersionInfo + type: object + PaginatedResponse: + description: A generic paginated response that follows a simple format. + properties: + data: + items: + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - data + - has_more + title: PaginatedResponse + type: object + Dataset: + description: Dataset resource for storing and accessing training or evaluation data. + 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 nullable: true + 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: '#/components/schemas/DatasetPurpose' + source: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + metadata: + additionalProperties: true + description: Any additional metadata for this dataset + title: Metadata + type: object required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody + - identifier + - provider_id + - purpose + - source + title: Dataset type: object - OpenAIEmbeddingData: - description: A single embedding data object from an OpenAI-compatible embeddings response. + RowsDataSource: + description: A dataset stored in rows. properties: - object: - const: embedding - default: embedding - title: Object + type: + const: rows + default: rows + title: Type type: string - embedding: - anyOf: - - items: - type: number - type: array - title: list[number] - - type: string - title: list[number] | string - index: - title: Index - type: integer + rows: + items: + additionalProperties: true + type: object + title: Rows + type: array required: - - embedding - - index - title: OpenAIEmbeddingData + - rows + title: RowsDataSource type: object - OpenAIEmbeddingUsage: - description: Usage information for an OpenAI-compatible embeddings response. + URIDataSource: + description: A dataset that can be obtained from a URI. properties: - prompt_tokens: - title: Prompt Tokens - type: integer - total_tokens: - title: Total Tokens - type: integer + type: + const: uri + default: uri + title: Type + type: string + uri: + title: Uri + type: string required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage + - uri + title: URIDataSource type: object - OpenAIEmbeddingsRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible embeddings endpoint. + ListDatasetsResponse: + description: Response from listing datasets. properties: - model: - title: Model + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object + Benchmark: + description: A benchmark resource for evaluating model performance. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - encoding_format: - anyOf: - - type: string - - type: 'null' - default: float - dimensions: - anyOf: - - type: integer - - type: 'null' - nullable: true - user: + provider_resource_id: anyOf: - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true + 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: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark type: object - OpenAIEmbeddingsResponse: - description: Response from an OpenAI-compatible embeddings request. + ListBenchmarksResponse: properties: - object: - const: list - default: list - title: Object - type: string data: items: - $ref: '#/components/schemas/OpenAIEmbeddingData' + $ref: '#/components/schemas/Benchmark' title: Data type: array - model: - title: Model - type: string - usage: - $ref: '#/components/schemas/OpenAIEmbeddingUsage' required: - data - - model - - usage - title: OpenAIEmbeddingsResponse + title: ListBenchmarksResponse type: object - RerankData: - description: A single rerank result from a reranking response. + BenchmarkConfig: + description: A benchmark configuration for evaluation. properties: - index: - title: Index - type: integer - relevance_score: - title: Relevance Score - type: number + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + description: Map between scoring function id and parameters for each scoring function you want to run + title: Scoring Params + type: object + num_examples: + anyOf: + - type: integer + - type: 'null' + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + nullable: true required: - - index - - relevance_score - title: RerankData + - eval_candidate + title: BenchmarkConfig type: object - RerankResponse: - description: Response from a reranking request. + GreedySamplingStrategy: + description: Greedy sampling strategy that selects the highest probability token at each step. properties: - data: - items: - $ref: '#/components/schemas/RerankData' - title: Data - type: array + type: + const: greedy + default: greedy + title: Type + type: string + title: GreedySamplingStrategy + type: object + ModelCandidate: + description: A model candidate for evaluation. + properties: + type: + const: model + default: model + title: Type + type: string + model: + title: Model + type: string + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage + - type: 'null' + nullable: true + title: SystemMessage required: - - data - title: RerankResponse + - model + - sampling_params + title: ModelCandidate type: object - TokenLogProbs: - description: Log probabilities for generated tokens. + SamplingParams: + description: Sampling parameters. properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs + strategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + repetition_penalty: + anyOf: + - type: number + - type: 'null' + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + title: SamplingParams type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. + SystemMessage: + description: A system message providing instructions or context to the model. properties: role: - const: tool - default: tool + const: system + default: system title: Role type: string - call_id: - title: Call Id - type: string content: anyOf: - type: string @@ -7213,195 +6889,229 @@ components: title: list[ImageContentItem | TextContentItem] title: string | list[ImageContentItem | TextContentItem] required: - - call_id - content - title: ToolResponseMessage + title: SystemMessage type: object - UserMessage: - description: A message from the user in a chat conversation. + TopKSamplingStrategy: + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. properties: - role: - const: user - default: user - title: Role + type: + const: top_k + default: top_k + title: Type type: string - content: + 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. + properties: + type: + const: top_p + default: top_p + title: Type + type: string + temperature: anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: + - type: number + minimum: 0.0 + - type: 'null' + top_p: anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] + - type: number - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true + default: 0.95 required: - - content - title: UserMessage + - temperature + title: TopPSamplingStrategy type: object - HealthStatus: - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - type: string - HealthInfo: - description: Health status information for the service. + EvaluateResponse: + description: The response from an evaluation. + properties: + generations: + items: + additionalProperties: true + type: object + title: Generations + type: array + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Scores + type: object + required: + - generations + - scores + title: EvaluateResponse + type: object + Job: + description: A job execution instance with status tracking. properties: + job_id: + title: Job Id + type: string status: - $ref: '#/components/schemas/HealthStatus' + $ref: '#/components/schemas/JobStatus' required: + - job_id - status - title: HealthInfo + title: Job type: object - RouteInfo: - description: Information about an API route including its path, method, and implementing providers. + RerankData: + description: A single rerank result from a reranking response. properties: - route: - title: Route - type: string - method: - title: Method - type: string - provider_types: + index: + title: Index + type: integer + relevance_score: + title: Relevance Score + type: number + required: + - index + - relevance_score + title: RerankData + type: object + RerankResponse: + description: Response from a reranking request. + properties: + data: items: - type: string - title: Provider Types + $ref: '#/components/schemas/RerankData' + title: Data type: array required: - - route - - method - - provider_types - title: RouteInfo + - data + title: RerankResponse + type: object + Checkpoint: + description: Checkpoint created during training runs. + 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: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric + - type: 'null' + nullable: true + title: PostTrainingMetric + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint type: object - ListRoutesResponse: - description: Response containing a list of all available API routes. + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. properties: - data: + job_uuid: + title: Job Uuid + type: string + checkpoints: items: - $ref: '#/components/schemas/RouteInfo' - title: Data + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints type: array required: - - data - title: ListRoutesResponse + - job_uuid + title: PostTrainingJobArtifactsResponse type: object - VersionInfo: - description: Version information for the service. + PostTrainingMetric: + description: Training metrics captured during post-training jobs. properties: - version: - title: Version - type: string + 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: - - version - title: VersionInfo + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric type: object - OpenAIModel: - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata + PostTrainingJobStatusResponse: + description: Status of a finetuning job. properties: - id: - title: Id - type: string - object: - const: model - default: model - title: Object - type: string - created: - title: Created - type: integer - owned_by: - title: Owned By + job_uuid: + title: Job Uuid type: string - custom_metadata: + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + started_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + completed_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - id - - created - - owned_by - title: OpenAIModel + - job_uuid + - status + title: PostTrainingJobStatusResponse type: object - OpenAIListModelsResponse: + ListPostTrainingJobsResponse: properties: data: items: - $ref: '#/components/schemas/OpenAIModel' + $ref: '#/components/schemas/PostTrainingJob' title: Data type: array required: - data - title: OpenAIListModelsResponse + title: ListPostTrainingJobsResponse type: object - DPOLossType: - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - type: string DPOAlignmentConfig: description: Configuration for Direct Preference Optimization (DPO) alignment. properties: @@ -7415,12 +7125,13 @@ components: - beta title: DPOAlignmentConfig type: object - DatasetFormat: - description: Format of the training dataset. + DPOLossType: enum: - - instruct - - dialog - title: DatasetFormat + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType type: string DataConfig: description: Configuration for training data and data loading. @@ -7438,1280 +7149,1635 @@ components: $ref: '#/components/schemas/DatasetFormat' validation_dataset_id: anyOf: - - type: string + - type: string + - type: 'null' + nullable: true + packed: + anyOf: + - type: boolean + - type: 'null' + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + default: false + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + type: object + DatasetFormat: + description: Format of the training dataset. + enum: + - instruct + - dialog + title: DatasetFormat + type: string + EfficiencyConfig: + description: Configuration for memory and compute efficiency optimizations. + properties: + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + default: false + title: EfficiencyConfig + type: object + OptimizerConfig: + description: Configuration parameters for the optimization algorithm. + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + lr: + title: Lr + type: number + weight_decay: + title: Weight Decay + type: number + num_warmup_steps: + title: Num Warmup Steps + type: integer + required: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + type: object + OptimizerType: + description: Available optimizer algorithms for training. + enum: + - adam + - adamw + - sgd + title: OptimizerType + type: string + TrainingConfig: + description: Comprehensive configuration for the training process. + properties: + n_epochs: + title: N Epochs + type: integer + max_steps_per_epoch: + default: 1 + title: Max Steps Per Epoch + type: integer + gradient_accumulation_steps: + default: 1 + title: Gradient Accumulation Steps + type: integer + max_validation_steps: + anyOf: + - type: integer + - type: 'null' + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + title: DataConfig + - type: 'null' + nullable: true + title: DataConfig + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig - type: 'null' nullable: true - packed: + title: OptimizerConfig + efficiency_config: anyOf: - - type: boolean + - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig - type: 'null' - default: false - train_on_input: + nullable: true + title: EfficiencyConfig + dtype: anyOf: - - type: boolean + - type: string - type: 'null' - default: false + default: bf16 required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig + - n_epochs + title: TrainingConfig type: object - EfficiencyConfig: - description: Configuration for memory and compute efficiency optimizations. + PostTrainingJob: properties: - enable_activation_checkpointing: - anyOf: - - type: boolean - - type: 'null' - default: false - enable_activation_offloading: - anyOf: - - type: boolean - - type: 'null' - default: false - memory_efficient_fsdp_wrap: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + LoraFinetuningConfig: + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + properties: + type: + const: LoRA + default: LoRA + title: Type + type: string + lora_attn_modules: + items: + type: string + title: Lora Attn Modules + type: array + apply_lora_to_mlp: + title: Apply Lora To Mlp + type: boolean + apply_lora_to_output: + title: Apply Lora To Output + type: boolean + rank: + title: Rank + type: integer + alpha: + title: Alpha + type: integer + use_dora: anyOf: - type: boolean - type: 'null' default: false - fsdp_cpu_offload: + quantize_base: anyOf: - type: boolean - type: 'null' default: false - title: EfficiencyConfig + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig type: object - PostTrainingJob: + QATFinetuningConfig: + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: - job_uuid: - title: Job Uuid + type: + const: QAT + default: QAT + title: Type + type: string + quantizer_name: + title: Quantizer Name type: string + group_size: + title: Group Size + type: integer required: - - job_uuid - title: PostTrainingJob + - quantizer_name + - group_size + title: QATFinetuningConfig type: object - ListPostTrainingJobsResponse: + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + _URLOrData: + description: A URL or a base64 encoded string properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL data: - items: - $ref: '#/components/schemas/PostTrainingJob' - title: Data - type: array + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + nullable: true + title: _URLOrData + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object required: - - data - title: ListPostTrainingJobsResponse + - bnf + title: GrammarResponseFormat type: object - OptimizerType: - description: Available optimizer algorithms for training. - enum: - - adam - - adamw - - sgd - title: OptimizerType - type: string - OptimizerConfig: - description: Configuration parameters for the optimization algorithm. + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. properties: - optimizer_type: - $ref: '#/components/schemas/OptimizerType' - lr: - title: Lr - type: number - weight_decay: - title: Weight Decay - type: number - num_warmup_steps: - title: Num Warmup Steps - type: integer + type: + const: json_schema + default: json_schema + title: Type + type: string + json_schema: + additionalProperties: true + title: Json Schema + type: object required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig + - json_schema + title: JsonSchemaResponseFormat type: object - PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + MCPListToolsTool: + description: Tool definition returned by MCP list tools operation. properties: - job_uuid: - title: Job Uuid + input_schema: + additionalProperties: true + title: Input Schema + type: object + name: + title: Name type: string - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array + description: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - job_uuid - title: PostTrainingJobArtifactsResponse + - input_schema + - name + title: MCPListToolsTool type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. + OpenAIResponseOutputMessageFileSearchToolCallResults: + description: Search results returned by the file search operation. properties: - job_uuid: - title: Job Uuid + 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 - log_lines: - items: - type: string - title: Log Lines - type: array required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream + - attributes + - file_id + - filename + - score + - text + title: OpenAIResponseOutputMessageFileSearchToolCallResults type: object - PostTrainingJobStatusResponse: - description: Status of a finetuning job. + AllowedToolsFilter: + description: Filter configuration for restricting which MCP tools can be used. properties: - job_uuid: - title: Job Uuid - type: string - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - format: date-time - type: string - - type: 'null' - nullable: true - started_at: + tool_names: anyOf: - - format: date-time - type: string + - items: + type: string + type: array - type: 'null' nullable: true - completed_at: + title: AllowedToolsFilter + type: object + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. + properties: + always: anyOf: - - format: date-time - type: string + - items: + type: string + type: array - type: 'null' nullable: true - resources_allocated: + never: anyOf: - - additionalProperties: true - type: object + - items: + type: string + type: array - type: 'null' nullable: true - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse + title: ApprovalFilter type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - TrainingConfig: - description: Comprehensive configuration for the training process. + SearchRankingOptions: + description: Options for ranking and filtering search results. properties: - n_epochs: - title: N Epochs - type: integer - max_steps_per_epoch: - default: 1 - title: Max Steps Per Epoch - type: integer - gradient_accumulation_steps: - default: 1 - title: Gradient Accumulation Steps - type: integer - max_validation_steps: + ranker: anyOf: - - type: integer + - type: string - type: 'null' - default: 1 - data_config: + nullable: true + score_threshold: anyOf: - - $ref: '#/components/schemas/DataConfig' - title: DataConfig + - type: number - type: 'null' - nullable: true - title: DataConfig - optimizer_config: + default: 0.0 + title: SearchRankingOptions + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + OpenAIResponseTextFormat: + description: Configuration for Responses API text format. + properties: + type: + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text + name: anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - title: OptimizerConfig + - type: string - type: 'null' - nullable: true - title: OptimizerConfig - efficiency_config: + schema: anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - title: EfficiencyConfig + - additionalProperties: true + type: object - type: 'null' - nullable: true - title: EfficiencyConfig - dtype: + description: anyOf: - type: string - type: 'null' - default: bf16 - required: - - n_epochs - title: TrainingConfig - type: object - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. - properties: - job_uuid: - title: Job Uuid - type: string - finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id - type: string - validation_dataset_id: - title: Validation Dataset Id - type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - title: Hyperparam Search Config - type: object - logger_config: - additionalProperties: true - title: Logger Config - type: object - required: - - job_uuid - - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - - algorithm_config - - optimizer_config - - training_config - - hyperparam_search_config - - logger_config - title: PostTrainingRLHFRequest + strict: + anyOf: + - type: boolean + - type: 'null' + title: OpenAIResponseTextFormat type: object - Prompt: - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. + OpenAIResponseUsageInputTokensDetails: + description: Token details for input tokens in OpenAI response usage. properties: - prompt: + cached_tokens: anyOf: - - type: string + - type: integer - type: 'null' - description: The system prompt with variable placeholders nullable: true - version: - description: Version (integer starting at 1, incremented on save) - minimum: 1 - title: Version - type: integer - prompt_id: - description: Unique identifier in format 'pmpt_<48-digit-hash>' - title: Prompt Id - type: string - variables: - description: List of variable names that can be used in the prompt template - items: - type: string - title: Variables - type: array - is_default: - default: false - description: Boolean indicating whether this version is the default version - title: Is Default - type: boolean - required: - - version - - prompt_id - title: Prompt + title: OpenAIResponseUsageInputTokensDetails type: object - ListPromptsResponse: - description: Response model to list prompts. + OpenAIResponseUsageOutputTokensDetails: + description: Token details for output tokens in OpenAI response usage. properties: - data: - items: - $ref: '#/components/schemas/Prompt' - title: Data - type: array - required: - - data - title: ListPromptsResponse + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIResponseUsageOutputTokensDetails type: object - ProviderInfo: - description: Information about a registered provider including its configuration and health status. + SpanEndPayload: + description: Payload for a span end event. properties: - api: - title: Api - type: string - provider_id: - title: Provider Id - type: string - provider_type: - title: Provider Type + type: + const: span_end + default: span_end + title: Type type: string - config: - additionalProperties: true - title: Config - type: object - health: - additionalProperties: true - title: Health - type: object + status: + $ref: '#/components/schemas/SpanStatus' required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo + - status + title: SpanEndPayload type: object - ListProvidersResponse: - description: Response containing a list of all available providers. + SpanStartPayload: + description: Payload for a span start event. properties: - data: - items: - $ref: '#/components/schemas/ProviderInfo' - title: Data - type: array + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - data - title: ListProvidersResponse + - name + title: SpanStartPayload type: object - ModerationObjectResults: - description: A moderation object. + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: - flagged: - title: Flagged - type: boolean - categories: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - type: boolean + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - category_applied_input_types: + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - items: - type: string - type: array + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - category_scores: + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - type: number + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - user_message: - anyOf: - - type: string - - type: 'null' - nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - flagged - title: ModerationObjectResults - type: object - ModerationObject: - description: A moderation object. - properties: - id: - title: Id + type: + const: unstructured_log + default: unstructured_log + title: Type type: string - model: - title: Model + message: + title: Message type: string - results: - items: - $ref: '#/components/schemas/ModerationObjectResults' - title: Results - type: array + severity: + $ref: '#/components/schemas/LogSeverity' required: - - id - - model - - results - title: ModerationObject + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent type: object - SafetyViolation: - description: Details of a safety violation detected by content moderation. + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + BatchError: + additionalProperties: true properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - user_message: + code: anyOf: - type: string - type: 'null' nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - violation_level - title: SafetyViolation - type: object - ViolationLevel: - description: Severity level of a safety violation. - enum: - - info - - warn - - error - title: ViolationLevel - type: string - RunShieldResponse: - description: Response from running a safety shield. - properties: - violation: + line: anyOf: - - $ref: '#/components/schemas/SafetyViolation' - title: SafetyViolation + - type: integer - type: 'null' nullable: true - title: SafetyViolation - title: RunShieldResponse - type: object - ScoreBatchResponse: - description: Response from batch scoring operations on datasets. - properties: - dataset_id: + message: anyOf: - type: string - type: 'null' nullable: true - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Results - type: object - required: - - results - title: ScoreBatchResponse + param: + anyOf: + - type: string + - type: 'null' + nullable: true + title: BatchError type: object - ScoreResponse: - description: The response from scoring. + BatchRequestCounts: + additionalProperties: true properties: - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Results - type: object + completed: + title: Completed + type: integer + failed: + title: Failed + type: integer + total: + title: Total + type: integer required: - - results - title: ScoreResponse + - completed + - failed + - total + title: BatchRequestCounts type: object - ListScoringFunctionsResponse: + BatchUsage: + additionalProperties: true properties: - data: - items: - $ref: '#/components/schemas/ScoringFn' - title: Data - type: array + input_tokens: + title: Input Tokens + type: integer + input_tokens_details: + $ref: '#/components/schemas/InputTokensDetails' + output_tokens: + title: Output Tokens + type: integer + output_tokens_details: + $ref: '#/components/schemas/OutputTokensDetails' + total_tokens: + title: Total Tokens + type: integer required: - - data - title: ListScoringFunctionsResponse + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage type: object - ListShieldsResponse: + Errors: + additionalProperties: true properties: data: - items: - $ref: '#/components/schemas/Shield' - title: Data - type: array - required: - - data - title: ListShieldsResponse - type: object - ToolDef: - description: Tool definition used in runtime contexts. - properties: - toolgroup_id: anyOf: - - type: string + - items: + $ref: '#/components/schemas/BatchError' + type: array - type: 'null' nullable: true - name: - title: Name - type: string - description: + object: anyOf: - type: string - type: 'null' nullable: true - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true + title: Errors + type: object + InputTokensDetails: + additionalProperties: true + properties: + cached_tokens: + title: Cached Tokens + type: integer required: - - name - title: ToolDef + - cached_tokens + title: InputTokensDetails type: object - ListToolDefsResponse: - description: Response containing a list of tool definitions. + OutputTokensDetails: + additionalProperties: true properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - title: Data - type: array + reasoning_tokens: + title: Reasoning Tokens + type: integer + required: + - reasoning_tokens + title: OutputTokensDetails + type: object + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string required: - - data - title: ListToolDefsResponse + - image + title: ImageDelta type: object - ListToolGroupsResponse: - description: Response containing a list of tool groups. + TextDelta: + description: A text content delta for streaming responses. properties: - data: - items: - $ref: '#/components/schemas/ToolGroup' - title: Data - type: array + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string required: - - data - title: ListToolGroupsResponse + - text + title: TextDelta type: object - ToolGroupInput: - description: Input data for registering a tool group. + JobStatus: + description: Status of a job execution. + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + type: string + MetricInResponse: + description: A metric value included in API responses. properties: - toolgroup_id: - title: Toolgroup Id - type: string - provider_id: - title: Provider Id + metric: + title: Metric type: string - args: + value: anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: + - type: integer + - type: number + title: integer | number + unit: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string - type: 'null' nullable: true - title: URL required: - - toolgroup_id - - provider_id - title: ToolGroupInput + - metric + - value + title: MetricInResponse type: object - ToolInvocationResult: - description: Result of a tool invocation. + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: - content: - anyOf: - - type: string - - discriminator: + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true - error_message: - anyOf: - - type: string - - type: 'null' - nullable: true - error_code: - anyOf: - - type: integer - - type: 'null' - nullable: true - metadata: - anyOf: - - additionalProperties: true + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array + required: + - items + title: ConversationItemCreateRequest + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true type: object - - type: 'null' - nullable: true - title: ToolInvocationResult + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage 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. + DatasetPurpose: + description: Purpose of the dataset. Each purpose has a required input data schema. + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + title: DatasetPurpose + type: string + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + InlineProviderSpec: properties: - chunk_id: - anyOf: - - type: string - - type: 'null' - nullable: true - document_id: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - source: + deprecation_error: anyOf: - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - created_timestamp: - anyOf: - - type: integer - - type: 'null' - nullable: true - updated_timestamp: - anyOf: - - type: integer - - type: 'null' - nullable: true - chunk_window: + module: anyOf: - type: string - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - chunk_tokenizer: + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - type: string - type: 'null' nullable: true - chunk_embedding_model: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: anyOf: - type: string - type: 'null' + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. nullable: true - chunk_embedding_dimension: - anyOf: - - type: integer - - type: 'null' - nullable: true - content_token_count: - anyOf: - - type: integer - - type: 'null' - nullable: true - metadata_token_count: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: ChunkMetadata - type: object - Chunk: - description: A chunk of content that can be inserted into a vector database. - properties: - content: + description: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id - type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. nullable: true - title: ChunkMetadata required: - - content - - chunk_id - title: Chunk + - api + - provider_type + - config_class + title: InlineProviderSpec type: object - OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store file batch with extra_body support. + ProviderSpec: properties: - file_ids: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality items: - type: string - title: File Ids + $ref: '#/components/schemas/Api' + title: Api Dependencies type: array - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - chunking_strategy: - anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - nullable: true - required: - - file_ids - title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - type: object - OpenAICreateVectorStoreRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store with extra_body support. - properties: - name: + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - file_ids: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - expires_after: + deprecation_error: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - chunking_strategy: + module: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: string - type: 'null' - title: Chunking Strategy + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - metadata: + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - title: OpenAICreateVectorStoreRequestWithExtraBody - type: object - QueryChunksResponse: - description: Response from querying chunks in a vector database. - properties: - chunks: - items: - $ref: '#/components/schemas/Chunk' - title: Chunks - type: array - scores: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: items: - type: number - title: Scores + type: string + title: Deps type: array required: - - chunks - - scores - title: QueryChunksResponse + - api + - provider_type + - config_class + title: ProviderSpec type: object - VectorStoreContent: - description: Content item from a vector store file or search result. + RemoteProviderSpec: properties: - type: - const: text - title: Type + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - text: - title: Text + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class type: string - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - title: ChunkMetadata - metadata: + deprecation_error: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - required: - - type - - text - title: VectorStoreContent - type: object - VectorStoreCreateRequest: - description: Request to create a vector store. - properties: - name: + module: anyOf: - type: string - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - file_ids: + pip_packages: + description: The pip dependencies needed for this implementation items: type: string - title: File Ids + title: Pip Packages type: array - expires_after: + provider_data_validator: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - chunking_strategy: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type + type: string + description: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - title: VectorStoreCreateRequest + required: + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec type: object - VectorStoreDeleteResponse: - description: Response from deleting a vector store. + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). properties: - id: - title: Id - type: string - object: - default: vector_store.deleted - title: Object + type: + const: bf16 + default: bf16 + title: Type type: string - deleted: - default: true - title: Deleted - type: boolean - required: - - id - title: VectorStoreDeleteResponse + title: Bf16QuantizationConfig type: object - VectorStoreFileCounts: - description: File processing status counts for a vector store. + EmbeddingsResponse: + description: Response containing generated embeddings. 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 + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts + - embeddings + title: EmbeddingsResponse type: object - VectorStoreFileBatchObject: - description: OpenAI Vector Store File Batch object. + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. 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: - title: Status + type: + const: fp8_mixed + default: fp8_mixed + title: Type type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - required: - - id - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject + title: Fp8QuantizationConfig type: object - VectorStoreFileContentResponse: - description: Represents the parsed content of a vector store file. + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. properties: - object: - const: vector_store.file_content.page - default: vector_store.file_content.page - title: Object + type: + const: int4_mixed + default: int4_mixed + title: Type type: string - data: - items: - $ref: '#/components/schemas/VectorStoreContent' - title: Data - type: array - has_more: - default: false - title: Has More - type: boolean - next_page: + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig + type: object + OpenAIChatCompletionUsageCompletionTokensDetails: + description: Token details for output tokens in OpenAI chat completion usage. + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails + type: object + OpenAIChatCompletionUsagePromptTokensDetails: + description: Token details for prompt tokens in OpenAI chat completion usage. + properties: + cached_tokens: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - required: - - data - title: VectorStoreFileContentResponse + title: OpenAIChatCompletionUsagePromptTokensDetails type: object - VectorStoreFileDeleteResponse: - description: Response from deleting a vector store file. + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens 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 + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs type: object - VectorStoreFileLastError: - description: Error information for failed vector store file processing. + TokenLogProbs: + description: Log probabilities for generated tokens. properties: - code: - title: Code - type: string - enum: - - server_error - - rate_limit_exceeded - default: server_error - message: - title: Message - type: string + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object required: - - code - - message - title: VectorStoreFileLastError + - logprobs_by_token + title: TokenLogProbs type: object - VectorStoreFileObject: - description: OpenAI Vector Store File object. + ToolResponseMessage: + description: A message representing the result of a tool invocation. properties: - id: - title: Id + role: + const: tool + default: tool + title: Role type: string - object: - default: vector_store.file - title: Object + call_id: + title: Call Id type: string - attributes: - additionalProperties: true - title: Attributes - type: object - chunking_strategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - created_at: - title: Created At - type: integer - last_error: + content: anyOf: - - $ref: '#/components/schemas/VectorStoreFileLastError' - title: VectorStoreFileLastError - - type: 'null' - nullable: true - title: VectorStoreFileLastError - status: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - vector_store_id: - title: Vector Store Id - type: string + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - - id - - chunking_strategy - - created_at - - status - - vector_store_id - title: VectorStoreFileObject + - call_id + - content + title: ToolResponseMessage type: object - VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. + UserMessage: + description: A message from the user in a chat conversation. properties: - object: - default: list - title: Object + role: + const: user + default: user + title: Role type: string - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data - type: array - first_id: + content: anyOf: - type: string - - type: 'null' - nullable: true - last_id: + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: anyOf: - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] - type: 'null' + title: string | list[ImageContentItem | TextContentItem] nullable: true - has_more: - default: false - title: Has More - type: boolean required: - - data - title: VectorStoreFilesListInBatchResponse + - content + title: UserMessage type: object - VectorStoreListFilesResponse: - description: Response from listing files in a vector store. + HealthStatus: + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + type: string + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: - object: - default: list - title: Object + job_uuid: + title: Job Uuid type: string - data: + log_lines: items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data + type: string + title: Log Lines type: array - first_id: + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream + type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. + properties: + job_uuid: + title: Job Uuid + type: string + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id + type: string + provider_id: + title: Provider Id + type: string + args: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - last_id: + mcp_endpoint: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true - has_more: - default: false - title: Has More - type: boolean + title: URL required: - - data - title: VectorStoreListFilesResponse + - toolgroup_id + - provider_id + title: ToolGroupInput type: object - VectorStoreObject: - description: OpenAI Vector Store object. + VectorStoreCreateRequest: + description: Request to create a 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' nullable: true - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - status: - default: completed - title: Status - type: string + file_ids: + items: + type: string + title: File Ids + type: array expires_after: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - expires_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - last_active_at: + chunking_strategy: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' nullable: true metadata: additionalProperties: true title: Metadata type: object - required: - - id - - created_at - - file_counts - title: VectorStoreObject - type: object - VectorStoreListResponse: - description: Response from listing vector stores. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - nullable: true - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListResponse + title: VectorStoreCreateRequest type: object VectorStoreModifyRequest: description: Request to modify a vector store. @@ -8770,69 +8836,3 @@ components: - query title: VectorStoreSearchRequest type: object - VectorStoreSearchResponse: - description: Response from searching a vector store. - 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 - title: string | number | boolean - type: object - - type: 'null' - nullable: true - content: - items: - $ref: '#/components/schemas/VectorStoreContent' - title: Content - type: array - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - type: object - VectorStoreSearchResponsePage: - description: Paginated response from searching a vector store. - properties: - object: - default: vector_store.search_results.page - title: Object - type: string - search_query: - items: - type: string - title: Search Query - type: array - data: - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - title: Data - type: array - has_more: - default: false - title: Has More - type: boolean - next_page: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - search_query - - data - title: VectorStoreSearchResponsePage - type: object diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index d8a2d876e0..f1aae937fc 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -13,12 +13,12 @@ info: servers: - url: http://any-hosted-llama-stack.com paths: - /v1alpha/inference/rerank: + /v1beta/datasetio/append-rows/{dataset_id}: post: tags: - - Inference - summary: Rerank - operationId: rerank_v1alpha_inference_rerank_post + - Datasetio + summary: Append Rows + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post responses: '200': description: Successful Response @@ -37,12 +37,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1beta/datasetio/append-rows/{dataset_id}: - post: + parameters: + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1beta/datasetio/iterrows/{dataset_id}: + get: tags: - Datasetio - summary: Append Rows - operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post + summary: Iterrows + operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get responses: '200': description: Successful Response @@ -68,12 +75,12 @@ paths: schema: type: string description: 'Path parameter: dataset_id' - /v1beta/datasetio/iterrows/{dataset_id}: + /v1beta/datasets: get: tags: - - Datasetio - summary: Iterrows - operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get + - Datasets + summary: List Datasets + operationId: list_datasets_v1beta_datasets_get responses: '200': description: Successful Response @@ -92,13 +99,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: dataset_id - in: path - required: true - schema: - type: string - description: 'Path parameter: dataset_id' /v1beta/datasets/{dataset_id}: get: tags: @@ -130,12 +130,12 @@ paths: schema: type: string description: 'Path parameter: dataset_id' - /v1beta/datasets: + /v1alpha/eval/benchmarks: get: tags: - - Datasets - summary: List Datasets - operationId: list_datasets_v1beta_datasets_get + - Benchmarks + summary: List Benchmarks + operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': description: Successful Response @@ -154,12 +154,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: - post: + /v1alpha/eval/benchmarks/{benchmark_id}: + get: tags: - - Eval - summary: Evaluate Rows - operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post + - Benchmarks + summary: Get Benchmark + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': description: Successful Response @@ -185,12 +185,12 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: - get: + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + post: tags: - Eval - summary: Job Status - operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get + summary: Evaluate Rows + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post responses: '200': description: Successful Response @@ -216,17 +216,12 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' - - name: job_id - in: path - required: true - schema: - type: string - description: 'Path parameter: job_id' - delete: + /v1alpha/eval/benchmarks/{benchmark_id}/jobs: + post: tags: - Eval - summary: Job Cancel - operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete + summary: Run Eval + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post responses: '200': description: Successful Response @@ -252,18 +247,12 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' - - name: job_id - in: path - required: true - schema: - type: string - description: 'Path parameter: job_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: get: tags: - Eval - summary: Job Result - operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get + summary: Job Status + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': description: Successful Response @@ -295,12 +284,11 @@ paths: schema: type: string description: 'Path parameter: job_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs: - post: + delete: tags: - Eval - summary: Run Eval - operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post + summary: Job Cancel + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete responses: '200': description: Successful Response @@ -326,12 +314,18 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks/{benchmark_id}: + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: get: tags: - - Benchmarks - summary: Get Benchmark - operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get + - Eval + summary: Job Result + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get responses: '200': description: Successful Response @@ -357,12 +351,18 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks: - get: + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + /v1alpha/inference/rerank: + post: tags: - - Benchmarks - summary: List Benchmarks - operationId: list_benchmarks_v1alpha_eval_benchmarks_get + - Inference + summary: Rerank + operationId: rerank_v1alpha_inference_rerank_post responses: '200': description: Successful Response @@ -381,12 +381,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/cancel: - post: + /v1alpha/post-training/job/artifacts: + get: tags: - Post Training - summary: Cancel Training Job - operationId: cancel_training_job_v1alpha_post_training_job_cancel_post + summary: Get Training Job Artifacts + operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get responses: '200': description: Successful Response @@ -405,12 +405,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/artifacts: - get: + /v1alpha/post-training/job/cancel: + post: tags: - Post Training - summary: Get Training Job Artifacts - operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get + summary: Cancel Training Job + operationId: cancel_training_job_v1alpha_post_training_job_cancel_post responses: '200': description: Successful Response @@ -564,911 +564,674 @@ components: schema: $ref: '#/components/schemas/Error' schemas: - ImageContentItem: - description: A image content item - properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/components/schemas/_URLOrData' - required: - - image - title: ImageContentItem - type: object - TextContentItem: - description: A text content item + Error: + description: Error response from the API. Roughly follows RFC 7807. properties: - type: - const: text - default: text - title: Type + status: + title: Status + type: integer + title: + title: Title type: string - text: - title: Text + detail: + title: Detail type: string + instance: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - text - title: TextContentItem + - status + - title + - detail + title: Error type: object - URL: - description: A URL reference to external content. + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - uri: - title: Uri + object: + const: list + default: list + title: Object type: string - required: - - uri - title: URL - type: object - _URLOrData: - description: A URL or a base64 encoded string - properties: - url: + data: + description: List of batch objects + items: + $ref: '#/components/schemas/Batch' + title: Data + type: array + first_id: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string - type: 'null' + description: ID of the first batch in the list nullable: true - title: URL - data: + last_id: anyOf: - type: string - type: 'null' - contentEncoding: base64 + description: ID of the last batch in the list nullable: true - title: _URLOrData + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean + required: + - data + title: ListBatchesResponse type: object - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - GreedySamplingStrategy: - description: Greedy sampling strategy that selects the highest probability token at each step. + Batch: + additionalProperties: true properties: - type: - const: greedy - default: greedy - title: Type + id: + title: Id type: string - title: GreedySamplingStrategy - type: object - TopKSamplingStrategy: - description: Top-k sampling strategy that restricts sampling to the k most likely tokens. - properties: - type: - const: top_k - default: top_k - title: Type + completion_window: + title: Completion Window type: string - top_k: - minimum: 1 - title: Top K + created_at: + title: Created At 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. - properties: - type: - const: top_p - default: top_p - title: Type - type: string - temperature: - anyOf: - - type: number - minimum: 0.0 - - type: 'null' - top_p: - anyOf: - - type: number - - type: 'null' - default: 0.95 - required: - - temperature - title: TopPSamplingStrategy - type: object - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat - type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. - 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 - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIChatCompletionContentPartImageParam: - description: Image content part for OpenAI-compatible chat completion messages. - properties: - type: - const: image_url - default: image_url - title: Type + endpoint: + title: Endpoint type: string - image_url: - $ref: '#/components/schemas/OpenAIImageURL' - required: - - image_url - title: OpenAIChatCompletionContentPartImageParam - type: object - OpenAIChatCompletionContentPartTextParam: - description: Text content part for OpenAI-compatible chat completion messages. - properties: - type: - const: text - default: text - title: Type + input_file_id: + title: Input File Id type: string - text: - title: Text + object: + const: batch + title: Object type: string - required: - - text - title: OpenAIChatCompletionContentPartTextParam - type: object - OpenAIFile: - properties: - type: - const: file - default: file - title: Type + status: + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + title: Status type: string - file: - $ref: '#/components/schemas/OpenAIFileFile' - required: - - file - title: OpenAIFile - type: object - OpenAIFileFile: - properties: - file_data: + cancelled_at: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - file_id: + cancelling_at: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - filename: + completed_at: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - title: OpenAIFileFile - type: object - OpenAIImageURL: - description: Image URL specification for OpenAI-compatible chat completion messages. - properties: - url: - title: Url - type: string - detail: + error_file_id: anyOf: - type: string - type: 'null' nullable: true - required: - - url - title: OpenAIImageURL - type: object - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: + errors: anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] + - $ref: '#/components/schemas/Errors' + title: Errors - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] nullable: true - name: + title: Errors + expired_at: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - tool_calls: + expires_at: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - type: integer - type: 'null' nullable: true - title: OpenAIAssistantMessageParam - type: object - OpenAIChatCompletionToolCall: - description: Tool call specification for OpenAI-compatible chat completion responses. - properties: - index: + failed_at: anyOf: - type: integer - type: 'null' nullable: true - id: + finalizing_at: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - type: - const: function - default: function - title: Type - type: string - function: + in_progress_at: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - title: OpenAIChatCompletionToolCallFunction + - type: integer - type: 'null' nullable: true - title: OpenAIChatCompletionToolCallFunction - title: OpenAIChatCompletionToolCall - type: object - OpenAIChatCompletionToolCallFunction: - description: Function call details for OpenAI-compatible tool calls. - properties: - name: + metadata: anyOf: - - type: string + - additionalProperties: + type: string + type: object - type: 'null' nullable: true - arguments: + model: anyOf: - type: string - type: 'null' nullable: true - title: OpenAIChatCompletionToolCallFunction - type: object - OpenAIDeveloperMessageParam: - description: A message from the developer in an OpenAI-compatible chat completion request. - properties: - role: - const: developer - default: developer - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: + output_file_id: anyOf: - type: string - type: 'null' nullable: true - required: - - content - title: OpenAIDeveloperMessageParam - type: object - OpenAISystemMessageParam: - description: A system message providing instructions or context to the model. - properties: - role: - const: system - default: system - title: Role - type: string - content: + request_counts: anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: + - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts + - type: 'null' + nullable: true + title: BatchRequestCounts + usage: anyOf: - - type: string + - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage - type: 'null' nullable: true + title: BatchUsage required: - - content - title: OpenAISystemMessageParam + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch type: object - OpenAIToolMessageParam: - description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. properties: - role: - const: tool - default: tool - title: Role + data: + items: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - tool_call_id: - title: Tool Call Id + last_id: + title: Last Id + type: string + object: + const: list + default: list + title: Object type: string - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] required: - - tool_call_id - - content - title: OpenAIToolMessageParam + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse type: object - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: role: - const: user - default: user + const: assistant + default: assistant 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' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: - anyOf: - - type: string + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] nullable: true - required: - - content - title: OpenAIUserMessageParam - type: object - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - OpenAIJSONSchema: - description: JSON schema specification for OpenAI-compatible structured response format. - properties: name: - title: Name - type: string - description: anyOf: - type: string - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - schema: + nullable: true + tool_calls: anyOf: - - additionalProperties: true - type: object + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array - type: 'null' - title: OpenAIJSONSchema - type: object - OpenAIResponseFormatJSONObject: - description: JSON object response format for OpenAI-compatible chat completion requests. - properties: - type: - const: json_object - default: json_object - title: Type - type: string - title: OpenAIResponseFormatJSONObject + nullable: true + title: OpenAIAssistantMessageParam type: object - OpenAIResponseFormatJSONSchema: - description: JSON schema response format for OpenAI-compatible chat completion requests. + OpenAIChatCompletionContentPartImageParam: + description: Image content part for OpenAI-compatible chat completion messages. properties: type: - const: json_schema - default: json_schema + const: image_url + default: image_url title: Type type: string - json_schema: - $ref: '#/components/schemas/OpenAIJSONSchema' + image_url: + $ref: '#/components/schemas/OpenAIImageURL' required: - - json_schema - title: OpenAIResponseFormatJSONSchema + - image_url + title: OpenAIChatCompletionContentPartImageParam type: object - OpenAIResponseFormatText: - description: Text response format for OpenAI-compatible chat completion requests. + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + OpenAIChatCompletionContentPartTextParam: + description: Text content part for OpenAI-compatible chat completion messages. properties: type: const: text default: text title: Type type: string - title: OpenAIResponseFormatText + text: + title: Text + type: string + required: + - text + title: OpenAIChatCompletionContentPartTextParam type: object - OpenAIResponseFormatParam: - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - VectorStoreChunkingStrategyAuto: - description: Automatic chunking strategy for vector store files. + OpenAIChatCompletionToolCall: + description: Tool call specification for OpenAI-compatible chat completion responses. properties: + index: + anyOf: + - type: integer + - type: 'null' + nullable: true + id: + anyOf: + - type: string + - type: 'null' + nullable: true type: - const: auto - default: auto + const: function + default: function title: Type type: string - title: VectorStoreChunkingStrategyAuto + function: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction + - type: 'null' + nullable: true + title: OpenAIChatCompletionToolCallFunction + title: OpenAIChatCompletionToolCall type: object - VectorStoreChunkingStrategyStatic: - description: Static chunking strategy with configurable parameters. + OpenAIChatCompletionToolCallFunction: + description: Function call details for OpenAI-compatible tool calls. properties: - type: - const: static - default: static - title: Type - type: string - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' - required: - - static - title: VectorStoreChunkingStrategyStatic + name: + anyOf: + - type: string + - type: 'null' + nullable: true + arguments: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIChatCompletionToolCallFunction type: object - VectorStoreChunkingStrategyStaticConfig: - description: Configuration for static chunking strategy. + OpenAIChatCompletionUsage: + description: Usage information for OpenAI chat completion. properties: - chunk_overlap_tokens: - default: 400 - title: Chunk Overlap Tokens + prompt_tokens: + title: Prompt Tokens type: integer - max_chunk_size_tokens: - default: 800 - maximum: 4096 - minimum: 100 - title: Max Chunk Size Tokens + completion_tokens: + title: Completion Tokens type: integer - title: VectorStoreChunkingStrategyStaticConfig + total_tokens: + title: Total Tokens + type: integer + prompt_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsagePromptTokensDetails + completion_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage type: object - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - VectorStoreFileStatus: - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - OpenAIResponseInputMessageContentFile: - description: File content for input messages in OpenAI response format. + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. properties: - type: - const: input_file - default: input_file - title: Type + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + finish_reason: + title: Finish Reason type: string - file_data: + index: + title: Index + type: integer + logprobs: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true - file_id: + title: OpenAIChoiceLogprobs + 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. + properties: + content: anyOf: - - type: string + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array - type: 'null' nullable: true - file_url: + refusal: anyOf: - - type: string + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array - type: 'null' nullable: true - filename: + title: OpenAIChoiceLogprobs + type: object + OpenAIDeveloperMessageParam: + description: A message from the developer in an OpenAI-compatible chat completion request. + properties: + role: + const: developer + default: developer + title: Role + type: string + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: anyOf: - type: string - type: 'null' nullable: true - title: OpenAIResponseInputMessageContentFile + required: + - content + title: OpenAIDeveloperMessageParam type: object - OpenAIResponseInputMessageContentImage: - description: Image content for input messages in OpenAI response format. + OpenAIFile: properties: - detail: - default: auto - title: Detail - type: string - enum: - - low - - high - - auto type: - const: input_image - default: input_image + const: file + default: file title: Type type: string + file: + $ref: '#/components/schemas/OpenAIFileFile' + required: + - file + title: OpenAIFile + type: object + OpenAIFileFile: + properties: + file_data: + anyOf: + - type: string + - type: 'null' + nullable: true file_id: anyOf: - type: string - type: 'null' nullable: true - image_url: + filename: anyOf: - type: string - type: 'null' nullable: true - title: OpenAIResponseInputMessageContentImage + title: OpenAIFileFile type: object - OpenAIResponseInputMessageContentText: - description: Text content for input messages in OpenAI response format. + OpenAIImageURL: + description: Image URL specification for OpenAI-compatible chat completion messages. properties: - text: - title: Text - type: string - type: - const: input_text - default: input_text - title: Type + url: + title: Url type: string + detail: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - text - title: OpenAIResponseInputMessageContentText + - url + title: OpenAIImageURL type: object - OpenAIResponseInputMessageContent: + OpenAIMessageParam: discriminator: mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type + 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/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - OpenAIResponseAnnotationCitation: - description: URL citation annotation for referencing external web resources. + - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + OpenAISystemMessageParam: + description: A system message providing instructions or context to the model. 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 + role: + const: system + default: system + title: Role type: string + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation + - content + title: OpenAISystemMessageParam type: object - OpenAIResponseAnnotationContainerFileCitation: + 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: - 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 + token: + title: Token type: string - start_index: - title: Start Index - type: integer + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + logprob: + title: Logprob + type: number + top_logprobs: + items: + $ref: '#/components/schemas/OpenAITopLogProb' + title: Top Logprobs + type: array required: - - container_id - - end_index - - file_id - - filename - - start_index - title: OpenAIResponseAnnotationContainerFileCitation + - token + - logprob + - top_logprobs + title: OpenAITokenLogProb type: object - OpenAIResponseAnnotationFileCitation: - description: File citation annotation for referencing specific files in response content. + OpenAIToolMessageParam: + description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. properties: - type: - const: file_citation - default: file_citation - title: Type - type: string - file_id: - title: File Id + role: + const: tool + default: tool + title: Role type: string - filename: - title: Filename + tool_call_id: + title: Tool Call Id type: string - index: - title: Index - type: integer + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] required: - - file_id - - filename - - index - title: OpenAIResponseAnnotationFileCitation + - tool_call_id + - content + title: OpenAIToolMessageParam type: object - OpenAIResponseAnnotationFilePath: + 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: - type: - const: file_path - default: file_path - title: Type - type: string - file_id: - title: File Id + token: + title: Token type: string - index: - title: Index - type: integer + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + logprob: + title: Logprob + type: number required: - - file_id - - index - title: OpenAIResponseAnnotationFilePath + - token + - logprob + title: OpenAITopLogProb type: object - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - OpenAIResponseContentPartRefusal: - description: Refusal content within a streamed response part. + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. properties: - type: - const: refusal - default: refusal - title: Type - type: string - refusal: - title: Refusal + 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' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - refusal - title: OpenAIResponseContentPartRefusal - 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: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations - type: array - required: - - text - title: OpenAIResponseOutputMessageContentOutputText + - content + title: OpenAIUserMessageParam type: object - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - MCPListToolsTool: - description: Tool definition returned by MCP list tools operation. + OpenAIJSONSchema: + description: JSON schema specification for OpenAI-compatible structured response format. properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object name: title: Name type: string @@ -1476,1793 +1239,963 @@ components: anyOf: - type: string - type: 'null' - nullable: true - required: - - input_schema - - name - title: MCPListToolsTool + strict: + anyOf: + - type: boolean + - type: 'null' + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + title: OpenAIJSONSchema type: object - OpenAIResponseMCPApprovalRequest: - description: A request for human approval of a tool invocation. + OpenAIResponseFormatJSONObject: + description: JSON object response format for OpenAI-compatible chat completion requests. 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 + const: json_object + default: json_object title: Type type: string - required: - - arguments - - id - - name - - server_label - title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseFormatJSONObject 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. + OpenAIResponseFormatJSONSchema: + description: JSON schema response format for OpenAI-compatible chat completion requests. 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' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system type: - const: message - default: message + const: json_schema + default: json_schema title: Type type: string - id: - anyOf: - - type: string - - type: 'null' - nullable: true - status: - anyOf: - - type: string - - type: 'null' - nullable: true + json_schema: + $ref: '#/components/schemas/OpenAIJSONSchema' required: - - content - - role - title: OpenAIResponseMessage + - json_schema + title: OpenAIResponseFormatJSONSchema type: object - OpenAIResponseOutputMessageFileSearchToolCall: - description: File search tool call output message for OpenAI responses. + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + OpenAIResponseFormatText: + description: Text response format for OpenAI-compatible chat completion requests. 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 + const: text + default: text title: Type type: string - results: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' - type: array - - type: 'null' - nullable: true - required: - - id - - queries - - status - title: OpenAIResponseOutputMessageFileSearchToolCall + title: OpenAIResponseFormatText type: object - OpenAIResponseOutputMessageFileSearchToolCallResults: - description: Search results returned by the file search operation. + OpenAIChatCompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible chat completion endpoint. properties: - attributes: - additionalProperties: true - title: Attributes - type: object - file_id: - title: File Id + model: + title: Model 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. - 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: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + minItems: 1 + title: Messages + type: array + frequency_penalty: anyOf: - - type: string + - type: number - type: 'null' nullable: true - status: + function_call: anyOf: - type: string + - additionalProperties: true + type: object - type: 'null' + title: string | object nullable: true - required: - - call_id - - name - - arguments - title: OpenAIResponseOutputMessageFunctionToolCall - type: object - OpenAIResponseOutputMessageMCPCall: - description: Model Context Protocol (MCP) call output message for OpenAI responses. - 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: + functions: anyOf: - - type: string + - items: + additionalProperties: true + type: object + type: array - type: 'null' nullable: true - output: + logit_bias: anyOf: - - type: string + - additionalProperties: + type: number + type: object - type: 'null' nullable: true - required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - type: object - OpenAIResponseOutputMessageMCPListTools: - description: MCP list tools output message containing available tools from an 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: '#/components/schemas/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. - 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 - OpenAIResponseOutput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - AllowedToolsFilter: - description: Filter configuration for restricting which MCP tools can be used. - properties: - tool_names: + logprobs: anyOf: - - items: - type: string - type: array + - type: boolean - type: 'null' nullable: true - title: AllowedToolsFilter - type: object - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. - properties: - always: + max_completion_tokens: anyOf: - - items: - type: string - type: array + - type: integer - type: 'null' nullable: true - never: + max_tokens: anyOf: - - items: - type: string - type: array + - type: integer - type: 'null' nullable: true - title: ApprovalFilter - type: object - OpenAIResponseInputToolFileSearch: - description: File search tool configuration for OpenAI response inputs. - 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: + n: anyOf: - - additionalProperties: true - type: object + - type: integer - type: 'null' nullable: true - max_num_results: + parallel_tool_calls: anyOf: - - maximum: 50 - minimum: 1 - type: integer + - type: boolean - type: 'null' - default: 10 - ranking_options: + nullable: true + presence_penalty: anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions + - type: number - type: 'null' nullable: true - title: SearchRankingOptions - required: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch - type: object - OpenAIResponseInputToolFunction: - description: Function tool configuration for OpenAI response inputs. - properties: - type: - const: function - default: function - title: Type - type: string - name: - title: Name - type: string - description: + response_format: anyOf: - - type: string + - discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - type: 'null' + title: Response Format nullable: true - parameters: + seed: anyOf: - - additionalProperties: true - type: object + - type: integer - type: 'null' - strict: + nullable: true + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: anyOf: - type: boolean - type: 'null' nullable: true - required: - - name - - parameters - title: OpenAIResponseInputToolFunction - type: object - OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - properties: - type: - const: mcp - default: mcp - title: Type - type: string - server_label: - title: Server Label - type: string - server_url: - title: Server Url - type: string - headers: + stream_options: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - authorization: + temperature: anyOf: - - type: string + - type: number - type: 'null' nullable: true - require_approval: + tool_choice: anyOf: - - const: always - type: string - - const: never - type: string - - $ref: '#/components/schemas/ApprovalFilter' - title: ApprovalFilter - default: never - title: string | ApprovalFilter - allowed_tools: + - type: string + - additionalProperties: true + type: object + - type: 'null' + title: string | object + nullable: true + tools: anyOf: - items: - type: string + additionalProperties: true + type: object type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter - type: 'null' - title: list[string] | AllowedToolsFilter nullable: true - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - type: object - OpenAIResponseInputToolWebSearch: - description: Web search tool configuration for OpenAI response inputs. - properties: - type: - default: web_search - title: Type - type: string - enum: - - web_search - - web_search_preview - - web_search_preview_2025_03_11 - - web_search_2025_08_26 - search_context_size: - anyOf: - - pattern: ^low|medium|high$ - type: string - - type: 'null' - default: medium - title: OpenAIResponseInputToolWebSearch - type: object - SearchRankingOptions: - description: Options for ranking and filtering search results. - properties: - ranker: + top_logprobs: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - score_threshold: + top_p: anyOf: - type: number - type: 'null' - default: 0.0 - title: SearchRankingOptions - type: object - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. - properties: - type: - const: mcp - default: mcp - title: Type - type: string - server_label: - title: Server Label - type: string - allowed_tools: + nullable: true + user: anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter + - type: string - type: 'null' - title: list[string] | AllowedToolsFilter nullable: true required: - - server_label - title: OpenAIResponseToolMCP + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody type: object - OpenAIResponseTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseContentPartOutputText: - description: Text content within a streamed response part. + OpenAIChatCompletion: + description: Response from an OpenAI-compatible chat completion request. properties: - type: - const: output_text - default: output_text - title: Type - type: string - text: - title: Text + id: + title: Id type: string - annotations: + choices: items: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations + $ref: '#/components/schemas/OpenAIChoice' + title: Choices type: array - logprobs: + object: + const: chat.completion + default: chat.completion + title: Object + type: string + created: + title: Created + type: integer + model: + title: Model + type: string + usage: anyOf: - - items: - additionalProperties: true - type: object - type: array + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' nullable: true + title: OpenAIChatCompletionUsage required: - - text - title: OpenAIResponseContentPartOutputText + - id + - choices + - created + - model + title: OpenAIChatCompletion type: object - OpenAIResponseContentPartReasoningText: - description: Reasoning text emitted as part of a streamed response. - properties: - type: - const: reasoning_text - default: reasoning_text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIResponseContentPartReasoningText - type: object - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseContentPartReasoningSummary: - description: Reasoning summary part in a streamed response. - properties: - type: - const: summary_text - default: summary_text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIResponseContentPartReasoningSummary - type: object - OpenAIResponseError: - description: Error details for failed OpenAI response requests. - properties: - code: - title: Code - type: string - message: - title: Message - type: string - required: - - code - - message - title: OpenAIResponseError - type: object - OpenAIResponseObject: - description: Complete OpenAI response object containing generation results and metadata. + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: - created_at: - title: Created At - type: integer - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - nullable: true - title: OpenAIResponseError id: title: Id type: string - model: - title: Model - type: string + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array object: - const: response - default: response + const: chat.completion.chunk + default: chat.completion.chunk 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output - type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: - anyOf: - - type: string - - type: 'null' - nullable: true - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - nullable: true - title: OpenAIResponsePrompt - status: - title: Status + created: + title: Created + type: integer + model: + title: Model type: string - temperature: + usage: anyOf: - - type: number + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: + title: OpenAIChatCompletionUsage + required: + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk + type: object + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. + properties: + content: anyOf: - - type: number + - type: string - type: 'null' nullable: true - tools: + refusal: anyOf: - - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array + - type: string - type: 'null' nullable: true - truncation: + role: anyOf: - type: string - type: 'null' nullable: true - usage: + tool_calls: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array - type: 'null' nullable: true - title: OpenAIResponseUsage - instructions: + reasoning_content: anyOf: - type: string - type: 'null' nullable: true - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - nullable: true - required: - - created_at - - id - - model - - output - - status - title: OpenAIResponseObject + title: OpenAIChoiceDelta type: object - OpenAIResponseObjectStreamResponseCompleted: - description: Streaming event indicating a response has been completed. + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.completed - default: response.completed - title: Type + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - response - title: OpenAIResponseObjectStreamResponseCompleted + - delta + - finish_reason + - index + title: OpenAIChunkChoice type: object - OpenAIResponseObjectStreamResponseContentPartAdded: - description: Streaming event for when a new content part is added to a response item. + OpenAICompletionWithInputMessages: properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id + id: + title: Id type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer - type: - const: response.content_part.added - default: response.content_part.added - title: Type - type: string - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartAdded - type: object - OpenAIResponseObjectStreamResponseContentPartDone: - description: Streaming event for when a content part is completed. - properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer - type: - const: response.content_part.done - default: response.content_part.done - title: Type - type: string - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartDone - type: object - OpenAIResponseObjectStreamResponseCreated: - description: Streaming event indicating a new response has been created. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.created - default: response.created - title: Type - type: string - required: - - response - title: OpenAIResponseObjectStreamResponseCreated - type: object - OpenAIResponseObjectStreamResponseFailed: - description: Streaming event emitted when a response fails. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.failed - default: response.failed - title: Type - type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseFailed - type: object - OpenAIResponseObjectStreamResponseFileSearchCallCompleted: - description: Streaming event for completed file search calls. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.completed - default: response.file_search_call.completed - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - type: object - OpenAIResponseObjectStreamResponseFileSearchCallInProgress: - description: Streaming event for file search calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - type: object - OpenAIResponseObjectStreamResponseFileSearchCallSearching: - description: Streaming event for file search currently searching. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.searching - default: response.file_search_call.searching - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: - description: Streaming event for incremental function call argument updates. - properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - title: Type - type: string - required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: - description: Streaming event for when function call arguments are completed. - properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.done - default: response.function_call_arguments.done - title: Type - type: string - required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - type: object - OpenAIResponseObjectStreamResponseInProgress: - description: Streaming event indicating the response remains in progress. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.in_progress - default: response.in_progress - title: Type - type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseInProgress - type: object - OpenAIResponseObjectStreamResponseIncomplete: - description: Streaming event emitted when a response ends in an incomplete state. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.incomplete - default: response.incomplete - title: Type - type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseIncomplete - type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: - properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - title: Type - type: string - required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: - properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - title: Type - type: string - required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - type: object - OpenAIResponseObjectStreamResponseMcpCallCompleted: - description: Streaming event for completed MCP calls. - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.completed - default: response.mcp_call.completed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - type: object - OpenAIResponseObjectStreamResponseMcpCallFailed: - description: Streaming event for failed MCP calls. - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.failed - default: response.mcp_call.failed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallFailed - type: object - OpenAIResponseObjectStreamResponseMcpCallInProgress: - description: Streaming event for MCP calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - type: object - OpenAIResponseObjectStreamResponseMcpListToolsCompleted: - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - title: Type + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - type: object - OpenAIResponseObjectStreamResponseMcpListToolsFailed: - properties: - sequence_number: - title: Sequence Number + created: + title: Created type: integer - type: - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - title: Type + model: + title: Model type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + title: Input Messages + type: array required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages type: object - OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + OpenAICompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible completion endpoint. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - title: Type + model: + title: Model type: string + prompt: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - items: + type: integer + type: array + title: list[integer] + - items: + items: + type: integer + type: array + type: array + title: list[array] + title: string | ... (4 variants) + best_of: + anyOf: + - type: integer + - type: 'null' + nullable: true + echo: + anyOf: + - type: boolean + - type: 'null' + nullable: true + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true + suffix: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - model + - prompt + title: OpenAICompletionRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseOutputItemAdded: - description: Streaming event for when a new output item is added to the response. + OpenAICompletion: + 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: - response_id: - title: Response Id + id: + title: Id type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + choices: + items: + $ref: '#/components/schemas/OpenAICompletionChoice' + title: Choices + type: array + created: + title: Created type: integer - type: - const: response.output_item.added - default: response.output_item.added - title: Type - type: string - required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemAdded - type: object - OpenAIResponseObjectStreamResponseOutputItemDone: - description: Streaming event for when an output item is completed. - properties: - response_id: - title: Response Id + model: + title: Model type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.done - default: response.output_item.done - title: Type + object: + const: text_completion + default: text_completion + title: Object type: string required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemDone + - id + - choices + - created + - model + title: OpenAICompletion type: object - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: - description: Streaming event for when an annotation is added to output text. + 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: - item_id: - title: Item Id + finish_reason: + title: Finish Reason type: string - output_index: - title: Output Index - type: integer - content_index: - title: Content Index - type: integer - annotation_index: - title: Annotation Index - type: integer - annotation: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.annotation.added - default: response.output_text.annotation.added - title: Type + text: + title: Text type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - finish_reason + - text + - index + title: OpenAICompletionChoice type: object - OpenAIResponseObjectStreamResponseOutputTextDelta: - description: Streaming event for incremental text content updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer + ConversationItem: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + OpenAIResponseAnnotationCitation: + description: URL citation annotation for referencing external web resources. + properties: type: - const: response.output_text.delta - default: response.output_text.delta + const: url_citation + default: url_citation title: Type type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDelta - type: object - OpenAIResponseObjectStreamResponseOutputTextDone: - description: Streaming event for when text output is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index + end_index: + title: End Index type: integer - sequence_number: - title: Sequence Number + start_index: + title: Start Index type: integer - type: - const: response.output_text.done - default: response.output_text.done - title: Type + title: + title: Title + type: string + url: + title: Url type: string required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDone + - end_index + - start_index + - title + - url + title: OpenAIResponseAnnotationCitation type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: - description: Streaming event for when a new reasoning summary part is added. + OpenAIResponseAnnotationContainerFileCitation: properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer type: - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added + const: container_file_citation + default: container_file_citation title: Type type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: - description: Streaming event for when a reasoning summary part is completed. - properties: - item_id: - title: Item Id + container_id: + title: Container Id type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index + end_index: + title: End Index type: integer - type: - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - title: Type - type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: - description: Streaming event for incremental reasoning summary text updates. - properties: - delta: - title: Delta + file_id: + title: File Id type: string - item_id: - title: Item Id + filename: + title: Filename type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index + start_index: + title: Start Index type: integer - type: - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - title: Type - type: string required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - container_id + - end_index + - file_id + - filename + - start_index + title: OpenAIResponseAnnotationContainerFileCitation type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: - description: Streaming event for when reasoning summary text is completed. + OpenAIResponseAnnotationFileCitation: + description: File citation annotation for referencing specific files in response content. properties: - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer type: - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done + const: file_citation + default: file_citation title: Type type: string - required: - - text - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - type: object - OpenAIResponseObjectStreamResponseReasoningTextDelta: - description: Streaming event for incremental reasoning text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta + file_id: + title: File Id type: string - item_id: - title: Item Id + filename: + title: Filename type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + index: + title: Index type: integer - type: - const: response.reasoning_text.delta - default: response.reasoning_text.delta - title: Type - type: string required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - file_id + - filename + - index + title: OpenAIResponseAnnotationFileCitation type: object - OpenAIResponseObjectStreamResponseReasoningTextDone: - description: Streaming event for when reasoning text is completed. + OpenAIResponseAnnotationFilePath: properties: - content_index: - title: Content Index - type: integer - text: - title: Text + type: + const: file_path + default: file_path + title: Type type: string - item_id: - title: Item Id + file_id: + title: File Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + index: + title: Index type: integer + required: + - file_id + - index + title: OpenAIResponseAnnotationFilePath + type: object + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + OpenAIResponseContentPartRefusal: + description: Refusal content within a streamed response part. + properties: type: - const: response.reasoning_text.done - default: response.reasoning_text.done + const: refusal + default: refusal title: Type type: string + refusal: + title: Refusal + type: string required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDone + - refusal + title: OpenAIResponseContentPartRefusal type: object - OpenAIResponseObjectStreamResponseRefusalDelta: - description: Streaming event for incremental refusal text updates. + OpenAIResponseInputFunctionToolCallOutput: + description: This represents the output of a function call that gets passed back to the model. properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta + call_id: + title: Call Id type: string - item_id: - title: Item Id + output: + title: Output type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.refusal.delta - default: response.refusal.delta + const: function_call_output + default: function_call_output title: Type type: string + id: + anyOf: + - type: string + - type: 'null' + nullable: true + status: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDelta + - call_id + - output + title: OpenAIResponseInputFunctionToolCallOutput type: object - OpenAIResponseObjectStreamResponseRefusalDone: - description: Streaming event for when refusal text is completed. + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + OpenAIResponseInputMessageContentFile: + description: File content for input messages in OpenAI response format. properties: - content_index: - title: Content Index - type: integer - refusal: - title: Refusal + type: + const: input_file + default: input_file + title: Type type: string - item_id: - title: Item Id + file_data: + anyOf: + - type: string + - type: 'null' + nullable: true + file_id: + anyOf: + - type: string + - type: 'null' + nullable: true + file_url: + anyOf: + - type: string + - type: 'null' + nullable: true + filename: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIResponseInputMessageContentFile + type: object + OpenAIResponseInputMessageContentImage: + description: Image content for input messages in OpenAI response format. + properties: + detail: + default: auto + title: Detail type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer + enum: + - low + - high + - auto type: - const: response.refusal.done - default: response.refusal.done + const: input_image + default: input_image title: Type type: string - required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDone + file_id: + anyOf: + - type: string + - type: 'null' + nullable: true + image_url: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIResponseInputMessageContentImage type: object - OpenAIResponseObjectStreamResponseWebSearchCallCompleted: - description: Streaming event for completed web search calls. + OpenAIResponseInputMessageContentText: + description: Text content for input messages in OpenAI response format. properties: - item_id: - title: Item Id + text: + title: Text type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.web_search_call.completed - default: response.web_search_call.completed + const: input_text + default: input_text title: Type type: string required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - text + title: OpenAIResponseInputMessageContentText type: object - OpenAIResponseObjectStreamResponseWebSearchCallInProgress: - description: Streaming event for web search calls in progress. + OpenAIResponseMCPApprovalRequest: + description: A request for human approval of a tool invocation. properties: - item_id: - title: Item Id + arguments: + title: Arguments + type: string + id: + title: Id + type: string + name: + title: Name + type: string + server_label: + title: Server Label type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress + const: mcp_approval_request + default: mcp_approval_request title: Type type: string required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - arguments + - id + - name + - server_label + title: OpenAIResponseMCPApprovalRequest type: object - OpenAIResponseObjectStreamResponseWebSearchCallSearching: + OpenAIResponseMCPApprovalResponse: + description: A response to an MCP approval request. properties: - item_id: - title: Item Id + approval_request_id: + title: Approval Request Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer + approve: + title: Approve + type: boolean type: - const: response.web_search_call.searching - default: response.web_search_call.searching + const: mcp_approval_response + default: mcp_approval_response title: Type type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + id: + anyOf: + - type: string + - type: 'null' + nullable: true + reason: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - approval_request_id + - approve + title: OpenAIResponseMCPApprovalResponse type: object - OpenAIResponsePrompt: - description: OpenAI compatible Prompt object that is used in OpenAI responses. + 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: - id: - title: Id - type: string - variables: + content: anyOf: - - additionalProperties: + - type: string + - items: discriminator: mapping: input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' @@ -3277,959 +2210,1044 @@ components: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' title: OpenAIResponseInputMessageContentFile title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: object + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + const: message + default: message + title: Type + type: string + id: + anyOf: + - type: string - type: 'null' nullable: true - version: + status: anyOf: - type: string - type: 'null' nullable: true required: - - id - title: OpenAIResponsePrompt + - content + - role + title: OpenAIResponseMessage type: object - OpenAIResponseText: - description: Text response configuration for OpenAI responses. + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + OpenAIResponseOutputMessageContentOutputText: properties: - format: + text: + title: Text + type: string + type: + const: output_text + default: output_text + title: Type + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations + type: array + required: + - text + title: OpenAIResponseOutputMessageContentOutputText + type: object + OpenAIResponseOutputMessageFileSearchToolCall: + description: File search tool call output message for OpenAI responses. + 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: - - $ref: '#/components/schemas/OpenAIResponseTextFormat' - title: OpenAIResponseTextFormat + - items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array - type: 'null' nullable: true - title: OpenAIResponseTextFormat - title: OpenAIResponseText + required: + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall type: object - OpenAIResponseTextFormat: - description: Configuration for Responses API text format. + OpenAIResponseOutputMessageFunctionToolCall: + description: Function tool call output message for OpenAI responses. 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 - enum: - - text - - json_schema - - json_object - default: text - name: + id: anyOf: - type: string - type: 'null' - schema: + nullable: true + status: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - description: + nullable: true + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + type: object + OpenAIResponseOutputMessageMCPCall: + description: Model Context Protocol (MCP) call output message for OpenAI responses. + 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' - strict: + nullable: true + output: anyOf: - - type: boolean + - type: string - type: 'null' - title: OpenAIResponseTextFormat + nullable: true + required: + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + type: object + OpenAIResponseOutputMessageMCPListTools: + description: MCP list tools output message containing available tools from an 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: '#/components/schemas/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. + 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 - OpenAIResponseUsage: - description: Usage information for OpenAI response. + Conversation: + description: OpenAI-compatible conversation object. properties: - input_tokens: - title: Input Tokens - type: integer - output_tokens: - title: Output Tokens - type: integer - total_tokens: - title: Total Tokens + 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. + 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 - input_tokens_details: + metadata: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' - title: OpenAIResponseUsageInputTokensDetails + - 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. nullable: true - title: OpenAIResponseUsageInputTokensDetails - output_tokens_details: + items: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' - title: OpenAIResponseUsageOutputTokensDetails + - 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. nullable: true - title: OpenAIResponseUsageOutputTokensDetails required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - type: object - OpenAIResponseUsageInputTokensDetails: - description: Token details for input tokens in OpenAI response usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageInputTokensDetails - type: object - OpenAIResponseUsageOutputTokensDetails: - description: Token details for output tokens in OpenAI response usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageOutputTokensDetails + - id + - created_at + title: Conversation type: object - OpenAIResponseObjectStream: - discriminator: - mapping: - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - title: OpenAIResponseObjectStreamResponseCreated - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - title: OpenAIResponseObjectStreamResponseInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - title: OpenAIResponseObjectStreamResponseOutputItemAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - title: OpenAIResponseObjectStreamResponseOutputItemDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - title: OpenAIResponseObjectStreamResponseOutputTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - title: OpenAIResponseObjectStreamResponseOutputTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - title: OpenAIResponseObjectStreamResponseMcpCallFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - title: OpenAIResponseObjectStreamResponseContentPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - title: OpenAIResponseObjectStreamResponseContentPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - title: OpenAIResponseObjectStreamResponseReasoningTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - title: OpenAIResponseObjectStreamResponseRefusalDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - title: OpenAIResponseObjectStreamResponseRefusalDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - title: OpenAIResponseObjectStreamResponseIncomplete - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - title: OpenAIResponseObjectStreamResponseFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - title: OpenAIResponseObjectStreamResponseCompleted - title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) - OpenAIResponseInputFunctionToolCallOutput: - description: This represents the output of a function call that gets passed back to the model. + ConversationDeletedResource: + description: Response for deleted conversation. properties: - call_id: - title: Call Id + id: + description: The deleted conversation identifier + title: Id type: string - output: - title: Output + object: + default: conversation.deleted + description: Object type + title: Object type: string - type: - const: function_call_output - default: function_call_output - title: Type + deleted: + default: true + description: Whether the object was deleted + title: Deleted + type: boolean + required: + - id + title: ConversationDeletedResource + type: object + ConversationItemList: + description: List of conversation items with pagination. + properties: + object: + default: list + description: Object type + title: Object type: string - id: + data: + description: List of conversation items + items: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + title: Data + type: array + first_id: anyOf: - type: string - type: 'null' + description: The ID of the first item in the list nullable: true - status: + last_id: anyOf: - type: string - type: 'null' + description: The ID of the last item in the list nullable: true + has_more: + default: false + description: Whether there are more items available + title: Has More + type: boolean required: - - call_id - - output - title: OpenAIResponseInputFunctionToolCallOutput + - data + title: ConversationItemList type: object - OpenAIResponseMCPApprovalResponse: - description: A response to an MCP approval request. + ConversationItemDeletedResource: + description: Response for deleted conversation item. properties: - approval_request_id: - title: Approval Request Id + id: + description: The deleted item identifier + title: Id type: string - approve: - title: Approve + 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 - type: - const: mcp_approval_response - default: mcp_approval_response - title: Type + required: + - id + title: ConversationItemDeletedResource + type: object + OpenAIEmbeddingsRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible embeddings endpoint. + properties: + model: + title: Model type: string - id: + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + encoding_format: anyOf: - type: string - type: 'null' + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' nullable: true - reason: + user: anyOf: - type: string - type: 'null' nullable: true required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody type: object - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - ArrayType: - description: Parameter type for array values. + OpenAIEmbeddingData: + description: A single embedding data object from an OpenAI-compatible embeddings response. properties: - type: - const: array - default: array - title: Type + object: + const: embedding + default: embedding + title: Object type: string - title: ArrayType + embedding: + anyOf: + - items: + type: number + type: array + title: list[number] + - type: string + title: list[number] | string + index: + title: Index + type: integer + required: + - embedding + - index + title: OpenAIEmbeddingData type: object - BooleanType: - description: Parameter type for boolean values. + OpenAIEmbeddingUsage: + description: Usage information for an OpenAI-compatible embeddings response. properties: - type: - const: boolean - default: boolean - title: Type - type: string - title: BooleanType + prompt_tokens: + title: Prompt Tokens + type: integer + total_tokens: + title: Total Tokens + type: integer + required: + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage type: object - ChatCompletionInputType: - description: Parameter type for chat completion input. + OpenAIEmbeddingsResponse: + description: Response from an OpenAI-compatible embeddings request. properties: - type: - const: chat_completion_input - default: chat_completion_input - title: Type + object: + const: list + default: list + title: Object type: string - title: ChatCompletionInputType - type: object - CompletionInputType: - description: Parameter type for completion input. - properties: - type: - const: completion_input - default: completion_input - title: Type + data: + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + title: Data + type: array + model: + title: Model type: string - title: CompletionInputType + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' + required: + - data + - model + - usage + title: OpenAIEmbeddingsResponse type: object - JsonType: - description: Parameter type for JSON values. + OpenAIFilePurpose: + description: Valid purpose values for OpenAI Files API. + enum: + - assistants + - batch + title: OpenAIFilePurpose + type: string + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. properties: - type: - const: json - default: json - title: Type + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - title: JsonType + 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 - NumberType: - description: Parameter type for numeric values. + OpenAIFileObject: + description: OpenAI File object as defined in the OpenAI Files API. properties: - type: - const: number - default: number - title: Type + 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 - title: NumberType + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + required: + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject type: object - ObjectType: - description: Parameter type for object values. + 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: - type: - const: object - default: object - title: Type + anchor: + const: created_at + title: Anchor type: string - title: ObjectType + seconds: + maximum: 2592000 + minimum: 3600 + title: Seconds + type: integer + required: + - anchor + - seconds + title: ExpiresAfter type: object - StringType: - description: Parameter type for string values. + OpenAIFileDeleteResponse: + description: Response for deleting a file in OpenAI Files API. properties: - type: - const: string - default: string - title: Type + id: + title: Id type: string - title: StringType - type: object - UnionType: - description: Parameter type for union values. - properties: - type: - const: union - default: union - title: Type + object: + const: file + default: file + title: Object type: string - title: UnionType + deleted: + title: Deleted + type: boolean + required: + - id + - deleted + title: OpenAIFileDeleteResponse type: object - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - RowsDataSource: - description: A dataset stored in rows. + HealthInfo: + description: Health status information for the service. properties: - type: - const: rows - default: rows - title: Type - type: string - rows: - items: - additionalProperties: true - type: object - title: Rows - type: array + status: + $ref: '#/components/schemas/HealthStatus' required: - - rows - title: RowsDataSource + - status + title: HealthInfo type: object - URIDataSource: - description: A dataset that can be obtained from a URI. + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - type: - const: uri - default: uri - title: Type + route: + title: Route type: string - uri: - title: Uri + method: + title: Method type: string + provider_types: + items: + type: string + title: Provider Types + type: array required: - - uri - title: URIDataSource + - route + - method + - provider_types + title: RouteInfo type: object - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - AggregationFunctionType: - description: Types of aggregation functions for scoring results. - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - type: string - BasicScoringFnParams: - description: Parameters for basic scoring function configuration. + ListRoutesResponse: + description: Response containing a list of all available API routes. properties: - type: - const: basic - default: basic - title: Type - type: string - aggregation_functions: - description: Aggregation functions to apply to the scores of each row + data: items: - $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions + $ref: '#/components/schemas/RouteInfo' + title: Data type: array - title: BasicScoringFnParams + required: + - data + title: ListRoutesResponse type: object - LLMAsJudgeScoringFnParams: - description: Parameters for LLM-as-judge scoring function configuration. + OpenAIModel: + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: - type: - const: llm_as_judge - default: llm_as_judge - title: Type + id: + title: Id type: string - judge_model: - title: Judge Model + object: + const: model + default: model + title: Object + type: string + created: + title: Created + type: integer + owned_by: + title: Owned By type: string - prompt_template: + custom_metadata: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - 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 + required: + - id + - created + - owned_by + title: OpenAIModel + type: object + OpenAIListModelsResponse: + properties: + data: items: - $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions + $ref: '#/components/schemas/OpenAIModel' + title: Data type: array required: - - judge_model - title: LLMAsJudgeScoringFnParams + - data + title: OpenAIListModelsResponse type: object - RegexParserScoringFnParams: - description: Parameters for regex parser scoring function configuration. + Model: + description: A model resource representing an AI model registered in Llama Stack. 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 + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string type: - const: regex_parser - default: regex_parser + const: model + default: model 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: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions - type: array - title: RegexParserScoringFnParams + metadata: + additionalProperties: true + description: Any additional metadata for this model + title: Metadata + type: object + model_type: + $ref: '#/components/schemas/ModelType' + default: llm + required: + - identifier + - provider_id + title: Model type: object - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - LoraFinetuningConfig: - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + ModelType: + description: Enumeration of supported model types in Llama Stack. + enum: + - llm + - embedding + - rerank + title: ModelType + type: string + ModerationObject: + description: A moderation object. properties: - type: - const: LoRA - default: LoRA - title: Type + id: + title: Id type: string - lora_attn_modules: + model: + title: Model + type: string + results: items: - type: string - title: Lora Attn Modules + $ref: '#/components/schemas/ModerationObjectResults' + title: Results type: array - apply_lora_to_mlp: - title: Apply Lora To Mlp - type: boolean - apply_lora_to_output: - title: Apply Lora To Output + required: + - id + - model + - results + title: ModerationObject + type: object + ModerationObjectResults: + description: A moderation object. + properties: + flagged: + title: Flagged type: boolean - rank: - title: Rank - type: integer - alpha: - title: Alpha - type: integer - use_dora: + categories: anyOf: - - type: boolean + - additionalProperties: + type: boolean + type: object - type: 'null' - default: false - quantize_base: + nullable: true + category_applied_input_types: anyOf: - - type: boolean + - additionalProperties: + items: + type: string + type: array + type: object - type: 'null' - default: false + nullable: true + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig + - flagged + title: ModerationObjectResults type: object - QATFinetuningConfig: - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. + Prompt: + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. properties: - type: - const: QAT - default: QAT - title: Type - type: string - quantizer_name: - title: Quantizer Name - type: string - group_size: - title: Group Size + prompt: + anyOf: + - type: string + - type: 'null' + description: The system prompt with variable placeholders + nullable: true + version: + description: Version (integer starting at 1, incremented on save) + minimum: 1 + title: Version type: integer + prompt_id: + description: Unique identifier in format 'pmpt_<48-digit-hash>' + title: Prompt Id + type: string + variables: + description: List of variable names that can be used in the prompt template + items: + type: string + title: Variables + type: array + is_default: + default: false + description: Boolean indicating whether this version is the default version + title: Is Default + type: boolean required: - - quantizer_name - - group_size - title: QATFinetuningConfig + - version + - prompt_id + title: Prompt type: object - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - SpanEndPayload: - description: Payload for a span end event. + ListPromptsResponse: + description: Response model to list prompts. properties: - type: - const: span_end - default: span_end - title: Type - type: string - status: - $ref: '#/components/schemas/SpanStatus' + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array required: - - status - title: SpanEndPayload + - data + title: ListPromptsResponse type: object - SpanStartPayload: - description: Payload for a span start event. + ProviderInfo: + description: Information about a registered provider including its configuration and health status. properties: - type: - const: span_start - default: span_start - title: Type + api: + title: Api type: string - name: - title: Name + provider_id: + title: Provider Id type: string - parent_span_id: - anyOf: - - type: string - - type: 'null' - nullable: true + provider_type: + title: Provider Type + type: string + config: + additionalProperties: true + title: Config + type: object + health: + additionalProperties: true + title: Health + type: object required: - - name - title: SpanStartPayload + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. + ListProvidersResponse: + description: Response containing a list of all available providers. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: metric - default: metric - title: Type + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array + required: + - data + title: ListProvidersResponse + type: object + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. + 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 - metric: - title: Metric + last_id: + title: Last Id type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit + object: + const: list + default: list + title: Object type: string required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. + OpenAIResponseError: + description: Error details for failed OpenAI response requests. properties: - trace_id: - title: Trace Id + code: + title: Code type: string - span_id: - title: Span Id + message: + title: Message type: string - timestamp: - format: date-time - title: Timestamp + required: + - code + - message + title: OpenAIResponseError + type: object + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + OpenAIResponseInputToolFileSearch: + description: File search tool configuration for OpenAI response inputs. + properties: + type: + const: file_search + default: file_search + title: Type type: string - attributes: + vector_store_ids: + items: + type: string + title: Vector Store Ids + type: array + filters: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) + - additionalProperties: true type: object - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload + nullable: true + max_num_results: + anyOf: + - maximum: 50 + minimum: 1 + type: integer + - type: 'null' + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + nullable: true + title: SearchRankingOptions required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent + - vector_store_ids + title: OpenAIResponseInputToolFileSearch type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. + OpenAIResponseInputToolFunction: + description: Function tool configuration for OpenAI response inputs. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id + type: + const: function + default: function + title: Type type: string - timestamp: - format: date-time - title: Timestamp + name: + title: Name type: string - attributes: + description: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) + - type: string + - type: 'null' + nullable: true + parameters: + anyOf: + - additionalProperties: true type: object - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message - type: string - severity: - $ref: '#/components/schemas/LogSeverity' + strict: + anyOf: + - type: boolean + - type: 'null' + nullable: true required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent + - name + - parameters + title: OpenAIResponseInputToolFunction type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. + OpenAIResponseInputToolWebSearch: + description: Web search tool configuration for OpenAI response inputs. 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Data - type: array - object: - const: list - default: list - title: Object + type: + default: web_search + title: Type type: string - required: - - data - title: ListOpenAIResponseInputItem + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + search_context_size: + anyOf: + - pattern: ^low|medium|high$ + type: string + - type: 'null' + default: medium + title: OpenAIResponseInputToolWebSearch type: object OpenAIResponseObjectWithInput: description: OpenAI response object extended with input context information. @@ -4414,53 +3432,158 @@ components: - input title: OpenAIResponseObjectWithInput type: object - ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + OpenAIResponsePrompt: + description: OpenAI compatible Prompt object that is used in OpenAI responses. properties: - data: - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - title: Data - type: array - has_more: - title: Has More - type: boolean - first_id: - title: First Id + id: + title: Id type: string - last_id: - title: Last Id + variables: + anyOf: + - additionalProperties: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: object + - type: 'null' + nullable: true + version: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - id + title: OpenAIResponsePrompt + type: object + OpenAIResponseText: + description: Text response configuration for OpenAI responses. + properties: + format: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat + - type: 'null' + nullable: true + title: OpenAIResponseTextFormat + title: OpenAIResponseText + type: object + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + properties: + type: + const: mcp + default: mcp + title: Type type: string - object: - const: list - default: list - title: Object + server_label: + title: Server Label type: string + allowed_tools: + anyOf: + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter + - type: 'null' + title: list[string] | AllowedToolsFilter + nullable: true required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject + - server_label + title: OpenAIResponseToolMCP type: object - OpenAIDeleteResponseObject: - description: Response object confirming deletion of an OpenAI response. + OpenAIResponseUsage: + description: Usage information for OpenAI response. properties: - id: - title: Id - type: string - object: - const: response - default: response - title: Object - type: string - deleted: - default: true - title: Deleted - type: boolean + 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: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails + - type: 'null' + nullable: true + title: OpenAIResponseUsageInputTokensDetails + output_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails + - type: 'null' + nullable: true + title: OpenAIResponseUsageOutputTokensDetails required: - - id - title: OpenAIDeleteResponseObject + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage type: object ResponseGuardrailSpec: description: Specification for a guardrail to apply during response generation. @@ -4472,1551 +3595,1444 @@ components: - type title: ResponseGuardrailSpec type: object - Batch: - additionalProperties: true + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: - id: - title: Id - type: string - completion_window: - title: Completion Window - type: string - created_at: - title: Created At - type: integer - endpoint: - title: Endpoint - type: string - input_file_id: - title: Input File Id + type: + const: mcp + default: mcp + title: Type type: string - object: - const: batch - title: Object + server_label: + title: Server Label type: string - status: - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - title: Status + server_url: + title: Server Url type: string - cancelled_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - cancelling_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - completed_at: + headers: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' nullable: true - error_file_id: + authorization: anyOf: - type: string - type: 'null' nullable: true - errors: - anyOf: - - $ref: '#/components/schemas/Errors' - title: Errors - - type: 'null' - nullable: true - title: Errors - expired_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - expires_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - failed_at: + require_approval: anyOf: - - type: integer - - type: 'null' - nullable: true - finalizing_at: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + title: ApprovalFilter + default: never + title: string | ApprovalFilter + allowed_tools: anyOf: - - type: integer + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' + title: list[string] | AllowedToolsFilter nullable: true - in_progress_at: + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + type: object + OpenAIResponseObject: + description: Complete OpenAI response object containing generation results and metadata. + properties: + created_at: + title: Created At + type: integer + error: anyOf: - - type: integer + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' nullable: true - metadata: + title: OpenAIResponseError + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output + type: array + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: anyOf: - - additionalProperties: - type: string - type: object + - type: string - type: 'null' nullable: true - model: + prompt: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' nullable: true - output_file_id: + title: OpenAIResponsePrompt + status: + title: Status + type: string + temperature: anyOf: - - type: string + - type: number - type: 'null' nullable: true - request_counts: + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: anyOf: - - $ref: '#/components/schemas/BatchRequestCounts' - title: BatchRequestCounts + - type: number - type: 'null' nullable: true - title: BatchRequestCounts - usage: + tools: anyOf: - - $ref: '#/components/schemas/BatchUsage' - title: BatchUsage + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array - type: 'null' nullable: true - title: BatchUsage - required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - type: object - BatchError: - additionalProperties: true - properties: - code: + truncation: anyOf: - type: string - type: 'null' nullable: true - line: + usage: anyOf: - - type: integer + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' nullable: true - message: + title: OpenAIResponseUsage + instructions: anyOf: - type: string - type: 'null' nullable: true - param: + max_tool_calls: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - title: BatchError - type: object - BatchRequestCounts: - additionalProperties: true - properties: - completed: - title: Completed - type: integer - failed: - title: Failed - type: integer - total: - title: Total - type: integer - required: - - completed - - failed - - total - title: BatchRequestCounts - type: object - BatchUsage: - additionalProperties: true - properties: - input_tokens: - title: Input Tokens - type: integer - input_tokens_details: - $ref: '#/components/schemas/InputTokensDetails' - output_tokens: - title: Output Tokens - type: integer - output_tokens_details: - $ref: '#/components/schemas/OutputTokensDetails' - total_tokens: - title: Total Tokens - type: integer required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject type: object - Errors: - additionalProperties: true + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. properties: - data: + type: + const: output_text + default: output_text + title: Type + type: string + text: + title: Text + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations + type: array + logprobs: anyOf: - items: - $ref: '#/components/schemas/BatchError' + additionalProperties: true + type: object type: array - type: 'null' nullable: true - object: - anyOf: - - type: string - - type: 'null' - nullable: true - title: Errors + required: + - text + title: OpenAIResponseContentPartOutputText type: object - InputTokensDetails: - additionalProperties: true + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. properties: - cached_tokens: - title: Cached Tokens - type: integer + type: + const: summary_text + default: summary_text + title: Type + type: string + text: + title: Text + type: string required: - - cached_tokens - title: InputTokensDetails + - text + title: OpenAIResponseContentPartReasoningSummary type: object - OutputTokensDetails: - additionalProperties: true + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. properties: - reasoning_tokens: - title: Reasoning Tokens - type: integer + type: + const: reasoning_text + default: reasoning_text + title: Type + type: string + text: + title: Text + type: string required: - - reasoning_tokens - title: OutputTokensDetails + - text + title: OpenAIResponseContentPartReasoningText type: object - ListBatchesResponse: - description: Response containing a list of batch objects. + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. properties: - object: - const: list - default: list - title: Object + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.completed + default: response.completed + title: Type type: string - data: - description: List of batch objects - items: - $ref: '#/components/schemas/Batch' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: ID of the last batch in the list - nullable: true - has_more: - default: false - description: Whether there are more batches available - title: Has More - type: boolean required: - - data - title: ListBatchesResponse + - response + title: OpenAIResponseObjectStreamResponseCompleted type: object - Benchmark: - description: A benchmark resource for evaluating model performance. + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + content_index: + title: Content Index + type: integer + response_id: + title: Response Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer type: - const: benchmark - default: benchmark + const: response.content_part.added + default: response.content_part.added 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 - ListBenchmarksResponse: - properties: - data: - items: - $ref: '#/components/schemas/Benchmark' - title: Data - type: array required: - - data - title: ListBenchmarksResponse + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded type: object - ImageDelta: - description: An image content delta for streaming responses. + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer type: - const: image - default: image + const: response.content_part.done + default: response.content_part.done title: Type type: string - image: - format: binary - title: Image - type: string required: - - image - title: ImageDelta + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone type: object - TextDelta: - description: A text content delta for streaming responses. + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' type: - const: text - default: text + const: response.created + default: response.created title: Type type: string - text: - title: Text - type: string required: - - text - title: TextDelta + - response + title: OpenAIResponseObjectStreamResponseCreated type: object - JobStatus: - description: Status of a job execution. - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string - Job: - description: A job execution instance with status tracking. + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. properties: - job_id: - title: Job Id + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.failed + default: response.failed + title: Type type: string - status: - $ref: '#/components/schemas/JobStatus' required: - - job_id - - status - title: Job + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed type: object - MetricInResponse: - description: A metric value included in API responses. + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. properties: - metric: - title: Metric + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - metric - - value - title: MetricInResponse - type: object - PaginatedResponse: - description: A generic paginated response that follows a simple format. - properties: - data: - items: - additionalProperties: true - type: object - title: Data - type: array - has_more: - title: Has More - type: boolean - url: - anyOf: - - type: string - - type: 'null' - nullable: true required: - - data - - has_more - title: PaginatedResponse + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted type: object - PostTrainingMetric: - description: Training metrics captured during post-training jobs. + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. properties: - epoch: - title: Epoch + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - train_loss: - title: Train Loss - type: number - validation_loss: - title: Validation Loss - type: number - perplexity: - title: Perplexity - type: number + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type + type: string required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress type: object - Checkpoint: - description: Checkpoint created during training runs. + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. properties: - identifier: - title: Identifier - type: string - created_at: - format: date-time - title: Created At + item_id: + title: Item Id type: string - epoch: - title: Epoch + output_index: + title: Output Index type: integer - post_training_job_id: - title: Post Training Job Id - type: string - path: - title: Path + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type type: string - training_metrics: - anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' - title: PostTrainingMetric - - type: 'null' - nullable: true - title: PostTrainingMetric required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: dialog - default: dialog + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta title: Type type: string - title: DialogType + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta type: object - Conversation: - description: OpenAI-compatible conversation object. + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. properties: - id: - description: The unique ID of the conversation. - title: Id + arguments: + title: Arguments type: string - object: - const: conversation - default: conversation - description: The object type, which is always conversation. - title: Object + item_id: + title: Item Id type: string - created_at: - description: The time at which the conversation was created, measured in seconds since the Unix epoch. - title: Created At + output_index: + title: Output Index 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. - nullable: true - 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. - nullable: true + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type + type: string required: - - id - - created_at - title: Conversation + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone type: object - ConversationDeletedResource: - description: Response for deleted conversation. + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. properties: - id: - description: The deleted conversation identifier - title: Id - type: string - object: - default: conversation.deleted - description: Object type - title: Object + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type type: string - deleted: - default: true - description: Whether the object was deleted - title: Deleted - type: boolean required: - - id - title: ConversationDeletedResource + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.incomplete + default: response.incomplete + title: Type + type: string required: - - items - title: ConversationItemCreateRequest + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete type: object - ConversationItemDeletedResource: - description: Response for deleted conversation item. + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: properties: - id: - description: The deleted item identifier - title: Id + delta: + title: Delta type: string - object: - default: conversation.item.deleted - description: Object type - title: Object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type type: string - deleted: - default: true - description: Whether the object was deleted - title: Deleted - type: boolean required: - - id - title: ConversationItemDeletedResource + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta type: object - ConversationItemList: - description: List of conversation items with pagination. + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: properties: - object: - default: list - description: Object type - title: Object + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type type: string - data: - description: List of conversation items - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the first item in the list - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the last item in the list - nullable: true - has_more: - default: false - description: Whether there are more items available - title: Has More - type: boolean required: - - data - title: ConversationItemList + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer type: - const: message - default: message + const: response.mcp_call.failed + default: response.mcp_call.failed title: Type type: string - object: - const: message - default: message - title: Object - type: string required: - - id - - content - - role - - status - title: ConversationMessage + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed type: object - DatasetPurpose: - description: Purpose of the dataset. Each purpose has a required input data schema. - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string - Dataset: - description: Dataset resource for storing and accessing training or evaluation data. + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. 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 - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: dataset - default: dataset + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress title: Type type: string - purpose: - $ref: '#/components/schemas/DatasetPurpose' - source: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - metadata: - additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata - type: object required: - - identifier - - provider_id - - purpose - - source - title: Dataset + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress type: object - ListDatasetsResponse: - description: Response from listing datasets. + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: properties: - data: - items: - $ref: '#/components/schemas/Dataset' - title: Data - type: array + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type + type: string required: - - data - title: ListDatasetsResponse + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted type: object - Error: - description: Error response from the API. Roughly follows RFC 7807. + OpenAIResponseObjectStreamResponseMcpListToolsFailed: properties: - status: - title: Status + sequence_number: + title: Sequence Number type: integer - title: - title: Title - type: string - detail: - title: Detail + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type type: string - instance: - anyOf: - - type: string - - type: 'null' - nullable: true required: - - status - - title - - detail - title: Error + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed type: object - Api: - description: Enumeration of all available APIs in the Llama Stack system. - enum: - - providers - - inference - - safety - - agents - - batches - - vector_io - - datasetio - - scoring - - eval - - post_training - - tool_runtime - - models - - shields - - vector_stores - - datasets - - scoring_functions - - benchmarks - - tool_groups - - files - - prompts - - conversations - - inspect - title: Api - type: string - InlineProviderSpec: + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. + properties: + response_id: + title: Response Id + type: string + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.added + default: response.output_item.added + title: Type type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - container_image: - anyOf: - - type: string - - type: 'null' - description: |2 - - The container image to use for this implementation. If one is provided, pip_packages will be ignored. - If a provider depends on other providers, the dependencies MUST NOT specify a container image. - nullable: true - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true required: - - api - - provider_type - - config_class - title: InlineProviderSpec + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded type: object - ModelType: - description: Enumeration of supported model types in Llama Stack. - enum: - - llm - - embedding - - rerank - title: ModelType - type: string - Model: - description: A model resource representing an AI model registered in Llama Stack. + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + response_id: + title: Response Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done + title: Type + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone + type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. + properties: + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + sequence_number: + title: Sequence Number + type: integer type: - const: model - default: model + const: response.output_text.annotation.added + default: response.output_text.annotation.added title: Type type: string - metadata: - additionalProperties: true - description: Any additional metadata for this model - title: Metadata - type: object - model_type: - $ref: '#/components/schemas/ModelType' - default: llm required: - - identifier - - provider_id - title: Model + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded type: object - ProviderSpec: + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.delta + default: response.output_text.delta + title: Type type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array required: - - api - - provider_type - - config_class - title: ProviderSpec + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta type: object - RemoteProviderSpec: + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type + content_index: + title: Content Index + type: integer + text: + title: Text type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + item_id: + title: Item Id type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - adapter_type: - description: Unique identifier for this adapter - title: Adapter Type + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done + title: Type type: string - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true required: - - api - - provider_type - - config_class - - adapter_type - title: RemoteProviderSpec + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone type: object - ScoringFn: - description: A scoring function resource for evaluating model outputs. + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + item_id: + title: Item Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. + properties: + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: scoring_function - default: scoring_function + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done title: Type type: string - description: - anyOf: - - type: string - - type: 'null' - 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: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - params: - anyOf: - - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval - title: Params - nullable: true required: - - identifier - - provider_id - - return_type - title: ScoringFn + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone type: object - Shield: - description: A safety shield resource that can be used to check content. + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + delta: + title: Delta type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: shield - default: shield + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta title: Type type: string - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true required: - - identifier - - provider_id - title: Shield + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta type: object - ToolGroup: - description: A group of related tools managed together. + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + text: + title: Text type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: tool_group - default: tool_group + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done title: Type type: string - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - nullable: true - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true required: - - identifier - - provider_id - title: ToolGroup + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone type: object - ModelCandidate: - description: A model candidate for evaluation. + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: model - default: model + const: response.reasoning_text.delta + default: response.reasoning_text.delta title: Type type: string - model: - title: Model - type: string - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: - anyOf: - - $ref: '#/components/schemas/SystemMessage' - title: SystemMessage - - type: 'null' - nullable: true - title: SystemMessage required: - - model - - sampling_params - title: ModelCandidate + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta type: object - SamplingParams: - description: Sampling parameters. + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. properties: - strategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - max_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - repetition_penalty: - anyOf: - - type: number - - type: 'null' - default: 1.0 - stop: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - title: SamplingParams + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done + title: Type + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone type: object - SystemMessage: - description: A system message providing instructions or context to the model. + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. properties: - role: - const: system - default: system - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.delta + default: response.refusal.delta + title: Type + type: string required: - - content - title: SystemMessage + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta type: object - BenchmarkConfig: - description: A benchmark configuration for evaluation. + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - scoring_params: - additionalProperties: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - description: Map between scoring function id and parameters for each scoring function you want to run - title: Scoring Params - type: object - num_examples: - anyOf: - - type: integer - - type: 'null' - description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - nullable: true + content_index: + title: Content Index + type: integer + refusal: + title: Refusal + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.done + default: response.refusal.done + title: Type + type: string required: - - eval_candidate - title: BenchmarkConfig + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone type: object - ScoringResult: - description: A scoring result for a single row. + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. properties: - score_rows: - items: - additionalProperties: true - type: object - title: Score Rows - type: array - aggregated_results: - additionalProperties: true - title: Aggregated Results - type: object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type + type: string required: - - score_rows - - aggregated_results - title: ScoringResult + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted type: object - EvaluateResponse: - description: The response from an evaluation. + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. properties: - generations: - items: - additionalProperties: true - type: object - title: Generations - type: array - scores: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Scores - type: object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress + title: Type + type: string required: - - generations - - scores - title: EvaluateResponse + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress 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) + OpenAIResponseObjectStreamResponseWebSearchCallSearching: properties: - anchor: - const: created_at - title: Anchor + item_id: + title: Item Id type: string - seconds: - maximum: 2592000 - minimum: 3600 - title: Seconds + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number type: integer + type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type + type: string required: - - anchor - - seconds - title: ExpiresAfter + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching type: object - OpenAIFileObject: - description: OpenAI File object as defined in the OpenAI Files API. + OpenAIDeleteResponseObject: + description: Response object confirming deletion of an OpenAI response. 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 + object: + const: response + default: response + title: Object type: string - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' + deleted: + default: true + title: Deleted + type: boolean required: - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject + title: OpenAIDeleteResponseObject type: object - OpenAIFilePurpose: - description: Valid purpose values for OpenAI Files API. - enum: - - assistants - - batch - title: OpenAIFilePurpose - type: string - ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. properties: data: items: - $ref: '#/components/schemas/OpenAIFileObject' + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage 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 @@ -6024,1017 +5040,1677 @@ components: type: string required: - data - - has_more - - first_id - - last_id - title: ListOpenAIFileResponse + title: ListOpenAIResponseInputItem type: object - OpenAIFileDeleteResponse: - description: Response for deleting a file in OpenAI Files API. + RunShieldResponse: + description: Response from running a safety shield. properties: - id: - title: Id - type: string - object: - const: file - default: file - title: Object - type: string - deleted: - title: Deleted - type: boolean + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation + - type: 'null' + nullable: true + title: SafetyViolation + title: RunShieldResponse + type: object + SafetyViolation: + description: Details of a safety violation detected by content moderation. + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - id - - deleted - title: OpenAIFileDeleteResponse + - violation_level + title: SafetyViolation type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). + ViolationLevel: + description: Severity level of a safety violation. + enum: + - info + - warn + - error + title: ViolationLevel + type: string + AggregationFunctionType: + description: Types of aggregation functions for scoring results. + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + type: string + ArrayType: + description: Parameter type for array values. properties: type: - const: bf16 - default: bf16 + const: array + default: array title: Type type: string - title: Bf16QuantizationConfig + title: ArrayType type: object - EmbeddingsResponse: - description: Response containing generated embeddings. + BasicScoringFnParams: + description: Parameters for basic scoring function configuration. properties: - embeddings: + type: + const: basic + default: basic + title: Type + type: string + aggregation_functions: + description: Aggregation functions to apply to the scores of each row items: - items: - type: number - type: array - title: Embeddings + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions type: array - required: - - embeddings - title: EmbeddingsResponse + title: BasicScoringFnParams type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. + BooleanType: + description: Parameter type for boolean values. properties: type: - const: fp8_mixed - default: fp8_mixed + const: boolean + default: boolean title: Type type: string - title: Fp8QuantizationConfig + title: BooleanType type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. + ChatCompletionInputType: + description: Parameter type for chat completion input. properties: type: - const: int4_mixed - default: int4_mixed + const: chat_completion_input + default: chat_completion_input title: Type type: string - scheme: - anyOf: - - type: string - - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig + title: ChatCompletionInputType type: object - OpenAIChatCompletionUsage: - description: Usage information for OpenAI chat completion. + CompletionInputType: + description: Parameter type for completion input. 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: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' - title: OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - completion_tokens_details: + type: + const: completion_input + default: completion_input + title: Type + type: string + title: CompletionInputType + type: object + JsonType: + description: Parameter type for JSON values. + properties: + type: + const: json + default: json + title: Type + type: string + title: JsonType + type: object + LLMAsJudgeScoringFnParams: + description: Parameters for LLM-as-judge scoring function configuration. + properties: + type: + const: llm_as_judge + default: llm_as_judge + title: Type + type: string + judge_model: + title: Judge Model + type: string + prompt_template: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' - title: OpenAIChatCompletionUsageCompletionTokensDetails + - type: string - type: 'null' nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage + - judge_model + title: LLMAsJudgeScoringFnParams + type: object + NumberType: + description: Parameter type for numeric values. + properties: + type: + const: number + default: number + title: Type + type: string + title: NumberType + type: object + ObjectType: + description: Parameter type for object values. + properties: + type: + const: object + default: object + title: Type + type: string + title: ObjectType + type: object + RegexParserScoringFnParams: + description: Parameters for regex parser scoring function configuration. + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array + title: RegexParserScoringFnParams type: object - OpenAIChatCompletionUsageCompletionTokensDetails: - description: Token details for output tokens in OpenAI chat completion usage. + ScoringFn: + description: A scoring function resource for evaluating model outputs. properties: - reasoning_tokens: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier + type: string + provider_resource_id: anyOf: - - type: integer + - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object - OpenAIChatCompletionUsagePromptTokensDetails: - description: Token details for prompt tokens in OpenAI chat completion usage. - properties: - cached_tokens: + 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: integer + - type: string - type: 'null' nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - properties: - message: + 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: - assistant: '#/components/schemas/OpenAIAssistantMessageParam' - developer: '#/components/schemas/OpenAIDeveloperMessageParam' - system: '#/components/schemas/OpenAISystemMessageParam' - tool: '#/components/schemas/OpenAIToolMessageParam' - user: '#/components/schemas/OpenAIUserMessageParam' - propertyName: role + 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/OpenAIUserMessageParam' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + - $ref: '#/components/schemas/StringType' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + params: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + title: Params nullable: true - title: OpenAIChoiceLogprobs required: - - message - - finish_reason - - index - title: OpenAIChoice + - identifier + - provider_id + - return_type + title: ScoringFn type: object - OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + StringType: + description: Parameter type for string values. properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - nullable: true - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - nullable: true - title: OpenAIChoiceLogprobs + type: + const: string + default: string + title: Type + type: string + title: StringType type: object - OpenAICompletionWithInputMessages: + UnionType: + description: Parameter type for union values. properties: - id: - title: Id + type: + const: union + default: union + title: Type type: string - choices: + title: UnionType + type: object + ListScoringFunctionsResponse: + properties: + data: items: - $ref: '#/components/schemas/OpenAIChoice' - title: Choices + $ref: '#/components/schemas/ScoringFn' + title: Data 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: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsage - input_messages: + required: + - data + title: ListScoringFunctionsResponse + type: object + ScoreResponse: + description: The response from scoring. + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object + required: + - results + title: ScoreResponse + type: object + ScoringResult: + description: A scoring result for a single row. + properties: + score_rows: 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Input Messages + additionalProperties: true + type: object + title: Score Rows type: array + aggregated_results: + additionalProperties: true + title: Aggregated Results + type: object required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages + - score_rows + - aggregated_results + title: ScoringResult 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 + ScoreBatchResponse: + description: Response from batch scoring operations on datasets. properties: - token: - title: Token - type: string - bytes: + dataset_id: anyOf: - - items: - type: integer - type: array + - type: string - type: 'null' nullable: true - logprob: - title: Logprob - type: number - top_logprobs: - items: - $ref: '#/components/schemas/OpenAITopLogProb' - title: Top Logprobs - type: array + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object required: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb + - results + title: ScoreBatchResponse 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 + Shield: + description: A safety shield resource that can be used to check content. properties: - token: - title: Token + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - bytes: + provider_resource_id: anyOf: - - items: - type: integer - type: array + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string + type: + const: shield + default: shield + title: Type + type: string + params: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - logprob: - title: Logprob - type: number required: - - token - - logprob - title: OpenAITopLogProb + - identifier + - provider_id + title: Shield type: object - ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. + ListShieldsResponse: properties: data: items: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + $ref: '#/components/schemas/Shield' 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 + title: ListShieldsResponse type: object - OpenAIChatCompletion: - description: Response from an OpenAI-compatible chat completion request. + ImageContentItem: + description: A image content item properties: - id: - title: Id + type: + const: image + default: image + title: Type type: string - choices: - items: - $ref: '#/components/schemas/OpenAIChoice' - title: Choices - type: array - object: - const: chat.completion - default: chat.completion - title: Object + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + TextContentItem: + description: A text content item + properties: + type: + const: text + default: text + title: Type type: string - created: - title: Created - type: integer - model: - title: Model + text: + title: Text type: string - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsage required: - - id - - choices - - created - - model - title: OpenAIChatCompletion + - text + title: TextContentItem type: object - OpenAIChoiceDelta: - description: A delta from an OpenAI-compatible chat completion streaming response. + ToolInvocationResult: + description: Result of a tool invocation. properties: content: anyOf: - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true + error_message: + anyOf: + - type: string + - type: 'null' + nullable: true + error_code: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - refusal: + title: ToolInvocationResult + type: object + URL: + description: A URL reference to external content. + properties: + uri: + title: Uri + type: string + required: + - uri + title: URL + type: object + ToolDef: + description: Tool definition used in runtime contexts. + properties: + toolgroup_id: anyOf: - type: string - type: 'null' nullable: true - role: + name: + title: Name + type: string + description: anyOf: - type: string - type: 'null' nullable: true - tool_calls: + input_schema: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - reasoning_content: + output_schema: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceDelta - type: object - OpenAIChunkChoice: - description: A chunk choice from an OpenAI-compatible chat completion streaming response. - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + metadata: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceLogprobs required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice + - name + title: ToolDef type: object - OpenAIChatCompletionChunk: - description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + ListToolDefsResponse: + description: Response containing a list of tool definitions. properties: - id: - title: Id - type: string - choices: + data: items: - $ref: '#/components/schemas/OpenAIChunkChoice' - title: Choices + $ref: '#/components/schemas/ToolDef' + title: Data type: array - object: - const: chat.completion.chunk - default: chat.completion.chunk - title: Object - type: string - created: - title: Created - type: integer - model: - title: Model + required: + - data + title: ListToolDefsResponse + type: object + ToolGroup: + description: A group of related tools managed together. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - usage: + provider_resource_id: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage + - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true - title: OpenAIChatCompletionUsage - required: - - id - - choices - - created - - model - title: OpenAIChatCompletionChunk - type: object - OpenAIChatCompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible chat completion endpoint. - properties: - model: - title: Model + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - minItems: 1 - title: Messages - type: array - frequency_penalty: + type: + const: tool_group + default: tool_group + title: Type + type: string + mcp_endpoint: anyOf: - - type: number + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true - function_call: + title: URL + args: anyOf: - - type: string - additionalProperties: true type: object - type: 'null' - title: string | object nullable: true - functions: + required: + - identifier + - provider_id + title: ToolGroup + type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object + Chunk: + description: A chunk of content that can be inserted into a vector database. + properties: + content: anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: - additionalProperties: true - type: object + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - - type: 'null' - nullable: true - logit_bias: + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: anyOf: - - additionalProperties: + - items: type: number - type: object - - type: 'null' - nullable: true - logprobs: - anyOf: - - type: boolean - - type: 'null' - nullable: true - max_completion_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - max_tokens: - anyOf: - - type: integer + type: array - type: 'null' nullable: true - n: + chunk_metadata: anyOf: - - type: integer + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true - parallel_tool_calls: + title: ChunkMetadata + required: + - content + - chunk_id + 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. + properties: + chunk_id: anyOf: - - type: boolean + - type: string - type: 'null' nullable: true - presence_penalty: + document_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - response_format: + source: anyOf: - - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: string - type: 'null' - title: Response Format nullable: true - seed: + created_timestamp: anyOf: - type: integer - type: 'null' nullable: true - stop: + updated_timestamp: anyOf: - - type: string - - items: - type: string - type: array - title: list[string] + - type: integer - type: 'null' - title: string | list[string] nullable: true - stream: + chunk_window: anyOf: - - type: boolean + - type: string - type: 'null' nullable: true - stream_options: + chunk_tokenizer: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - temperature: + chunk_embedding_model: anyOf: - - type: number + - type: string - type: 'null' nullable: true - tool_choice: + chunk_embedding_dimension: anyOf: - - type: string - - additionalProperties: true - type: object + - type: integer - type: 'null' - title: string | object nullable: true - tools: + content_token_count: anyOf: - - items: - additionalProperties: true - type: object - type: array + - type: integer - type: 'null' nullable: true - top_logprobs: + metadata_token_count: anyOf: - type: integer - type: 'null' nullable: true - top_p: + title: ChunkMetadata + type: object + QueryChunksResponse: + description: Response from querying chunks in a vector database. + properties: + chunks: + items: + $ref: '#/components/schemas/Chunk' + title: Chunks + type: array + scores: + items: + type: number + title: Scores + type: array + required: + - chunks + - scores + title: QueryChunksResponse + type: object + VectorStoreFileCounts: + description: File processing status counts for a 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 + VectorStoreListResponse: + description: Response from listing vector stores. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - user: + last_id: anyOf: - type: string - type: 'null' nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody + - data + title: VectorStoreListResponse 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 + VectorStoreObject: + description: OpenAI Vector Store object. properties: - finish_reason: - title: Finish Reason + id: + title: Id type: string - text: - title: Text + object: + default: vector_store + title: Object type: string - index: - title: Index + created_at: + title: Created At type: integer - logprobs: + name: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - type: string - type: 'null' nullable: true - title: OpenAIChoiceLogprobs + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + default: completed + title: Status + type: string + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + expires_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + last_active_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - finish_reason - - text - - index - title: OpenAICompletionChoice + - id + - created_at + - file_counts + title: VectorStoreObject type: object - OpenAICompletion: - 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" + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + VectorStoreChunkingStrategyAuto: + description: Automatic chunking strategy for vector store files. properties: - id: - title: Id - type: string - choices: - items: - $ref: '#/components/schemas/OpenAICompletionChoice' - title: Choices - type: array - created: - title: Created - type: integer - model: - title: Model + type: + const: auto + default: auto + title: Type type: string - object: - const: text_completion - default: text_completion - title: Object + title: VectorStoreChunkingStrategyAuto + type: object + VectorStoreChunkingStrategyStatic: + description: Static chunking strategy with configurable parameters. + properties: + type: + const: static + default: static + title: Type type: string + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' required: - - id - - choices - - created - - model - title: OpenAICompletion + - static + title: VectorStoreChunkingStrategyStatic type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens + VectorStoreChunkingStrategyStaticConfig: + description: Configuration for static chunking strategy. properties: - text_offset: - anyOf: - - items: - type: integer - type: array - - type: 'null' - nullable: true - token_logprobs: + 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 + OpenAICreateVectorStoreRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store with extra_body support. + properties: + name: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - tokens: + file_ids: anyOf: - items: type: string type: array - type: 'null' nullable: true - top_logprobs: + expires_after: anyOf: - - items: - additionalProperties: - type: number - type: object - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAICompletionLogprobs - type: object - OpenAICompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible completion endpoint. - properties: - model: - title: Model - type: string - prompt: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - items: - type: integer - type: array - title: list[integer] - - items: - items: - type: integer - type: array - type: array - title: list[array] - title: string | ... (4 variants) - best_of: + chunking_strategy: anyOf: - - type: integer + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' + title: Chunking Strategy nullable: true - echo: + metadata: anyOf: - - type: boolean + - additionalProperties: true + type: object - type: 'null' nullable: true - frequency_penalty: + title: OpenAICreateVectorStoreRequestWithExtraBody + type: object + VectorStoreDeleteResponse: + description: Response from deleting a vector store. + 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 + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store file batch with extra_body support. + properties: + file_ids: + items: + type: string + title: File Ids + type: array + attributes: anyOf: - - type: number + - additionalProperties: true + type: object - type: 'null' nullable: true - logit_bias: + chunking_strategy: anyOf: - - additionalProperties: - type: number - type: object + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' + title: Chunking Strategy nullable: true - logprobs: + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + type: object + VectorStoreFileBatchObject: + description: OpenAI Vector Store File Batch object. + 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: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + required: + - id + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + type: object + VectorStoreFileStatus: + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + VectorStoreFileLastError: + description: Error information for failed vector store file processing. + properties: + code: + title: Code + type: string + enum: + - server_error + - rate_limit_exceeded + default: server_error + message: + title: Message + type: string + required: + - code + - message + title: VectorStoreFileLastError + type: object + VectorStoreFileObject: + description: OpenAI Vector Store File object. + 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: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + created_at: + title: Created At + type: integer + last_error: anyOf: - - type: boolean + - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' nullable: true - max_tokens: + title: VectorStoreFileLastError + status: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + 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 + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - n: + last_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - presence_penalty: + 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. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - seed: + last_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - stop: + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListFilesResponse + type: object + VectorStoreFileDeleteResponse: + description: Response from deleting a vector store file. + 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 + VectorStoreContent: + description: Content item from a vector store file or search result. + properties: + type: + const: text + title: Type + type: string + text: + title: Text + type: string + embedding: anyOf: - - type: string - items: - type: string + type: number type: array - title: list[string] - type: 'null' - title: string | list[string] nullable: true - stream: + chunk_metadata: anyOf: - - type: boolean + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true - stream_options: + title: ChunkMetadata + metadata: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - temperature: + required: + - type + - text + title: VectorStoreContent + type: object + VectorStoreFileContentResponse: + description: Represents the parsed content of a vector store file. + properties: + object: + const: vector_store.file_content.page + default: vector_store.file_content.page + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: anyOf: - - type: number + - type: string - type: 'null' nullable: true - top_p: + required: + - data + title: VectorStoreFileContentResponse + type: object + VectorStoreSearchResponse: + description: Response from searching a vector store. + properties: + file_id: + title: File Id + type: string + filename: + title: Filename + type: string + score: + title: Score + type: number + attributes: anyOf: - - type: number + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + title: string | number | boolean + type: object - type: 'null' nullable: true - user: + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Content + type: array + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + type: object + VectorStoreSearchResponsePage: + description: Paginated response from searching a vector store. + properties: + object: + default: vector_store.search_results.page + title: Object + type: string + search_query: + items: + type: string + title: Search Query + type: array + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: anyOf: - type: string - type: 'null' nullable: true - suffix: + required: + - search_query + - data + title: VectorStoreSearchResponsePage + type: object + VersionInfo: + description: Version information for the service. + properties: + version: + title: Version + type: string + required: + - version + title: VersionInfo + type: object + PaginatedResponse: + description: A generic paginated response that follows a simple format. + properties: + data: + items: + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - data + - has_more + title: PaginatedResponse + type: object + Dataset: + description: Dataset resource for storing and accessing training or evaluation data. + 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 nullable: true + 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: '#/components/schemas/DatasetPurpose' + source: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + metadata: + additionalProperties: true + description: Any additional metadata for this dataset + title: Metadata + type: object required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody + - identifier + - provider_id + - purpose + - source + title: Dataset type: object - OpenAIEmbeddingData: - description: A single embedding data object from an OpenAI-compatible embeddings response. + RowsDataSource: + description: A dataset stored in rows. properties: - object: - const: embedding - default: embedding - title: Object + type: + const: rows + default: rows + title: Type type: string - embedding: - anyOf: - - items: - type: number - type: array - title: list[number] - - type: string - title: list[number] | string - index: - title: Index - type: integer + rows: + items: + additionalProperties: true + type: object + title: Rows + type: array required: - - embedding - - index - title: OpenAIEmbeddingData + - rows + title: RowsDataSource type: object - OpenAIEmbeddingUsage: - description: Usage information for an OpenAI-compatible embeddings response. + URIDataSource: + description: A dataset that can be obtained from a URI. properties: - prompt_tokens: - title: Prompt Tokens - type: integer - total_tokens: - title: Total Tokens - type: integer + type: + const: uri + default: uri + title: Type + type: string + uri: + title: Uri + type: string required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage + - uri + title: URIDataSource type: object - OpenAIEmbeddingsRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible embeddings endpoint. + ListDatasetsResponse: + description: Response from listing datasets. properties: - model: - title: Model + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object + Benchmark: + description: A benchmark resource for evaluating model performance. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - encoding_format: - anyOf: - - type: string - - type: 'null' - default: float - dimensions: - anyOf: - - type: integer - - type: 'null' - nullable: true - user: + provider_resource_id: anyOf: - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true + 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: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark type: object - OpenAIEmbeddingsResponse: - description: Response from an OpenAI-compatible embeddings request. + ListBenchmarksResponse: properties: - object: - const: list - default: list - title: Object - type: string data: items: - $ref: '#/components/schemas/OpenAIEmbeddingData' + $ref: '#/components/schemas/Benchmark' title: Data type: array - model: - title: Model - type: string - usage: - $ref: '#/components/schemas/OpenAIEmbeddingUsage' required: - data - - model - - usage - title: OpenAIEmbeddingsResponse + title: ListBenchmarksResponse type: object - RerankData: - description: A single rerank result from a reranking response. + BenchmarkConfig: + description: A benchmark configuration for evaluation. properties: - index: - title: Index - type: integer - relevance_score: - title: Relevance Score - type: number + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + description: Map between scoring function id and parameters for each scoring function you want to run + title: Scoring Params + type: object + num_examples: + anyOf: + - type: integer + - type: 'null' + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + nullable: true required: - - index - - relevance_score - title: RerankData + - eval_candidate + title: BenchmarkConfig type: object - RerankResponse: - description: Response from a reranking request. + GreedySamplingStrategy: + description: Greedy sampling strategy that selects the highest probability token at each step. properties: - data: - items: - $ref: '#/components/schemas/RerankData' - title: Data - type: array + type: + const: greedy + default: greedy + title: Type + type: string + title: GreedySamplingStrategy + type: object + ModelCandidate: + description: A model candidate for evaluation. + properties: + type: + const: model + default: model + title: Type + type: string + model: + title: Model + type: string + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage + - type: 'null' + nullable: true + title: SystemMessage required: - - data - title: RerankResponse + - model + - sampling_params + title: ModelCandidate type: object - TokenLogProbs: - description: Log probabilities for generated tokens. + SamplingParams: + description: Sampling parameters. properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs + strategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + repetition_penalty: + anyOf: + - type: number + - type: 'null' + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + title: SamplingParams type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. + SystemMessage: + description: A system message providing instructions or context to the model. properties: role: - const: tool - default: tool + const: system + default: system title: Role type: string - call_id: - title: Call Id - type: string content: anyOf: - type: string @@ -7065,195 +6741,229 @@ components: title: list[ImageContentItem | TextContentItem] title: string | list[ImageContentItem | TextContentItem] required: - - call_id - content - title: ToolResponseMessage + title: SystemMessage type: object - UserMessage: - description: A message from the user in a chat conversation. + TopKSamplingStrategy: + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. properties: - role: - const: user - default: user - title: Role + type: + const: top_k + default: top_k + title: Type type: string - content: + 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. + properties: + type: + const: top_p + default: top_p + title: Type + type: string + temperature: anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: + - type: number + minimum: 0.0 + - type: 'null' + top_p: anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] + - type: number - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true + default: 0.95 required: - - content - title: UserMessage + - temperature + title: TopPSamplingStrategy type: object - HealthStatus: - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - type: string - HealthInfo: - description: Health status information for the service. + EvaluateResponse: + description: The response from an evaluation. + properties: + generations: + items: + additionalProperties: true + type: object + title: Generations + type: array + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Scores + type: object + required: + - generations + - scores + title: EvaluateResponse + type: object + Job: + description: A job execution instance with status tracking. properties: + job_id: + title: Job Id + type: string status: - $ref: '#/components/schemas/HealthStatus' + $ref: '#/components/schemas/JobStatus' required: + - job_id - status - title: HealthInfo + title: Job type: object - RouteInfo: - description: Information about an API route including its path, method, and implementing providers. + RerankData: + description: A single rerank result from a reranking response. properties: - route: - title: Route - type: string - method: - title: Method - type: string - provider_types: + index: + title: Index + type: integer + relevance_score: + title: Relevance Score + type: number + required: + - index + - relevance_score + title: RerankData + type: object + RerankResponse: + description: Response from a reranking request. + properties: + data: items: - type: string - title: Provider Types + $ref: '#/components/schemas/RerankData' + title: Data type: array required: - - route - - method - - provider_types - title: RouteInfo + - data + title: RerankResponse + type: object + Checkpoint: + description: Checkpoint created during training runs. + 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: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric + - type: 'null' + nullable: true + title: PostTrainingMetric + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint type: object - ListRoutesResponse: - description: Response containing a list of all available API routes. + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. properties: - data: + job_uuid: + title: Job Uuid + type: string + checkpoints: items: - $ref: '#/components/schemas/RouteInfo' - title: Data + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints type: array required: - - data - title: ListRoutesResponse + - job_uuid + title: PostTrainingJobArtifactsResponse type: object - VersionInfo: - description: Version information for the service. + PostTrainingMetric: + description: Training metrics captured during post-training jobs. properties: - version: - title: Version - type: string + 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: - - version - title: VersionInfo + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric type: object - OpenAIModel: - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata + PostTrainingJobStatusResponse: + description: Status of a finetuning job. properties: - id: - title: Id - type: string - object: - const: model - default: model - title: Object - type: string - created: - title: Created - type: integer - owned_by: - title: Owned By + job_uuid: + title: Job Uuid type: string - custom_metadata: + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + started_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + completed_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - id - - created - - owned_by - title: OpenAIModel + - job_uuid + - status + title: PostTrainingJobStatusResponse type: object - OpenAIListModelsResponse: + ListPostTrainingJobsResponse: properties: data: items: - $ref: '#/components/schemas/OpenAIModel' + $ref: '#/components/schemas/PostTrainingJob' title: Data type: array required: - data - title: OpenAIListModelsResponse + title: ListPostTrainingJobsResponse type: object - DPOLossType: - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - type: string DPOAlignmentConfig: description: Configuration for Direct Preference Optimization (DPO) alignment. properties: @@ -7267,12 +6977,13 @@ components: - beta title: DPOAlignmentConfig type: object - DatasetFormat: - description: Format of the training dataset. + DPOLossType: enum: - - instruct - - dialog - title: DatasetFormat + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType type: string DataConfig: description: Configuration for training data and data loading. @@ -7290,1280 +7001,1635 @@ components: $ref: '#/components/schemas/DatasetFormat' validation_dataset_id: anyOf: - - type: string + - type: string + - type: 'null' + nullable: true + packed: + anyOf: + - type: boolean + - type: 'null' + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + default: false + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + type: object + DatasetFormat: + description: Format of the training dataset. + enum: + - instruct + - dialog + title: DatasetFormat + type: string + EfficiencyConfig: + description: Configuration for memory and compute efficiency optimizations. + properties: + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + default: false + title: EfficiencyConfig + type: object + OptimizerConfig: + description: Configuration parameters for the optimization algorithm. + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + lr: + title: Lr + type: number + weight_decay: + title: Weight Decay + type: number + num_warmup_steps: + title: Num Warmup Steps + type: integer + required: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + type: object + OptimizerType: + description: Available optimizer algorithms for training. + enum: + - adam + - adamw + - sgd + title: OptimizerType + type: string + TrainingConfig: + description: Comprehensive configuration for the training process. + properties: + n_epochs: + title: N Epochs + type: integer + max_steps_per_epoch: + default: 1 + title: Max Steps Per Epoch + type: integer + gradient_accumulation_steps: + default: 1 + title: Gradient Accumulation Steps + type: integer + max_validation_steps: + anyOf: + - type: integer + - type: 'null' + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + title: DataConfig + - type: 'null' + nullable: true + title: DataConfig + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig - type: 'null' nullable: true - packed: + title: OptimizerConfig + efficiency_config: anyOf: - - type: boolean + - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig - type: 'null' - default: false - train_on_input: + nullable: true + title: EfficiencyConfig + dtype: anyOf: - - type: boolean + - type: string - type: 'null' - default: false + default: bf16 required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig + - n_epochs + title: TrainingConfig type: object - EfficiencyConfig: - description: Configuration for memory and compute efficiency optimizations. + PostTrainingJob: properties: - enable_activation_checkpointing: - anyOf: - - type: boolean - - type: 'null' - default: false - enable_activation_offloading: - anyOf: - - type: boolean - - type: 'null' - default: false - memory_efficient_fsdp_wrap: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + LoraFinetuningConfig: + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + properties: + type: + const: LoRA + default: LoRA + title: Type + type: string + lora_attn_modules: + items: + type: string + title: Lora Attn Modules + type: array + apply_lora_to_mlp: + title: Apply Lora To Mlp + type: boolean + apply_lora_to_output: + title: Apply Lora To Output + type: boolean + rank: + title: Rank + type: integer + alpha: + title: Alpha + type: integer + use_dora: anyOf: - type: boolean - type: 'null' default: false - fsdp_cpu_offload: + quantize_base: anyOf: - type: boolean - type: 'null' default: false - title: EfficiencyConfig + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig type: object - PostTrainingJob: + QATFinetuningConfig: + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: - job_uuid: - title: Job Uuid + type: + const: QAT + default: QAT + title: Type + type: string + quantizer_name: + title: Quantizer Name type: string + group_size: + title: Group Size + type: integer required: - - job_uuid - title: PostTrainingJob + - quantizer_name + - group_size + title: QATFinetuningConfig type: object - ListPostTrainingJobsResponse: + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + _URLOrData: + description: A URL or a base64 encoded string properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL data: - items: - $ref: '#/components/schemas/PostTrainingJob' - title: Data - type: array + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + nullable: true + title: _URLOrData + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object required: - - data - title: ListPostTrainingJobsResponse + - bnf + title: GrammarResponseFormat type: object - OptimizerType: - description: Available optimizer algorithms for training. - enum: - - adam - - adamw - - sgd - title: OptimizerType - type: string - OptimizerConfig: - description: Configuration parameters for the optimization algorithm. + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. properties: - optimizer_type: - $ref: '#/components/schemas/OptimizerType' - lr: - title: Lr - type: number - weight_decay: - title: Weight Decay - type: number - num_warmup_steps: - title: Num Warmup Steps - type: integer + type: + const: json_schema + default: json_schema + title: Type + type: string + json_schema: + additionalProperties: true + title: Json Schema + type: object required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig + - json_schema + title: JsonSchemaResponseFormat type: object - PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + MCPListToolsTool: + description: Tool definition returned by MCP list tools operation. properties: - job_uuid: - title: Job Uuid + input_schema: + additionalProperties: true + title: Input Schema + type: object + name: + title: Name type: string - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array + description: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - job_uuid - title: PostTrainingJobArtifactsResponse + - input_schema + - name + title: MCPListToolsTool type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. + OpenAIResponseOutputMessageFileSearchToolCallResults: + description: Search results returned by the file search operation. properties: - job_uuid: - title: Job Uuid + 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 - log_lines: - items: - type: string - title: Log Lines - type: array required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream + - attributes + - file_id + - filename + - score + - text + title: OpenAIResponseOutputMessageFileSearchToolCallResults type: object - PostTrainingJobStatusResponse: - description: Status of a finetuning job. + AllowedToolsFilter: + description: Filter configuration for restricting which MCP tools can be used. properties: - job_uuid: - title: Job Uuid - type: string - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - format: date-time - type: string - - type: 'null' - nullable: true - started_at: + tool_names: anyOf: - - format: date-time - type: string + - items: + type: string + type: array - type: 'null' nullable: true - completed_at: + title: AllowedToolsFilter + type: object + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. + properties: + always: anyOf: - - format: date-time - type: string + - items: + type: string + type: array - type: 'null' nullable: true - resources_allocated: + never: anyOf: - - additionalProperties: true - type: object + - items: + type: string + type: array - type: 'null' nullable: true - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse + title: ApprovalFilter type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - TrainingConfig: - description: Comprehensive configuration for the training process. + SearchRankingOptions: + description: Options for ranking and filtering search results. properties: - n_epochs: - title: N Epochs - type: integer - max_steps_per_epoch: - default: 1 - title: Max Steps Per Epoch - type: integer - gradient_accumulation_steps: - default: 1 - title: Gradient Accumulation Steps - type: integer - max_validation_steps: + ranker: anyOf: - - type: integer + - type: string - type: 'null' - default: 1 - data_config: + nullable: true + score_threshold: anyOf: - - $ref: '#/components/schemas/DataConfig' - title: DataConfig + - type: number - type: 'null' - nullable: true - title: DataConfig - optimizer_config: + default: 0.0 + title: SearchRankingOptions + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + OpenAIResponseTextFormat: + description: Configuration for Responses API text format. + properties: + type: + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text + name: anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - title: OptimizerConfig + - type: string - type: 'null' - nullable: true - title: OptimizerConfig - efficiency_config: + schema: anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - title: EfficiencyConfig + - additionalProperties: true + type: object - type: 'null' - nullable: true - title: EfficiencyConfig - dtype: + description: anyOf: - type: string - type: 'null' - default: bf16 - required: - - n_epochs - title: TrainingConfig - type: object - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. - properties: - job_uuid: - title: Job Uuid - type: string - finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id - type: string - validation_dataset_id: - title: Validation Dataset Id - type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - title: Hyperparam Search Config - type: object - logger_config: - additionalProperties: true - title: Logger Config - type: object - required: - - job_uuid - - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - - algorithm_config - - optimizer_config - - training_config - - hyperparam_search_config - - logger_config - title: PostTrainingRLHFRequest + strict: + anyOf: + - type: boolean + - type: 'null' + title: OpenAIResponseTextFormat type: object - Prompt: - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. + OpenAIResponseUsageInputTokensDetails: + description: Token details for input tokens in OpenAI response usage. properties: - prompt: + cached_tokens: anyOf: - - type: string + - type: integer - type: 'null' - description: The system prompt with variable placeholders nullable: true - version: - description: Version (integer starting at 1, incremented on save) - minimum: 1 - title: Version - type: integer - prompt_id: - description: Unique identifier in format 'pmpt_<48-digit-hash>' - title: Prompt Id - type: string - variables: - description: List of variable names that can be used in the prompt template - items: - type: string - title: Variables - type: array - is_default: - default: false - description: Boolean indicating whether this version is the default version - title: Is Default - type: boolean - required: - - version - - prompt_id - title: Prompt + title: OpenAIResponseUsageInputTokensDetails type: object - ListPromptsResponse: - description: Response model to list prompts. + OpenAIResponseUsageOutputTokensDetails: + description: Token details for output tokens in OpenAI response usage. properties: - data: - items: - $ref: '#/components/schemas/Prompt' - title: Data - type: array - required: - - data - title: ListPromptsResponse + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIResponseUsageOutputTokensDetails type: object - ProviderInfo: - description: Information about a registered provider including its configuration and health status. + SpanEndPayload: + description: Payload for a span end event. properties: - api: - title: Api - type: string - provider_id: - title: Provider Id - type: string - provider_type: - title: Provider Type + type: + const: span_end + default: span_end + title: Type type: string - config: - additionalProperties: true - title: Config - type: object - health: - additionalProperties: true - title: Health - type: object + status: + $ref: '#/components/schemas/SpanStatus' required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo + - status + title: SpanEndPayload type: object - ListProvidersResponse: - description: Response containing a list of all available providers. + SpanStartPayload: + description: Payload for a span start event. properties: - data: - items: - $ref: '#/components/schemas/ProviderInfo' - title: Data - type: array + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - data - title: ListProvidersResponse + - name + title: SpanStartPayload type: object - ModerationObjectResults: - description: A moderation object. + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: - flagged: - title: Flagged - type: boolean - categories: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - type: boolean + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - category_applied_input_types: + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - items: - type: string - type: array + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - category_scores: + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - type: number + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - user_message: - anyOf: - - type: string - - type: 'null' - nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - flagged - title: ModerationObjectResults - type: object - ModerationObject: - description: A moderation object. - properties: - id: - title: Id + type: + const: unstructured_log + default: unstructured_log + title: Type type: string - model: - title: Model + message: + title: Message type: string - results: - items: - $ref: '#/components/schemas/ModerationObjectResults' - title: Results - type: array + severity: + $ref: '#/components/schemas/LogSeverity' required: - - id - - model - - results - title: ModerationObject + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent type: object - SafetyViolation: - description: Details of a safety violation detected by content moderation. + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + BatchError: + additionalProperties: true properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - user_message: + code: anyOf: - type: string - type: 'null' nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - violation_level - title: SafetyViolation - type: object - ViolationLevel: - description: Severity level of a safety violation. - enum: - - info - - warn - - error - title: ViolationLevel - type: string - RunShieldResponse: - description: Response from running a safety shield. - properties: - violation: + line: anyOf: - - $ref: '#/components/schemas/SafetyViolation' - title: SafetyViolation + - type: integer - type: 'null' nullable: true - title: SafetyViolation - title: RunShieldResponse - type: object - ScoreBatchResponse: - description: Response from batch scoring operations on datasets. - properties: - dataset_id: + message: anyOf: - type: string - type: 'null' nullable: true - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Results - type: object - required: - - results - title: ScoreBatchResponse + param: + anyOf: + - type: string + - type: 'null' + nullable: true + title: BatchError type: object - ScoreResponse: - description: The response from scoring. + BatchRequestCounts: + additionalProperties: true properties: - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Results - type: object + completed: + title: Completed + type: integer + failed: + title: Failed + type: integer + total: + title: Total + type: integer required: - - results - title: ScoreResponse + - completed + - failed + - total + title: BatchRequestCounts type: object - ListScoringFunctionsResponse: + BatchUsage: + additionalProperties: true properties: - data: - items: - $ref: '#/components/schemas/ScoringFn' - title: Data - type: array + input_tokens: + title: Input Tokens + type: integer + input_tokens_details: + $ref: '#/components/schemas/InputTokensDetails' + output_tokens: + title: Output Tokens + type: integer + output_tokens_details: + $ref: '#/components/schemas/OutputTokensDetails' + total_tokens: + title: Total Tokens + type: integer required: - - data - title: ListScoringFunctionsResponse + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage type: object - ListShieldsResponse: + Errors: + additionalProperties: true properties: data: - items: - $ref: '#/components/schemas/Shield' - title: Data - type: array - required: - - data - title: ListShieldsResponse - type: object - ToolDef: - description: Tool definition used in runtime contexts. - properties: - toolgroup_id: anyOf: - - type: string + - items: + $ref: '#/components/schemas/BatchError' + type: array - type: 'null' nullable: true - name: - title: Name - type: string - description: + object: anyOf: - type: string - type: 'null' nullable: true - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true + title: Errors + type: object + InputTokensDetails: + additionalProperties: true + properties: + cached_tokens: + title: Cached Tokens + type: integer required: - - name - title: ToolDef + - cached_tokens + title: InputTokensDetails type: object - ListToolDefsResponse: - description: Response containing a list of tool definitions. + OutputTokensDetails: + additionalProperties: true properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - title: Data - type: array + reasoning_tokens: + title: Reasoning Tokens + type: integer + required: + - reasoning_tokens + title: OutputTokensDetails + type: object + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string required: - - data - title: ListToolDefsResponse + - image + title: ImageDelta type: object - ListToolGroupsResponse: - description: Response containing a list of tool groups. + TextDelta: + description: A text content delta for streaming responses. properties: - data: - items: - $ref: '#/components/schemas/ToolGroup' - title: Data - type: array + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string required: - - data - title: ListToolGroupsResponse + - text + title: TextDelta type: object - ToolGroupInput: - description: Input data for registering a tool group. + JobStatus: + description: Status of a job execution. + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + type: string + MetricInResponse: + description: A metric value included in API responses. properties: - toolgroup_id: - title: Toolgroup Id - type: string - provider_id: - title: Provider Id + metric: + title: Metric type: string - args: + value: anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: + - type: integer + - type: number + title: integer | number + unit: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string - type: 'null' nullable: true - title: URL required: - - toolgroup_id - - provider_id - title: ToolGroupInput + - metric + - value + title: MetricInResponse type: object - ToolInvocationResult: - description: Result of a tool invocation. + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: - content: - anyOf: - - type: string - - discriminator: + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true - error_message: - anyOf: - - type: string - - type: 'null' - nullable: true - error_code: - anyOf: - - type: integer - - type: 'null' - nullable: true - metadata: - anyOf: - - additionalProperties: true + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array + required: + - items + title: ConversationItemCreateRequest + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true type: object - - type: 'null' - nullable: true - title: ToolInvocationResult + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage 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. + DatasetPurpose: + description: Purpose of the dataset. Each purpose has a required input data schema. + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + title: DatasetPurpose + type: string + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + InlineProviderSpec: properties: - chunk_id: - anyOf: - - type: string - - type: 'null' - nullable: true - document_id: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - source: + deprecation_error: anyOf: - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - created_timestamp: - anyOf: - - type: integer - - type: 'null' - nullable: true - updated_timestamp: - anyOf: - - type: integer - - type: 'null' - nullable: true - chunk_window: + module: anyOf: - type: string - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - chunk_tokenizer: + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - type: string - type: 'null' nullable: true - chunk_embedding_model: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: anyOf: - type: string - type: 'null' + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. nullable: true - chunk_embedding_dimension: - anyOf: - - type: integer - - type: 'null' - nullable: true - content_token_count: - anyOf: - - type: integer - - type: 'null' - nullable: true - metadata_token_count: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: ChunkMetadata - type: object - Chunk: - description: A chunk of content that can be inserted into a vector database. - properties: - content: + description: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id - type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. nullable: true - title: ChunkMetadata required: - - content - - chunk_id - title: Chunk + - api + - provider_type + - config_class + title: InlineProviderSpec type: object - OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store file batch with extra_body support. + ProviderSpec: properties: - file_ids: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality items: - type: string - title: File Ids + $ref: '#/components/schemas/Api' + title: Api Dependencies type: array - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - chunking_strategy: - anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - nullable: true - required: - - file_ids - title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - type: object - OpenAICreateVectorStoreRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store with extra_body support. - properties: - name: + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - file_ids: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - expires_after: + deprecation_error: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - chunking_strategy: + module: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: string - type: 'null' - title: Chunking Strategy + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - metadata: + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - title: OpenAICreateVectorStoreRequestWithExtraBody - type: object - QueryChunksResponse: - description: Response from querying chunks in a vector database. - properties: - chunks: - items: - $ref: '#/components/schemas/Chunk' - title: Chunks - type: array - scores: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: items: - type: number - title: Scores + type: string + title: Deps type: array required: - - chunks - - scores - title: QueryChunksResponse + - api + - provider_type + - config_class + title: ProviderSpec type: object - VectorStoreContent: - description: Content item from a vector store file or search result. + RemoteProviderSpec: properties: - type: - const: text - title: Type + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - text: - title: Text + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class type: string - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - title: ChunkMetadata - metadata: + deprecation_error: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - required: - - type - - text - title: VectorStoreContent - type: object - VectorStoreCreateRequest: - description: Request to create a vector store. - properties: - name: + module: anyOf: - type: string - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - file_ids: + pip_packages: + description: The pip dependencies needed for this implementation items: type: string - title: File Ids + title: Pip Packages type: array - expires_after: + provider_data_validator: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - chunking_strategy: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type + type: string + description: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - title: VectorStoreCreateRequest + required: + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec type: object - VectorStoreDeleteResponse: - description: Response from deleting a vector store. + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). properties: - id: - title: Id - type: string - object: - default: vector_store.deleted - title: Object + type: + const: bf16 + default: bf16 + title: Type type: string - deleted: - default: true - title: Deleted - type: boolean - required: - - id - title: VectorStoreDeleteResponse + title: Bf16QuantizationConfig type: object - VectorStoreFileCounts: - description: File processing status counts for a vector store. + EmbeddingsResponse: + description: Response containing generated embeddings. 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 + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts + - embeddings + title: EmbeddingsResponse type: object - VectorStoreFileBatchObject: - description: OpenAI Vector Store File Batch object. + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. 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: - title: Status + type: + const: fp8_mixed + default: fp8_mixed + title: Type type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - required: - - id - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject + title: Fp8QuantizationConfig type: object - VectorStoreFileContentResponse: - description: Represents the parsed content of a vector store file. + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. properties: - object: - const: vector_store.file_content.page - default: vector_store.file_content.page - title: Object + type: + const: int4_mixed + default: int4_mixed + title: Type type: string - data: - items: - $ref: '#/components/schemas/VectorStoreContent' - title: Data - type: array - has_more: - default: false - title: Has More - type: boolean - next_page: + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig + type: object + OpenAIChatCompletionUsageCompletionTokensDetails: + description: Token details for output tokens in OpenAI chat completion usage. + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails + type: object + OpenAIChatCompletionUsagePromptTokensDetails: + description: Token details for prompt tokens in OpenAI chat completion usage. + properties: + cached_tokens: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - required: - - data - title: VectorStoreFileContentResponse + title: OpenAIChatCompletionUsagePromptTokensDetails type: object - VectorStoreFileDeleteResponse: - description: Response from deleting a vector store file. + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens 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 + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs type: object - VectorStoreFileLastError: - description: Error information for failed vector store file processing. + TokenLogProbs: + description: Log probabilities for generated tokens. properties: - code: - title: Code - type: string - enum: - - server_error - - rate_limit_exceeded - default: server_error - message: - title: Message - type: string + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object required: - - code - - message - title: VectorStoreFileLastError + - logprobs_by_token + title: TokenLogProbs type: object - VectorStoreFileObject: - description: OpenAI Vector Store File object. + ToolResponseMessage: + description: A message representing the result of a tool invocation. properties: - id: - title: Id + role: + const: tool + default: tool + title: Role type: string - object: - default: vector_store.file - title: Object + call_id: + title: Call Id type: string - attributes: - additionalProperties: true - title: Attributes - type: object - chunking_strategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - created_at: - title: Created At - type: integer - last_error: + content: anyOf: - - $ref: '#/components/schemas/VectorStoreFileLastError' - title: VectorStoreFileLastError - - type: 'null' - nullable: true - title: VectorStoreFileLastError - status: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - vector_store_id: - title: Vector Store Id - type: string + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - - id - - chunking_strategy - - created_at - - status - - vector_store_id - title: VectorStoreFileObject + - call_id + - content + title: ToolResponseMessage type: object - VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. + UserMessage: + description: A message from the user in a chat conversation. properties: - object: - default: list - title: Object + role: + const: user + default: user + title: Role type: string - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data - type: array - first_id: + content: anyOf: - type: string - - type: 'null' - nullable: true - last_id: + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: anyOf: - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] - type: 'null' + title: string | list[ImageContentItem | TextContentItem] nullable: true - has_more: - default: false - title: Has More - type: boolean required: - - data - title: VectorStoreFilesListInBatchResponse + - content + title: UserMessage type: object - VectorStoreListFilesResponse: - description: Response from listing files in a vector store. + HealthStatus: + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + type: string + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: - object: - default: list - title: Object + job_uuid: + title: Job Uuid type: string - data: + log_lines: items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data + type: string + title: Log Lines type: array - first_id: + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream + type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. + properties: + job_uuid: + title: Job Uuid + type: string + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id + type: string + provider_id: + title: Provider Id + type: string + args: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - last_id: + mcp_endpoint: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true - has_more: - default: false - title: Has More - type: boolean + title: URL required: - - data - title: VectorStoreListFilesResponse + - toolgroup_id + - provider_id + title: ToolGroupInput type: object - VectorStoreObject: - description: OpenAI Vector Store object. + VectorStoreCreateRequest: + description: Request to create a 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' nullable: true - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - status: - default: completed - title: Status - type: string + file_ids: + items: + type: string + title: File Ids + type: array expires_after: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - expires_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - last_active_at: + chunking_strategy: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' nullable: true metadata: additionalProperties: true title: Metadata type: object - required: - - id - - created_at - - file_counts - title: VectorStoreObject - type: object - VectorStoreListResponse: - description: Response from listing vector stores. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - nullable: true - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListResponse + title: VectorStoreCreateRequest type: object VectorStoreModifyRequest: description: Request to modify a vector store. @@ -8622,69 +8688,3 @@ components: - query title: VectorStoreSearchRequest type: object - VectorStoreSearchResponse: - description: Response from searching a vector store. - 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 - title: string | number | boolean - type: object - - type: 'null' - nullable: true - content: - items: - $ref: '#/components/schemas/VectorStoreContent' - title: Content - type: array - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - type: object - VectorStoreSearchResponsePage: - description: Paginated response from searching a vector store. - properties: - object: - default: vector_store.search_results.page - title: Object - type: string - search_query: - items: - type: string - title: Search Query - type: array - data: - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - title: Data - type: array - has_more: - default: false - title: Has More - type: boolean - next_page: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - search_query - - data - title: VectorStoreSearchResponsePage - type: object diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index a22f8f0c8d..b4d16eaed4 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -12,12 +12,12 @@ info: servers: - url: http://any-hosted-llama-stack.com paths: - /v1/providers/{provider_id}: + /v1/batches: get: tags: - - Providers - summary: Inspect Provider - operationId: inspect_provider_v1_providers__provider_id__get + - Batches + summary: List Batches + operationId: list_batches_v1_batches_get responses: '200': description: Successful Response @@ -36,19 +36,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: provider_id - in: path - required: true - schema: - type: string - description: 'Path parameter: provider_id' - /v1/providers: - get: + post: tags: - - Providers - summary: List Providers - operationId: list_providers_v1_providers_get + - Batches + summary: Create Batch + operationId: create_batch_v1_batches_post responses: '200': description: Successful Response @@ -67,12 +59,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/responses: + /v1/batches/{batch_id}: get: tags: - - Agents - summary: List Openai Responses - operationId: list_openai_responses_v1_responses_get + - Batches + summary: Retrieve Batch + operationId: retrieve_batch_v1_batches__batch_id__get responses: '200': description: Successful Response @@ -91,35 +83,19 @@ paths: 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/batches/{batch_id}/cancel: post: tags: - - Agents - summary: Create Openai Response - operationId: create_openai_response_v1_responses_post - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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/responses/{response_id}: - get: - tags: - - Agents - summary: Get Openai Response - operationId: get_openai_response_v1_responses__response_id__get + - Batches + summary: Cancel Batch + operationId: cancel_batch_v1_batches__batch_id__cancel_post responses: '200': description: Successful Response @@ -139,17 +115,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: response_id + - name: batch_id in: path required: true schema: type: string - description: 'Path parameter: response_id' - delete: + description: 'Path parameter: batch_id' + /v1/chat/completions: + get: tags: - - Agents - summary: Delete Openai Response - operationId: delete_openai_response_v1_responses__response_id__delete + - Inference + summary: List Chat Completions + operationId: list_chat_completions_v1_chat_completions_get responses: '200': description: Successful Response @@ -168,19 +145,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: response_id - in: path - required: true - schema: - type: string - description: 'Path parameter: response_id' - /v1/responses/{response_id}/input_items: - get: + post: tags: - - Agents - summary: List Openai Response Input Items - operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get + - Inference + summary: Openai Chat Completion + operationId: openai_chat_completion_v1_chat_completions_post responses: '200': description: Successful Response @@ -199,13 +168,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: response_id - in: path - required: true - schema: - type: string - description: 'Path parameter: response_id' /v1/chat/completions/{completion_id}: get: tags: @@ -237,12 +199,12 @@ paths: schema: type: string description: 'Path parameter: completion_id' - /v1/chat/completions: - get: + /v1/completions: + post: tags: - Inference - summary: List Chat Completions - operationId: list_chat_completions_v1_chat_completions_get + summary: Openai Completion + operationId: openai_completion_v1_completions_post responses: '200': description: Successful Response @@ -261,11 +223,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + /v1/conversations: post: tags: - - Inference - summary: Openai Chat Completion - operationId: openai_chat_completion_v1_chat_completions_post + - Conversations + summary: Create Conversation + operationId: create_conversation_v1_conversations_post responses: '200': description: Successful Response @@ -284,12 +247,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/completions: - post: + /v1/conversations/{conversation_id}: + get: tags: - - Inference - summary: Openai Completion - operationId: openai_completion_v1_completions_post + - Conversations + summary: Get Conversation + operationId: get_conversation_v1_conversations__conversation_id__get responses: '200': description: Successful Response @@ -308,12 +271,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/embeddings: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' post: tags: - - Inference - summary: Openai Embeddings - operationId: openai_embeddings_v1_embeddings_post + - Conversations + summary: Update Conversation + operationId: update_conversation_v1_conversations__conversation_id__post responses: '200': description: Successful Response @@ -332,12 +301,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/health: - get: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + delete: tags: - - Inspect - summary: Health - operationId: health_v1_health_get + - Conversations + summary: Openai Delete Conversation + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete responses: '200': description: Successful Response @@ -356,12 +331,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/inspect/routes: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items: get: tags: - - Inspect - summary: List Routes - operationId: list_routes_v1_inspect_routes_get + - Conversations + summary: List Items + operationId: list_items_v1_conversations__conversation_id__items_get responses: '200': description: Successful Response @@ -380,12 +362,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/version: - get: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + post: tags: - - Inspect - summary: Version - operationId: version_v1_version_get + - Conversations + summary: Add Items + operationId: add_items_v1_conversations__conversation_id__items_post responses: '200': description: Successful Response @@ -404,12 +392,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/batches/{batch_id}/cancel: - post: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items/{item_id}: + get: tags: - - Batches - summary: Cancel Batch - operationId: cancel_batch_v1_batches__batch_id__cancel_post + - Conversations + summary: Retrieve + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get responses: '200': description: Successful Response @@ -429,18 +424,23 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: batch_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/batches: - get: + description: 'Path parameter: conversation_id' + - name: item_id + in: path + required: true + schema: + type: string + description: 'Path parameter: item_id' + delete: tags: - - Batches - summary: List Batches - operationId: list_batches_v1_batches_get + - Conversations + summary: Openai Delete Conversation Item + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete responses: '200': description: Successful Response @@ -459,11 +459,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + - name: item_id + in: path + required: true + schema: + type: string + description: 'Path parameter: item_id' + /v1/embeddings: post: tags: - - Batches - summary: Create Batch - operationId: create_batch_v1_batches_post + - Inference + summary: Openai Embeddings + operationId: openai_embeddings_v1_embeddings_post responses: '200': description: Successful Response @@ -482,12 +496,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/batches/{batch_id}: + /v1/files: get: tags: - - Batches - summary: Retrieve Batch - operationId: retrieve_batch_v1_batches__batch_id__get + - Files + summary: Openai List Files + operationId: openai_list_files_v1_files_get responses: '200': description: Successful Response @@ -506,19 +520,11 @@ paths: 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/vector-io/insert: post: tags: - - Vector Io - summary: Insert Chunks - operationId: insert_chunks_v1_vector_io_insert_post + - Files + summary: Openai Upload File + operationId: openai_upload_file_v1_files_post responses: '200': description: Successful Response @@ -537,12 +543,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector_stores/{vector_store_id}/files: + /v1/files/{file_id}: get: tags: - - Vector Io - summary: Openai List Files In Vector Store - operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get + - Files + summary: Openai Retrieve File + operationId: openai_retrieve_file_v1_files__file_id__get responses: '200': description: Successful Response @@ -562,17 +568,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: file_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - post: + description: 'Path parameter: file_id' + delete: tags: - - Vector Io - summary: Openai Attach File To Vector Store - operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post + - Files + summary: Openai Delete File + operationId: openai_delete_file_v1_files__file_id__delete responses: '200': description: Successful Response @@ -592,18 +598,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: file_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: - post: + description: 'Path parameter: file_id' + /v1/files/{file_id}/content: + get: tags: - - Vector Io - summary: Openai Cancel Vector Store File Batch - operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post + - Files + summary: Openai Retrieve File Content + operationId: openai_retrieve_file_content_v1_files__file_id__content_get responses: '200': description: Successful Response @@ -623,24 +629,18 @@ paths: 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 + - name: file_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/vector_stores: + description: 'Path parameter: file_id' + /v1/health: get: tags: - - Vector Io - summary: Openai List Vector Stores - operationId: openai_list_vector_stores_v1_vector_stores_get + - Inspect + summary: Health + operationId: health_v1_health_get responses: '200': description: Successful Response @@ -659,11 +659,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: + /v1/inspect/routes: + get: tags: - - Vector Io - summary: Openai Create Vector Store - operationId: openai_create_vector_store_v1_vector_stores_post + - Inspect + summary: List Routes + operationId: list_routes_v1_inspect_routes_get responses: '200': description: Successful Response @@ -682,12 +683,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector_stores/{vector_store_id}/file_batches: - post: + /v1/models: + get: tags: - - Vector Io - summary: Openai Create Vector Store File Batch - operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post + - Models + summary: Openai List Models + operationId: openai_list_models_v1_models_get responses: '200': description: Successful Response @@ -706,19 +707,12 @@ 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}: + /v1/models/{model_id}: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store - operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get + - Models + summary: Get Model + operationId: get_model_v1_models__model_id__get responses: '200': description: Successful Response @@ -738,17 +732,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: model_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' + description: 'Path parameter: model_id' + /v1/moderations: post: tags: - - Vector Io - summary: Openai Update Vector Store - operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post + - Safety + summary: Run Moderation + operationId: run_moderation_v1_moderations_post responses: '200': description: Successful Response @@ -767,18 +762,12 @@ 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' - delete: + /v1/prompts: + get: tags: - - Vector Io - summary: Openai Delete Vector Store - operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete + - Prompts + summary: List Prompts + operationId: list_prompts_v1_prompts_get responses: '200': description: Successful Response @@ -797,19 +786,35 @@ 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}/files/{file_id}: + post: + tags: + - Prompts + summary: Create Prompt + operationId: create_prompt_v1_prompts_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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}: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store File - operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get + - Prompts + summary: Get Prompt + operationId: get_prompt_v1_prompts__prompt_id__get responses: '200': description: Successful Response @@ -829,23 +834,17 @@ paths: 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: file_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: file_id' + description: 'Path parameter: prompt_id' post: tags: - - Vector Io - summary: Openai Update Vector Store File - operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post + - Prompts + summary: Update Prompt + operationId: update_prompt_v1_prompts__prompt_id__post responses: '200': description: Successful Response @@ -865,23 +864,17 @@ paths: 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: file_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: file_id' + description: 'Path parameter: prompt_id' delete: tags: - - Vector Io - summary: Openai Delete Vector Store File - operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete + - Prompts + summary: Delete Prompt + operationId: delete_prompt_v1_prompts__prompt_id__delete responses: '200': description: Successful Response @@ -901,24 +894,18 @@ paths: 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: file_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: file_id' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: - get: + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/set-default-version: + post: tags: - - Vector Io - summary: Openai List Files In Vector Store File Batch - operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get + - Prompts + summary: Set Default Version + operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post responses: '200': description: Successful Response @@ -938,24 +925,18 @@ paths: 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 + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/versions: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store File Batch - operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get + - Prompts + summary: List Prompt Versions + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get responses: '200': description: Successful Response @@ -975,24 +956,18 @@ paths: 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 + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/vector_stores/{vector_store_id}/files/{file_id}/content: + description: 'Path parameter: prompt_id' + /v1/providers: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store File Contents - operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get + - Providers + summary: List Providers + operationId: list_providers_v1_providers_get responses: '200': description: Successful Response @@ -1011,25 +986,12 @@ 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' - - name: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' - /v1/vector_stores/{vector_store_id}/search: - post: + /v1/providers/{provider_id}: + get: tags: - - Vector Io - summary: Openai Search Vector Store - operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post + - Providers + summary: Inspect Provider + operationId: inspect_provider_v1_providers__provider_id__get responses: '200': description: Successful Response @@ -1049,18 +1011,41 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: provider_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - /v1/vector-io/query: + description: 'Path parameter: provider_id' + /v1/responses: + get: + tags: + - Agents + summary: List Openai Responses + operationId: list_openai_responses_v1_responses_get + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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: - - Vector Io - summary: Query Chunks - operationId: query_chunks_v1_vector_io_query_post + - Agents + summary: Create Openai Response + operationId: create_openai_response_v1_responses_post responses: '200': description: Successful Response @@ -1079,12 +1064,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/models/{model_id}: + /v1/responses/{response_id}: get: tags: - - Models - summary: Get Model - operationId: get_model_v1_models__model_id__get + - Agents + summary: Get Openai Response + operationId: get_openai_response_v1_responses__response_id__get responses: '200': description: Successful Response @@ -1104,18 +1089,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: model_id + - name: response_id in: path required: true schema: type: string - description: 'Path parameter: model_id' - /v1/models: - get: + description: 'Path parameter: response_id' + delete: tags: - - Models - summary: Openai List Models - operationId: openai_list_models_v1_models_get + - Agents + summary: Delete Openai Response + operationId: delete_openai_response_v1_responses__response_id__delete responses: '200': description: Successful Response @@ -1134,12 +1118,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/moderations: - post: + parameters: + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + /v1/responses/{response_id}/input_items: + get: tags: - - Safety - summary: Run Moderation - operationId: run_moderation_v1_moderations_post + - Agents + summary: List Openai Response Input Items + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get responses: '200': description: Successful Response @@ -1158,6 +1149,13 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + parameters: + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' /v1/safety/run-shield: post: tags: @@ -1182,12 +1180,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/shields/{identifier}: + /v1/scoring-functions: get: tags: - - Shields - summary: Get Shield - operationId: get_shield_v1_shields__identifier__get + - Scoring Functions + summary: List Scoring Functions + operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': description: Successful Response @@ -1206,19 +1204,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: identifier - in: path - required: true - schema: - type: string - description: 'Path parameter: identifier' - /v1/shields: + /v1/scoring-functions/{scoring_fn_id}: get: tags: - - Shields - summary: List Shields - operationId: list_shields_v1_shields_get + - Scoring Functions + summary: Get Scoring Function + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': description: Successful Response @@ -1237,6 +1228,13 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + parameters: + - name: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' /v1/scoring/score: post: tags: @@ -1285,12 +1283,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring-functions/{scoring_fn_id}: + /v1/shields: get: tags: - - Scoring Functions - summary: Get Scoring Function - operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get + - Shields + summary: List Shields + operationId: list_shields_v1_shields_get responses: '200': description: Successful Response @@ -1309,19 +1307,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: scoring_fn_id - in: path - required: true - schema: - type: string - description: 'Path parameter: scoring_fn_id' - /v1/scoring-functions: + /v1/shields/{identifier}: get: tags: - - Scoring Functions - summary: List Scoring Functions - operationId: list_scoring_functions_v1_scoring_functions_get + - Shields + summary: Get Shield + operationId: get_shield_v1_shields__identifier__get responses: '200': description: Successful Response @@ -1340,12 +1331,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tools/{tool_name}: - get: + parameters: + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + /v1/tool-runtime/invoke: + post: tags: - - Tool Groups - summary: Get Tool - operationId: get_tool_v1_tools__tool_name__get + - Tool Runtime + summary: Invoke Tool + operationId: invoke_tool_v1_tool_runtime_invoke_post responses: '200': description: Successful Response @@ -1364,19 +1362,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: tool_name - in: path - required: true - schema: - type: string - description: 'Path parameter: tool_name' - /v1/toolgroups/{toolgroup_id}: + /v1/tool-runtime/list-tools: get: tags: - - Tool Groups - summary: Get Tool Group - operationId: get_tool_group_v1_toolgroups__toolgroup_id__get + - Tool Runtime + summary: List Runtime Tools + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get responses: '200': description: Successful Response @@ -1395,13 +1386,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: toolgroup_id - in: path - required: true - schema: - type: string - description: 'Path parameter: toolgroup_id' /v1/toolgroups: get: tags: @@ -1426,12 +1410,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tools: + /v1/toolgroups/{toolgroup_id}: get: tags: - Tool Groups - summary: List Tools - operationId: list_tools_v1_tools_get + summary: Get Tool Group + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get responses: '200': description: Successful Response @@ -1450,12 +1434,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tool-runtime/invoke: - post: + parameters: + - name: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' + /v1/tools: + get: tags: - - Tool Runtime - summary: Invoke Tool - operationId: invoke_tool_v1_tool_runtime_invoke_post + - Tool Groups + summary: List Tools + operationId: list_tools_v1_tools_get responses: '200': description: Successful Response @@ -1474,12 +1465,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tool-runtime/list-tools: + /v1/tools/{tool_name}: get: tags: - - Tool Runtime - summary: List Runtime Tools - operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + - Tool Groups + summary: Get Tool + operationId: get_tool_v1_tools__tool_name__get responses: '200': description: Successful Response @@ -1498,12 +1489,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/files/{file_id}: - get: + parameters: + - name: tool_name + in: path + required: true + schema: + type: string + description: 'Path parameter: tool_name' + /v1/vector-io/insert: + post: tags: - - Files - summary: Openai Retrieve File - operationId: openai_retrieve_file_v1_files__file_id__get + - Vector Io + summary: Insert Chunks + operationId: insert_chunks_v1_vector_io_insert_post responses: '200': description: Successful Response @@ -1522,18 +1520,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' - delete: + /v1/vector-io/query: + post: tags: - - Files - summary: Openai Delete File - operationId: openai_delete_file_v1_files__file_id__delete + - Vector Io + summary: Query Chunks + operationId: query_chunks_v1_vector_io_query_post responses: '200': description: Successful Response @@ -1552,19 +1544,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' - /v1/files: + /v1/vector_stores: get: tags: - - Files - summary: Openai List Files - operationId: openai_list_files_v1_files_get + - Vector Io + summary: Openai List Vector Stores + operationId: openai_list_vector_stores_v1_vector_stores_get responses: '200': description: Successful Response @@ -1585,9 +1570,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Files - summary: Openai Upload File - operationId: openai_upload_file_v1_files_post + - Vector Io + summary: Openai Create Vector Store + operationId: openai_create_vector_store_v1_vector_stores_post responses: '200': description: Successful Response @@ -1606,12 +1591,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/files/{file_id}/content: + /v1/vector_stores/{vector_store_id}: get: tags: - - Files - summary: Openai Retrieve File Content - operationId: openai_retrieve_file_content_v1_files__file_id__content_get + - Vector Io + summary: Openai Retrieve Vector Store + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get responses: '200': description: Successful Response @@ -1631,18 +1616,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: file_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: file_id' - /v1/prompts: - get: + description: 'Path parameter: vector_store_id' + post: tags: - - Prompts - summary: List Prompts - operationId: list_prompts_v1_prompts_get + - Vector Io + summary: Openai Update Vector Store + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post responses: '200': description: Successful Response @@ -1661,11 +1645,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + delete: tags: - - Prompts - summary: Create Prompt - operationId: create_prompt_v1_prompts_post + - Vector Io + summary: Openai Delete Vector Store + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete responses: '200': description: Successful Response @@ -1684,12 +1675,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/prompts/{prompt_id}: - get: + 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: - - Prompts - summary: Get Prompt - operationId: get_prompt_v1_prompts__prompt_id__get + - Vector Io + summary: Openai Create Vector Store File Batch + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post responses: '200': description: Successful Response @@ -1709,17 +1707,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: prompt_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: prompt_id' - post: + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: + get: tags: - - Prompts - summary: Update Prompt - operationId: update_prompt_v1_prompts__prompt_id__post + - Vector Io + summary: Openai Retrieve Vector Store File Batch + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get responses: '200': description: Successful Response @@ -1739,17 +1738,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: prompt_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: prompt_id' - delete: + 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}/cancel: + post: tags: - - Prompts - summary: Delete Prompt - operationId: delete_prompt_v1_prompts__prompt_id__delete + - Vector Io + summary: Openai Cancel Vector Store File Batch + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post responses: '200': description: Successful Response @@ -1769,18 +1775,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: prompt_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/versions: + 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: - - Prompts - summary: List Prompt Versions - operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get + - Vector Io + summary: Openai List Files In Vector Store File Batch + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get responses: '200': description: Successful Response @@ -1800,18 +1812,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: prompt_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/set-default-version: - post: + 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}/files: + get: tags: - - Prompts - summary: Set Default Version - operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post + - Vector Io + summary: Openai List Files In Vector Store + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get responses: '200': description: Successful Response @@ -1831,18 +1849,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: prompt_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: prompt_id' - /v1/conversations/{conversation_id}/items: - get: + description: 'Path parameter: vector_store_id' + post: tags: - - Conversations - summary: List Items - operationId: list_items_v1_conversations__conversation_id__items_get + - Vector Io + summary: Openai Attach File To Vector Store + operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post responses: '200': description: Successful Response @@ -1862,17 +1879,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: conversation_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: conversation_id' - post: + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}/files/{file_id}: + get: tags: - - Conversations - summary: Add Items - operationId: add_items_v1_conversations__conversation_id__items_post + - Vector Io + summary: Openai Retrieve Vector Store File + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get responses: '200': description: Successful Response @@ -1892,18 +1910,23 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: conversation_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: conversation_id' - /v1/conversations: + description: 'Path parameter: vector_store_id' + - name: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' post: tags: - - Conversations - summary: Create Conversation - operationId: create_conversation_v1_conversations_post + - Vector Io + summary: Openai Update Vector Store File + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post responses: '200': description: Successful Response @@ -1922,12 +1945,24 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/conversations/{conversation_id}: - get: + 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' + delete: tags: - - Conversations - summary: Get Conversation - operationId: get_conversation_v1_conversations__conversation_id__get + - Vector Io + summary: Openai Delete Vector Store File + operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete responses: '200': description: Successful Response @@ -1947,17 +1982,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: conversation_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: conversation_id' - post: + 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: - - Conversations - summary: Update Conversation - operationId: update_conversation_v1_conversations__conversation_id__post + - Vector Io + summary: Openai Retrieve Vector Store File Contents + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get responses: '200': description: Successful Response @@ -1977,17 +2019,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: conversation_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: conversation_id' - delete: + 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}/search: + post: tags: - - Conversations - summary: Openai Delete Conversation - operationId: openai_delete_conversation_v1_conversations__conversation_id__delete + - Vector Io + summary: Openai Search Vector Store + operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post responses: '200': description: Successful Response @@ -2007,54 +2056,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: conversation_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: conversation_id' - /v1/conversations/{conversation_id}/items/{item_id}: + description: 'Path parameter: vector_store_id' + /v1/version: get: tags: - - Conversations - summary: Retrieve - operationId: retrieve_v1_conversations__conversation_id__items__item_id__get - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: item_id - in: path - required: true - schema: - type: string - description: 'Path parameter: item_id' - delete: - tags: - - Conversations - summary: Openai Delete Conversation Item - operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete + - Inspect + summary: Version + operationId: version_v1_version_get responses: '200': description: Successful Response @@ -2073,19 +2086,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: item_id - in: path - required: true - schema: - type: string - description: 'Path parameter: item_id' components: responses: BadRequest400: @@ -2125,302 +2125,220 @@ components: schema: $ref: '#/components/schemas/Error' schemas: - ImageContentItem: - description: A image content item - properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/components/schemas/_URLOrData' - required: - - image - title: ImageContentItem - type: object - TextContentItem: - description: A text content item + Error: + description: Error response from the API. Roughly follows RFC 7807. properties: - type: - const: text - default: text - title: Type + status: + title: Status + type: integer + title: + title: Title type: string - text: - title: Text + detail: + title: Detail type: string + instance: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - text - title: TextContentItem + - status + - title + - detail + title: Error type: object - URL: - description: A URL reference to external content. + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - uri: - title: Uri + object: + const: list + default: list + title: Object type: string - required: - - uri - title: URL - type: object - _URLOrData: - description: A URL or a base64 encoded string - properties: - url: + data: + description: List of batch objects + items: + $ref: '#/components/schemas/Batch' + title: Data + type: array + first_id: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string - type: 'null' + description: ID of the first batch in the list nullable: true - title: URL - data: + last_id: anyOf: - type: string - type: 'null' - contentEncoding: base64 + description: ID of the last batch in the list nullable: true - title: _URLOrData + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean + required: + - data + title: ListBatchesResponse type: object - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - GreedySamplingStrategy: - description: Greedy sampling strategy that selects the highest probability token at each step. + Batch: + additionalProperties: true properties: - type: - const: greedy - default: greedy - title: Type + id: + title: Id type: string - title: GreedySamplingStrategy - type: object - TopKSamplingStrategy: - description: Top-k sampling strategy that restricts sampling to the k most likely tokens. - properties: - type: - const: top_k - default: top_k - title: Type + completion_window: + title: Completion Window type: string - top_k: - minimum: 1 - title: Top K + created_at: + title: Created At 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. - properties: - type: - const: top_p - default: top_p - title: Type + endpoint: + title: Endpoint type: string - temperature: + input_file_id: + title: Input File Id + type: string + object: + const: batch + title: Object + type: string + status: + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + title: Status + type: string + cancelled_at: anyOf: - - type: number - minimum: 0.0 + - type: integer - type: 'null' - top_p: + nullable: true + cancelling_at: anyOf: - - type: number + - type: integer - type: 'null' - default: 0.95 - required: - - temperature - title: TopPSamplingStrategy - type: object - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat - type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. - 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 - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIChatCompletionContentPartImageParam: - description: Image content part for OpenAI-compatible chat completion messages. - properties: - type: - const: image_url - default: image_url - title: Type - type: string - image_url: - $ref: '#/components/schemas/OpenAIImageURL' - required: - - image_url - title: OpenAIChatCompletionContentPartImageParam - type: object - OpenAIChatCompletionContentPartTextParam: - description: Text content part for OpenAI-compatible chat completion messages. - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIChatCompletionContentPartTextParam - type: object - OpenAIFile: - properties: - type: - const: file - default: file - title: Type - type: string - file: - $ref: '#/components/schemas/OpenAIFileFile' - required: - - file - title: OpenAIFile - type: object - OpenAIFileFile: - properties: - file_data: + nullable: true + completed_at: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - file_id: + error_file_id: anyOf: - type: string - type: 'null' nullable: true - filename: + errors: + anyOf: + - $ref: '#/components/schemas/Errors' + title: Errors + - type: 'null' + nullable: true + title: Errors + expired_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + expires_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + failed_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + finalizing_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + in_progress_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + nullable: true + model: anyOf: - type: string - type: 'null' nullable: true - title: OpenAIFileFile - type: object - OpenAIImageURL: - description: Image URL specification for OpenAI-compatible chat completion messages. - properties: - url: - title: Url - type: string - detail: + output_file_id: anyOf: - type: string - type: 'null' nullable: true + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts + - type: 'null' + nullable: true + title: BatchRequestCounts + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage + - type: 'null' + nullable: true + title: BatchUsage required: - - url - title: OpenAIImageURL + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + type: object + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. + 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 - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIAssistantMessageParam: description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: @@ -2453,34 +2371,78 @@ components: nullable: true title: OpenAIAssistantMessageParam type: object - OpenAIChatCompletionToolCall: - description: Tool call specification for OpenAI-compatible chat completion responses. + OpenAIChatCompletionContentPartImageParam: + description: Image content part for OpenAI-compatible chat completion messages. properties: - index: - anyOf: - - type: integer - - type: 'null' - nullable: true - id: - anyOf: - - type: string - - type: 'null' - nullable: true type: - const: function - default: function + const: image_url + default: image_url title: Type type: string - function: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - title: OpenAIChatCompletionToolCallFunction - - type: 'null' - nullable: true - title: OpenAIChatCompletionToolCallFunction - title: OpenAIChatCompletionToolCall + image_url: + $ref: '#/components/schemas/OpenAIImageURL' + required: + - image_url + title: OpenAIChatCompletionContentPartImageParam type: object - OpenAIChatCompletionToolCallFunction: + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + OpenAIChatCompletionContentPartTextParam: + description: Text content part for OpenAI-compatible chat completion messages. + 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. + properties: + index: + anyOf: + - type: integer + - type: 'null' + nullable: true + id: + anyOf: + - type: string + - type: 'null' + nullable: true + type: + const: function + default: function + title: Type + type: string + function: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction + - type: 'null' + nullable: true + title: OpenAIChatCompletionToolCallFunction + title: OpenAIChatCompletionToolCall + type: object + OpenAIChatCompletionToolCallFunction: description: Function call details for OpenAI-compatible tool calls. properties: name: @@ -2495,6 +2457,100 @@ components: nullable: true title: OpenAIChatCompletionToolCallFunction type: object + OpenAIChatCompletionUsage: + description: Usage information for OpenAI chat completion. + 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: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsagePromptTokensDetails + completion_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage + type: object + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs + 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. + properties: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + nullable: true + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs + type: object OpenAIDeveloperMessageParam: description: A message from the developer in an OpenAI-compatible chat completion request. properties: @@ -2520,6 +2576,74 @@ components: - content title: OpenAIDeveloperMessageParam type: object + OpenAIFile: + properties: + type: + const: file + default: file + title: Type + type: string + file: + $ref: '#/components/schemas/OpenAIFileFile' + required: + - file + title: OpenAIFile + type: object + OpenAIFileFile: + properties: + file_data: + anyOf: + - type: string + - type: 'null' + nullable: true + file_id: + anyOf: + - type: string + - type: 'null' + nullable: true + filename: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIFileFile + type: object + OpenAIImageURL: + description: Image URL specification for OpenAI-compatible chat completion messages. + properties: + url: + title: Url + type: string + detail: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - url + title: OpenAIImageURL + type: object + OpenAIMessageParam: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: description: A system message providing instructions or context to the model. properties: @@ -2545,6 +2669,39 @@ components: - 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' + nullable: true + logprob: + title: Logprob + type: number + top_logprobs: + items: + $ref: '#/components/schemas/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. properties: @@ -2569,9 +2726,35 @@ components: - content title: OpenAIToolMessageParam type: object - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. - properties: + 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' + nullable: true + 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. + properties: role: const: user default: user @@ -2607,27 +2790,6 @@ components: - content title: OpenAIUserMessageParam type: object - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) OpenAIJSONSchema: description: JSON schema specification for OpenAI-compatible structured response format. properties: @@ -2673,16 +2835,6 @@ components: - json_schema title: OpenAIResponseFormatJSONSchema type: object - OpenAIResponseFormatText: - description: Text response format for OpenAI-compatible chat completion requests. - properties: - type: - const: text - default: text - title: Type - type: string - title: OpenAIResponseFormatText - type: object OpenAIResponseFormatParam: discriminator: mapping: @@ -2698,628 +2850,573 @@ components: - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' title: OpenAIResponseFormatJSONObject title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - VectorStoreChunkingStrategyAuto: - description: Automatic chunking strategy for vector store files. - properties: - type: - const: auto - default: auto - title: Type - type: string - title: VectorStoreChunkingStrategyAuto - type: object - VectorStoreChunkingStrategyStatic: - description: Static chunking strategy with configurable parameters. + OpenAIResponseFormatText: + description: Text response format for OpenAI-compatible chat completion requests. properties: type: - const: static - default: static + const: text + default: text title: Type type: string - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' - required: - - static - title: VectorStoreChunkingStrategyStatic - type: object - VectorStoreChunkingStrategyStaticConfig: - description: Configuration for static chunking strategy. - 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 + title: OpenAIResponseFormatText type: object - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - VectorStoreFileStatus: - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - OpenAIResponseInputMessageContentFile: - description: File content for input messages in OpenAI response format. + OpenAIChatCompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible chat completion endpoint. properties: - type: - const: input_file - default: input_file - title: Type + model: + title: Model type: string - file_data: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + minItems: 1 + title: Messages + type: array + frequency_penalty: anyOf: - - type: string + - type: number - type: 'null' nullable: true - file_id: + function_call: anyOf: - type: string + - additionalProperties: true + type: object - type: 'null' + title: string | object nullable: true - file_url: + functions: anyOf: - - type: string + - items: + additionalProperties: true + type: object + type: array - type: 'null' nullable: true - filename: + logit_bias: anyOf: - - type: string + - additionalProperties: + type: number + type: object - type: 'null' nullable: true - title: OpenAIResponseInputMessageContentFile - type: object - OpenAIResponseInputMessageContentImage: - description: Image content for input messages in OpenAI response format. - properties: - detail: - default: auto - title: Detail - type: string - enum: - - low - - high - - auto - type: - const: input_image - default: input_image - title: Type - type: string - file_id: + logprobs: anyOf: - - type: string + - type: boolean - type: 'null' nullable: true - image_url: + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + response_format: + anyOf: + - discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: 'null' + title: Response Format + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + tool_choice: + anyOf: + - type: string + - additionalProperties: true + type: object + - type: 'null' + title: string | object + nullable: true + tools: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - type: integer + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: anyOf: - type: string - type: 'null' nullable: true - title: OpenAIResponseInputMessageContentImage - type: object - OpenAIResponseInputMessageContentText: - description: Text content for input messages in OpenAI response format. - properties: - text: - title: Text - type: string - type: - const: input_text - default: input_text - title: Type - type: string required: - - text - title: OpenAIResponseInputMessageContentText + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody type: object - OpenAIResponseInputMessageContent: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - OpenAIResponseAnnotationCitation: - description: URL citation annotation for referencing external web resources. + OpenAIChatCompletion: + description: Response from an OpenAI-compatible chat completion request. properties: - type: - const: url_citation - default: url_citation - title: Type + id: + title: Id type: string - end_index: - title: End Index - type: integer - start_index: - title: Start Index - type: integer - title: - title: Title + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object type: string - url: - title: Url + created: + title: Created + type: integer + model: + title: Model type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation + - id + - choices + - created + - model + title: OpenAIChatCompletion type: object - OpenAIResponseAnnotationContainerFileCitation: + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: - type: - const: container_file_citation - default: container_file_citation - title: Type + id: + title: Id type: string - container_id: - title: Container Id + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object type: string - end_index: - title: End Index + created: + title: Created type: integer - file_id: - title: File Id - type: string - filename: - title: Filename + model: + title: Model type: string - start_index: - title: Start Index - type: integer + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - container_id - - end_index - - file_id - - filename - - start_index - title: OpenAIResponseAnnotationContainerFileCitation + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk type: object - OpenAIResponseAnnotationFileCitation: - description: File citation annotation for referencing specific files in response content. + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. properties: - type: - const: file_citation - default: file_citation - title: Type - type: string - file_id: - title: File Id - type: string - filename: - title: Filename + content: + anyOf: + - type: string + - type: 'null' + nullable: true + refusal: + anyOf: + - type: string + - type: 'null' + nullable: true + role: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + reasoning_content: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIChoiceDelta + type: object + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. + properties: + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason type: string index: title: Index type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - file_id - - filename + - delta + - finish_reason - index - title: OpenAIResponseAnnotationFileCitation + title: OpenAIChunkChoice type: object - OpenAIResponseAnnotationFilePath: + OpenAICompletionWithInputMessages: properties: - type: - const: file_path - default: file_path - title: Type - type: string - file_id: - title: File Id + id: + title: Id type: string - index: - title: Index - type: integer - required: - - file_id - - index - title: OpenAIResponseAnnotationFilePath - type: object - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - OpenAIResponseContentPartRefusal: - description: Refusal content within a streamed response part. - properties: - type: - const: refusal - default: refusal - title: Type - type: string - refusal: - title: Refusal - type: string - required: - - refusal - title: OpenAIResponseContentPartRefusal - type: object - OpenAIResponseOutputMessageContentOutputText: - properties: - text: - title: Text + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object type: string - type: - const: output_text - default: output_text - title: Type + created: + title: Created + type: integer + model: + title: Model type: string - annotations: + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage + input_messages: items: discriminator: mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type + 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/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations + - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + title: Input Messages type: array required: - - text - title: OpenAIResponseOutputMessageContentOutputText - type: object - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - MCPListToolsTool: - description: Tool definition returned by MCP list tools operation. - properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - input_schema - - name - title: MCPListToolsTool - 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 + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages 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. + OpenAICompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible completion endpoint. properties: - content: + model: + title: Model + type: string + prompt: 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' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: string type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + title: list[string] - items: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: integer type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - const: message - default: message - title: Type - type: string - id: + title: list[integer] + - items: + items: + type: integer + type: array + type: array + title: list[array] + title: string | ... (4 variants) + best_of: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - status: + echo: anyOf: - - type: string + - type: boolean - type: 'null' nullable: true - required: - - content - - role - title: OpenAIResponseMessage - type: object - OpenAIResponseOutputMessageFileSearchToolCall: - description: File search tool call output message for OpenAI responses. - 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: + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_tokens: anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: string type: array + title: list[string] - type: 'null' + title: string | list[string] nullable: true - required: - - id - - queries - - status - title: OpenAIResponseOutputMessageFileSearchToolCall - type: object - OpenAIResponseOutputMessageFileSearchToolCallResults: - description: Search results returned by the file search operation. - 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. - 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: + stream: anyOf: - - type: string + - type: boolean - type: 'null' nullable: true - status: + stream_options: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - required: - - call_id - - name - - arguments - title: OpenAIResponseOutputMessageFunctionToolCall - type: object - OpenAIResponseOutputMessageMCPCall: - description: Model Context Protocol (MCP) call output message for OpenAI responses. - 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: + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: anyOf: - type: string - type: 'null' nullable: true - output: + suffix: anyOf: - type: string - type: 'null' nullable: true required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall + - model + - prompt + title: OpenAICompletionRequestWithExtraBody type: object - OpenAIResponseOutputMessageMCPListTools: - description: MCP list tools output message containing available tools from an MCP server. + OpenAICompletion: + 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 - type: - const: mcp_list_tools - default: mcp_list_tools - title: Type - type: string - server_label: - title: Server Label - type: string - tools: + choices: items: - $ref: '#/components/schemas/MCPListToolsTool' - title: Tools + $ref: '#/components/schemas/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 - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools + - choices + - created + - model + title: OpenAICompletion type: object - OpenAIResponseOutputMessageWebSearchToolCall: - description: Web search tool call output message for OpenAI responses. + 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: - id: - title: Id - type: string - status: - title: Status + finish_reason: + title: Finish Reason type: string - type: - const: web_search_call - default: web_search_call - title: Type + text: + title: Text type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - id - - status - title: OpenAIResponseOutputMessageWebSearchToolCall + - finish_reason + - text + - index + title: OpenAICompletionChoice type: object - OpenAIResponseOutput: + ConversationItem: discriminator: 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' @@ -3334,1487 +3431,1595 @@ components: title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - AllowedToolsFilter: - description: Filter configuration for restricting which MCP tools can be used. + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + OpenAIResponseAnnotationCitation: + description: URL citation annotation for referencing external web resources. properties: - tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - title: AllowedToolsFilter + 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 - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. + OpenAIResponseAnnotationContainerFileCitation: properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - title: ApprovalFilter + 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 - OpenAIResponseInputToolFileSearch: - description: File search tool configuration for OpenAI response inputs. + OpenAIResponseAnnotationFileCitation: + description: File citation annotation for referencing specific files in response content. properties: type: - const: file_search - default: file_search + const: file_citation + default: file_citation title: Type type: string - vector_store_ids: - items: - type: string - title: Vector Store Ids - type: array - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - max_num_results: - anyOf: - - maximum: 50 - minimum: 1 - type: integer - - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - nullable: true - title: SearchRankingOptions + file_id: + title: File Id + type: string + filename: + title: Filename + type: string + index: + title: Index + type: integer required: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch + - file_id + - filename + - index + title: OpenAIResponseAnnotationFileCitation type: object - OpenAIResponseInputToolFunction: - description: Function tool configuration for OpenAI response inputs. + OpenAIResponseAnnotationFilePath: properties: type: - const: function - default: function + const: file_path + default: file_path title: Type type: string - name: - title: Name + file_id: + title: File Id type: string - description: - anyOf: - - type: string - - type: 'null' - nullable: true - parameters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - nullable: true + index: + title: Index + type: integer required: - - name - - parameters - title: OpenAIResponseInputToolFunction + - file_id + - index + title: OpenAIResponseAnnotationFilePath type: object - OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + OpenAIResponseContentPartRefusal: + description: Refusal content within a streamed response part. properties: type: - const: mcp - default: mcp + const: refusal + default: refusal title: Type type: string - server_label: - title: Server Label + refusal: + title: Refusal type: string - server_url: - title: Server Url + 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 - headers: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - authorization: + output: + title: Output + type: string + type: + const: function_call_output + default: function_call_output + title: Type + type: string + id: anyOf: - type: string - type: 'null' nullable: true - require_approval: - anyOf: - - const: always - type: string - - const: never - type: string - - $ref: '#/components/schemas/ApprovalFilter' - title: ApprovalFilter - default: never - title: string | ApprovalFilter - allowed_tools: + status: anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter + - type: string - type: 'null' - title: list[string] | AllowedToolsFilter nullable: true required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - type: object - OpenAIResponseInputToolWebSearch: - description: Web search tool configuration for OpenAI response inputs. + - call_id + - output + title: OpenAIResponseInputFunctionToolCallOutput + type: object + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + OpenAIResponseInputMessageContentFile: + description: File content for input messages in OpenAI response format. properties: type: - default: web_search + const: input_file + default: input_file title: Type type: string - enum: - - web_search - - web_search_preview - - web_search_preview_2025_03_11 - - web_search_2025_08_26 - search_context_size: + file_data: anyOf: - - pattern: ^low|medium|high$ - type: string + - type: string - type: 'null' - default: medium - title: OpenAIResponseInputToolWebSearch - type: object - SearchRankingOptions: - description: Options for ranking and filtering search results. - properties: - ranker: + nullable: true + file_id: anyOf: - type: string - type: 'null' nullable: true - score_threshold: + file_url: anyOf: - - type: number + - type: string - type: 'null' - default: 0.0 - title: SearchRankingOptions - type: object - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. - properties: - type: - const: mcp - default: mcp - title: Type - type: string - server_label: - title: Server Label - type: string - allowed_tools: + nullable: true + filename: anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter + - type: string - type: 'null' - title: list[string] | AllowedToolsFilter nullable: true - required: - - server_label - title: OpenAIResponseToolMCP + title: OpenAIResponseInputMessageContentFile type: object - OpenAIResponseTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseContentPartOutputText: - description: Text content within a streamed response part. + OpenAIResponseInputMessageContentImage: + description: Image content for input messages in OpenAI response format. properties: + detail: + default: auto + title: Detail + type: string + enum: + - low + - high + - auto type: - const: output_text - default: output_text + const: input_image + default: input_image title: Type type: string - text: - title: Text - type: string - annotations: - items: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations - type: array - logprobs: + file_id: anyOf: - - items: - additionalProperties: true - type: object - type: array + - type: string - type: 'null' nullable: true - required: - - text - title: OpenAIResponseContentPartOutputText + image_url: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIResponseInputMessageContentImage type: object - OpenAIResponseContentPartReasoningText: - description: Reasoning text emitted as part of a streamed response. + OpenAIResponseInputMessageContentText: + description: Text content for input messages in OpenAI response format. properties: - type: - const: reasoning_text - default: reasoning_text - title: Type - type: string text: title: Text type: string - required: - - text - title: OpenAIResponseContentPartReasoningText - type: object - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseContentPartReasoningSummary: - description: Reasoning summary part in a streamed response. - properties: type: - const: summary_text - default: summary_text + const: input_text + default: input_text title: Type type: string - text: - title: Text - type: string required: - text - title: OpenAIResponseContentPartReasoningSummary + title: OpenAIResponseInputMessageContentText type: object - OpenAIResponseError: - description: Error details for failed OpenAI response requests. + OpenAIResponseMCPApprovalRequest: + description: A request for human approval of a tool invocation. properties: - code: - title: Code - type: string - message: - title: Message + arguments: + title: Arguments type: string - required: - - code - - message - title: OpenAIResponseError - type: object - OpenAIResponseObject: - description: Complete OpenAI response object containing generation results and metadata. - properties: - created_at: - title: Created At - type: integer - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - nullable: true - title: OpenAIResponseError id: title: Id type: string - model: - title: Model + name: + title: Name type: string - object: - const: response - default: response - title: Object + server_label: + title: Server Label 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output - type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls + 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 - previous_response_id: - anyOf: - - type: string - - type: 'null' - nullable: true - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - nullable: true - title: OpenAIResponsePrompt - status: - title: Status + type: + const: mcp_approval_response + default: mcp_approval_response + title: Type type: string - temperature: + id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: + reason: anyOf: - - type: number + - type: string - type: 'null' nullable: true - tools: + 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: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array - - type: 'null' - nullable: true - truncation: + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + const: message + default: message + title: Type + type: string + id: anyOf: - type: string - type: 'null' nullable: true - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - nullable: true - title: OpenAIResponseUsage - instructions: + status: anyOf: - type: string - type: 'null' nullable: true - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - nullable: true required: - - created_at - - id - - model - - output - - status - title: OpenAIResponseObject + - content + - role + title: OpenAIResponseMessage type: object - OpenAIResponseObjectStreamResponseCompleted: - description: Streaming event indicating a response has been completed. + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + OpenAIResponseOutputMessageContentOutputText: properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' + text: + title: Text + type: string type: - const: response.completed - default: response.completed + const: output_text + default: output_text title: Type type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations + type: array required: - - response - title: OpenAIResponseObjectStreamResponseCompleted + - text + title: OpenAIResponseOutputMessageContentOutputText type: object - OpenAIResponseObjectStreamResponseContentPartAdded: - description: Streaming event for when a new content part is added to a response item. + OpenAIResponseOutputMessageFileSearchToolCall: + description: File search tool call output message for OpenAI responses. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id + id: + title: Id type: string - item_id: - title: Item Id + queries: + items: + type: string + title: Queries + type: array + status: + title: Status type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer type: - const: response.content_part.added - default: response.content_part.added + const: file_search_call + default: file_search_call title: Type type: string + results: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array + - type: 'null' + nullable: true required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartAdded + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall type: object - OpenAIResponseObjectStreamResponseContentPartDone: - description: Streaming event for when a content part is completed. + OpenAIResponseOutputMessageFunctionToolCall: + description: Function tool call output message for OpenAI responses. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id + call_id: + title: Call Id type: string - item_id: - title: Item Id + name: + title: Name type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer - type: - const: response.content_part.done - default: response.content_part.done - title: Type + arguments: + title: Arguments type: string - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartDone - type: object - OpenAIResponseObjectStreamResponseCreated: - description: Streaming event indicating a new response has been created. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' type: - const: response.created - default: response.created + const: function_call + default: function_call title: Type type: string + id: + anyOf: + - type: string + - type: 'null' + nullable: true + status: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - response - title: OpenAIResponseObjectStreamResponseCreated + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall type: object - OpenAIResponseObjectStreamResponseFailed: - description: Streaming event emitted when a response fails. + OpenAIResponseOutputMessageMCPCall: + description: Model Context Protocol (MCP) call output message for OpenAI responses. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer + id: + title: Id + type: string type: - const: response.failed - default: response.failed + const: mcp_call + default: mcp_call title: Type type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseFailed - type: object - OpenAIResponseObjectStreamResponseFileSearchCallCompleted: - description: Streaming event for completed file search calls. - properties: - item_id: - title: Item Id + arguments: + title: Arguments type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.completed - default: response.file_search_call.completed - title: Type + name: + title: Name type: string + server_label: + title: Server Label + type: string + error: + anyOf: + - type: string + - type: 'null' + nullable: true + output: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall type: object - OpenAIResponseObjectStreamResponseFileSearchCallInProgress: - description: Streaming event for file search calls in progress. + OpenAIResponseOutputMessageMCPListTools: + description: MCP list tools output message containing available tools from an MCP server. properties: - item_id: - title: Item Id + id: + title: Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress + const: mcp_list_tools + default: mcp_list_tools title: Type type: string + server_label: + title: Server Label + type: string + tools: + items: + $ref: '#/components/schemas/MCPListToolsTool' + title: Tools + type: array required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - id + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools type: object - OpenAIResponseObjectStreamResponseFileSearchCallSearching: - description: Streaming event for file search currently searching. + OpenAIResponseOutputMessageWebSearchToolCall: + description: Web search tool call output message for OpenAI responses. properties: - item_id: - title: Item Id + id: + title: Id + type: string + status: + title: Status type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.file_search_call.searching - default: response.file_search_call.searching + const: web_search_call + default: web_search_call title: Type type: string required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - id + - status + title: OpenAIResponseOutputMessageWebSearchToolCall type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: - description: Streaming event for incremental function call argument updates. + Conversation: + description: OpenAI-compatible conversation object. properties: - delta: - title: Delta + id: + description: The unique ID of the conversation. + title: Id type: string - item_id: - title: Item Id + object: + const: conversation + default: conversation + description: The object type, which is always conversation. + title: Object type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + created_at: + description: The time at which the conversation was created, measured in seconds since the Unix epoch. + title: Created At type: integer - type: - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - title: Type - type: string + 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. + nullable: true + 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. + nullable: true required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - id + - created_at + title: Conversation type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: - description: Streaming event for when function call arguments are completed. + ConversationDeletedResource: + description: Response for deleted conversation. properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id + id: + description: The deleted conversation identifier + title: Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.done - default: response.function_call_arguments.done - title: Type + 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: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - id + title: ConversationDeletedResource type: object - OpenAIResponseObjectStreamResponseInProgress: - description: Streaming event indicating the response remains in progress. + ConversationItemList: + description: List of conversation items with pagination. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.in_progress - default: response.in_progress - title: Type + object: + default: list + description: Object type + title: Object type: string + data: + description: List of conversation items + items: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + title: Data + type: array + first_id: + anyOf: + - type: string + - type: 'null' + description: The ID of the first item in the list + nullable: true + last_id: + anyOf: + - type: string + - type: 'null' + description: The ID of the last item in the list + nullable: true + has_more: + default: false + description: Whether there are more items available + title: Has More + type: boolean required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseInProgress + - data + title: ConversationItemList type: object - OpenAIResponseObjectStreamResponseIncomplete: - description: Streaming event emitted when a response ends in an incomplete state. + ConversationItemDeletedResource: + description: Response for deleted conversation item. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.incomplete - default: response.incomplete - title: Type + 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: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseIncomplete + - id + title: ConversationItemDeletedResource type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + OpenAIEmbeddingsRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible embeddings endpoint. properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - title: Type + model: + title: Model type: string + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + encoding_format: + anyOf: + - type: string + - type: 'null' + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' + nullable: true + user: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + OpenAIEmbeddingData: + description: A single embedding data object from an OpenAI-compatible embeddings response. properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id + object: + const: embedding + default: embedding + title: Object type: string - output_index: - title: Output Index + embedding: + anyOf: + - items: + type: number + type: array + title: list[number] + - type: string + title: list[number] | string + index: + title: Index type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - title: Type - type: string required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - embedding + - index + title: OpenAIEmbeddingData type: object - OpenAIResponseObjectStreamResponseMcpCallCompleted: - description: Streaming event for completed MCP calls. + OpenAIEmbeddingUsage: + description: Usage information for an OpenAI-compatible embeddings response. properties: - sequence_number: - title: Sequence Number + prompt_tokens: + title: Prompt Tokens type: integer - type: - const: response.mcp_call.completed - default: response.mcp_call.completed - title: Type + total_tokens: + title: Total Tokens + type: integer + required: + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage + type: object + OpenAIEmbeddingsResponse: + description: Response from an OpenAI-compatible embeddings request. + properties: + object: + const: list + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + title: Data + type: array + model: + title: Model type: string + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - data + - model + - usage + title: OpenAIEmbeddingsResponse type: object - OpenAIResponseObjectStreamResponseMcpCallFailed: - description: Streaming event for failed MCP calls. + OpenAIFilePurpose: + description: Valid purpose values for OpenAI Files API. + enum: + - assistants + - batch + title: OpenAIFilePurpose + type: string + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.failed - default: response.mcp_call.failed - title: Type + 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: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallFailed + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse type: object - OpenAIResponseObjectStreamResponseMcpCallInProgress: - description: Streaming event for MCP calls in progress. + OpenAIFileObject: + description: OpenAI File object as defined in the OpenAI Files API. properties: - item_id: - title: Item Id + object: + const: file + default: file + title: Object type: string - output_index: - title: Output Index + id: + title: Id + type: string + bytes: + title: Bytes type: integer - sequence_number: - title: Sequence Number + created_at: + title: Created At type: integer - type: - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - title: Type + expires_at: + title: Expires At + type: integer + filename: + title: Filename type: string + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject type: object - OpenAIResponseObjectStreamResponseMcpListToolsCompleted: + 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: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - title: Type + anchor: + const: created_at + title: Anchor type: string + seconds: + maximum: 2592000 + minimum: 3600 + title: Seconds + type: integer required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - anchor + - seconds + title: ExpiresAfter type: object - OpenAIResponseObjectStreamResponseMcpListToolsFailed: + OpenAIFileDeleteResponse: + description: Response for deleting a file in OpenAI Files API. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - title: Type + id: + title: Id + type: string + object: + const: file + default: file + title: Object type: string + deleted: + title: Deleted + type: boolean required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - id + - deleted + title: OpenAIFileDeleteResponse type: object - OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + HealthInfo: + description: Health status information for the service. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - title: Type - type: string + status: + $ref: '#/components/schemas/HealthStatus' required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - status + title: HealthInfo type: object - OpenAIResponseObjectStreamResponseOutputItemAdded: - description: Streaming event for when a new output item is added to the response. + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - response_id: - title: Response Id + route: + title: Route type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.added - default: response.output_item.added - title: Type + method: + title: Method type: string + provider_types: + items: + type: string + title: Provider Types + type: array required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemAdded + - route + - method + - provider_types + title: RouteInfo type: object - OpenAIResponseObjectStreamResponseOutputItemDone: - description: Streaming event for when an output item is completed. + ListRoutesResponse: + description: Response containing a list of all available API routes. properties: - response_id: - title: Response Id - type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.done - default: response.output_item.done - title: Type - type: string + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemDone + - data + title: ListRoutesResponse type: object - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: - description: Streaming event for when an annotation is added to output text. + OpenAIModel: + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: - item_id: - title: Item Id + id: + title: Id type: string - output_index: - title: Output Index - type: integer - content_index: - title: Content Index - type: integer - annotation_index: - title: Annotation Index - type: integer - annotation: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - sequence_number: - title: Sequence Number + object: + const: model + default: model + title: Object + type: string + created: + title: Created type: integer - type: - const: response.output_text.annotation.added - default: response.output_text.annotation.added - title: Type + owned_by: + title: Owned By type: string + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - id + - created + - owned_by + title: OpenAIModel type: object - OpenAIResponseObjectStreamResponseOutputTextDelta: - description: Streaming event for incremental text content updates. + OpenAIListModelsResponse: properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.delta - default: response.output_text.delta - title: Type - type: string + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDelta + - data + title: OpenAIListModelsResponse type: object - OpenAIResponseObjectStreamResponseOutputTextDone: - description: Streaming event for when text output is completed. + Model: + description: A model resource representing an AI model registered in Llama Stack. properties: - content_index: - title: Content Index - type: integer - text: - title: Text + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - item_id: - title: Item Id + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.output_text.done - default: response.output_text.done + const: model + default: model title: Type type: string + metadata: + additionalProperties: true + description: Any additional metadata for this model + title: Metadata + type: object + model_type: + $ref: '#/components/schemas/ModelType' + default: llm required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDone + - identifier + - provider_id + title: Model type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: - description: Streaming event for when a new reasoning summary part is added. + ModelType: + description: Enumeration of supported model types in Llama Stack. + enum: + - llm + - embedding + - rerank + title: ModelType + type: string + ModerationObject: + description: A moderation object. properties: - item_id: - title: Item Id + id: + title: Id type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - title: Type + model: + title: Model type: string + results: + items: + $ref: '#/components/schemas/ModerationObjectResults' + title: Results + type: array required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - id + - model + - results + title: ModerationObject type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: - description: Streaming event for when a reasoning summary part is completed. + ModerationObjectResults: + description: A moderation object. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index + flagged: + title: Flagged + type: boolean + categories: + anyOf: + - additionalProperties: + type: boolean + type: object + - type: 'null' + nullable: true + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + nullable: true + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object + required: + - flagged + title: ModerationObjectResults + type: object + Prompt: + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. + properties: + prompt: + anyOf: + - type: string + - type: 'null' + description: The system prompt with variable placeholders + nullable: true + version: + description: Version (integer starting at 1, incremented on save) + minimum: 1 + title: Version type: integer - type: - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - title: Type + prompt_id: + description: Unique identifier in format 'pmpt_<48-digit-hash>' + title: Prompt Id type: string + variables: + description: List of variable names that can be used in the prompt template + items: + type: string + title: Variables + type: array + is_default: + default: false + description: Boolean indicating whether this version is the default version + title: Is Default + type: boolean required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - version + - prompt_id + title: Prompt type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: - description: Streaming event for incremental reasoning summary text updates. + ListPromptsResponse: + description: Response model to list prompts. properties: - delta: - title: Delta + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array + required: + - data + title: ListPromptsResponse + type: object + ProviderInfo: + description: Information about a registered provider including its configuration and health status. + properties: + api: + title: Api type: string - item_id: - title: Item Id + provider_id: + title: Provider Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - title: Type + provider_type: + title: Provider Type type: string + config: + additionalProperties: true + title: Config + type: object + health: + additionalProperties: true + title: Health + type: object required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: - description: Streaming event for when reasoning summary text is completed. + ListProvidersResponse: + description: Response containing a list of all available providers. properties: - text: - title: Text + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array + required: + - data + title: ListProvidersResponse + type: object + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. + 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 - item_id: - title: Item Id + last_id: + title: Last Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - title: Type + object: + const: list + default: list + title: Object type: string required: - - text - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject type: object - OpenAIResponseObjectStreamResponseReasoningTextDelta: - description: Streaming event for incremental reasoning text updates. + OpenAIResponseError: + description: Error details for failed OpenAI response requests. properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta + code: + title: Code type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.delta - default: response.reasoning_text.delta - title: Type + message: + title: Message type: string required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - code + - message + title: OpenAIResponseError type: object - OpenAIResponseObjectStreamResponseReasoningTextDone: - description: Streaming event for when reasoning text is completed. + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + OpenAIResponseInputToolFileSearch: + description: File search tool configuration for OpenAI response inputs. properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.reasoning_text.done - default: response.reasoning_text.done + 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' + nullable: true + max_num_results: + anyOf: + - maximum: 50 + minimum: 1 + type: integer + - type: 'null' + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + nullable: true + title: SearchRankingOptions required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDone + - vector_store_ids + title: OpenAIResponseInputToolFileSearch type: object - OpenAIResponseObjectStreamResponseRefusalDelta: - description: Streaming event for incremental refusal text updates. + OpenAIResponseInputToolFunction: + description: Function tool configuration for OpenAI response inputs. properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.refusal.delta - default: response.refusal.delta + const: function + default: function title: Type type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDelta - type: object - OpenAIResponseObjectStreamResponseRefusalDone: - description: Streaming event for when refusal text is completed. - properties: - content_index: - title: Content Index - type: integer - refusal: - title: Refusal - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.done - default: response.refusal.done - title: Type + name: + title: Name type: string + description: + anyOf: + - type: string + - type: 'null' + nullable: true + parameters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + nullable: true required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDone + - name + - parameters + title: OpenAIResponseInputToolFunction type: object - OpenAIResponseObjectStreamResponseWebSearchCallCompleted: - description: Streaming event for completed web search calls. + OpenAIResponseInputToolWebSearch: + description: Web search tool configuration for OpenAI response inputs. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.web_search_call.completed - default: response.web_search_call.completed + default: web_search title: Type type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + search_context_size: + anyOf: + - pattern: ^low|medium|high$ + type: string + - type: 'null' + default: medium + title: OpenAIResponseInputToolWebSearch type: object - OpenAIResponseObjectStreamResponseWebSearchCallInProgress: - description: Streaming event for web search calls in progress. + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + created_at: + title: Created At type: integer - type: - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - title: Type + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + nullable: true + title: OpenAIResponseError + id: + title: Id type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - type: object - OpenAIResponseObjectStreamResponseWebSearchCallSearching: - properties: - item_id: - title: Item Id + model: + title: Model type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.searching - default: response.web_search_call.searching - title: Type + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output + type: array + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: + anyOf: + - type: string + - type: 'null' + nullable: true + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + nullable: true + title: OpenAIResponsePrompt + status: + title: Status type: string + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + tools: + anyOf: + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + nullable: true + truncation: + anyOf: + - type: string + - type: 'null' + nullable: true + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage + - type: 'null' + nullable: true + title: OpenAIResponseUsage + instructions: + anyOf: + - type: string + - type: 'null' + nullable: true + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + title: Input + type: array required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput type: object + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) OpenAIResponsePrompt: description: OpenAI compatible Prompt object that is used in OpenAI responses. properties: @@ -4862,35 +5067,52 @@ components: title: OpenAIResponseTextFormat title: OpenAIResponseText type: object - OpenAIResponseTextFormat: - description: Configuration for Responses API text format. + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. properties: type: + const: mcp + default: mcp title: Type type: string - enum: - - text - - json_schema - - json_object - default: text - name: + server_label: + title: Server Label + type: string + allowed_tools: anyOf: - - type: string + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - title: OpenAIResponseTextFormat + title: list[string] | AllowedToolsFilter + nullable: true + required: + - server_label + title: OpenAIResponseToolMCP type: object OpenAIResponseUsage: description: Usage information for OpenAI response. @@ -4924,2660 +5146,1454 @@ components: - total_tokens title: OpenAIResponseUsage type: object - OpenAIResponseUsageInputTokensDetails: - description: Token details for input tokens in OpenAI response usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageInputTokensDetails - type: object - OpenAIResponseUsageOutputTokensDetails: - description: Token details for output tokens in OpenAI response usage. + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageOutputTokensDetails + type: + title: Type + type: string + required: + - type + title: ResponseGuardrailSpec type: object - OpenAIResponseObjectStream: + OpenAIResponseInputTool: discriminator: mapping: - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - title: OpenAIResponseObjectStreamResponseCreated - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - title: OpenAIResponseObjectStreamResponseInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - title: OpenAIResponseObjectStreamResponseOutputItemAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - title: OpenAIResponseObjectStreamResponseOutputItemDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - title: OpenAIResponseObjectStreamResponseOutputTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - title: OpenAIResponseObjectStreamResponseOutputTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - title: OpenAIResponseObjectStreamResponseMcpCallFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - title: OpenAIResponseObjectStreamResponseContentPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - title: OpenAIResponseObjectStreamResponseContentPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - title: OpenAIResponseObjectStreamResponseReasoningTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - title: OpenAIResponseObjectStreamResponseRefusalDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - title: OpenAIResponseObjectStreamResponseRefusalDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - title: OpenAIResponseObjectStreamResponseIncomplete - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - title: OpenAIResponseObjectStreamResponseFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - title: OpenAIResponseObjectStreamResponseCompleted - title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) - OpenAIResponseInputFunctionToolCallOutput: - description: This represents the output of a function call that gets passed back to the model. + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: - call_id: - title: Call Id - type: string - output: - title: Output - type: string type: - const: function_call_output - default: function_call_output + const: mcp + default: mcp title: Type type: string - id: + server_label: + title: Server Label + type: string + server_url: + title: Server Url + type: string + headers: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - status: + authorization: anyOf: - type: string - type: 'null' nullable: true - required: - - call_id - - output - title: OpenAIResponseInputFunctionToolCallOutput - 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: + require_approval: anyOf: - - type: string - - type: 'null' - nullable: true - reason: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + title: ApprovalFilter + default: never + title: string | ApprovalFilter + allowed_tools: anyOf: - - type: string + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' + title: list[string] | AllowedToolsFilter nullable: true required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse + - server_label + - server_url + title: OpenAIResponseInputToolMCP type: object - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - ArrayType: - description: Parameter type for array values. + OpenAIResponseObject: + description: Complete OpenAI response object containing generation results and metadata. properties: - type: - const: array - default: array - title: Type + created_at: + title: Created At + type: integer + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + nullable: true + title: OpenAIResponseError + id: + title: Id type: string - title: ArrayType - type: object - BooleanType: - description: Parameter type for boolean values. - properties: - type: - const: boolean - default: boolean - title: Type + model: + title: Model type: string - title: BooleanType - type: object - ChatCompletionInputType: - description: Parameter type for chat completion input. - properties: - type: - const: chat_completion_input - default: chat_completion_input - title: Type + object: + const: response + default: response + title: Object type: string - title: ChatCompletionInputType + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output + type: array + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: + anyOf: + - type: string + - type: 'null' + nullable: true + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + nullable: true + title: OpenAIResponsePrompt + status: + title: Status + type: string + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + tools: + anyOf: + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + nullable: true + truncation: + anyOf: + - type: string + - type: 'null' + nullable: true + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage + - type: 'null' + nullable: true + title: OpenAIResponseUsage + instructions: + anyOf: + - type: string + - type: 'null' + nullable: true + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + nullable: true + required: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject type: object - CompletionInputType: - description: Parameter type for completion input. + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. properties: type: - const: completion_input - default: completion_input + const: output_text + default: output_text title: Type type: string - title: CompletionInputType + text: + title: Text + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations + type: array + logprobs: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + nullable: true + required: + - text + title: OpenAIResponseContentPartOutputText type: object - JsonType: - description: Parameter type for JSON values. + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. properties: type: - const: json - default: json + const: summary_text + default: summary_text title: Type type: string - title: JsonType + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningSummary type: object - NumberType: - description: Parameter type for numeric values. + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. properties: type: - const: number - default: number + const: reasoning_text + default: reasoning_text title: Type type: string - title: NumberType + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningText type: object - ObjectType: - description: Parameter type for object values. + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' type: - const: object - default: object + const: response.completed + default: response.completed title: Type type: string - title: ObjectType + required: + - response + title: OpenAIResponseObjectStreamResponseCompleted type: object - StringType: - description: Parameter type for string values. + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer type: - const: string - default: string + const: response.content_part.added + default: response.content_part.added title: Type type: string - title: StringType + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded type: object - UnionType: - description: Parameter type for union values. + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer type: - const: union - default: union + const: response.content_part.done + default: response.content_part.done title: Type type: string - title: UnionType + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone type: object - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - RowsDataSource: - description: A dataset stored in rows. + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' type: - const: rows - default: rows + const: response.created + default: response.created title: Type type: string - rows: - items: - additionalProperties: true - type: object - title: Rows - type: array required: - - rows - title: RowsDataSource + - response + title: OpenAIResponseObjectStreamResponseCreated type: object - URIDataSource: - description: A dataset that can be obtained from a URI. + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer type: - const: uri - default: uri + const: response.failed + default: response.failed title: Type type: string - uri: - title: Uri - type: string required: - - uri - title: URIDataSource + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed type: object - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - AggregationFunctionType: - description: Types of aggregation functions for scoring results. - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - type: string - BasicScoringFnParams: - description: Parameters for basic scoring function configuration. + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: basic - default: basic + const: response.file_search_call.completed + default: response.file_search_call.completed title: Type type: string - aggregation_functions: - description: Aggregation functions to apply to the scores of each row - items: - $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions - type: array - title: BasicScoringFnParams + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted type: object - LLMAsJudgeScoringFnParams: - description: Parameters for LLM-as-judge scoring function configuration. + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: llm_as_judge - default: llm_as_judge + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress title: Type type: string - judge_model: - title: Judge Model - type: string - prompt_template: - anyOf: - - type: string - - type: 'null' - nullable: true - 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: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions - type: array required: - - judge_model - title: LLMAsJudgeScoringFnParams + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress type: object - RegexParserScoringFnParams: - description: Parameters for regex parser scoring function configuration. + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: regex_parser - default: regex_parser + const: response.file_search_call.searching + default: response.file_search_call.searching 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: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions - type: array - title: RegexParserScoringFnParams + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching type: object - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - LoraFinetuningConfig: - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. properties: - type: - const: LoRA - default: LoRA - title: Type + delta: + title: Delta type: string - lora_attn_modules: - items: - type: string - title: Lora Attn Modules - type: array - apply_lora_to_mlp: - title: Apply Lora To Mlp - type: boolean - apply_lora_to_output: - title: Apply Lora To Output - type: boolean - rank: - title: Rank + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - alpha: - title: Alpha + sequence_number: + title: Sequence Number type: integer - use_dora: - anyOf: - - type: boolean - - type: 'null' - default: false - quantize_base: - anyOf: - - type: boolean - - type: 'null' - default: false + type: + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + title: Type + type: string required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta type: object - QATFinetuningConfig: - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. properties: - type: - const: QAT - default: QAT - title: Type + arguments: + title: Arguments type: string - quantizer_name: - title: Quantizer Name + item_id: + title: Item Id type: string - group_size: - title: Group Size + output_index: + title: Output Index type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type + type: string required: - - quantizer_name - - group_size - title: QATFinetuningConfig + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone type: object - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - SpanEndPayload: - description: Payload for a span end event. + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer type: - const: span_end - default: span_end + const: response.in_progress + default: response.in_progress title: Type type: string - status: - $ref: '#/components/schemas/SpanStatus' required: - - status - title: SpanEndPayload + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress type: object - SpanStartPayload: - description: Payload for a span start event. + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer type: - const: span_start - default: span_start + const: response.incomplete + default: response.incomplete title: Type type: string - name: - title: Name - type: string - parent_span_id: - anyOf: - - type: string - - type: 'null' - nullable: true required: - - name - title: SpanStartPayload + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id + delta: + title: Delta type: string - timestamp: - format: date-time - title: Timestamp + item_id: + title: Item Id type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: metric - default: metric + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta title: Type type: string - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id + arguments: + title: Arguments type: string - timestamp: - format: date-time - title: Timestamp + item_id: + title: Item Id type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: structured_log - default: structured_log + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done title: Type type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. properties: - trace_id: - title: Trace Id + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type type: string - span_id: - title: Span Id + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.failed + default: response.mcp_call.failed + title: Type type: string - timestamp: - format: date-time - title: Timestamp + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed + type: object + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. + properties: + item_id: + title: Item Id type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: unstructured_log - default: unstructured_log + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress title: Type type: string - message: - title: Message + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + type: object + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type type: string - severity: - $ref: '#/components/schemas/LogSeverity' required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. + OpenAIResponseObjectStreamResponseMcpListToolsFailed: 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Data - type: array - object: - const: list - default: list - title: Object + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type type: string required: - - data - title: ListOpenAIResponseInputItem + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed type: object - OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: properties: - created_at: - title: Created At + sequence_number: + title: Sequence Number type: integer - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - nullable: true - title: OpenAIResponseError - id: - title: Id + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type type: string - model: - title: Model + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. + properties: + response_id: + title: Response Id type: string - object: - const: response - default: response - title: Object + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.added + default: response.output_item.added + title: Type 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output - type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: - anyOf: - - type: string - - type: 'null' - nullable: true - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - nullable: true - title: OpenAIResponsePrompt - status: - title: Status - type: string - temperature: - anyOf: - - type: number - - type: 'null' - nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - nullable: true - tools: - anyOf: - - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - nullable: true - truncation: - anyOf: - - type: string - - type: 'null' - nullable: true - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - nullable: true - title: OpenAIResponseUsage - instructions: - anyOf: - - type: string - - type: 'null' - nullable: true - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Input - type: array - required: - - created_at - - id - - model - - output - - status - - input - title: OpenAIResponseObjectWithInput - type: object - ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. - 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. - 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 - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - type: object - Batch: - additionalProperties: true - properties: - id: - title: Id - type: string - completion_window: - title: Completion Window - type: string - created_at: - title: Created At - type: integer - endpoint: - title: Endpoint - type: string - input_file_id: - title: Input File Id - type: string - object: - const: batch - title: Object - type: string - status: - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - title: Status - type: string - cancelled_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - cancelling_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - completed_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - error_file_id: - anyOf: - - type: string - - type: 'null' - nullable: true - errors: - anyOf: - - $ref: '#/components/schemas/Errors' - title: Errors - - type: 'null' - nullable: true - title: Errors - expired_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - expires_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - failed_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - finalizing_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - in_progress_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - nullable: true - model: - anyOf: - - type: string - - type: 'null' - nullable: true - output_file_id: - anyOf: - - type: string - - type: 'null' - nullable: true - request_counts: - anyOf: - - $ref: '#/components/schemas/BatchRequestCounts' - title: BatchRequestCounts - - type: 'null' - nullable: true - title: BatchRequestCounts - usage: - anyOf: - - $ref: '#/components/schemas/BatchUsage' - title: BatchUsage - - type: 'null' - nullable: true - title: BatchUsage - required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - type: object - BatchError: - additionalProperties: true - properties: - code: - anyOf: - - type: string - - type: 'null' - nullable: true - line: - anyOf: - - type: integer - - type: 'null' - nullable: true - message: - anyOf: - - type: string - - type: 'null' - nullable: true - param: - anyOf: - - type: string - - type: 'null' - nullable: true - title: BatchError - type: object - BatchRequestCounts: - additionalProperties: true - properties: - completed: - title: Completed - type: integer - failed: - title: Failed - type: integer - total: - title: Total - type: integer - required: - - completed - - failed - - total - title: BatchRequestCounts - type: object - BatchUsage: - additionalProperties: true - properties: - input_tokens: - title: Input Tokens - type: integer - input_tokens_details: - $ref: '#/components/schemas/InputTokensDetails' - output_tokens: - title: Output Tokens - type: integer - output_tokens_details: - $ref: '#/components/schemas/OutputTokensDetails' - total_tokens: - title: Total Tokens - type: integer - required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage - type: object - Errors: - additionalProperties: true - properties: - data: - anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array - - type: 'null' - nullable: true - object: - anyOf: - - type: string - - type: 'null' - nullable: true - title: Errors - type: object - InputTokensDetails: - additionalProperties: true - properties: - cached_tokens: - title: Cached Tokens - type: integer - required: - - cached_tokens - title: InputTokensDetails - type: object - OutputTokensDetails: - additionalProperties: true - properties: - reasoning_tokens: - title: Reasoning Tokens - type: integer - required: - - reasoning_tokens - title: OutputTokensDetails - 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: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: ID of the last batch in the list - nullable: true - has_more: - default: false - description: Whether there are more batches available - title: Has More - type: boolean - required: - - data - title: ListBatchesResponse - type: object - Benchmark: - description: A benchmark resource for evaluating model performance. - 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 - nullable: true - 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 - ListBenchmarksResponse: - properties: - data: - items: - $ref: '#/components/schemas/Benchmark' - title: Data - type: array - required: - - data - title: ListBenchmarksResponse - type: object - ImageDelta: - description: An image content delta for streaming responses. - properties: - type: - const: image - default: image - title: Type - type: string - image: - format: binary - title: Image - type: string - required: - - image - title: ImageDelta - type: object - TextDelta: - description: A text content delta for streaming responses. - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: TextDelta - type: object - JobStatus: - description: Status of a job execution. - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string - Job: - description: A job execution instance with status tracking. - properties: - job_id: - title: Job Id - type: string - status: - $ref: '#/components/schemas/JobStatus' - required: - - job_id - - status - title: Job - type: object - MetricInResponse: - description: A metric value included in API responses. - properties: - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - metric - - value - title: MetricInResponse - type: object - PaginatedResponse: - description: A generic paginated response that follows a simple format. - properties: - data: - items: - additionalProperties: true - type: object - title: Data - type: array - has_more: - title: Has More - type: boolean - url: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - data - - has_more - title: PaginatedResponse - type: object - PostTrainingMetric: - description: Training metrics captured during post-training jobs. - 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 - Checkpoint: - description: Checkpoint created during training runs. - 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: '#/components/schemas/PostTrainingMetric' - title: PostTrainingMetric - - type: 'null' - nullable: true - title: PostTrainingMetric - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. - properties: - type: - const: dialog - default: dialog - title: Type - type: string - title: DialogType - 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. - 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. - nullable: true - 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. - nullable: true - required: - - id - - created_at - title: Conversation - 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 - ConversationItemCreateRequest: - description: Request body for creating conversation items. - properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array - required: - - items - title: ConversationItemCreateRequest - 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 - ConversationItemList: - 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: '#/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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the first item in the list - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the last item in the list - nullable: true - has_more: - default: false - description: Whether there are more items available - title: Has More - type: boolean - required: - - data - title: ConversationItemList - type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. - properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status - type: string - type: - const: message - default: message - title: Type - type: string - object: - const: message - default: message - title: Object - type: string - required: - - id - - content - - role - - status - title: ConversationMessage - type: object - DatasetPurpose: - description: Purpose of the dataset. Each purpose has a required input data schema. - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string - Dataset: - description: Dataset resource for storing and accessing training or evaluation data. - 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 - nullable: true - 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: '#/components/schemas/DatasetPurpose' - source: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - metadata: - additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata - type: object - required: - - identifier - - provider_id - - purpose - - source - title: Dataset - type: object - ListDatasetsResponse: - description: Response from listing datasets. - properties: - data: - items: - $ref: '#/components/schemas/Dataset' - title: Data - type: array - required: - - data - title: ListDatasetsResponse - type: object - Error: - description: Error response from the API. Roughly follows RFC 7807. - properties: - status: - title: Status - type: integer - title: - title: Title - type: string - detail: - title: Detail - type: string - instance: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - status - - title - - detail - title: Error - type: object - Api: - description: Enumeration of all available APIs in the Llama Stack system. - enum: - - providers - - inference - - safety - - agents - - batches - - vector_io - - datasetio - - scoring - - eval - - post_training - - tool_runtime - - models - - shields - - vector_stores - - datasets - - scoring_functions - - benchmarks - - tool_groups - - files - - prompts - - conversations - - inspect - title: Api - type: string - InlineProviderSpec: - properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class - type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - container_image: - anyOf: - - type: string - - type: 'null' - description: |2 - - The container image to use for this implementation. If one is provided, pip_packages will be ignored. - If a provider depends on other providers, the dependencies MUST NOT specify a container image. - nullable: true - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true required: - - api - - provider_type - - config_class - title: InlineProviderSpec + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded type: object - ModelType: - description: Enumeration of supported model types in Llama Stack. - enum: - - llm - - embedding - - rerank - title: ModelType - type: string - Model: - description: A model resource representing an AI model registered in Llama Stack. + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + response_id: + title: Response Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done + title: Type + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone + type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. + properties: + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + sequence_number: + title: Sequence Number + type: integer type: - const: model - default: model + const: response.output_text.annotation.added + default: response.output_text.annotation.added title: Type type: string - metadata: - additionalProperties: true - description: Any additional metadata for this model - title: Metadata - type: object - model_type: - $ref: '#/components/schemas/ModelType' - default: llm required: - - identifier - - provider_id - title: Model + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded type: object - ProviderSpec: + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.delta + default: response.output_text.delta + title: Type type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array required: - - api - - provider_type - - config_class - title: ProviderSpec + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta type: object - RemoteProviderSpec: + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type + content_index: + title: Content Index + type: integer + text: + title: Text type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + item_id: + title: Item Id type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - adapter_type: - description: Unique identifier for this adapter - title: Adapter Type + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done + title: Type type: string - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true required: - - api - - provider_type - - config_class - - adapter_type - title: RemoteProviderSpec + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone type: object - ScoringFn: - description: A scoring function resource for evaluating model outputs. + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + item_id: + title: Item Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. + properties: + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: scoring_function - default: scoring_function + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done title: Type type: string - description: - anyOf: - - type: string - - type: 'null' - 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: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - params: - anyOf: - - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval - title: Params - nullable: true required: - - identifier - - provider_id - - return_type - title: ScoringFn + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone type: object - Shield: - description: A safety shield resource that can be used to check content. + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + delta: + title: Delta type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: shield - default: shield + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta title: Type type: string - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true required: - - identifier - - provider_id - title: Shield + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta type: object - ToolGroup: - description: A group of related tools managed together. + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + text: + title: Text type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: tool_group - default: tool_group + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done title: Type type: string - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - nullable: true - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true required: - - identifier - - provider_id - title: ToolGroup + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone type: object - ModelCandidate: - description: A model candidate for evaluation. + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: model - default: model + const: response.reasoning_text.delta + default: response.reasoning_text.delta title: Type type: string - model: - title: Model - type: string - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: - anyOf: - - $ref: '#/components/schemas/SystemMessage' - title: SystemMessage - - type: 'null' - nullable: true - title: SystemMessage required: - - model - - sampling_params - title: ModelCandidate + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta type: object - SamplingParams: - description: Sampling parameters. + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. properties: - strategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - max_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - repetition_penalty: - anyOf: - - type: number - - type: 'null' - default: 1.0 - stop: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - title: SamplingParams + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done + title: Type + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone type: object - SystemMessage: - description: A system message providing instructions or context to the model. + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. properties: - role: - const: system - default: system - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.delta + default: response.refusal.delta + title: Type + type: string required: - - content - title: SystemMessage + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta type: object - BenchmarkConfig: - description: A benchmark configuration for evaluation. + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - scoring_params: - additionalProperties: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - description: Map between scoring function id and parameters for each scoring function you want to run - title: Scoring Params - type: object - num_examples: - anyOf: - - type: integer - - type: 'null' - description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - nullable: true + content_index: + title: Content Index + type: integer + refusal: + title: Refusal + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.done + default: response.refusal.done + title: Type + type: string required: - - eval_candidate - title: BenchmarkConfig + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone type: object - ScoringResult: - description: A scoring result for a single row. + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. properties: - score_rows: - items: - additionalProperties: true - type: object - title: Score Rows - type: array - aggregated_results: - additionalProperties: true - title: Aggregated Results - type: object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type + type: string required: - - score_rows - - aggregated_results - title: ScoringResult + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted type: object - EvaluateResponse: - description: The response from an evaluation. + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. properties: - generations: - items: - additionalProperties: true - type: object - title: Generations - type: array - scores: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Scores - type: object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress + title: Type + type: string required: - - generations - - scores - title: EvaluateResponse + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress 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) + OpenAIResponseObjectStreamResponseWebSearchCallSearching: properties: - anchor: - const: created_at - title: Anchor + item_id: + title: Item Id type: string - seconds: - maximum: 2592000 - minimum: 3600 - title: Seconds + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number type: integer + type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type + type: string required: - - anchor - - seconds - title: ExpiresAfter + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching type: object - OpenAIFileObject: - description: OpenAI File object as defined in the OpenAI Files API. + OpenAIDeleteResponseObject: + description: Response object confirming deletion of an OpenAI response. 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 + object: + const: response + default: response + title: Object type: string - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' + deleted: + default: true + title: Deleted + type: boolean required: - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject + title: OpenAIDeleteResponseObject type: object - OpenAIFilePurpose: - description: Valid purpose values for OpenAI Files API. - enum: - - assistants - - batch - title: OpenAIFilePurpose - type: string - ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. properties: data: items: - $ref: '#/components/schemas/OpenAIFileObject' + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage 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 @@ -7585,1017 +6601,1677 @@ components: type: string required: - data - - has_more - - first_id - - last_id - title: ListOpenAIFileResponse + title: ListOpenAIResponseInputItem type: object - OpenAIFileDeleteResponse: - description: Response for deleting a file in OpenAI Files API. + RunShieldResponse: + description: Response from running a safety shield. properties: - id: - title: Id - type: string - object: - const: file - default: file - title: Object - type: string - deleted: - title: Deleted - type: boolean + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation + - type: 'null' + nullable: true + title: SafetyViolation + title: RunShieldResponse + type: object + SafetyViolation: + description: Details of a safety violation detected by content moderation. + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - id - - deleted - title: OpenAIFileDeleteResponse + - violation_level + title: SafetyViolation type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). + ViolationLevel: + description: Severity level of a safety violation. + enum: + - info + - warn + - error + title: ViolationLevel + type: string + AggregationFunctionType: + description: Types of aggregation functions for scoring results. + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + type: string + ArrayType: + description: Parameter type for array values. properties: type: - const: bf16 - default: bf16 + const: array + default: array title: Type type: string - title: Bf16QuantizationConfig + title: ArrayType type: object - EmbeddingsResponse: - description: Response containing generated embeddings. + BasicScoringFnParams: + description: Parameters for basic scoring function configuration. properties: - embeddings: + type: + const: basic + default: basic + title: Type + type: string + aggregation_functions: + description: Aggregation functions to apply to the scores of each row items: - items: - type: number - type: array - title: Embeddings + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions type: array - required: - - embeddings - title: EmbeddingsResponse + title: BasicScoringFnParams type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. + BooleanType: + description: Parameter type for boolean values. properties: type: - const: fp8_mixed - default: fp8_mixed + const: boolean + default: boolean title: Type type: string - title: Fp8QuantizationConfig + title: BooleanType type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. + ChatCompletionInputType: + description: Parameter type for chat completion input. properties: type: - const: int4_mixed - default: int4_mixed + const: chat_completion_input + default: chat_completion_input title: Type type: string - scheme: - anyOf: - - type: string - - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig + title: ChatCompletionInputType type: object - OpenAIChatCompletionUsage: - description: Usage information for OpenAI chat completion. + CompletionInputType: + description: Parameter type for completion input. 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: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' - title: OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - completion_tokens_details: + type: + const: completion_input + default: completion_input + title: Type + type: string + title: CompletionInputType + type: object + JsonType: + description: Parameter type for JSON values. + properties: + type: + const: json + default: json + title: Type + type: string + title: JsonType + type: object + LLMAsJudgeScoringFnParams: + description: Parameters for LLM-as-judge scoring function configuration. + properties: + type: + const: llm_as_judge + default: llm_as_judge + title: Type + type: string + judge_model: + title: Judge Model + type: string + prompt_template: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' - title: OpenAIChatCompletionUsageCompletionTokensDetails + - type: string - type: 'null' nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage + - judge_model + title: LLMAsJudgeScoringFnParams + type: object + NumberType: + description: Parameter type for numeric values. + properties: + type: + const: number + default: number + title: Type + type: string + title: NumberType + type: object + ObjectType: + description: Parameter type for object values. + properties: + type: + const: object + default: object + title: Type + type: string + title: ObjectType + type: object + RegexParserScoringFnParams: + description: Parameters for regex parser scoring function configuration. + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array + title: RegexParserScoringFnParams type: object - OpenAIChatCompletionUsageCompletionTokensDetails: - description: Token details for output tokens in OpenAI chat completion usage. + ScoringFn: + description: A scoring function resource for evaluating model outputs. properties: - reasoning_tokens: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier + type: string + provider_resource_id: anyOf: - - type: integer + - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object - OpenAIChatCompletionUsagePromptTokensDetails: - description: Token details for prompt tokens in OpenAI chat completion usage. - properties: - cached_tokens: + 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: integer + - type: string - type: 'null' nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - properties: - message: + 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: - assistant: '#/components/schemas/OpenAIAssistantMessageParam' - developer: '#/components/schemas/OpenAIDeveloperMessageParam' - system: '#/components/schemas/OpenAISystemMessageParam' - tool: '#/components/schemas/OpenAIToolMessageParam' - user: '#/components/schemas/OpenAIUserMessageParam' - propertyName: role + 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/OpenAIUserMessageParam' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + - $ref: '#/components/schemas/StringType' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + params: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + title: Params nullable: true - title: OpenAIChoiceLogprobs required: - - message - - finish_reason - - index - title: OpenAIChoice + - identifier + - provider_id + - return_type + title: ScoringFn type: object - OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + StringType: + description: Parameter type for string values. properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - nullable: true - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - nullable: true - title: OpenAIChoiceLogprobs + type: + const: string + default: string + title: Type + type: string + title: StringType type: object - OpenAICompletionWithInputMessages: + UnionType: + description: Parameter type for union values. properties: - id: - title: Id + type: + const: union + default: union + title: Type type: string - choices: + title: UnionType + type: object + ListScoringFunctionsResponse: + properties: + data: items: - $ref: '#/components/schemas/OpenAIChoice' - title: Choices + $ref: '#/components/schemas/ScoringFn' + title: Data 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: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsage - input_messages: + required: + - data + title: ListScoringFunctionsResponse + type: object + ScoreResponse: + description: The response from scoring. + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object + required: + - results + title: ScoreResponse + type: object + ScoringResult: + description: A scoring result for a single row. + properties: + score_rows: 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Input Messages + additionalProperties: true + type: object + title: Score Rows type: array + aggregated_results: + additionalProperties: true + title: Aggregated Results + type: object required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages + - score_rows + - aggregated_results + title: ScoringResult 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 + ScoreBatchResponse: + description: Response from batch scoring operations on datasets. properties: - token: - title: Token - type: string - bytes: + dataset_id: anyOf: - - items: - type: integer - type: array + - type: string - type: 'null' nullable: true - logprob: - title: Logprob - type: number - top_logprobs: - items: - $ref: '#/components/schemas/OpenAITopLogProb' - title: Top Logprobs - type: array + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object required: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb + - results + title: ScoreBatchResponse 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 + Shield: + description: A safety shield resource that can be used to check content. properties: - token: - title: Token + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - bytes: + provider_resource_id: anyOf: - - items: - type: integer - type: array + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string + type: + const: shield + default: shield + title: Type + type: string + params: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - logprob: - title: Logprob - type: number required: - - token - - logprob - title: OpenAITopLogProb + - identifier + - provider_id + title: Shield type: object - ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. + ListShieldsResponse: properties: data: items: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + $ref: '#/components/schemas/Shield' 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 + title: ListShieldsResponse type: object - OpenAIChatCompletion: - description: Response from an OpenAI-compatible chat completion request. + ImageContentItem: + description: A image content item properties: - id: - title: Id + type: + const: image + default: image + title: Type type: string - choices: - items: - $ref: '#/components/schemas/OpenAIChoice' - title: Choices - type: array - object: - const: chat.completion - default: chat.completion - title: Object + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + TextContentItem: + description: A text content item + properties: + type: + const: text + default: text + title: Type type: string - created: - title: Created - type: integer - model: - title: Model + text: + title: Text type: string - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsage required: - - id - - choices - - created - - model - title: OpenAIChatCompletion + - text + title: TextContentItem type: object - OpenAIChoiceDelta: - description: A delta from an OpenAI-compatible chat completion streaming response. + ToolInvocationResult: + description: Result of a tool invocation. properties: content: anyOf: - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true + error_message: + anyOf: + - type: string + - type: 'null' + nullable: true + error_code: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - refusal: + title: ToolInvocationResult + type: object + URL: + description: A URL reference to external content. + properties: + uri: + title: Uri + type: string + required: + - uri + title: URL + type: object + ToolDef: + description: Tool definition used in runtime contexts. + properties: + toolgroup_id: anyOf: - type: string - type: 'null' nullable: true - role: + name: + title: Name + type: string + description: anyOf: - type: string - type: 'null' nullable: true - tool_calls: + input_schema: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - reasoning_content: + output_schema: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceDelta - type: object - OpenAIChunkChoice: - description: A chunk choice from an OpenAI-compatible chat completion streaming response. - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + metadata: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceLogprobs required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice + - name + title: ToolDef type: object - OpenAIChatCompletionChunk: - description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + ListToolDefsResponse: + description: Response containing a list of tool definitions. properties: - id: - title: Id - type: string - choices: + data: items: - $ref: '#/components/schemas/OpenAIChunkChoice' - title: Choices + $ref: '#/components/schemas/ToolDef' + title: Data type: array - object: - const: chat.completion.chunk - default: chat.completion.chunk - title: Object - type: string - created: - title: Created - type: integer - model: - title: Model + required: + - data + title: ListToolDefsResponse + type: object + ToolGroup: + description: A group of related tools managed together. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - usage: + provider_resource_id: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage + - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true - title: OpenAIChatCompletionUsage - required: - - id - - choices - - created - - model - title: OpenAIChatCompletionChunk - type: object - OpenAIChatCompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible chat completion endpoint. - properties: - model: - title: Model + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - minItems: 1 - title: Messages - type: array - frequency_penalty: + type: + const: tool_group + default: tool_group + title: Type + type: string + mcp_endpoint: anyOf: - - type: number + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true - function_call: + title: URL + args: anyOf: - - type: string - additionalProperties: true type: object - type: 'null' - title: string | object nullable: true - functions: + required: + - identifier + - provider_id + title: ToolGroup + type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object + Chunk: + description: A chunk of content that can be inserted into a vector database. + properties: + content: anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: - additionalProperties: true - type: object + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - - type: 'null' - nullable: true - logit_bias: + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: anyOf: - - additionalProperties: + - items: type: number - type: object - - type: 'null' - nullable: true - logprobs: - anyOf: - - type: boolean - - type: 'null' - nullable: true - max_completion_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - max_tokens: - anyOf: - - type: integer + type: array - type: 'null' nullable: true - n: + chunk_metadata: anyOf: - - type: integer + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true - parallel_tool_calls: + title: ChunkMetadata + required: + - content + - chunk_id + 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. + properties: + chunk_id: anyOf: - - type: boolean + - type: string - type: 'null' nullable: true - presence_penalty: + document_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - response_format: + source: anyOf: - - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: string - type: 'null' - title: Response Format nullable: true - seed: + created_timestamp: anyOf: - type: integer - type: 'null' nullable: true - stop: + updated_timestamp: anyOf: - - type: string - - items: - type: string - type: array - title: list[string] + - type: integer - type: 'null' - title: string | list[string] nullable: true - stream: + chunk_window: anyOf: - - type: boolean + - type: string - type: 'null' nullable: true - stream_options: + chunk_tokenizer: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - temperature: + chunk_embedding_model: anyOf: - - type: number + - type: string - type: 'null' nullable: true - tool_choice: + chunk_embedding_dimension: anyOf: - - type: string - - additionalProperties: true - type: object + - type: integer - type: 'null' - title: string | object nullable: true - tools: + content_token_count: anyOf: - - items: - additionalProperties: true - type: object - type: array + - type: integer - type: 'null' nullable: true - top_logprobs: + metadata_token_count: anyOf: - type: integer - type: 'null' nullable: true - top_p: + title: ChunkMetadata + type: object + QueryChunksResponse: + description: Response from querying chunks in a vector database. + properties: + chunks: + items: + $ref: '#/components/schemas/Chunk' + title: Chunks + type: array + scores: + items: + type: number + title: Scores + type: array + required: + - chunks + - scores + title: QueryChunksResponse + type: object + VectorStoreFileCounts: + description: File processing status counts for a 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 + VectorStoreListResponse: + description: Response from listing vector stores. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - user: + last_id: anyOf: - type: string - type: 'null' nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody + - data + title: VectorStoreListResponse 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 + VectorStoreObject: + description: OpenAI Vector Store object. properties: - finish_reason: - title: Finish Reason + id: + title: Id type: string - text: - title: Text + object: + default: vector_store + title: Object type: string - index: - title: Index + created_at: + title: Created At type: integer - logprobs: + name: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - type: string - type: 'null' nullable: true - title: OpenAIChoiceLogprobs + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + default: completed + title: Status + type: string + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + expires_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + last_active_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - finish_reason - - text - - index - title: OpenAICompletionChoice + - id + - created_at + - file_counts + title: VectorStoreObject type: object - OpenAICompletion: - 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" + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + VectorStoreChunkingStrategyAuto: + description: Automatic chunking strategy for vector store files. properties: - id: - title: Id - type: string - choices: - items: - $ref: '#/components/schemas/OpenAICompletionChoice' - title: Choices - type: array - created: - title: Created - type: integer - model: - title: Model + type: + const: auto + default: auto + title: Type type: string - object: - const: text_completion - default: text_completion - title: Object + title: VectorStoreChunkingStrategyAuto + type: object + VectorStoreChunkingStrategyStatic: + description: Static chunking strategy with configurable parameters. + properties: + type: + const: static + default: static + title: Type type: string + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' required: - - id - - choices - - created - - model - title: OpenAICompletion + - static + title: VectorStoreChunkingStrategyStatic type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens + VectorStoreChunkingStrategyStaticConfig: + description: Configuration for static chunking strategy. properties: - text_offset: - anyOf: - - items: - type: integer - type: array - - type: 'null' - nullable: true - token_logprobs: + 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 + OpenAICreateVectorStoreRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store with extra_body support. + properties: + name: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - tokens: + file_ids: anyOf: - items: type: string type: array - type: 'null' nullable: true - top_logprobs: + expires_after: anyOf: - - items: - additionalProperties: - type: number - type: object - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAICompletionLogprobs - type: object - OpenAICompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible completion endpoint. - properties: - model: - title: Model - type: string - prompt: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - items: - type: integer - type: array - title: list[integer] - - items: - items: - type: integer - type: array - type: array - title: list[array] - title: string | ... (4 variants) - best_of: + chunking_strategy: anyOf: - - type: integer + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' + title: Chunking Strategy nullable: true - echo: + metadata: anyOf: - - type: boolean + - additionalProperties: true + type: object - type: 'null' nullable: true - frequency_penalty: + title: OpenAICreateVectorStoreRequestWithExtraBody + type: object + VectorStoreDeleteResponse: + description: Response from deleting a vector store. + 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 + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store file batch with extra_body support. + properties: + file_ids: + items: + type: string + title: File Ids + type: array + attributes: anyOf: - - type: number + - additionalProperties: true + type: object - type: 'null' nullable: true - logit_bias: + chunking_strategy: anyOf: - - additionalProperties: - type: number - type: object + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' + title: Chunking Strategy nullable: true - logprobs: + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + type: object + VectorStoreFileBatchObject: + description: OpenAI Vector Store File Batch object. + 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: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + required: + - id + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + type: object + VectorStoreFileStatus: + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + VectorStoreFileLastError: + description: Error information for failed vector store file processing. + properties: + code: + title: Code + type: string + enum: + - server_error + - rate_limit_exceeded + default: server_error + message: + title: Message + type: string + required: + - code + - message + title: VectorStoreFileLastError + type: object + VectorStoreFileObject: + description: OpenAI Vector Store File object. + 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: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + created_at: + title: Created At + type: integer + last_error: anyOf: - - type: boolean + - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' nullable: true - max_tokens: + title: VectorStoreFileLastError + status: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + 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 + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - n: + last_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - presence_penalty: + 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. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - seed: + last_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - stop: + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListFilesResponse + type: object + VectorStoreFileDeleteResponse: + description: Response from deleting a vector store file. + 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 + VectorStoreContent: + description: Content item from a vector store file or search result. + properties: + type: + const: text + title: Type + type: string + text: + title: Text + type: string + embedding: anyOf: - - type: string - items: - type: string + type: number type: array - title: list[string] - type: 'null' - title: string | list[string] nullable: true - stream: + chunk_metadata: anyOf: - - type: boolean + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true - stream_options: + title: ChunkMetadata + metadata: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - temperature: + required: + - type + - text + title: VectorStoreContent + type: object + VectorStoreFileContentResponse: + description: Represents the parsed content of a vector store file. + properties: + object: + const: vector_store.file_content.page + default: vector_store.file_content.page + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: anyOf: - - type: number + - type: string - type: 'null' nullable: true - top_p: + required: + - data + title: VectorStoreFileContentResponse + type: object + VectorStoreSearchResponse: + description: Response from searching a vector store. + properties: + file_id: + title: File Id + type: string + filename: + title: Filename + type: string + score: + title: Score + type: number + attributes: anyOf: - - type: number + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + title: string | number | boolean + type: object - type: 'null' nullable: true - user: + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Content + type: array + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + type: object + VectorStoreSearchResponsePage: + description: Paginated response from searching a vector store. + properties: + object: + default: vector_store.search_results.page + title: Object + type: string + search_query: + items: + type: string + title: Search Query + type: array + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: anyOf: - type: string - type: 'null' nullable: true - suffix: + required: + - search_query + - data + title: VectorStoreSearchResponsePage + type: object + VersionInfo: + description: Version information for the service. + properties: + version: + title: Version + type: string + required: + - version + title: VersionInfo + type: object + PaginatedResponse: + description: A generic paginated response that follows a simple format. + properties: + data: + items: + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - data + - has_more + title: PaginatedResponse + type: object + Dataset: + description: Dataset resource for storing and accessing training or evaluation data. + 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 nullable: true + 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: '#/components/schemas/DatasetPurpose' + source: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + metadata: + additionalProperties: true + description: Any additional metadata for this dataset + title: Metadata + type: object required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody + - identifier + - provider_id + - purpose + - source + title: Dataset type: object - OpenAIEmbeddingData: - description: A single embedding data object from an OpenAI-compatible embeddings response. + RowsDataSource: + description: A dataset stored in rows. properties: - object: - const: embedding - default: embedding - title: Object + type: + const: rows + default: rows + title: Type type: string - embedding: - anyOf: - - items: - type: number - type: array - title: list[number] - - type: string - title: list[number] | string - index: - title: Index - type: integer + rows: + items: + additionalProperties: true + type: object + title: Rows + type: array required: - - embedding - - index - title: OpenAIEmbeddingData + - rows + title: RowsDataSource type: object - OpenAIEmbeddingUsage: - description: Usage information for an OpenAI-compatible embeddings response. + URIDataSource: + description: A dataset that can be obtained from a URI. properties: - prompt_tokens: - title: Prompt Tokens - type: integer - total_tokens: - title: Total Tokens - type: integer + type: + const: uri + default: uri + title: Type + type: string + uri: + title: Uri + type: string required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage + - uri + title: URIDataSource type: object - OpenAIEmbeddingsRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible embeddings endpoint. + ListDatasetsResponse: + description: Response from listing datasets. properties: - model: - title: Model + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object + Benchmark: + description: A benchmark resource for evaluating model performance. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - encoding_format: - anyOf: - - type: string - - type: 'null' - default: float - dimensions: - anyOf: - - type: integer - - type: 'null' - nullable: true - user: + provider_resource_id: anyOf: - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true + 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: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark type: object - OpenAIEmbeddingsResponse: - description: Response from an OpenAI-compatible embeddings request. + ListBenchmarksResponse: properties: - object: - const: list - default: list - title: Object - type: string data: items: - $ref: '#/components/schemas/OpenAIEmbeddingData' + $ref: '#/components/schemas/Benchmark' title: Data type: array - model: - title: Model - type: string - usage: - $ref: '#/components/schemas/OpenAIEmbeddingUsage' required: - data - - model - - usage - title: OpenAIEmbeddingsResponse + title: ListBenchmarksResponse type: object - RerankData: - description: A single rerank result from a reranking response. + BenchmarkConfig: + description: A benchmark configuration for evaluation. properties: - index: - title: Index - type: integer - relevance_score: - title: Relevance Score - type: number + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + description: Map between scoring function id and parameters for each scoring function you want to run + title: Scoring Params + type: object + num_examples: + anyOf: + - type: integer + - type: 'null' + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + nullable: true required: - - index - - relevance_score - title: RerankData + - eval_candidate + title: BenchmarkConfig type: object - RerankResponse: - description: Response from a reranking request. + GreedySamplingStrategy: + description: Greedy sampling strategy that selects the highest probability token at each step. properties: - data: - items: - $ref: '#/components/schemas/RerankData' - title: Data - type: array + type: + const: greedy + default: greedy + title: Type + type: string + title: GreedySamplingStrategy + type: object + ModelCandidate: + description: A model candidate for evaluation. + properties: + type: + const: model + default: model + title: Type + type: string + model: + title: Model + type: string + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage + - type: 'null' + nullable: true + title: SystemMessage required: - - data - title: RerankResponse + - model + - sampling_params + title: ModelCandidate type: object - TokenLogProbs: - description: Log probabilities for generated tokens. + SamplingParams: + description: Sampling parameters. properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs + strategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + repetition_penalty: + anyOf: + - type: number + - type: 'null' + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + title: SamplingParams type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. + SystemMessage: + description: A system message providing instructions or context to the model. properties: role: - const: tool - default: tool + const: system + default: system title: Role type: string - call_id: - title: Call Id - type: string content: anyOf: - type: string @@ -8626,195 +8302,229 @@ components: title: list[ImageContentItem | TextContentItem] title: string | list[ImageContentItem | TextContentItem] required: - - call_id - content - title: ToolResponseMessage + title: SystemMessage type: object - UserMessage: - description: A message from the user in a chat conversation. + TopKSamplingStrategy: + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. properties: - role: - const: user - default: user - title: Role + type: + const: top_k + default: top_k + title: Type type: string - content: + 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. + properties: + type: + const: top_p + default: top_p + title: Type + type: string + temperature: anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: + - type: number + minimum: 0.0 + - type: 'null' + top_p: anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] + - type: number - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true + default: 0.95 required: - - content - title: UserMessage + - temperature + title: TopPSamplingStrategy type: object - HealthStatus: - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - type: string - HealthInfo: - description: Health status information for the service. + EvaluateResponse: + description: The response from an evaluation. + properties: + generations: + items: + additionalProperties: true + type: object + title: Generations + type: array + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Scores + type: object + required: + - generations + - scores + title: EvaluateResponse + type: object + Job: + description: A job execution instance with status tracking. properties: + job_id: + title: Job Id + type: string status: - $ref: '#/components/schemas/HealthStatus' + $ref: '#/components/schemas/JobStatus' required: + - job_id - status - title: HealthInfo + title: Job type: object - RouteInfo: - description: Information about an API route including its path, method, and implementing providers. + RerankData: + description: A single rerank result from a reranking response. properties: - route: - title: Route - type: string - method: - title: Method - type: string - provider_types: + index: + title: Index + type: integer + relevance_score: + title: Relevance Score + type: number + required: + - index + - relevance_score + title: RerankData + type: object + RerankResponse: + description: Response from a reranking request. + properties: + data: items: - type: string - title: Provider Types + $ref: '#/components/schemas/RerankData' + title: Data type: array required: - - route - - method - - provider_types - title: RouteInfo + - data + title: RerankResponse + type: object + Checkpoint: + description: Checkpoint created during training runs. + 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: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric + - type: 'null' + nullable: true + title: PostTrainingMetric + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint type: object - ListRoutesResponse: - description: Response containing a list of all available API routes. + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. properties: - data: + job_uuid: + title: Job Uuid + type: string + checkpoints: items: - $ref: '#/components/schemas/RouteInfo' - title: Data + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints type: array required: - - data - title: ListRoutesResponse + - job_uuid + title: PostTrainingJobArtifactsResponse type: object - VersionInfo: - description: Version information for the service. + PostTrainingMetric: + description: Training metrics captured during post-training jobs. properties: - version: - title: Version - type: string + 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: - - version - title: VersionInfo + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric type: object - OpenAIModel: - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata + PostTrainingJobStatusResponse: + description: Status of a finetuning job. properties: - id: - title: Id - type: string - object: - const: model - default: model - title: Object - type: string - created: - title: Created - type: integer - owned_by: - title: Owned By + job_uuid: + title: Job Uuid type: string - custom_metadata: + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + started_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + completed_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - id - - created - - owned_by - title: OpenAIModel + - job_uuid + - status + title: PostTrainingJobStatusResponse type: object - OpenAIListModelsResponse: + ListPostTrainingJobsResponse: properties: data: items: - $ref: '#/components/schemas/OpenAIModel' + $ref: '#/components/schemas/PostTrainingJob' title: Data type: array required: - data - title: OpenAIListModelsResponse + title: ListPostTrainingJobsResponse type: object - DPOLossType: - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - type: string DPOAlignmentConfig: description: Configuration for Direct Preference Optimization (DPO) alignment. properties: @@ -8828,12 +8538,13 @@ components: - beta title: DPOAlignmentConfig type: object - DatasetFormat: - description: Format of the training dataset. + DPOLossType: enum: - - instruct - - dialog - title: DatasetFormat + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType type: string DataConfig: description: Configuration for training data and data loading. @@ -8851,1280 +8562,1635 @@ components: $ref: '#/components/schemas/DatasetFormat' validation_dataset_id: anyOf: - - type: string + - type: string + - type: 'null' + nullable: true + packed: + anyOf: + - type: boolean + - type: 'null' + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + default: false + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + type: object + DatasetFormat: + description: Format of the training dataset. + enum: + - instruct + - dialog + title: DatasetFormat + type: string + EfficiencyConfig: + description: Configuration for memory and compute efficiency optimizations. + properties: + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + default: false + title: EfficiencyConfig + type: object + OptimizerConfig: + description: Configuration parameters for the optimization algorithm. + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + lr: + title: Lr + type: number + weight_decay: + title: Weight Decay + type: number + num_warmup_steps: + title: Num Warmup Steps + type: integer + required: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + type: object + OptimizerType: + description: Available optimizer algorithms for training. + enum: + - adam + - adamw + - sgd + title: OptimizerType + type: string + TrainingConfig: + description: Comprehensive configuration for the training process. + properties: + n_epochs: + title: N Epochs + type: integer + max_steps_per_epoch: + default: 1 + title: Max Steps Per Epoch + type: integer + gradient_accumulation_steps: + default: 1 + title: Gradient Accumulation Steps + type: integer + max_validation_steps: + anyOf: + - type: integer + - type: 'null' + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + title: DataConfig + - type: 'null' + nullable: true + title: DataConfig + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig - type: 'null' nullable: true - packed: + title: OptimizerConfig + efficiency_config: anyOf: - - type: boolean + - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig - type: 'null' - default: false - train_on_input: + nullable: true + title: EfficiencyConfig + dtype: anyOf: - - type: boolean + - type: string - type: 'null' - default: false + default: bf16 required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig + - n_epochs + title: TrainingConfig type: object - EfficiencyConfig: - description: Configuration for memory and compute efficiency optimizations. + PostTrainingJob: properties: - enable_activation_checkpointing: - anyOf: - - type: boolean - - type: 'null' - default: false - enable_activation_offloading: - anyOf: - - type: boolean - - type: 'null' - default: false - memory_efficient_fsdp_wrap: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + LoraFinetuningConfig: + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + properties: + type: + const: LoRA + default: LoRA + title: Type + type: string + lora_attn_modules: + items: + type: string + title: Lora Attn Modules + type: array + apply_lora_to_mlp: + title: Apply Lora To Mlp + type: boolean + apply_lora_to_output: + title: Apply Lora To Output + type: boolean + rank: + title: Rank + type: integer + alpha: + title: Alpha + type: integer + use_dora: anyOf: - type: boolean - type: 'null' default: false - fsdp_cpu_offload: + quantize_base: anyOf: - type: boolean - type: 'null' default: false - title: EfficiencyConfig + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig type: object - PostTrainingJob: + QATFinetuningConfig: + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: - job_uuid: - title: Job Uuid + type: + const: QAT + default: QAT + title: Type + type: string + quantizer_name: + title: Quantizer Name type: string + group_size: + title: Group Size + type: integer required: - - job_uuid - title: PostTrainingJob + - quantizer_name + - group_size + title: QATFinetuningConfig type: object - ListPostTrainingJobsResponse: + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + _URLOrData: + description: A URL or a base64 encoded string properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL data: - items: - $ref: '#/components/schemas/PostTrainingJob' - title: Data - type: array + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + nullable: true + title: _URLOrData + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object required: - - data - title: ListPostTrainingJobsResponse + - bnf + title: GrammarResponseFormat type: object - OptimizerType: - description: Available optimizer algorithms for training. - enum: - - adam - - adamw - - sgd - title: OptimizerType - type: string - OptimizerConfig: - description: Configuration parameters for the optimization algorithm. + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. properties: - optimizer_type: - $ref: '#/components/schemas/OptimizerType' - lr: - title: Lr - type: number - weight_decay: - title: Weight Decay - type: number - num_warmup_steps: - title: Num Warmup Steps - type: integer + type: + const: json_schema + default: json_schema + title: Type + type: string + json_schema: + additionalProperties: true + title: Json Schema + type: object required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig + - json_schema + title: JsonSchemaResponseFormat type: object - PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + MCPListToolsTool: + description: Tool definition returned by MCP list tools operation. properties: - job_uuid: - title: Job Uuid + input_schema: + additionalProperties: true + title: Input Schema + type: object + name: + title: Name type: string - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array + description: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - job_uuid - title: PostTrainingJobArtifactsResponse + - input_schema + - name + title: MCPListToolsTool type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. + OpenAIResponseOutputMessageFileSearchToolCallResults: + description: Search results returned by the file search operation. properties: - job_uuid: - title: Job Uuid + 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 - log_lines: - items: - type: string - title: Log Lines - type: array required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream + - attributes + - file_id + - filename + - score + - text + title: OpenAIResponseOutputMessageFileSearchToolCallResults type: object - PostTrainingJobStatusResponse: - description: Status of a finetuning job. + AllowedToolsFilter: + description: Filter configuration for restricting which MCP tools can be used. properties: - job_uuid: - title: Job Uuid - type: string - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - format: date-time - type: string - - type: 'null' - nullable: true - started_at: + tool_names: anyOf: - - format: date-time - type: string + - items: + type: string + type: array - type: 'null' nullable: true - completed_at: + title: AllowedToolsFilter + type: object + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. + properties: + always: anyOf: - - format: date-time - type: string + - items: + type: string + type: array - type: 'null' nullable: true - resources_allocated: + never: anyOf: - - additionalProperties: true - type: object + - items: + type: string + type: array - type: 'null' nullable: true - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse + title: ApprovalFilter type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - TrainingConfig: - description: Comprehensive configuration for the training process. + SearchRankingOptions: + description: Options for ranking and filtering search results. properties: - n_epochs: - title: N Epochs - type: integer - max_steps_per_epoch: - default: 1 - title: Max Steps Per Epoch - type: integer - gradient_accumulation_steps: - default: 1 - title: Gradient Accumulation Steps - type: integer - max_validation_steps: + ranker: anyOf: - - type: integer + - type: string - type: 'null' - default: 1 - data_config: + nullable: true + score_threshold: anyOf: - - $ref: '#/components/schemas/DataConfig' - title: DataConfig + - type: number - type: 'null' - nullable: true - title: DataConfig - optimizer_config: + default: 0.0 + title: SearchRankingOptions + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + OpenAIResponseTextFormat: + description: Configuration for Responses API text format. + properties: + type: + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text + name: anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - title: OptimizerConfig + - type: string - type: 'null' - nullable: true - title: OptimizerConfig - efficiency_config: + schema: anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - title: EfficiencyConfig + - additionalProperties: true + type: object - type: 'null' - nullable: true - title: EfficiencyConfig - dtype: + description: anyOf: - type: string - type: 'null' - default: bf16 - required: - - n_epochs - title: TrainingConfig - type: object - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. - properties: - job_uuid: - title: Job Uuid - type: string - finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id - type: string - validation_dataset_id: - title: Validation Dataset Id - type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - title: Hyperparam Search Config - type: object - logger_config: - additionalProperties: true - title: Logger Config - type: object - required: - - job_uuid - - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - - algorithm_config - - optimizer_config - - training_config - - hyperparam_search_config - - logger_config - title: PostTrainingRLHFRequest + strict: + anyOf: + - type: boolean + - type: 'null' + title: OpenAIResponseTextFormat type: object - Prompt: - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. + OpenAIResponseUsageInputTokensDetails: + description: Token details for input tokens in OpenAI response usage. properties: - prompt: + cached_tokens: anyOf: - - type: string + - type: integer - type: 'null' - description: The system prompt with variable placeholders nullable: true - version: - description: Version (integer starting at 1, incremented on save) - minimum: 1 - title: Version - type: integer - prompt_id: - description: Unique identifier in format 'pmpt_<48-digit-hash>' - title: Prompt Id - type: string - variables: - description: List of variable names that can be used in the prompt template - items: - type: string - title: Variables - type: array - is_default: - default: false - description: Boolean indicating whether this version is the default version - title: Is Default - type: boolean - required: - - version - - prompt_id - title: Prompt + title: OpenAIResponseUsageInputTokensDetails type: object - ListPromptsResponse: - description: Response model to list prompts. + OpenAIResponseUsageOutputTokensDetails: + description: Token details for output tokens in OpenAI response usage. properties: - data: - items: - $ref: '#/components/schemas/Prompt' - title: Data - type: array - required: - - data - title: ListPromptsResponse + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIResponseUsageOutputTokensDetails type: object - ProviderInfo: - description: Information about a registered provider including its configuration and health status. + SpanEndPayload: + description: Payload for a span end event. properties: - api: - title: Api - type: string - provider_id: - title: Provider Id - type: string - provider_type: - title: Provider Type + type: + const: span_end + default: span_end + title: Type type: string - config: - additionalProperties: true - title: Config - type: object - health: - additionalProperties: true - title: Health - type: object + status: + $ref: '#/components/schemas/SpanStatus' required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo + - status + title: SpanEndPayload type: object - ListProvidersResponse: - description: Response containing a list of all available providers. + SpanStartPayload: + description: Payload for a span start event. properties: - data: - items: - $ref: '#/components/schemas/ProviderInfo' - title: Data - type: array + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - data - title: ListProvidersResponse + - name + title: SpanStartPayload type: object - ModerationObjectResults: - description: A moderation object. + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: - flagged: - title: Flagged - type: boolean - categories: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - type: boolean + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - category_applied_input_types: + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - items: - type: string - type: array + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - category_scores: + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - type: number + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - user_message: - anyOf: - - type: string - - type: 'null' - nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - flagged - title: ModerationObjectResults - type: object - ModerationObject: - description: A moderation object. - properties: - id: - title: Id + type: + const: unstructured_log + default: unstructured_log + title: Type type: string - model: - title: Model + message: + title: Message type: string - results: - items: - $ref: '#/components/schemas/ModerationObjectResults' - title: Results - type: array + severity: + $ref: '#/components/schemas/LogSeverity' required: - - id - - model - - results - title: ModerationObject + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent type: object - SafetyViolation: - description: Details of a safety violation detected by content moderation. + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + BatchError: + additionalProperties: true properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - user_message: + code: anyOf: - type: string - type: 'null' nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - violation_level - title: SafetyViolation - type: object - ViolationLevel: - description: Severity level of a safety violation. - enum: - - info - - warn - - error - title: ViolationLevel - type: string - RunShieldResponse: - description: Response from running a safety shield. - properties: - violation: + line: anyOf: - - $ref: '#/components/schemas/SafetyViolation' - title: SafetyViolation + - type: integer - type: 'null' nullable: true - title: SafetyViolation - title: RunShieldResponse - type: object - ScoreBatchResponse: - description: Response from batch scoring operations on datasets. - properties: - dataset_id: + message: anyOf: - type: string - type: 'null' nullable: true - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Results - type: object - required: - - results - title: ScoreBatchResponse + param: + anyOf: + - type: string + - type: 'null' + nullable: true + title: BatchError type: object - ScoreResponse: - description: The response from scoring. + BatchRequestCounts: + additionalProperties: true properties: - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Results - type: object + completed: + title: Completed + type: integer + failed: + title: Failed + type: integer + total: + title: Total + type: integer required: - - results - title: ScoreResponse + - completed + - failed + - total + title: BatchRequestCounts type: object - ListScoringFunctionsResponse: + BatchUsage: + additionalProperties: true properties: - data: - items: - $ref: '#/components/schemas/ScoringFn' - title: Data - type: array + input_tokens: + title: Input Tokens + type: integer + input_tokens_details: + $ref: '#/components/schemas/InputTokensDetails' + output_tokens: + title: Output Tokens + type: integer + output_tokens_details: + $ref: '#/components/schemas/OutputTokensDetails' + total_tokens: + title: Total Tokens + type: integer required: - - data - title: ListScoringFunctionsResponse + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage type: object - ListShieldsResponse: + Errors: + additionalProperties: true properties: data: - items: - $ref: '#/components/schemas/Shield' - title: Data - type: array - required: - - data - title: ListShieldsResponse - type: object - ToolDef: - description: Tool definition used in runtime contexts. - properties: - toolgroup_id: anyOf: - - type: string + - items: + $ref: '#/components/schemas/BatchError' + type: array - type: 'null' nullable: true - name: - title: Name - type: string - description: + object: anyOf: - type: string - type: 'null' nullable: true - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true + title: Errors + type: object + InputTokensDetails: + additionalProperties: true + properties: + cached_tokens: + title: Cached Tokens + type: integer required: - - name - title: ToolDef + - cached_tokens + title: InputTokensDetails type: object - ListToolDefsResponse: - description: Response containing a list of tool definitions. + OutputTokensDetails: + additionalProperties: true properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - title: Data - type: array + reasoning_tokens: + title: Reasoning Tokens + type: integer + required: + - reasoning_tokens + title: OutputTokensDetails + type: object + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string required: - - data - title: ListToolDefsResponse + - image + title: ImageDelta type: object - ListToolGroupsResponse: - description: Response containing a list of tool groups. + TextDelta: + description: A text content delta for streaming responses. properties: - data: - items: - $ref: '#/components/schemas/ToolGroup' - title: Data - type: array + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string required: - - data - title: ListToolGroupsResponse + - text + title: TextDelta type: object - ToolGroupInput: - description: Input data for registering a tool group. + JobStatus: + description: Status of a job execution. + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + type: string + MetricInResponse: + description: A metric value included in API responses. properties: - toolgroup_id: - title: Toolgroup Id - type: string - provider_id: - title: Provider Id + metric: + title: Metric type: string - args: + value: anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: + - type: integer + - type: number + title: integer | number + unit: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string - type: 'null' nullable: true - title: URL required: - - toolgroup_id - - provider_id - title: ToolGroupInput + - metric + - value + title: MetricInResponse type: object - ToolInvocationResult: - description: Result of a tool invocation. + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: - content: - anyOf: - - type: string - - discriminator: + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true - error_message: - anyOf: - - type: string - - type: 'null' - nullable: true - error_code: - anyOf: - - type: integer - - type: 'null' - nullable: true - metadata: - anyOf: - - additionalProperties: true + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array + required: + - items + title: ConversationItemCreateRequest + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true type: object - - type: 'null' - nullable: true - title: ToolInvocationResult + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage 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. + DatasetPurpose: + description: Purpose of the dataset. Each purpose has a required input data schema. + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + title: DatasetPurpose + type: string + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + InlineProviderSpec: properties: - chunk_id: - anyOf: - - type: string - - type: 'null' - nullable: true - document_id: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - source: + deprecation_error: anyOf: - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - created_timestamp: - anyOf: - - type: integer - - type: 'null' - nullable: true - updated_timestamp: - anyOf: - - type: integer - - type: 'null' - nullable: true - chunk_window: + module: anyOf: - type: string - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - chunk_tokenizer: + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - type: string - type: 'null' nullable: true - chunk_embedding_model: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: anyOf: - type: string - type: 'null' + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. nullable: true - chunk_embedding_dimension: - anyOf: - - type: integer - - type: 'null' - nullable: true - content_token_count: - anyOf: - - type: integer - - type: 'null' - nullable: true - metadata_token_count: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: ChunkMetadata - type: object - Chunk: - description: A chunk of content that can be inserted into a vector database. - properties: - content: + description: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id - type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. nullable: true - title: ChunkMetadata required: - - content - - chunk_id - title: Chunk + - api + - provider_type + - config_class + title: InlineProviderSpec type: object - OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store file batch with extra_body support. + ProviderSpec: properties: - file_ids: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality items: - type: string - title: File Ids + $ref: '#/components/schemas/Api' + title: Api Dependencies type: array - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - chunking_strategy: - anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - nullable: true - required: - - file_ids - title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - type: object - OpenAICreateVectorStoreRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store with extra_body support. - properties: - name: + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - file_ids: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - expires_after: + deprecation_error: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - chunking_strategy: + module: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: string - type: 'null' - title: Chunking Strategy + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - metadata: + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - title: OpenAICreateVectorStoreRequestWithExtraBody - type: object - QueryChunksResponse: - description: Response from querying chunks in a vector database. - properties: - chunks: - items: - $ref: '#/components/schemas/Chunk' - title: Chunks - type: array - scores: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: items: - type: number - title: Scores + type: string + title: Deps type: array required: - - chunks - - scores - title: QueryChunksResponse + - api + - provider_type + - config_class + title: ProviderSpec type: object - VectorStoreContent: - description: Content item from a vector store file or search result. + RemoteProviderSpec: properties: - type: - const: text - title: Type + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - text: - title: Text + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class type: string - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - title: ChunkMetadata - metadata: + deprecation_error: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - required: - - type - - text - title: VectorStoreContent - type: object - VectorStoreCreateRequest: - description: Request to create a vector store. - properties: - name: + module: anyOf: - type: string - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - file_ids: + pip_packages: + description: The pip dependencies needed for this implementation items: type: string - title: File Ids + title: Pip Packages type: array - expires_after: + provider_data_validator: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - chunking_strategy: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type + type: string + description: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - title: VectorStoreCreateRequest + required: + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec type: object - VectorStoreDeleteResponse: - description: Response from deleting a vector store. + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). properties: - id: - title: Id - type: string - object: - default: vector_store.deleted - title: Object + type: + const: bf16 + default: bf16 + title: Type type: string - deleted: - default: true - title: Deleted - type: boolean - required: - - id - title: VectorStoreDeleteResponse + title: Bf16QuantizationConfig type: object - VectorStoreFileCounts: - description: File processing status counts for a vector store. + EmbeddingsResponse: + description: Response containing generated embeddings. 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 + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts + - embeddings + title: EmbeddingsResponse type: object - VectorStoreFileBatchObject: - description: OpenAI Vector Store File Batch object. + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. 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: - title: Status + type: + const: fp8_mixed + default: fp8_mixed + title: Type type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - required: - - id - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject + title: Fp8QuantizationConfig type: object - VectorStoreFileContentResponse: - description: Represents the parsed content of a vector store file. + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. properties: - object: - const: vector_store.file_content.page - default: vector_store.file_content.page - title: Object + type: + const: int4_mixed + default: int4_mixed + title: Type type: string - data: - items: - $ref: '#/components/schemas/VectorStoreContent' - title: Data - type: array - has_more: - default: false - title: Has More - type: boolean - next_page: + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig + type: object + OpenAIChatCompletionUsageCompletionTokensDetails: + description: Token details for output tokens in OpenAI chat completion usage. + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails + type: object + OpenAIChatCompletionUsagePromptTokensDetails: + description: Token details for prompt tokens in OpenAI chat completion usage. + properties: + cached_tokens: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - required: - - data - title: VectorStoreFileContentResponse + title: OpenAIChatCompletionUsagePromptTokensDetails type: object - VectorStoreFileDeleteResponse: - description: Response from deleting a vector store file. + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens 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 + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs type: object - VectorStoreFileLastError: - description: Error information for failed vector store file processing. + TokenLogProbs: + description: Log probabilities for generated tokens. properties: - code: - title: Code - type: string - enum: - - server_error - - rate_limit_exceeded - default: server_error - message: - title: Message - type: string + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object required: - - code - - message - title: VectorStoreFileLastError + - logprobs_by_token + title: TokenLogProbs type: object - VectorStoreFileObject: - description: OpenAI Vector Store File object. + ToolResponseMessage: + description: A message representing the result of a tool invocation. properties: - id: - title: Id + role: + const: tool + default: tool + title: Role type: string - object: - default: vector_store.file - title: Object + call_id: + title: Call Id type: string - attributes: - additionalProperties: true - title: Attributes - type: object - chunking_strategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - created_at: - title: Created At - type: integer - last_error: + content: anyOf: - - $ref: '#/components/schemas/VectorStoreFileLastError' - title: VectorStoreFileLastError - - type: 'null' - nullable: true - title: VectorStoreFileLastError - status: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - vector_store_id: - title: Vector Store Id - type: string + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - - id - - chunking_strategy - - created_at - - status - - vector_store_id - title: VectorStoreFileObject + - call_id + - content + title: ToolResponseMessage type: object - VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. + UserMessage: + description: A message from the user in a chat conversation. properties: - object: - default: list - title: Object + role: + const: user + default: user + title: Role type: string - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data - type: array - first_id: + content: anyOf: - type: string - - type: 'null' - nullable: true - last_id: + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: anyOf: - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] - type: 'null' + title: string | list[ImageContentItem | TextContentItem] nullable: true - has_more: - default: false - title: Has More - type: boolean required: - - data - title: VectorStoreFilesListInBatchResponse + - content + title: UserMessage type: object - VectorStoreListFilesResponse: - description: Response from listing files in a vector store. + HealthStatus: + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + type: string + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: - object: - default: list - title: Object + job_uuid: + title: Job Uuid type: string - data: + log_lines: items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data + type: string + title: Log Lines type: array - first_id: + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream + type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. + properties: + job_uuid: + title: Job Uuid + type: string + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id + type: string + provider_id: + title: Provider Id + type: string + args: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - last_id: + mcp_endpoint: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true - has_more: - default: false - title: Has More - type: boolean + title: URL required: - - data - title: VectorStoreListFilesResponse + - toolgroup_id + - provider_id + title: ToolGroupInput type: object - VectorStoreObject: - description: OpenAI Vector Store object. + VectorStoreCreateRequest: + description: Request to create a 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' nullable: true - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - status: - default: completed - title: Status - type: string + file_ids: + items: + type: string + title: File Ids + type: array expires_after: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - expires_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - last_active_at: + chunking_strategy: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' nullable: true metadata: additionalProperties: true title: Metadata type: object - required: - - id - - created_at - - file_counts - title: VectorStoreObject - type: object - VectorStoreListResponse: - description: Response from listing vector stores. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - nullable: true - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListResponse + title: VectorStoreCreateRequest type: object VectorStoreModifyRequest: description: Request to modify a vector store. @@ -10183,69 +10249,3 @@ components: - query title: VectorStoreSearchRequest type: object - VectorStoreSearchResponse: - description: Response from searching a vector store. - 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 - title: string | number | boolean - type: object - - type: 'null' - nullable: true - content: - items: - $ref: '#/components/schemas/VectorStoreContent' - title: Content - type: array - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - type: object - VectorStoreSearchResponsePage: - description: Paginated response from searching a vector store. - properties: - object: - default: vector_store.search_results.page - title: Object - type: string - search_query: - items: - type: string - title: Search Query - type: array - data: - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - title: Data - type: array - has_more: - default: false - title: Has More - type: boolean - next_page: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - search_query - - data - title: VectorStoreSearchResponsePage - type: object diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index aea8747471..d5324828a2 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -14,12 +14,12 @@ info: servers: - url: http://any-hosted-llama-stack.com paths: - /v1/providers/{provider_id}: + /v1/batches: get: tags: - - Providers - summary: Inspect Provider - operationId: inspect_provider_v1_providers__provider_id__get + - Batches + summary: List Batches + operationId: list_batches_v1_batches_get responses: '200': description: Successful Response @@ -38,19 +38,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: provider_id - in: path - required: true - schema: - type: string - description: 'Path parameter: provider_id' - /v1/providers: - get: + post: tags: - - Providers - summary: List Providers - operationId: list_providers_v1_providers_get + - Batches + summary: Create Batch + operationId: create_batch_v1_batches_post responses: '200': description: Successful Response @@ -69,12 +61,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/responses: + /v1/batches/{batch_id}: get: tags: - - Agents - summary: List Openai Responses - operationId: list_openai_responses_v1_responses_get + - Batches + summary: Retrieve Batch + operationId: retrieve_batch_v1_batches__batch_id__get responses: '200': description: Successful Response @@ -93,35 +85,19 @@ paths: 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/batches/{batch_id}/cancel: post: tags: - - Agents - summary: Create Openai Response - operationId: create_openai_response_v1_responses_post - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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/responses/{response_id}: - get: - tags: - - Agents - summary: Get Openai Response - operationId: get_openai_response_v1_responses__response_id__get + - Batches + summary: Cancel Batch + operationId: cancel_batch_v1_batches__batch_id__cancel_post responses: '200': description: Successful Response @@ -141,17 +117,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: response_id + - name: batch_id in: path required: true schema: type: string - description: 'Path parameter: response_id' - delete: + description: 'Path parameter: batch_id' + /v1/chat/completions: + get: tags: - - Agents - summary: Delete Openai Response - operationId: delete_openai_response_v1_responses__response_id__delete + - Inference + summary: List Chat Completions + operationId: list_chat_completions_v1_chat_completions_get responses: '200': description: Successful Response @@ -170,19 +147,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: response_id - in: path - required: true - schema: - type: string - description: 'Path parameter: response_id' - /v1/responses/{response_id}/input_items: - get: + post: tags: - - Agents - summary: List Openai Response Input Items - operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get + - Inference + summary: Openai Chat Completion + operationId: openai_chat_completion_v1_chat_completions_post responses: '200': description: Successful Response @@ -201,13 +170,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: response_id - in: path - required: true - schema: - type: string - description: 'Path parameter: response_id' /v1/chat/completions/{completion_id}: get: tags: @@ -239,12 +201,12 @@ paths: schema: type: string description: 'Path parameter: completion_id' - /v1/chat/completions: - get: + /v1/completions: + post: tags: - Inference - summary: List Chat Completions - operationId: list_chat_completions_v1_chat_completions_get + summary: Openai Completion + operationId: openai_completion_v1_completions_post responses: '200': description: Successful Response @@ -263,11 +225,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + /v1/conversations: post: tags: - - Inference - summary: Openai Chat Completion - operationId: openai_chat_completion_v1_chat_completions_post + - Conversations + summary: Create Conversation + operationId: create_conversation_v1_conversations_post responses: '200': description: Successful Response @@ -286,12 +249,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/completions: - post: + /v1/conversations/{conversation_id}: + get: tags: - - Inference - summary: Openai Completion - operationId: openai_completion_v1_completions_post + - Conversations + summary: Get Conversation + operationId: get_conversation_v1_conversations__conversation_id__get responses: '200': description: Successful Response @@ -310,12 +273,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/embeddings: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' post: tags: - - Inference - summary: Openai Embeddings - operationId: openai_embeddings_v1_embeddings_post + - Conversations + summary: Update Conversation + operationId: update_conversation_v1_conversations__conversation_id__post responses: '200': description: Successful Response @@ -334,12 +303,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/inference/rerank: - post: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + delete: tags: - - Inference - summary: Rerank - operationId: rerank_v1alpha_inference_rerank_post + - Conversations + summary: Openai Delete Conversation + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete responses: '200': description: Successful Response @@ -358,12 +333,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/health: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items: get: tags: - - Inspect - summary: Health - operationId: health_v1_health_get + - Conversations + summary: List Items + operationId: list_items_v1_conversations__conversation_id__items_get responses: '200': description: Successful Response @@ -382,12 +364,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/inspect/routes: - get: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + post: tags: - - Inspect - summary: List Routes - operationId: list_routes_v1_inspect_routes_get + - Conversations + summary: Add Items + operationId: add_items_v1_conversations__conversation_id__items_post responses: '200': description: Successful Response @@ -406,12 +394,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/version: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items/{item_id}: get: tags: - - Inspect - summary: Version - operationId: version_v1_version_get + - Conversations + summary: Retrieve + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get responses: '200': description: Successful Response @@ -430,12 +425,24 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/batches/{batch_id}/cancel: - post: + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + - name: item_id + in: path + required: true + schema: + type: string + description: 'Path parameter: item_id' + delete: tags: - - Batches - summary: Cancel Batch - operationId: cancel_batch_v1_batches__batch_id__cancel_post + - Conversations + summary: Openai Delete Conversation Item + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete responses: '200': description: Successful Response @@ -455,18 +462,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: batch_id + - name: conversation_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/batches: - get: + description: 'Path parameter: conversation_id' + - name: item_id + in: path + required: true + schema: + type: string + description: 'Path parameter: item_id' + /v1/embeddings: + post: tags: - - Batches - summary: List Batches - operationId: list_batches_v1_batches_get + - Inference + summary: Openai Embeddings + operationId: openai_embeddings_v1_embeddings_post responses: '200': description: Successful Response @@ -485,12 +498,13 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: + /v1/files: + get: tags: - - Batches - summary: Create Batch - operationId: create_batch_v1_batches_post - responses: + - Files + summary: Openai List Files + operationId: openai_list_files_v1_files_get + responses: '200': description: Successful Response content: @@ -508,12 +522,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/batches/{batch_id}: - get: + post: tags: - - Batches - summary: Retrieve Batch - operationId: retrieve_batch_v1_batches__batch_id__get + - Files + summary: Openai Upload File + operationId: openai_upload_file_v1_files_post responses: '200': description: Successful Response @@ -532,19 +545,12 @@ paths: 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/vector-io/insert: - post: + /v1/files/{file_id}: + get: tags: - - Vector Io - summary: Insert Chunks - operationId: insert_chunks_v1_vector_io_insert_post + - Files + summary: Openai Retrieve File + operationId: openai_retrieve_file_v1_files__file_id__get responses: '200': description: Successful Response @@ -563,12 +569,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector_stores/{vector_store_id}/files: - get: + parameters: + - name: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + delete: tags: - - Vector Io - summary: Openai List Files In Vector Store - operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get + - Files + summary: Openai Delete File + operationId: openai_delete_file_v1_files__file_id__delete responses: '200': description: Successful Response @@ -588,17 +600,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: file_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - post: + description: 'Path parameter: file_id' + /v1/files/{file_id}/content: + get: tags: - - Vector Io - summary: Openai Attach File To Vector Store - operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post + - Files + summary: Openai Retrieve File Content + operationId: openai_retrieve_file_content_v1_files__file_id__content_get responses: '200': description: Successful Response @@ -618,18 +631,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: file_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: - post: + description: 'Path parameter: file_id' + /v1/health: + get: tags: - - Vector Io - summary: Openai Cancel Vector Store File Batch - operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post + - Inspect + summary: Health + operationId: health_v1_health_get responses: '200': description: Successful Response @@ -648,25 +661,12 @@ 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' - - name: batch_id - in: path - required: true - schema: - type: string - description: 'Path parameter: batch_id' - /v1/vector_stores: + /v1/inspect/routes: get: tags: - - Vector Io - summary: Openai List Vector Stores - operationId: openai_list_vector_stores_v1_vector_stores_get + - Inspect + summary: List Routes + operationId: list_routes_v1_inspect_routes_get responses: '200': description: Successful Response @@ -685,11 +685,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: + /v1/models: + get: tags: - - Vector Io - summary: Openai Create Vector Store - operationId: openai_create_vector_store_v1_vector_stores_post + - Models + summary: Openai List Models + operationId: openai_list_models_v1_models_get responses: '200': description: Successful Response @@ -708,12 +709,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector_stores/{vector_store_id}/file_batches: post: tags: - - Vector Io - summary: Openai Create Vector Store File Batch - operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post + - Models + summary: Register Model + operationId: register_model_v1_models_post responses: '200': description: Successful Response @@ -732,19 +732,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}: + deprecated: true + /v1/models/{model_id}: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store - operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get + - Models + summary: Get Model + operationId: get_model_v1_models__model_id__get responses: '200': description: Successful Response @@ -764,17 +758,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: model_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - post: + description: 'Path parameter: model_id' + delete: tags: - - Vector Io - summary: Openai Update Vector Store - operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post + - Models + summary: Unregister Model + operationId: unregister_model_v1_models__model_id__delete responses: '200': description: Successful Response @@ -793,18 +787,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - - name: vector_store_id + - name: model_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - delete: + description: 'Path parameter: model_id' + /v1/moderations: + post: tags: - - Vector Io - summary: Openai Delete Vector Store - operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete + - Safety + summary: Run Moderation + operationId: run_moderation_v1_moderations_post responses: '200': description: Successful Response @@ -823,19 +819,12 @@ 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}/files/{file_id}: + /v1/prompts: get: tags: - - Vector Io - summary: Openai Retrieve Vector Store File - operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get + - Prompts + summary: List Prompts + operationId: list_prompts_v1_prompts_get responses: '200': description: Successful Response @@ -854,24 +843,11 @@ 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' - - name: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' post: tags: - - Vector Io - summary: Openai Update Vector Store File - operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post + - Prompts + summary: Create Prompt + operationId: create_prompt_v1_prompts_post responses: '200': description: Successful Response @@ -890,24 +866,12 @@ 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' - - name: file_id - in: path - required: true - schema: - type: string - description: 'Path parameter: file_id' - delete: + /v1/prompts/{prompt_id}: + get: tags: - - Vector Io - summary: Openai Delete Vector Store File - operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete + - Prompts + summary: Get Prompt + operationId: get_prompt_v1_prompts__prompt_id__get responses: '200': description: Successful Response @@ -927,24 +891,17 @@ paths: 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: file_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: file_id' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: - get: + description: 'Path parameter: prompt_id' + post: tags: - - Vector Io - summary: Openai List Files In Vector Store File Batch - operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get + - Prompts + summary: Update Prompt + operationId: update_prompt_v1_prompts__prompt_id__post responses: '200': description: Successful Response @@ -964,24 +921,17 @@ paths: 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 + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: - get: + description: 'Path parameter: prompt_id' + delete: tags: - - Vector Io - summary: Openai Retrieve Vector Store File Batch - operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get + - Prompts + summary: Delete Prompt + operationId: delete_prompt_v1_prompts__prompt_id__delete responses: '200': description: Successful Response @@ -1001,24 +951,18 @@ paths: 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 + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: batch_id' - /v1/vector_stores/{vector_store_id}/files/{file_id}/content: - get: + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/set-default-version: + post: tags: - - Vector Io - summary: Openai Retrieve Vector Store File Contents - operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get + - Prompts + summary: Set Default Version + operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post responses: '200': description: Successful Response @@ -1038,24 +982,18 @@ paths: 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: file_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: file_id' - /v1/vector_stores/{vector_store_id}/search: - post: + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/versions: + get: tags: - - Vector Io - summary: Openai Search Vector Store - operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post + - Prompts + summary: List Prompt Versions + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get responses: '200': description: Successful Response @@ -1075,42 +1013,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: vector_store_id + - name: prompt_id in: path required: true schema: type: string - description: 'Path parameter: vector_store_id' - /v1/vector-io/query: - post: - tags: - - Vector Io - summary: Query Chunks - operationId: query_chunks_v1_vector_io_query_post - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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}: + description: 'Path parameter: prompt_id' + /v1/providers: get: tags: - - Models - summary: Get Model - operationId: get_model_v1_models__model_id__get + - Providers + summary: List Providers + operationId: list_providers_v1_providers_get responses: '200': description: Successful Response @@ -1129,18 +1043,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: model_id - in: path - required: true - schema: - type: string - description: 'Path parameter: model_id' - delete: + /v1/providers/{provider_id}: + get: tags: - - Models - summary: Unregister Model - operationId: unregister_model_v1_models__model_id__delete + - Providers + summary: Inspect Provider + operationId: inspect_provider_v1_providers__provider_id__get responses: '200': description: Successful Response @@ -1159,20 +1067,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true parameters: - - name: model_id + - name: provider_id in: path required: true schema: type: string - description: 'Path parameter: model_id' - /v1/models: + description: 'Path parameter: provider_id' + /v1/responses: get: tags: - - Models - summary: Openai List Models - operationId: openai_list_models_v1_models_get + - Agents + summary: List Openai Responses + operationId: list_openai_responses_v1_responses_get responses: '200': description: Successful Response @@ -1193,9 +1100,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Models - summary: Register Model - operationId: register_model_v1_models_post + - Agents + summary: Create Openai Response + operationId: create_openai_response_v1_responses_post responses: '200': description: Successful Response @@ -1214,13 +1121,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - /v1/moderations: - post: + /v1/responses/{response_id}: + get: tags: - - Safety - summary: Run Moderation - operationId: run_moderation_v1_moderations_post + - Agents + summary: Get Openai Response + operationId: get_openai_response_v1_responses__response_id__get responses: '200': description: Successful Response @@ -1239,12 +1145,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/safety/run-shield: - post: + parameters: + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + delete: tags: - - Safety - summary: Run Shield - operationId: run_shield_v1_safety_run_shield_post + - Agents + summary: Delete Openai Response + operationId: delete_openai_response_v1_responses__response_id__delete responses: '200': description: Successful Response @@ -1263,12 +1175,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/shields/{identifier}: + parameters: + - name: response_id + in: path + required: true + schema: + type: string + description: 'Path parameter: response_id' + /v1/responses/{response_id}/input_items: get: tags: - - Shields - summary: Get Shield - operationId: get_shield_v1_shields__identifier__get + - Agents + summary: List Openai Response Input Items + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get responses: '200': description: Successful Response @@ -1288,17 +1207,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: identifier + - name: response_id in: path required: true schema: type: string - description: 'Path parameter: identifier' - delete: + description: 'Path parameter: response_id' + /v1/safety/run-shield: + post: tags: - - Shields - summary: Unregister Shield - operationId: unregister_shield_v1_shields__identifier__delete + - Safety + summary: Run Shield + operationId: run_shield_v1_safety_run_shield_post responses: '200': description: Successful Response @@ -1317,20 +1237,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - parameters: - - name: identifier - in: path - required: true - schema: - type: string - description: 'Path parameter: identifier' - /v1/shields: + /v1/scoring-functions: get: tags: - - Shields - summary: List Shields - operationId: list_shields_v1_shields_get + - Scoring Functions + summary: List Scoring Functions + operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': description: Successful Response @@ -1351,9 +1263,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Shields - summary: Register Shield - operationId: register_shield_v1_shields_post + - Scoring Functions + summary: Register Scoring Function + operationId: register_scoring_function_v1_scoring_functions_post responses: '200': description: Successful Response @@ -1373,12 +1285,12 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' deprecated: true - /v1beta/datasetio/append-rows/{dataset_id}: - post: + /v1/scoring-functions/{scoring_fn_id}: + get: tags: - - Datasetio - summary: Append Rows - operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post + - Scoring Functions + summary: Get Scoring Function + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': description: Successful Response @@ -1398,18 +1310,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: dataset_id + - name: scoring_fn_id in: path required: true schema: type: string - description: 'Path parameter: dataset_id' - /v1beta/datasetio/iterrows/{dataset_id}: - get: + description: 'Path parameter: scoring_fn_id' + delete: tags: - - Datasetio - summary: Iterrows - operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get + - Scoring Functions + summary: Unregister Scoring Function + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete responses: '200': description: Successful Response @@ -1428,19 +1339,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - - name: dataset_id + - name: scoring_fn_id in: path required: true schema: type: string - description: 'Path parameter: dataset_id' - /v1beta/datasets/{dataset_id}: - get: + description: 'Path parameter: scoring_fn_id' + /v1/scoring/score: + post: tags: - - Datasets - summary: Get Dataset - operationId: get_dataset_v1beta_datasets__dataset_id__get + - Scoring + summary: Score + operationId: score_v1_scoring_score_post responses: '200': description: Successful Response @@ -1459,18 +1371,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: dataset_id - in: path - required: true - schema: - type: string - description: 'Path parameter: dataset_id' - delete: + /v1/scoring/score-batch: + post: tags: - - Datasets - summary: Unregister Dataset - operationId: unregister_dataset_v1beta_datasets__dataset_id__delete + - Scoring + summary: Score Batch + operationId: score_batch_v1_scoring_score_batch_post responses: '200': description: Successful Response @@ -1489,20 +1395,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - parameters: - - name: dataset_id - in: path - required: true - schema: - type: string - description: 'Path parameter: dataset_id' - /v1beta/datasets: + /v1/shields: get: tags: - - Datasets - summary: List Datasets - operationId: list_datasets_v1beta_datasets_get + - Shields + summary: List Shields + operationId: list_shields_v1_shields_get responses: '200': description: Successful Response @@ -1523,9 +1421,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Datasets - summary: Register Dataset - operationId: register_dataset_v1beta_datasets_post + - Shields + summary: Register Shield + operationId: register_shield_v1_shields_post responses: '200': description: Successful Response @@ -1545,12 +1443,12 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' deprecated: true - /v1/scoring/score: - post: + /v1/shields/{identifier}: + get: tags: - - Scoring - summary: Score - operationId: score_v1_scoring_score_post + - Shields + summary: Get Shield + operationId: get_shield_v1_shields__identifier__get responses: '200': description: Successful Response @@ -1569,12 +1467,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring/score-batch: - post: + parameters: + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + delete: tags: - - Scoring - summary: Score Batch - operationId: score_batch_v1_scoring_score_batch_post + - Shields + summary: Unregister Shield + operationId: unregister_shield_v1_shields__identifier__delete responses: '200': description: Successful Response @@ -1593,12 +1497,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring-functions/{scoring_fn_id}: - get: + deprecated: true + parameters: + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + /v1/tool-runtime/invoke: + post: tags: - - Scoring Functions - summary: Get Scoring Function - operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get + - Tool Runtime + summary: Invoke Tool + operationId: invoke_tool_v1_tool_runtime_invoke_post responses: '200': description: Successful Response @@ -1617,18 +1529,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: scoring_fn_id - in: path - required: true - schema: - type: string - description: 'Path parameter: scoring_fn_id' - delete: + /v1/tool-runtime/list-tools: + get: tags: - - Scoring Functions - summary: Unregister Scoring Function - operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete + - Tool Runtime + summary: List Runtime Tools + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get responses: '200': description: Successful Response @@ -1647,20 +1553,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - parameters: - - name: scoring_fn_id - in: path - required: true - schema: - type: string - description: 'Path parameter: scoring_fn_id' - /v1/scoring-functions: + /v1/toolgroups: get: tags: - - Scoring Functions - summary: List Scoring Functions - operationId: list_scoring_functions_v1_scoring_functions_get + - Tool Groups + summary: List Tool Groups + operationId: list_tool_groups_v1_toolgroups_get responses: '200': description: Successful Response @@ -1681,9 +1579,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Scoring Functions - summary: Register Scoring Function - operationId: register_scoring_function_v1_scoring_functions_post + - Tool Groups + summary: Register Tool Group + operationId: register_tool_group_v1_toolgroups_post responses: '200': description: Successful Response @@ -1703,12 +1601,12 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' deprecated: true - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: - post: + /v1/toolgroups/{toolgroup_id}: + get: tags: - - Eval - summary: Evaluate Rows - operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post + - Tool Groups + summary: Get Tool Group + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get responses: '200': description: Successful Response @@ -1728,18 +1626,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id + - name: toolgroup_id in: path required: true schema: type: string - description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: - get: + description: 'Path parameter: toolgroup_id' + delete: tags: - - Eval - summary: Job Status - operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get + - Tool Groups + summary: Unregister Toolgroup + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete responses: '200': description: Successful Response @@ -1758,24 +1655,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - - name: benchmark_id - in: path - required: true - schema: - type: string - description: 'Path parameter: benchmark_id' - - name: job_id + - name: toolgroup_id in: path required: true schema: type: string - description: 'Path parameter: job_id' - delete: + description: 'Path parameter: toolgroup_id' + /v1/tools: + get: tags: - - Eval - summary: Job Cancel - operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete + - Tool Groups + summary: List Tools + operationId: list_tools_v1_tools_get responses: '200': description: Successful Response @@ -1794,25 +1687,12 @@ 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' - - name: job_id - in: path - required: true - schema: - type: string - description: 'Path parameter: job_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: + /v1/tools/{tool_name}: get: tags: - - Eval - summary: Job Result - operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get + - Tool Groups + summary: Get Tool + operationId: get_tool_v1_tools__tool_name__get responses: '200': description: Successful Response @@ -1832,24 +1712,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: benchmark_id - in: path - required: true - schema: - type: string - description: 'Path parameter: benchmark_id' - - name: job_id + - name: tool_name in: path required: true schema: type: string - description: 'Path parameter: job_id' - /v1alpha/eval/benchmarks/{benchmark_id}/jobs: + description: 'Path parameter: tool_name' + /v1/vector-io/insert: post: tags: - - Eval - summary: Run Eval - operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post + - Vector Io + summary: Insert Chunks + operationId: insert_chunks_v1_vector_io_insert_post responses: '200': description: Successful Response @@ -1868,19 +1742,12 @@ 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}: - get: + /v1/vector-io/query: + post: tags: - - Benchmarks - summary: Get Benchmark - operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get + - Vector Io + summary: Query Chunks + operationId: query_chunks_v1_vector_io_query_post responses: '200': description: Successful Response @@ -1899,18 +1766,12 @@ 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' - delete: + /v1/vector_stores: + get: tags: - - Benchmarks - summary: Unregister Benchmark - operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete + - Vector Io + summary: Openai List Vector Stores + operationId: openai_list_vector_stores_v1_vector_stores_get responses: '200': description: Successful Response @@ -1929,20 +1790,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - parameters: - - name: benchmark_id - in: path - required: true - schema: - type: string - description: 'Path parameter: benchmark_id' - /v1alpha/eval/benchmarks: - get: + post: tags: - - Benchmarks - summary: List Benchmarks - operationId: list_benchmarks_v1alpha_eval_benchmarks_get + - Vector Io + summary: Openai Create Vector Store + operationId: openai_create_vector_store_v1_vector_stores_post responses: '200': description: Successful Response @@ -1961,11 +1813,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: + /v1/vector_stores/{vector_store_id}: + get: tags: - - Benchmarks - summary: Register Benchmark - operationId: register_benchmark_v1alpha_eval_benchmarks_post + - Vector Io + summary: Openai Retrieve Vector Store + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get responses: '200': description: Successful Response @@ -1984,13 +1837,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - /v1alpha/post-training/job/cancel: + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' post: tags: - - Post Training - summary: Cancel Training Job - operationId: cancel_training_job_v1alpha_post_training_job_cancel_post + - Vector Io + summary: Openai Update Vector Store + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post responses: '200': description: Successful Response @@ -2009,12 +1867,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/artifacts: - get: + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + delete: tags: - - Post Training - summary: Get Training Job Artifacts - operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get + - Vector Io + summary: Openai Delete Vector Store + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete responses: '200': description: Successful Response @@ -2033,12 +1897,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/status: - get: - tags: - - Post Training - summary: Get Training Job Status - operationId: get_training_job_status_v1alpha_post_training_job_status_get + 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: + - Vector Io + summary: Openai Create Vector Store File Batch + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post responses: '200': description: Successful Response @@ -2057,12 +1928,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/jobs: + 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: - - Post Training - summary: Get Training Jobs - operationId: get_training_jobs_v1alpha_post_training_jobs_get + - Vector Io + summary: Openai Retrieve Vector Store File Batch + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get responses: '200': description: Successful Response @@ -2081,12 +1959,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/preference-optimize: + 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}/cancel: post: tags: - - Post Training - summary: Preference Optimize - operationId: preference_optimize_v1alpha_post_training_preference_optimize_post + - Vector Io + summary: Openai Cancel Vector Store File Batch + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post responses: '200': description: Successful Response @@ -2105,12 +1996,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/supervised-fine-tune: - post: + 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: - - Post Training - summary: Supervised Fine Tune - operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post + - Vector Io + summary: Openai List Files In Vector Store File Batch + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get responses: '200': description: Successful Response @@ -2129,12 +2033,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tools/{tool_name}: + 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}/files: get: tags: - - Tool Groups - summary: Get Tool - operationId: get_tool_v1_tools__tool_name__get + - Vector Io + summary: Openai List Files In Vector Store + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get responses: '200': description: Successful Response @@ -2154,18 +2071,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: tool_name + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: tool_name' - /v1/toolgroups/{toolgroup_id}: - get: + description: 'Path parameter: vector_store_id' + post: tags: - - Tool Groups - summary: Get Tool Group - operationId: get_tool_group_v1_toolgroups__toolgroup_id__get + - Vector Io + summary: Openai Attach File To Vector Store + operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post responses: '200': description: Successful Response @@ -2185,17 +2101,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: toolgroup_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: toolgroup_id' - delete: + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}/files/{file_id}: + get: tags: - - Tool Groups - summary: Unregister Toolgroup - operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete + - Vector Io + summary: Openai Retrieve Vector Store File + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get responses: '200': description: Successful Response @@ -2214,20 +2131,24 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true parameters: - - name: toolgroup_id + - name: vector_store_id in: path required: true schema: type: string - description: 'Path parameter: toolgroup_id' - /v1/toolgroups: - get: + description: 'Path parameter: vector_store_id' + - name: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + post: tags: - - Tool Groups - summary: List Tool Groups - operationId: list_tool_groups_v1_toolgroups_get + - Vector Io + summary: Openai Update Vector Store File + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post responses: '200': description: Successful Response @@ -2246,11 +2167,24 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: + 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' + delete: tags: - - Tool Groups - summary: Register Tool Group - operationId: register_tool_group_v1_toolgroups_post + - Vector Io + summary: Openai Delete Vector Store File + operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete responses: '200': description: Successful Response @@ -2269,13 +2203,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true - /v1/tools: + 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: - - Tool Groups - summary: List Tools - operationId: list_tools_v1_tools_get + - Vector Io + summary: Openai Retrieve Vector Store File Contents + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get responses: '200': description: Successful Response @@ -2294,12 +2240,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tool-runtime/invoke: + 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}/search: post: tags: - - Tool Runtime - summary: Invoke Tool - operationId: invoke_tool_v1_tool_runtime_invoke_post + - Vector Io + summary: Openai Search Vector Store + operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post responses: '200': description: Successful Response @@ -2318,12 +2277,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tool-runtime/list-tools: + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/version: get: tags: - - Tool Runtime - summary: List Runtime Tools - operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + - Inspect + summary: Version + operationId: version_v1_version_get responses: '200': description: Successful Response @@ -2342,12 +2308,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/files/{file_id}: - get: + /v1beta/datasetio/append-rows/{dataset_id}: + post: tags: - - Files - summary: Openai Retrieve File - operationId: openai_retrieve_file_v1_files__file_id__get + - Datasetio + summary: Append Rows + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post responses: '200': description: Successful Response @@ -2367,17 +2333,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: file_id + - name: dataset_id in: path required: true schema: type: string - description: 'Path parameter: file_id' - delete: + description: 'Path parameter: dataset_id' + /v1beta/datasetio/iterrows/{dataset_id}: + get: tags: - - Files - summary: Openai Delete File - operationId: openai_delete_file_v1_files__file_id__delete + - Datasetio + summary: Iterrows + operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get responses: '200': description: Successful Response @@ -2397,18 +2364,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: file_id + - name: dataset_id in: path required: true schema: type: string - description: 'Path parameter: file_id' - /v1/files: + description: 'Path parameter: dataset_id' + /v1beta/datasets: get: tags: - - Files - summary: Openai List Files - operationId: openai_list_files_v1_files_get + - Datasets + summary: List Datasets + operationId: list_datasets_v1beta_datasets_get responses: '200': description: Successful Response @@ -2429,9 +2396,9 @@ paths: $ref: '#/components/responses/DefaultError' post: tags: - - Files - summary: Openai Upload File - operationId: openai_upload_file_v1_files_post + - Datasets + summary: Register Dataset + operationId: register_dataset_v1beta_datasets_post responses: '200': description: Successful Response @@ -2450,12 +2417,13 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/files/{file_id}/content: + deprecated: true + /v1beta/datasets/{dataset_id}: get: tags: - - Files - summary: Openai Retrieve File Content - operationId: openai_retrieve_file_content_v1_files__file_id__content_get + - Datasets + summary: Get Dataset + operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': description: Successful Response @@ -2475,18 +2443,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: file_id + - name: dataset_id in: path required: true schema: type: string - description: 'Path parameter: file_id' - /v1/prompts: - get: + description: 'Path parameter: dataset_id' + delete: tags: - - Prompts - summary: List Prompts - operationId: list_prompts_v1_prompts_get + - Datasets + summary: Unregister Dataset + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete responses: '200': description: Successful Response @@ -2505,11 +2472,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: + deprecated: true + parameters: + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + /v1alpha/eval/benchmarks: + get: tags: - - Prompts - summary: Create Prompt - operationId: create_prompt_v1_prompts_post + - Benchmarks + summary: List Benchmarks + operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': description: Successful Response @@ -2528,12 +2504,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/prompts/{prompt_id}: - get: + post: tags: - - Prompts - summary: Get Prompt - operationId: get_prompt_v1_prompts__prompt_id__get + - Benchmarks + summary: Register Benchmark + operationId: register_benchmark_v1alpha_eval_benchmarks_post responses: '200': description: Successful Response @@ -2552,18 +2527,13 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: prompt_id - in: path - required: true - schema: - type: string - description: 'Path parameter: prompt_id' - post: + deprecated: true + /v1alpha/eval/benchmarks/{benchmark_id}: + get: tags: - - Prompts - summary: Update Prompt - operationId: update_prompt_v1_prompts__prompt_id__post + - Benchmarks + summary: Get Benchmark + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': description: Successful Response @@ -2583,17 +2553,17 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: prompt_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: prompt_id' + description: 'Path parameter: benchmark_id' delete: tags: - - Prompts - summary: Delete Prompt - operationId: delete_prompt_v1_prompts__prompt_id__delete + - Benchmarks + summary: Unregister Benchmark + operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete responses: '200': description: Successful Response @@ -2612,19 +2582,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + deprecated: true parameters: - - name: prompt_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/versions: - get: + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + post: tags: - - Prompts - summary: List Prompt Versions - operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get + - Eval + summary: Evaluate Rows + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post responses: '200': description: Successful Response @@ -2644,18 +2615,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: prompt_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: prompt_id' - /v1/prompts/{prompt_id}/set-default-version: + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs: post: tags: - - Prompts - summary: Set Default Version - operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post + - Eval + summary: Run Eval + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post responses: '200': description: Successful Response @@ -2675,18 +2646,18 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: prompt_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: prompt_id' - /v1/conversations/{conversation_id}/items: + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: get: tags: - - Conversations - summary: List Items - operationId: list_items_v1_conversations__conversation_id__items_get + - Eval + summary: Job Status + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': description: Successful Response @@ -2706,17 +2677,23 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: conversation_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: conversation_id' - post: + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + delete: tags: - - Conversations - summary: Add Items - operationId: add_items_v1_conversations__conversation_id__items_post + - Eval + summary: Job Cancel + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete responses: '200': description: Successful Response @@ -2736,18 +2713,24 @@ paths: description: Default Response $ref: '#/components/responses/DefaultError' parameters: - - name: conversation_id + - name: benchmark_id in: path required: true schema: type: string - description: 'Path parameter: conversation_id' - /v1/conversations: - post: + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: + get: tags: - - Conversations - summary: Create Conversation - operationId: create_conversation_v1_conversations_post + - Eval + summary: Job Result + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get responses: '200': description: Successful Response @@ -2766,12 +2749,25 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/conversations/{conversation_id}: - get: + parameters: + - 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' + /v1alpha/inference/rerank: + post: tags: - - Conversations - summary: Get Conversation - operationId: get_conversation_v1_conversations__conversation_id__get + - Inference + summary: Rerank + operationId: rerank_v1alpha_inference_rerank_post responses: '200': description: Successful Response @@ -2790,18 +2786,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - post: + /v1alpha/post-training/job/artifacts: + get: tags: - - Conversations - summary: Update Conversation - operationId: update_conversation_v1_conversations__conversation_id__post + - Post Training + summary: Get Training Job Artifacts + operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get responses: '200': description: Successful Response @@ -2820,18 +2810,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - delete: + /v1alpha/post-training/job/cancel: + post: tags: - - Conversations - summary: Openai Delete Conversation - operationId: openai_delete_conversation_v1_conversations__conversation_id__delete + - Post Training + summary: Cancel Training Job + operationId: cancel_training_job_v1alpha_post_training_job_cancel_post responses: '200': description: Successful Response @@ -2850,19 +2834,12 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - /v1/conversations/{conversation_id}/items/{item_id}: + /v1alpha/post-training/job/status: get: tags: - - Conversations - summary: Retrieve - operationId: retrieve_v1_conversations__conversation_id__items__item_id__get + - Post Training + summary: Get Training Job Status + operationId: get_training_job_status_v1alpha_post_training_job_status_get responses: '200': description: Successful Response @@ -2881,24 +2858,60 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: item_id - in: path - required: true - schema: - type: string - description: 'Path parameter: item_id' - delete: + /v1alpha/post-training/jobs: + get: tags: - - Conversations - summary: Openai Delete Conversation Item - operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete + - Post Training + summary: Get Training Jobs + operationId: get_training_jobs_v1alpha_post_training_jobs_get + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + /v1alpha/post-training/preference-optimize: + post: + tags: + - Post Training + summary: Preference Optimize + operationId: preference_optimize_v1alpha_post_training_preference_optimize_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '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' + /v1alpha/post-training/supervised-fine-tune: + post: + tags: + - Post Training + summary: Supervised Fine Tune + operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post responses: '200': description: Successful Response @@ -2917,19 +2930,6 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - description: 'Path parameter: conversation_id' - - name: item_id - in: path - required: true - schema: - type: string - description: 'Path parameter: item_id' components: responses: BadRequest400: @@ -2969,211 +2969,252 @@ components: schema: $ref: '#/components/schemas/Error' schemas: - ImageContentItem: - description: A image content item - properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/components/schemas/_URLOrData' - required: - - image - title: ImageContentItem - type: object - TextContentItem: - description: A text content item + Error: + description: Error response from the API. Roughly follows RFC 7807. properties: - type: - const: text - default: text - title: Type + status: + title: Status + type: integer + title: + title: Title type: string - text: - title: Text + detail: + title: Detail type: string + instance: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - text - title: TextContentItem + - status + - title + - detail + title: Error type: object - URL: - description: A URL reference to external content. + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - uri: - title: Uri + object: + const: list + default: list + title: Object type: string - required: - - uri - title: URL - type: object - _URLOrData: - description: A URL or a base64 encoded string - properties: - url: + data: + description: List of batch objects + items: + $ref: '#/components/schemas/Batch' + title: Data + type: array + first_id: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string - type: 'null' + description: ID of the first batch in the list nullable: true - title: URL - data: + last_id: anyOf: - type: string - type: 'null' - contentEncoding: base64 + description: ID of the last batch in the list nullable: true - title: _URLOrData + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean + required: + - data + title: ListBatchesResponse type: object - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - GreedySamplingStrategy: - description: Greedy sampling strategy that selects the highest probability token at each step. + Batch: + additionalProperties: true properties: - type: - const: greedy - default: greedy - title: Type + id: + title: Id type: string - title: GreedySamplingStrategy - type: object - TopKSamplingStrategy: - description: Top-k sampling strategy that restricts sampling to the k most likely tokens. - properties: - type: - const: top_k - default: top_k - title: Type + completion_window: + title: Completion Window type: string - top_k: - minimum: 1 - title: Top K + created_at: + title: Created At 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. - properties: - type: - const: top_p - default: top_p - title: Type + endpoint: + title: Endpoint type: string - temperature: + input_file_id: + title: Input File Id + type: string + object: + const: batch + title: Object + type: string + status: + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + title: Status + type: string + cancelled_at: anyOf: - - type: number - minimum: 0.0 + - type: integer - type: 'null' - top_p: + nullable: true + cancelling_at: anyOf: - - type: number + - type: integer - type: 'null' - default: 0.95 - required: - - temperature - title: TopPSamplingStrategy - type: object - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. + nullable: true + completed_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + error_file_id: + anyOf: + - type: string + - type: 'null' + nullable: true + errors: + anyOf: + - $ref: '#/components/schemas/Errors' + title: Errors + - type: 'null' + nullable: true + title: Errors + expired_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + expires_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + failed_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + finalizing_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + in_progress_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + nullable: true + model: + anyOf: + - type: string + - type: 'null' + nullable: true + output_file_id: + anyOf: + - type: string + - type: 'null' + nullable: true + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts + - type: 'null' + nullable: true + title: BatchRequestCounts + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage + - type: 'null' + nullable: true + title: BatchUsage + required: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + type: object + ListOpenAIChatCompletionResponse: + description: Response from listing OpenAI-compatible chat completions. properties: - type: - const: grammar - default: grammar - title: Type + 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 - bnf: - additionalProperties: true - title: Bnf - type: object required: - - bnf - title: GrammarResponseFormat + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: - type: - const: json_schema - default: json_schema - title: Type + role: + const: assistant + default: assistant + title: Role type: string - json_schema: - additionalProperties: true - title: Json Schema - type: object - required: - - json_schema - title: JsonSchemaResponseFormat + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + nullable: true + name: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + title: OpenAIAssistantMessageParam type: object - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat OpenAIChatCompletionContentPartImageParam: description: Image content part for OpenAI-compatible chat completion messages. properties: @@ -3188,6 +3229,21 @@ components: - image_url title: OpenAIChatCompletionContentPartImageParam type: object + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: description: Text content part for OpenAI-compatible chat completion messages. properties: @@ -3203,141 +3259,141 @@ components: - text title: OpenAIChatCompletionContentPartTextParam type: object - OpenAIFile: - properties: - type: - const: file - default: file - title: Type - type: string - file: - $ref: '#/components/schemas/OpenAIFileFile' - required: - - file - title: OpenAIFile - type: object - OpenAIFileFile: + OpenAIChatCompletionToolCall: + description: Tool call specification for OpenAI-compatible chat completion responses. properties: - file_data: + index: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - file_id: + id: anyOf: - type: string - type: 'null' nullable: true - filename: + type: + const: function + default: function + title: Type + type: string + function: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction - type: 'null' nullable: true - title: OpenAIFileFile + title: OpenAIChatCompletionToolCallFunction + title: OpenAIChatCompletionToolCall type: object - OpenAIImageURL: - description: Image URL specification for OpenAI-compatible chat completion messages. + OpenAIChatCompletionToolCallFunction: + description: Function call details for OpenAI-compatible tool calls. properties: - url: - title: Url - type: string - detail: + name: anyOf: - type: string - type: 'null' nullable: true - required: - - url - title: OpenAIImageURL + arguments: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIChatCompletionToolCallFunction type: object - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIChatCompletionUsage: + description: Usage information for OpenAI chat completion. properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - nullable: true - name: + 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: - - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' nullable: true - tool_calls: + title: OpenAIChatCompletionUsagePromptTokensDetails + completion_tokens_details: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' nullable: true - title: OpenAIAssistantMessageParam + title: OpenAIChatCompletionUsageCompletionTokensDetails + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage type: object - OpenAIChatCompletionToolCall: - description: Tool call specification for OpenAI-compatible chat completion responses. + OpenAIChoice: + description: A choice from an OpenAI-compatible chat completion response. properties: - index: - anyOf: - - type: integer - - type: 'null' - nullable: true - id: - anyOf: - - type: string - - type: 'null' - nullable: true - type: - const: function - default: function - title: Type + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + finish_reason: + title: Finish Reason type: string - function: + index: + title: Index + type: integer + logprobs: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - title: OpenAIChatCompletionToolCallFunction + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' nullable: true - title: OpenAIChatCompletionToolCallFunction - title: OpenAIChatCompletionToolCall + title: OpenAIChoiceLogprobs + required: + - message + - finish_reason + - index + title: OpenAIChoice type: object - OpenAIChatCompletionToolCallFunction: - description: Function call details for OpenAI-compatible tool calls. + OpenAIChoiceLogprobs: + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. properties: - name: + content: anyOf: - - type: string + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array - type: 'null' nullable: true - arguments: + refusal: anyOf: - - type: string + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array - type: 'null' nullable: true - title: OpenAIChatCompletionToolCallFunction + title: OpenAIChoiceLogprobs type: object OpenAIDeveloperMessageParam: description: A message from the developer in an OpenAI-compatible chat completion request. @@ -3364,6 +3420,74 @@ components: - content title: OpenAIDeveloperMessageParam type: object + OpenAIFile: + properties: + type: + const: file + default: file + title: Type + type: string + file: + $ref: '#/components/schemas/OpenAIFileFile' + required: + - file + title: OpenAIFile + type: object + OpenAIFileFile: + properties: + file_data: + anyOf: + - type: string + - type: 'null' + nullable: true + file_id: + anyOf: + - type: string + - type: 'null' + nullable: true + filename: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIFileFile + type: object + OpenAIImageURL: + description: Image URL specification for OpenAI-compatible chat completion messages. + properties: + url: + title: Url + type: string + detail: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - url + title: OpenAIImageURL + type: object + OpenAIMessageParam: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: description: A system message providing instructions or context to the model. properties: @@ -3389,6 +3513,39 @@ components: - 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' + nullable: true + logprob: + title: Logprob + type: number + top_logprobs: + items: + $ref: '#/components/schemas/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. properties: @@ -3413,15 +3570,41 @@ components: - content title: OpenAIToolMessageParam type: object - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. + 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: - role: - const: user - default: user - title: Role + token: + title: Token type: string - content: + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + 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. + properties: + role: + const: user + default: user + title: Role + type: string + content: anyOf: - type: string - items: @@ -3451,27 +3634,6 @@ components: - content title: OpenAIUserMessageParam type: object - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) OpenAIJSONSchema: description: JSON schema specification for OpenAI-compatible structured response format. properties: @@ -3517,16 +3679,6 @@ components: - json_schema title: OpenAIResponseFormatJSONSchema type: object - OpenAIResponseFormatText: - description: Text response format for OpenAI-compatible chat completion requests. - properties: - type: - const: text - default: text - title: Type - type: string - title: OpenAIResponseFormatText - type: object OpenAIResponseFormatParam: discriminator: mapping: @@ -3542,628 +3694,573 @@ components: - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' title: OpenAIResponseFormatJSONObject title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - VectorStoreChunkingStrategyAuto: - description: Automatic chunking strategy for vector store files. - properties: - type: - const: auto - default: auto - title: Type - type: string - title: VectorStoreChunkingStrategyAuto - type: object - VectorStoreChunkingStrategyStatic: - description: Static chunking strategy with configurable parameters. + OpenAIResponseFormatText: + description: Text response format for OpenAI-compatible chat completion requests. properties: type: - const: static - default: static + const: text + default: text title: Type type: string - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' - required: - - static - title: VectorStoreChunkingStrategyStatic - type: object - VectorStoreChunkingStrategyStaticConfig: - description: Configuration for static chunking strategy. - 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 + title: OpenAIResponseFormatText type: object - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - VectorStoreFileStatus: - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - OpenAIResponseInputMessageContentFile: - description: File content for input messages in OpenAI response format. + OpenAIChatCompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible chat completion endpoint. properties: - type: - const: input_file - default: input_file - title: Type + model: + title: Model type: string - file_data: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + minItems: 1 + title: Messages + type: array + frequency_penalty: anyOf: - - type: string + - type: number - type: 'null' nullable: true - file_id: + function_call: anyOf: - type: string + - additionalProperties: true + type: object - type: 'null' + title: string | object nullable: true - file_url: + functions: anyOf: - - type: string + - items: + additionalProperties: true + type: object + type: array - type: 'null' nullable: true - filename: + logit_bias: anyOf: - - type: string + - additionalProperties: + type: number + type: object - type: 'null' nullable: true - title: OpenAIResponseInputMessageContentFile - type: object - OpenAIResponseInputMessageContentImage: - description: Image content for input messages in OpenAI response format. - properties: - detail: - default: auto - title: Detail - type: string - enum: - - low - - high - - auto - type: - const: input_image - default: input_image - title: Type - type: string - file_id: + logprobs: anyOf: - - type: string + - type: boolean - type: 'null' nullable: true - image_url: + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + nullable: true + presence_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + response_format: + anyOf: + - discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: 'null' + title: Response Format + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + nullable: true + stream: + anyOf: + - type: boolean + - type: 'null' + nullable: true + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + tool_choice: + anyOf: + - type: string + - additionalProperties: true + type: object + - type: 'null' + title: string | object + nullable: true + tools: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - type: integer + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: anyOf: - type: string - type: 'null' nullable: true - title: OpenAIResponseInputMessageContentImage - type: object - OpenAIResponseInputMessageContentText: - description: Text content for input messages in OpenAI response format. - properties: - text: - title: Text - type: string - type: - const: input_text - default: input_text - title: Type - type: string required: - - text - title: OpenAIResponseInputMessageContentText + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody type: object - OpenAIResponseInputMessageContent: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - OpenAIResponseAnnotationCitation: - description: URL citation annotation for referencing external web resources. + OpenAIChatCompletion: + description: Response from an OpenAI-compatible chat completion request. properties: - type: - const: url_citation - default: url_citation - title: Type + id: + title: Id type: string - end_index: - title: End Index - type: integer - start_index: - title: Start Index - type: integer - title: - title: Title + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object type: string - url: - title: Url + created: + title: Created + type: integer + model: + title: Model type: string + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation + - id + - choices + - created + - model + title: OpenAIChatCompletion type: object - OpenAIResponseAnnotationContainerFileCitation: + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: - type: - const: container_file_citation - default: container_file_citation - title: Type + id: + title: Id type: string - container_id: - title: Container Id + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object type: string - end_index: - title: End Index + created: + title: Created type: integer - file_id: - title: File Id - type: string - filename: - title: Filename + model: + title: Model type: string - start_index: - title: Start Index - type: integer + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage required: - - container_id - - end_index - - file_id - - filename - - start_index - title: OpenAIResponseAnnotationContainerFileCitation + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk type: object - OpenAIResponseAnnotationFileCitation: - description: File citation annotation for referencing specific files in response content. + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. 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 + content: + anyOf: + - type: string + - type: 'null' + nullable: true + refusal: + anyOf: + - type: string + - type: 'null' + nullable: true + role: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + reasoning_content: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIChoiceDelta type: object - OpenAIResponseAnnotationFilePath: + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: - type: - const: file_path - default: file_path - title: Type - type: string - file_id: - title: File Id + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason type: string index: title: Index type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - file_id + - delta + - finish_reason - index - title: OpenAIResponseAnnotationFilePath + title: OpenAIChunkChoice type: object - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - OpenAIResponseContentPartRefusal: - description: Refusal content within a streamed response part. + OpenAICompletionWithInputMessages: properties: - type: - const: refusal - default: refusal - title: Type - type: string - refusal: - title: Refusal + id: + title: Id type: string - required: - - refusal - title: OpenAIResponseContentPartRefusal - type: object - OpenAIResponseOutputMessageContentOutputText: - properties: - text: - title: Text + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object type: string - type: - const: output_text - default: output_text - title: Type + created: + title: Created + type: integer + model: + title: Model type: string - annotations: + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsage + input_messages: items: discriminator: mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type + 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/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations + - $ref: '#/components/schemas/OpenAIUserMessageParam' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + title: Input Messages type: array required: - - text - title: OpenAIResponseOutputMessageContentOutputText - type: object - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - MCPListToolsTool: - description: Tool definition returned by MCP list tools operation. - properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - input_schema - - name - title: MCPListToolsTool - 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 + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages 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. + OpenAICompletionRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible completion endpoint. properties: - content: + model: + title: Model + type: string + prompt: 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' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: string type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + title: list[string] - items: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: integer type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - const: message - default: message - title: Type - type: string - id: + title: list[integer] + - items: + items: + type: integer + type: array + type: array + title: list[array] + title: string | ... (4 variants) + best_of: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - status: + echo: anyOf: - - type: string + - type: boolean - type: 'null' nullable: true - required: - - content - - role - title: OpenAIResponseMessage - type: object - OpenAIResponseOutputMessageFileSearchToolCall: - description: File search tool call output message for OpenAI responses. - 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: + frequency_penalty: + anyOf: + - type: number + - type: 'null' + nullable: true + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + logprobs: + anyOf: + - type: boolean + - type: 'null' + nullable: true + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + n: + anyOf: + - type: integer + - type: 'null' + nullable: true + presence_penalty: anyOf: + - type: number + - type: 'null' + nullable: true + seed: + anyOf: + - type: integer + - type: 'null' + nullable: true + stop: + anyOf: + - type: string - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: string type: array + title: list[string] - type: 'null' + title: string | list[string] nullable: true - required: - - id - - queries - - status - title: OpenAIResponseOutputMessageFileSearchToolCall - type: object - OpenAIResponseOutputMessageFileSearchToolCallResults: - description: Search results returned by the file search operation. - 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. - 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: + stream: anyOf: - - type: string + - type: boolean - type: 'null' nullable: true - status: + stream_options: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - required: - - call_id - - name - - arguments - title: OpenAIResponseOutputMessageFunctionToolCall - type: object - OpenAIResponseOutputMessageMCPCall: - description: Model Context Protocol (MCP) call output message for OpenAI responses. - 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: + temperature: + anyOf: + - type: number + - type: 'null' + nullable: true + top_p: + anyOf: + - type: number + - type: 'null' + nullable: true + user: anyOf: - type: string - type: 'null' nullable: true - output: + suffix: anyOf: - type: string - type: 'null' nullable: true required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall + - model + - prompt + title: OpenAICompletionRequestWithExtraBody type: object - OpenAIResponseOutputMessageMCPListTools: - description: MCP list tools output message containing available tools from an MCP server. + OpenAICompletion: + 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 - type: - const: mcp_list_tools - default: mcp_list_tools - title: Type - type: string - server_label: - title: Server Label - type: string - tools: + choices: items: - $ref: '#/components/schemas/MCPListToolsTool' - title: Tools + $ref: '#/components/schemas/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 - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools + - choices + - created + - model + title: OpenAICompletion type: object - OpenAIResponseOutputMessageWebSearchToolCall: - description: Web search tool call output message for OpenAI responses. + 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: - id: - title: Id - type: string - status: - title: Status + finish_reason: + title: Finish Reason type: string - type: - const: web_search_call - default: web_search_call - title: Type + text: + title: Text type: string + index: + title: Index + type: integer + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + nullable: true + title: OpenAIChoiceLogprobs required: - - id - - status - title: OpenAIResponseOutputMessageWebSearchToolCall + - finish_reason + - text + - index + title: OpenAICompletionChoice type: object - OpenAIResponseOutput: + ConversationItem: discriminator: 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' @@ -4178,277 +4275,414 @@ components: title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - AllowedToolsFilter: - description: Filter configuration for restricting which MCP tools can be used. + title: OpenAIResponseMessage | ... (9 variants) + OpenAIResponseAnnotationCitation: + description: URL citation annotation for referencing external web resources. properties: - tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - title: AllowedToolsFilter + 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 - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. + OpenAIResponseAnnotationContainerFileCitation: properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - title: ApprovalFilter + 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 - OpenAIResponseInputToolFileSearch: - description: File search tool configuration for OpenAI response inputs. + OpenAIResponseAnnotationFileCitation: + description: File citation annotation for referencing specific files in response content. properties: type: - const: file_search - default: file_search + const: file_citation + default: file_citation title: Type type: string - vector_store_ids: - items: - type: string - title: Vector Store Ids - type: array - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - max_num_results: - anyOf: - - maximum: 50 - minimum: 1 - type: integer - - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - nullable: true - title: SearchRankingOptions + file_id: + title: File Id + type: string + filename: + title: Filename + type: string + index: + title: Index + type: integer required: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch + - file_id + - filename + - index + title: OpenAIResponseAnnotationFileCitation type: object - OpenAIResponseInputToolFunction: - description: Function tool configuration for OpenAI response inputs. + OpenAIResponseAnnotationFilePath: properties: type: - const: function - default: function + const: file_path + default: file_path title: Type type: string - name: - title: Name + file_id: + title: File Id type: string - description: + index: + title: Index + type: integer + required: + - file_id + - index + title: OpenAIResponseAnnotationFilePath + type: object + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + OpenAIResponseContentPartRefusal: + description: Refusal content within a streamed response part. + 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' nullable: true - parameters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - strict: + status: anyOf: - - type: boolean + - type: string - type: 'null' nullable: true required: - - name - - parameters - title: OpenAIResponseInputToolFunction + - call_id + - output + title: OpenAIResponseInputFunctionToolCallOutput type: object - OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + OpenAIResponseInputMessageContentFile: + description: File content for input messages in OpenAI response format. properties: type: - const: mcp - default: mcp + const: input_file + default: input_file title: Type type: string - server_label: - title: Server Label - type: string - server_url: - title: Server Url - type: string - headers: + file_data: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - authorization: + file_id: anyOf: - type: string - type: 'null' nullable: true - require_approval: - anyOf: - - const: always - type: string - - const: never - type: string - - $ref: '#/components/schemas/ApprovalFilter' - title: ApprovalFilter - default: never - title: string | ApprovalFilter - allowed_tools: + file_url: anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter + - type: string - type: 'null' - title: list[string] | AllowedToolsFilter nullable: true - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP + filename: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIResponseInputMessageContentFile type: object - OpenAIResponseInputToolWebSearch: - description: Web search tool configuration for OpenAI response inputs. + OpenAIResponseInputMessageContentImage: + description: Image content for input messages in OpenAI response format. properties: + detail: + default: auto + title: Detail + type: string + enum: + - low + - high + - auto type: - default: web_search + const: input_image + default: input_image title: Type type: string - enum: - - web_search - - web_search_preview - - web_search_preview_2025_03_11 - - web_search_2025_08_26 - search_context_size: - anyOf: - - pattern: ^low|medium|high$ - type: string - - type: 'null' - default: medium - title: OpenAIResponseInputToolWebSearch - type: object - SearchRankingOptions: - description: Options for ranking and filtering search results. - properties: - ranker: + file_id: anyOf: - type: string - type: 'null' nullable: true - score_threshold: + image_url: anyOf: - - type: number + - type: string - type: 'null' - default: 0.0 - title: SearchRankingOptions + nullable: true + title: OpenAIResponseInputMessageContentImage type: object - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + OpenAIResponseInputMessageContentText: + description: Text content for input messages in OpenAI response format. properties: + text: + title: Text + type: string type: - const: mcp - default: mcp + 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 - allowed_tools: + 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' + nullable: true + reason: + anyOf: + - type: string + - type: 'null' + nullable: true + 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: - type: string + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + const: message + default: message + title: Type + type: string + id: + anyOf: + - type: string + - type: 'null' + nullable: true + status: + anyOf: + - type: string - type: 'null' - title: list[string] | AllowedToolsFilter nullable: true required: - - server_label - title: OpenAIResponseToolMCP + - content + - role + title: OpenAIResponseMessage type: object - OpenAIResponseTool: + OpenAIResponseOutputMessageContent: discriminator: mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - OpenAIResponseContentPartOutputText: - description: Text content within a streamed response part. + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + OpenAIResponseOutputMessageContentOutputText: properties: + text: + title: Text + type: string type: const: output_text default: output_text title: Type type: string - text: - title: Text - type: string annotations: items: discriminator: @@ -4470,108 +4704,234 @@ components: title: OpenAIResponseAnnotationFileCitation | ... (4 variants) title: Annotations type: array - logprobs: - anyOf: - - items: - additionalProperties: true - type: object + required: + - text + title: OpenAIResponseOutputMessageContentOutputText + type: object + OpenAIResponseOutputMessageFileSearchToolCall: + description: File search tool call output message for OpenAI responses. + 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: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' nullable: true required: - - text - title: OpenAIResponseContentPartOutputText + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall type: object - OpenAIResponseContentPartReasoningText: - description: Reasoning text emitted as part of a streamed response. + OpenAIResponseOutputMessageFunctionToolCall: + description: Function tool call output message for OpenAI responses. properties: + call_id: + title: Call Id + type: string + name: + title: Name + type: string + arguments: + title: Arguments + type: string type: - const: reasoning_text - default: reasoning_text + const: function_call + default: function_call title: Type type: string - text: - title: Text + id: + anyOf: + - type: string + - type: 'null' + nullable: true + status: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + type: object + OpenAIResponseOutputMessageMCPCall: + description: Model Context Protocol (MCP) call output message for OpenAI responses. + 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' + nullable: true + output: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - text - title: OpenAIResponseContentPartReasoningText + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall type: object - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseContentPartReasoningSummary: - description: Reasoning summary part in a streamed response. + OpenAIResponseOutputMessageMCPListTools: + description: MCP list tools output message containing available tools from an MCP server. properties: + id: + title: Id + type: string type: - const: summary_text - default: summary_text + const: mcp_list_tools + default: mcp_list_tools title: Type type: string - text: - title: Text + server_label: + title: Server Label type: string + tools: + items: + $ref: '#/components/schemas/MCPListToolsTool' + title: Tools + type: array required: - - text - title: OpenAIResponseContentPartReasoningSummary + - id + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools type: object - OpenAIResponseError: - description: Error details for failed OpenAI response requests. + OpenAIResponseOutputMessageWebSearchToolCall: + description: Web search tool call output message for OpenAI responses. properties: - code: - title: Code + id: + title: Id type: string - message: - title: Message + status: + title: Status + type: string + type: + const: web_search_call + default: web_search_call + title: Type type: string required: - - code - - message - title: OpenAIResponseError + - id + - status + title: OpenAIResponseOutputMessageWebSearchToolCall type: object - OpenAIResponseObject: - description: Complete OpenAI response object containing generation results and metadata. + 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. + 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 - error: + metadata: anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError + - 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. + nullable: true + 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. nullable: true - title: OpenAIResponseError + required: + - id + - created_at + title: Conversation + type: object + ConversationDeletedResource: + description: Response for deleted conversation. + properties: id: + description: The deleted conversation identifier title: Id type: string - model: - title: Model + 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 + ConversationItemList: + description: List of conversation items with pagination. + properties: object: - const: response - default: response + default: list + description: Object type title: Object type: string - output: + data: + description: List of conversation items items: discriminator: 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' @@ -4586,2079 +4946,737 @@ components: title: OpenAIResponseOutputMessageFileSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output + title: OpenAIResponseMessage | ... (9 variants) + title: Data type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: + first_id: anyOf: - type: string - type: 'null' + description: The ID of the first item in the list nullable: true - prompt: + last_id: anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt + - type: string - type: 'null' + description: The ID of the last item in the list nullable: true - title: OpenAIResponsePrompt - status: - title: Status + has_more: + default: false + description: Whether there are more items available + title: Has More + type: boolean + required: + - data + title: ConversationItemList + type: object + ConversationItemDeletedResource: + description: Response for deleted conversation item. + properties: + id: + description: The deleted item identifier + title: Id type: string - temperature: - anyOf: - - type: number - - type: 'null' - nullable: true - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - nullable: true - tools: + 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 + OpenAIEmbeddingsRequestWithExtraBody: + additionalProperties: true + description: Request parameters for OpenAI-compatible embeddings endpoint. + properties: + model: + title: Model + type: string + input: anyOf: + - type: string - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: string type: array - - type: 'null' - nullable: true - truncation: + title: list[string] + title: string | list[string] + encoding_format: anyOf: - type: string - type: 'null' - nullable: true - usage: + default: float + dimensions: anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage + - type: integer - type: 'null' nullable: true - title: OpenAIResponseUsage - instructions: + user: anyOf: - type: string - type: 'null' nullable: true - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - nullable: true required: - - created_at - - id - model - - output - - status - title: OpenAIResponseObject + - input + title: OpenAIEmbeddingsRequestWithExtraBody type: object - OpenAIResponseObjectStreamResponseCompleted: - description: Streaming event indicating a response has been completed. + OpenAIEmbeddingData: + description: A single embedding data object from an OpenAI-compatible embeddings response. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.completed - default: response.completed - title: Type + object: + const: embedding + default: embedding + title: Object type: string + embedding: + anyOf: + - items: + type: number + type: array + title: list[number] + - type: string + title: list[number] | string + index: + title: Index + type: integer required: - - response - title: OpenAIResponseObjectStreamResponseCompleted + - embedding + - index + title: OpenAIEmbeddingData type: object - OpenAIResponseObjectStreamResponseContentPartAdded: - description: Streaming event for when a new content part is added to a response item. + OpenAIEmbeddingUsage: + description: Usage information for an OpenAI-compatible embeddings response. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index + prompt_tokens: + title: Prompt Tokens type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number + total_tokens: + title: Total Tokens type: integer - type: - const: response.content_part.added - default: response.content_part.added - title: Type - type: string required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartAdded + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage type: object - OpenAIResponseObjectStreamResponseContentPartDone: - description: Streaming event for when a content part is completed. + OpenAIEmbeddingsResponse: + description: Response from an OpenAI-compatible embeddings request. properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id + object: + const: list + default: list + title: Object type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer - type: - const: response.content_part.done - default: response.content_part.done - title: Type + data: + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + title: Data + type: array + model: + title: Model type: string + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartDone + - data + - model + - usage + title: OpenAIEmbeddingsResponse type: object - OpenAIResponseObjectStreamResponseCreated: - description: Streaming event indicating a new response has been created. + OpenAIFilePurpose: + description: Valid purpose values for OpenAI Files API. + enum: + - assistants + - batch + title: OpenAIFilePurpose + type: string + ListOpenAIFileResponse: + description: Response for listing files in OpenAI Files API. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.created - default: response.created - title: Type + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - required: - - response - title: OpenAIResponseObjectStreamResponseCreated - type: object - OpenAIResponseObjectStreamResponseFailed: - description: Streaming event emitted when a response fails. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.failed - default: response.failed - title: Type + last_id: + title: Last Id + type: string + object: + const: list + default: list + title: Object type: string required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseFailed + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse type: object - OpenAIResponseObjectStreamResponseFileSearchCallCompleted: - description: Streaming event for completed file search calls. + OpenAIFileObject: + description: OpenAI File object as defined in the OpenAI Files API. properties: - item_id: - title: Item Id + object: + const: file + default: file + title: Object type: string - output_index: - title: Output Index + id: + title: Id + type: string + bytes: + title: Bytes type: integer - sequence_number: - title: Sequence Number + created_at: + title: Created At type: integer - type: - const: response.file_search_call.completed - default: response.file_search_call.completed - title: Type + expires_at: + title: Expires At + type: integer + filename: + title: Filename type: string + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject type: object - OpenAIResponseObjectStreamResponseFileSearchCallInProgress: - description: Streaming event for file search calls in progress. + 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: - item_id: - title: Item Id + anchor: + const: created_at + title: Anchor type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + seconds: + maximum: 2592000 + minimum: 3600 + title: Seconds type: integer - type: - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - title: Type - type: string required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - anchor + - seconds + title: ExpiresAfter type: object - OpenAIResponseObjectStreamResponseFileSearchCallSearching: - description: Streaming event for file search currently searching. + OpenAIFileDeleteResponse: + description: Response for deleting a file in OpenAI Files API. properties: - item_id: - title: Item Id + id: + title: Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.searching - default: response.file_search_call.searching - title: Type + object: + const: file + default: file + title: Object type: string + deleted: + title: Deleted + type: boolean required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - id + - deleted + title: OpenAIFileDeleteResponse type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: - description: Streaming event for incremental function call argument updates. + HealthInfo: + description: Health status information for the service. properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - title: Type - type: string + status: + $ref: '#/components/schemas/HealthStatus' required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - status + title: HealthInfo type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: - description: Streaming event for when function call arguments are completed. + RouteInfo: + description: Information about an API route including its path, method, and implementing providers. properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id + route: + title: Route type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.done - default: response.function_call_arguments.done - title: Type + method: + title: Method type: string + provider_types: + items: + type: string + title: Provider Types + type: array required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - route + - method + - provider_types + title: RouteInfo type: object - OpenAIResponseObjectStreamResponseInProgress: - description: Streaming event indicating the response remains in progress. + ListRoutesResponse: + description: Response containing a list of all available API routes. properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.in_progress - default: response.in_progress - title: Type - type: string + data: + items: + $ref: '#/components/schemas/RouteInfo' + title: Data + type: array required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseInProgress + - data + title: ListRoutesResponse type: object - OpenAIResponseObjectStreamResponseIncomplete: - description: Streaming event emitted when a response ends in an incomplete state. + OpenAIModel: + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number + id: + title: Id + type: string + object: + const: model + default: model + title: Object + type: string + created: + title: Created type: integer - type: - const: response.incomplete - default: response.incomplete - title: Type + owned_by: + title: Owned By type: string + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseIncomplete + - id + - created + - owned_by + title: OpenAIModel type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + OpenAIListModelsResponse: properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - title: Type - type: string + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - data + title: OpenAIListModelsResponse type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + Model: + description: A model resource representing an AI model registered in Llama Stack. properties: - arguments: - title: Arguments + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - item_id: - title: Item Id + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done + const: model + default: model title: Type type: string + metadata: + additionalProperties: true + description: Any additional metadata for this model + title: Metadata + type: object + model_type: + $ref: '#/components/schemas/ModelType' + default: llm required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - identifier + - provider_id + title: Model type: object - OpenAIResponseObjectStreamResponseMcpCallCompleted: - description: Streaming event for completed MCP calls. + ModelType: + description: Enumeration of supported model types in Llama Stack. + enum: + - llm + - embedding + - rerank + title: ModelType + type: string + ModerationObject: + description: A moderation object. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.completed - default: response.mcp_call.completed - title: Type + id: + title: Id + type: string + model: + title: Model type: string + results: + items: + $ref: '#/components/schemas/ModerationObjectResults' + title: Results + type: array required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - id + - model + - results + title: ModerationObject type: object - OpenAIResponseObjectStreamResponseMcpCallFailed: - description: Streaming event for failed MCP calls. + ModerationObjectResults: + description: A moderation object. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.failed - default: response.mcp_call.failed - title: Type - type: string + flagged: + title: Flagged + type: boolean + categories: + anyOf: + - additionalProperties: + type: boolean + type: object + - type: 'null' + nullable: true + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + nullable: true + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + nullable: true + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallFailed + - flagged + title: ModerationObjectResults type: object - OpenAIResponseObjectStreamResponseMcpCallInProgress: - description: Streaming event for MCP calls in progress. + Prompt: + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number + prompt: + anyOf: + - type: string + - type: 'null' + description: The system prompt with variable placeholders + nullable: true + version: + description: Version (integer starting at 1, incremented on save) + minimum: 1 + title: Version type: integer - type: - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - title: Type + prompt_id: + description: Unique identifier in format 'pmpt_<48-digit-hash>' + title: Prompt Id type: string + variables: + description: List of variable names that can be used in the prompt template + items: + type: string + title: Variables + type: array + is_default: + default: false + description: Boolean indicating whether this version is the default version + title: Is Default + type: boolean required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - version + - prompt_id + title: Prompt type: object - OpenAIResponseObjectStreamResponseMcpListToolsCompleted: + ListPromptsResponse: + description: Response model to list prompts. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - title: Type - type: string + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - data + title: ListPromptsResponse type: object - OpenAIResponseObjectStreamResponseMcpListToolsFailed: + ProviderInfo: + description: Information about a registered provider including its configuration and health status. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - title: Type + api: + title: Api + type: string + provider_id: + title: Provider Id + type: string + provider_type: + title: Provider Type type: string + config: + additionalProperties: true + title: Config + type: object + health: + additionalProperties: true + title: Health + type: object required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo type: object - OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + ListProvidersResponse: + description: Response containing a list of all available providers. properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - title: Type - type: string + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - data + title: ListProvidersResponse type: object - OpenAIResponseObjectStreamResponseOutputItemAdded: - description: Streaming event for when a new output item is added to the response. + ListOpenAIResponseObject: + description: Paginated list of OpenAI response objects with navigation metadata. properties: - response_id: - title: Response Id + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.added - default: response.output_item.added - title: Type + last_id: + title: Last Id + type: string + object: + const: list + default: list + title: Object type: string required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemAdded + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject type: object - OpenAIResponseObjectStreamResponseOutputItemDone: - description: Streaming event for when an output item is completed. + OpenAIResponseError: + description: Error details for failed OpenAI response requests. properties: - response_id: - title: Response Id + code: + title: Code type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.done - default: response.output_item.done - title: Type + message: + title: Message type: string required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemDone + - code + - message + title: OpenAIResponseError type: object - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: - description: Streaming event for when an annotation is added to output text. + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + OpenAIResponseInputToolFileSearch: + description: File search tool configuration for OpenAI response inputs. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - content_index: - title: Content Index - type: integer - annotation_index: - title: Annotation Index - type: integer - annotation: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.annotation.added - default: response.output_text.annotation.added - title: Type + 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' + nullable: true + max_num_results: + anyOf: + - maximum: 50 + minimum: 1 + type: integer + - type: 'null' + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + nullable: true + title: SearchRankingOptions required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - vector_store_ids + title: OpenAIResponseInputToolFileSearch type: object - OpenAIResponseObjectStreamResponseOutputTextDelta: - description: Streaming event for incremental text content updates. + OpenAIResponseInputToolFunction: + description: Function tool configuration for OpenAI response inputs. properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer type: - const: response.output_text.delta - default: response.output_text.delta + const: function + default: function title: Type type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDelta - type: object - OpenAIResponseObjectStreamResponseOutputTextDone: - description: Streaming event for when text output is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.done - default: response.output_text.done - title: Type + name: + title: Name type: string + description: + anyOf: + - type: string + - type: 'null' + nullable: true + parameters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + nullable: true required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDone + - name + - parameters + title: OpenAIResponseInputToolFunction type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: - description: Streaming event for when a new reasoning summary part is added. + OpenAIResponseInputToolWebSearch: + description: Web search tool configuration for OpenAI response inputs. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer type: - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added + default: web_search title: Type type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + search_context_size: + anyOf: + - pattern: ^low|medium|high$ + type: string + - type: 'null' + default: medium + title: OpenAIResponseInputToolWebSearch type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: - description: Streaming event for when a reasoning summary part is completed. + OpenAIResponseObjectWithInput: + description: OpenAI response object extended with input context information. properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index + created_at: + title: Created At type: integer - type: - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - title: Type - type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: - description: Streaming event for incremental reasoning summary text updates. - properties: - delta: - title: Delta - type: string - item_id: - title: Item Id + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + nullable: true + title: OpenAIResponseError + id: + title: Id type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - title: Type + model: + title: Model type: string - required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: - description: Streaming event for when reasoning summary text is completed. - properties: - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - title: Type - type: string - required: - - text - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - type: object - OpenAIResponseObjectStreamResponseReasoningTextDelta: - description: Streaming event for incremental reasoning text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.delta - default: response.reasoning_text.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - type: object - OpenAIResponseObjectStreamResponseReasoningTextDone: - description: Streaming event for when reasoning text is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.done - default: response.reasoning_text.done - title: Type - type: string - required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDone - type: object - OpenAIResponseObjectStreamResponseRefusalDelta: - description: Streaming event for incremental refusal text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.delta - default: response.refusal.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDelta - type: object - OpenAIResponseObjectStreamResponseRefusalDone: - description: Streaming event for when refusal text is completed. - properties: - content_index: - title: Content Index - type: integer - refusal: - title: Refusal - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.done - default: response.refusal.done - title: Type - type: string - required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDone - type: object - OpenAIResponseObjectStreamResponseWebSearchCallCompleted: - description: Streaming event for completed web search calls. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.completed - default: response.web_search_call.completed - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - type: object - OpenAIResponseObjectStreamResponseWebSearchCallInProgress: - description: Streaming event for web search calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - type: object - OpenAIResponseObjectStreamResponseWebSearchCallSearching: - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.searching - default: response.web_search_call.searching - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - type: object - OpenAIResponsePrompt: - description: OpenAI compatible Prompt object that is used in OpenAI responses. - properties: - id: - title: Id - type: string - variables: - anyOf: - - additionalProperties: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: object - - type: 'null' - nullable: true - version: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - id - title: OpenAIResponsePrompt - type: object - OpenAIResponseText: - description: Text response configuration for OpenAI responses. - properties: - format: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseTextFormat' - title: OpenAIResponseTextFormat - - type: 'null' - nullable: true - title: OpenAIResponseTextFormat - title: OpenAIResponseText - type: object - OpenAIResponseTextFormat: - description: Configuration for Responses API text format. - properties: - type: - title: Type - type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - title: OpenAIResponseTextFormat - type: object - OpenAIResponseUsage: - description: Usage information for OpenAI response. - 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: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' - title: OpenAIResponseUsageInputTokensDetails - - type: 'null' - nullable: true - title: OpenAIResponseUsageInputTokensDetails - output_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' - title: OpenAIResponseUsageOutputTokensDetails - - type: 'null' - nullable: true - title: OpenAIResponseUsageOutputTokensDetails - required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - type: object - OpenAIResponseUsageInputTokensDetails: - description: Token details for input tokens in OpenAI response usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageInputTokensDetails - type: object - OpenAIResponseUsageOutputTokensDetails: - description: Token details for output tokens in OpenAI response usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageOutputTokensDetails - type: object - OpenAIResponseObjectStream: - discriminator: - mapping: - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - title: OpenAIResponseObjectStreamResponseCreated - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - title: OpenAIResponseObjectStreamResponseInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - title: OpenAIResponseObjectStreamResponseOutputItemAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - title: OpenAIResponseObjectStreamResponseOutputItemDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - title: OpenAIResponseObjectStreamResponseOutputTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - title: OpenAIResponseObjectStreamResponseOutputTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - title: OpenAIResponseObjectStreamResponseMcpCallFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - title: OpenAIResponseObjectStreamResponseContentPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - title: OpenAIResponseObjectStreamResponseContentPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - title: OpenAIResponseObjectStreamResponseReasoningTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - title: OpenAIResponseObjectStreamResponseRefusalDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - title: OpenAIResponseObjectStreamResponseRefusalDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - title: OpenAIResponseObjectStreamResponseIncomplete - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - title: OpenAIResponseObjectStreamResponseFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - title: OpenAIResponseObjectStreamResponseCompleted - title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) - 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' - nullable: true - status: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - call_id - - output - title: OpenAIResponseInputFunctionToolCallOutput - 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' - nullable: true - reason: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse - type: object - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - ArrayType: - description: Parameter type for array values. - properties: - type: - const: array - default: array - title: Type - type: string - title: ArrayType - type: object - BooleanType: - description: Parameter type for boolean values. - properties: - type: - const: boolean - default: boolean - title: Type - type: string - title: BooleanType - type: object - ChatCompletionInputType: - description: Parameter type for 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. - properties: - type: - const: completion_input - default: completion_input - title: Type - type: string - title: CompletionInputType - type: object - JsonType: - description: Parameter type for JSON values. - properties: - type: - const: json - default: json - title: Type - type: string - title: JsonType - type: object - NumberType: - description: Parameter type for numeric values. - properties: - type: - const: number - default: number - title: Type - type: string - title: NumberType - type: object - ObjectType: - description: Parameter type for object values. - properties: - type: - const: object - default: object - title: Type - type: string - title: ObjectType - type: object - StringType: - description: Parameter type for string values. - properties: - type: - const: string - default: string - title: Type - type: string - title: StringType - type: object - UnionType: - description: Parameter type for union values. - properties: - type: - const: union - default: union - title: Type - type: string - title: UnionType - type: object - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - RowsDataSource: - description: A dataset stored in rows. - 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. - properties: - type: - const: uri - default: uri - title: Type - type: string - uri: - title: Uri - type: string - required: - - uri - title: URIDataSource - type: object - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - AggregationFunctionType: - description: Types of aggregation functions for scoring results. - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - type: string - BasicScoringFnParams: - description: Parameters for basic scoring function configuration. - 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: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions - type: array - title: BasicScoringFnParams - type: object - LLMAsJudgeScoringFnParams: - description: Parameters for LLM-as-judge scoring function configuration. - 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' - nullable: true - 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: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions - type: array - required: - - judge_model - title: LLMAsJudgeScoringFnParams - type: object - RegexParserScoringFnParams: - description: Parameters for regex parser scoring function configuration. - 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: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions - type: array - title: RegexParserScoringFnParams - type: object - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - LoraFinetuningConfig: - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - properties: - type: - const: LoRA - default: LoRA - title: Type - type: string - lora_attn_modules: - items: - type: string - title: Lora Attn Modules - type: array - apply_lora_to_mlp: - title: Apply Lora To Mlp - type: boolean - apply_lora_to_output: - title: Apply Lora To Output - type: boolean - rank: - title: Rank - type: integer - alpha: - title: Alpha - type: integer - use_dora: - anyOf: - - type: boolean - - type: 'null' - default: false - quantize_base: - anyOf: - - type: boolean - - type: 'null' - default: false - required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - type: object - QATFinetuningConfig: - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - properties: - type: - const: QAT - default: QAT - title: Type - type: string - quantizer_name: - title: Quantizer Name - type: string - group_size: - title: Group Size - type: integer - required: - - quantizer_name - - group_size - title: QATFinetuningConfig - type: object - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - SpanEndPayload: - description: Payload for a span end event. - properties: - type: - const: span_end - default: span_end - title: Type - type: string - status: - $ref: '#/components/schemas/SpanStatus' - required: - - status - title: SpanEndPayload - type: object - SpanStartPayload: - description: Payload for a span start event. - properties: - type: - const: span_start - default: span_start - title: Type - type: string - name: - title: Name - type: string - parent_span_id: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - name - title: SpanStartPayload - type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string - required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent - type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent - type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message - type: string - severity: - $ref: '#/components/schemas/LogSeverity' - required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent - type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Data - type: array - object: - const: list - default: list - title: Object - type: string - required: - - data - title: ListOpenAIResponseInputItem - type: object - OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. - properties: - created_at: - title: Created At - type: integer - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - nullable: true - title: OpenAIResponseError - id: - title: Id - type: string - model: - title: Model - type: string - object: - const: response - default: response - title: Object + object: + const: response + default: response + title: Object type: string output: items: @@ -6819,53 +5837,158 @@ components: - input title: OpenAIResponseObjectWithInput type: object - ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + OpenAIResponsePrompt: + description: OpenAI compatible Prompt object that is used in OpenAI responses. properties: - data: - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - title: Data - type: array - has_more: - title: Has More - type: boolean - first_id: - title: First Id + id: + title: Id type: string - last_id: - title: Last Id + variables: + anyOf: + - additionalProperties: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: object + - type: 'null' + nullable: true + version: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - id + title: OpenAIResponsePrompt + type: object + OpenAIResponseText: + description: Text response configuration for OpenAI responses. + properties: + format: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat + - type: 'null' + nullable: true + title: OpenAIResponseTextFormat + title: OpenAIResponseText + type: object + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + properties: + type: + const: mcp + default: mcp + title: Type type: string - object: - const: list - default: list - title: Object + server_label: + title: Server Label type: string + allowed_tools: + anyOf: + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter + - type: 'null' + title: list[string] | AllowedToolsFilter + nullable: true required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject + - server_label + title: OpenAIResponseToolMCP type: object - OpenAIDeleteResponseObject: - description: Response object confirming deletion of an OpenAI response. + OpenAIResponseUsage: + description: Usage information for OpenAI response. properties: - id: - title: Id - type: string - object: - const: response - default: response - title: Object - type: string - deleted: - default: true - title: Deleted - type: boolean + 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: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails + - type: 'null' + nullable: true + title: OpenAIResponseUsageInputTokensDetails + output_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails + - type: 'null' + nullable: true + title: OpenAIResponseUsageOutputTokensDetails required: - - id - title: OpenAIDeleteResponseObject + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage type: object ResponseGuardrailSpec: description: Specification for a guardrail to apply during response generation. @@ -6877,1551 +6000,1444 @@ components: - type title: ResponseGuardrailSpec type: object - Batch: - additionalProperties: true + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + OpenAIResponseInputToolMCP: + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: - id: - title: Id - type: string - completion_window: - title: Completion Window - type: string - created_at: - title: Created At - type: integer - endpoint: - title: Endpoint - type: string - input_file_id: - title: Input File Id + type: + const: mcp + default: mcp + title: Type type: string - object: - const: batch - title: Object + server_label: + title: Server Label type: string - status: - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - title: Status + server_url: + title: Server Url type: string - cancelled_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - cancelling_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - completed_at: + headers: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' nullable: true - error_file_id: + authorization: anyOf: - type: string - type: 'null' nullable: true - errors: - anyOf: - - $ref: '#/components/schemas/Errors' - title: Errors - - type: 'null' - nullable: true - title: Errors - expired_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - expires_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - failed_at: + require_approval: anyOf: - - type: integer - - type: 'null' - nullable: true - finalizing_at: + - const: always + type: string + - const: never + type: string + - $ref: '#/components/schemas/ApprovalFilter' + title: ApprovalFilter + default: never + title: string | ApprovalFilter + allowed_tools: anyOf: - - type: integer + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter - type: 'null' + title: list[string] | AllowedToolsFilter nullable: true - in_progress_at: + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + type: object + OpenAIResponseObject: + description: Complete OpenAI response object containing generation results and metadata. + properties: + created_at: + title: Created At + type: integer + error: anyOf: - - type: integer + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError - type: 'null' nullable: true - metadata: + title: OpenAIResponseError + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + title: Output + type: array + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: anyOf: - - additionalProperties: - type: string - type: object + - type: string - type: 'null' nullable: true - model: + prompt: anyOf: - - type: string + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt - type: 'null' nullable: true - output_file_id: + title: OpenAIResponsePrompt + status: + title: Status + type: string + temperature: anyOf: - - type: string + - type: number - type: 'null' nullable: true - request_counts: + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: anyOf: - - $ref: '#/components/schemas/BatchRequestCounts' - title: BatchRequestCounts + - type: number - type: 'null' nullable: true - title: BatchRequestCounts - usage: + tools: anyOf: - - $ref: '#/components/schemas/BatchUsage' - title: BatchUsage + - items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array - type: 'null' nullable: true - title: BatchUsage - required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - type: object - BatchError: - additionalProperties: true - properties: - code: + truncation: anyOf: - type: string - type: 'null' nullable: true - line: + usage: anyOf: - - type: integer + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage - type: 'null' nullable: true - message: + title: OpenAIResponseUsage + instructions: anyOf: - type: string - type: 'null' nullable: true - param: + max_tool_calls: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - title: BatchError - type: object - BatchRequestCounts: - additionalProperties: true - properties: - completed: - title: Completed - type: integer - failed: - title: Failed - type: integer - total: - title: Total - type: integer - required: - - completed - - failed - - total - title: BatchRequestCounts - type: object - BatchUsage: - additionalProperties: true - properties: - input_tokens: - title: Input Tokens - type: integer - input_tokens_details: - $ref: '#/components/schemas/InputTokensDetails' - output_tokens: - title: Output Tokens - type: integer - output_tokens_details: - $ref: '#/components/schemas/OutputTokensDetails' - total_tokens: - title: Total Tokens - type: integer required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject type: object - Errors: - additionalProperties: true + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. properties: - data: + type: + const: output_text + default: output_text + title: Type + type: string + text: + title: Text + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations + type: array + logprobs: anyOf: - items: - $ref: '#/components/schemas/BatchError' + additionalProperties: true + type: object type: array - type: 'null' nullable: true - object: - anyOf: - - type: string - - type: 'null' - nullable: true - title: Errors + required: + - text + title: OpenAIResponseContentPartOutputText type: object - InputTokensDetails: - additionalProperties: true + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. properties: - cached_tokens: - title: Cached Tokens - type: integer + type: + const: summary_text + default: summary_text + title: Type + type: string + text: + title: Text + type: string required: - - cached_tokens - title: InputTokensDetails + - text + title: OpenAIResponseContentPartReasoningSummary type: object - OutputTokensDetails: - additionalProperties: true + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. properties: - reasoning_tokens: - title: Reasoning Tokens - type: integer + type: + const: reasoning_text + default: reasoning_text + title: Type + type: string + text: + title: Text + type: string required: - - reasoning_tokens - title: OutputTokensDetails + - text + title: OpenAIResponseContentPartReasoningText type: object - ListBatchesResponse: - description: Response containing a list of batch objects. + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. properties: - object: - const: list - default: list - title: Object + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.completed + default: response.completed + title: Type type: string - data: - description: List of batch objects - items: - $ref: '#/components/schemas/Batch' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: ID of the last batch in the list - nullable: true - has_more: - default: false - description: Whether there are more batches available - title: Has More - type: boolean required: - - data - title: ListBatchesResponse + - response + title: OpenAIResponseObjectStreamResponseCompleted type: object - Benchmark: - description: A benchmark resource for evaluating model performance. + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + content_index: + title: Content Index + type: integer + response_id: + title: Response Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer type: - const: benchmark - default: benchmark + const: response.content_part.added + default: response.content_part.added 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 - ListBenchmarksResponse: - properties: - data: - items: - $ref: '#/components/schemas/Benchmark' - title: Data - type: array required: - - data - title: ListBenchmarksResponse + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded type: object - ImageDelta: - description: An image content delta for streaming responses. + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer type: - const: image - default: image + const: response.content_part.done + default: response.content_part.done title: Type type: string - image: - format: binary - title: Image - type: string required: - - image - title: ImageDelta + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone type: object - TextDelta: - description: A text content delta for streaming responses. + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' type: - const: text - default: text + const: response.created + default: response.created title: Type type: string - text: - title: Text - type: string required: - - text - title: TextDelta + - response + title: OpenAIResponseObjectStreamResponseCreated type: object - JobStatus: - description: Status of a job execution. - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string - Job: - description: A job execution instance with status tracking. + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. properties: - job_id: - title: Job Id + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.failed + default: response.failed + title: Type type: string - status: - $ref: '#/components/schemas/JobStatus' required: - - job_id - - status - title: Job + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed type: object - MetricInResponse: - description: A metric value included in API responses. + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. properties: - metric: - title: Metric + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - metric - - value - title: MetricInResponse - type: object - PaginatedResponse: - description: A generic paginated response that follows a simple format. - properties: - data: - items: - additionalProperties: true - type: object - title: Data - type: array - has_more: - title: Has More - type: boolean - url: - anyOf: - - type: string - - type: 'null' - nullable: true required: - - data - - has_more - title: PaginatedResponse + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted type: object - PostTrainingMetric: - description: Training metrics captured during post-training jobs. + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. properties: - epoch: - title: Epoch + item_id: + title: Item Id + type: string + output_index: + title: Output Index type: integer - train_loss: - title: Train Loss - type: number - validation_loss: - title: Validation Loss - type: number - perplexity: - title: Perplexity - type: number + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type + type: string required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress type: object - Checkpoint: - description: Checkpoint created during training runs. + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. properties: - identifier: - title: Identifier - type: string - created_at: - format: date-time - title: Created At + item_id: + title: Item Id type: string - epoch: - title: Epoch + output_index: + title: Output Index type: integer - post_training_job_id: - title: Post Training Job Id - type: string - path: - title: Path + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type type: string - training_metrics: - anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' - title: PostTrainingMetric - - type: 'null' - nullable: true - title: PostTrainingMetric required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: dialog - default: dialog + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta title: Type type: string - title: DialogType + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta type: object - Conversation: - description: OpenAI-compatible conversation object. + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. properties: - id: - description: The unique ID of the conversation. - title: Id + arguments: + title: Arguments type: string - object: - const: conversation - default: conversation - description: The object type, which is always conversation. - title: Object + item_id: + title: Item Id type: string - created_at: - description: The time at which the conversation was created, measured in seconds since the Unix epoch. - title: Created At + output_index: + title: Output Index 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. - nullable: true - 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. - nullable: true + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type + type: string required: - - id - - created_at - title: Conversation + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone type: object - ConversationDeletedResource: - description: Response for deleted conversation. + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. properties: - id: - description: The deleted conversation identifier - title: Id - type: string - object: - default: conversation.deleted - description: Object type - title: Object + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type type: string - deleted: - default: true - description: Whether the object was deleted - title: Deleted - type: boolean required: - - id - title: ConversationDeletedResource + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.incomplete + default: response.incomplete + title: Type + type: string required: - - items - title: ConversationItemCreateRequest + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete type: object - ConversationItemDeletedResource: - description: Response for deleted conversation item. + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: properties: - id: - description: The deleted item identifier - title: Id + delta: + title: Delta type: string - object: - default: conversation.item.deleted - description: Object type - title: Object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type type: string - deleted: - default: true - description: Whether the object was deleted - title: Deleted - type: boolean required: - - id - title: ConversationItemDeletedResource + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta type: object - ConversationItemList: - description: List of conversation items with pagination. + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: properties: - object: - default: list - description: Object type - title: Object + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type type: string - data: - description: List of conversation items - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the first item in the list - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the last item in the list - nullable: true - has_more: - default: false - description: Whether there are more items available - title: Has More - type: boolean required: - - data - title: ConversationItemList + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer type: - const: message - default: message + const: response.mcp_call.failed + default: response.mcp_call.failed title: Type type: string - object: - const: message - default: message - title: Object - type: string required: - - id - - content - - role - - status - title: ConversationMessage + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed type: object - DatasetPurpose: - description: Purpose of the dataset. Each purpose has a required input data schema. - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string - Dataset: - description: Dataset resource for storing and accessing training or evaluation data. + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. 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 - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: dataset - default: dataset + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress title: Type type: string - purpose: - $ref: '#/components/schemas/DatasetPurpose' - source: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - metadata: - additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata - type: object required: - - identifier - - provider_id - - purpose - - source - title: Dataset + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress type: object - ListDatasetsResponse: - description: Response from listing datasets. + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: properties: - data: - items: - $ref: '#/components/schemas/Dataset' - title: Data - type: array + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type + type: string required: - - data - title: ListDatasetsResponse + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted type: object - Error: - description: Error response from the API. Roughly follows RFC 7807. + OpenAIResponseObjectStreamResponseMcpListToolsFailed: properties: - status: - title: Status + sequence_number: + title: Sequence Number type: integer - title: - title: Title - type: string - detail: - title: Detail + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type type: string - instance: - anyOf: - - type: string - - type: 'null' - nullable: true required: - - status - - title - - detail - title: Error + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed type: object - Api: - description: Enumeration of all available APIs in the Llama Stack system. - enum: - - providers - - inference - - safety - - agents - - batches - - vector_io - - datasetio - - scoring - - eval - - post_training - - tool_runtime - - models - - shields - - vector_stores - - datasets - - scoring_functions - - benchmarks - - tool_groups - - files - - prompts - - conversations - - inspect - title: Api - type: string - InlineProviderSpec: + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. + properties: + response_id: + title: Response Id + type: string + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.added + default: response.output_item.added + title: Type type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - container_image: - anyOf: - - type: string - - type: 'null' - description: |2 - - The container image to use for this implementation. If one is provided, pip_packages will be ignored. - If a provider depends on other providers, the dependencies MUST NOT specify a container image. - nullable: true - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true required: - - api - - provider_type - - config_class - title: InlineProviderSpec + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded type: object - ModelType: - description: Enumeration of supported model types in Llama Stack. - enum: - - llm - - embedding - - rerank - title: ModelType - type: string - Model: - description: A model resource representing an AI model registered in Llama Stack. + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + response_id: + title: Response Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done + title: Type + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone + type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. + properties: + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + sequence_number: + title: Sequence Number + type: integer type: - const: model - default: model + const: response.output_text.annotation.added + default: response.output_text.annotation.added title: Type type: string - metadata: - additionalProperties: true - description: Any additional metadata for this model - title: Metadata - type: object - model_type: - $ref: '#/components/schemas/ModelType' - default: llm required: - - identifier - - provider_id - title: Model + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded type: object - ProviderSpec: + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type + content_index: + title: Content Index + type: integer + delta: + title: Delta type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.delta + default: response.output_text.delta + title: Type type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array required: - - api - - provider_type - - config_class - title: ProviderSpec + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta type: object - RemoteProviderSpec: + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type + content_index: + title: Content Index + type: integer + text: + title: Text type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + item_id: + title: Item Id type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - adapter_type: - description: Unique identifier for this adapter - title: Adapter Type + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done + title: Type type: string - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true required: - - api - - provider_type - - config_class - - adapter_type - title: RemoteProviderSpec + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone type: object - ScoringFn: - description: A scoring function resource for evaluating model outputs. + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + item_id: + title: Item Id type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. + properties: + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: scoring_function - default: scoring_function + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done title: Type type: string - description: - anyOf: - - type: string - - type: 'null' - 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: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - params: - anyOf: - - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval - title: Params - nullable: true required: - - identifier - - provider_id - - return_type - title: ScoringFn + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone type: object - Shield: - description: A safety shield resource that can be used to check content. + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + delta: + title: Delta type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: shield - default: shield + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta title: Type type: string - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true required: - - identifier - - provider_id - title: Shield + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta type: object - ToolGroup: - description: A group of related tools managed together. + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. properties: - identifier: - description: Unique identifier for this resource in llama stack - title: Identifier + text: + title: Text type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - nullable: true - provider_id: - description: ID of the provider that owns this resource - title: Provider Id + item_id: + title: Item Id type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer type: - const: tool_group - default: tool_group + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done title: Type type: string - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - nullable: true - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true required: - - identifier - - provider_id - title: ToolGroup + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone type: object - ModelCandidate: - description: A model candidate for evaluation. + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer type: - const: model - default: model + const: response.reasoning_text.delta + default: response.reasoning_text.delta title: Type type: string - model: - title: Model - type: string - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: - anyOf: - - $ref: '#/components/schemas/SystemMessage' - title: SystemMessage - - type: 'null' - nullable: true - title: SystemMessage required: - - model - - sampling_params - title: ModelCandidate + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta type: object - SamplingParams: - description: Sampling parameters. + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. properties: - strategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - max_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - repetition_penalty: - anyOf: - - type: number - - type: 'null' - default: 1.0 - stop: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - title: SamplingParams + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done + title: Type + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone type: object - SystemMessage: - description: A system message providing instructions or context to the model. + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. properties: - role: - const: system - default: system - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.delta + default: response.refusal.delta + title: Type + type: string required: - - content - title: SystemMessage + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta type: object - BenchmarkConfig: - description: A benchmark configuration for evaluation. + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - scoring_params: - additionalProperties: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - description: Map between scoring function id and parameters for each scoring function you want to run - title: Scoring Params - type: object - num_examples: - anyOf: - - type: integer - - type: 'null' - description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - nullable: true + content_index: + title: Content Index + type: integer + refusal: + title: Refusal + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.done + default: response.refusal.done + title: Type + type: string required: - - eval_candidate - title: BenchmarkConfig + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone type: object - ScoringResult: - description: A scoring result for a single row. + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. properties: - score_rows: - items: - additionalProperties: true - type: object - title: Score Rows - type: array - aggregated_results: - additionalProperties: true - title: Aggregated Results - type: object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type + type: string required: - - score_rows - - aggregated_results - title: ScoringResult + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted type: object - EvaluateResponse: - description: The response from an evaluation. + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. properties: - generations: - items: - additionalProperties: true - type: object - title: Generations - type: array - scores: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Scores - type: object + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress + title: Type + type: string required: - - generations - - scores - title: EvaluateResponse + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress 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) + OpenAIResponseObjectStreamResponseWebSearchCallSearching: properties: - anchor: - const: created_at - title: Anchor + item_id: + title: Item Id type: string - seconds: - maximum: 2592000 - minimum: 3600 - title: Seconds + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number type: integer + type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type + type: string required: - - anchor - - seconds - title: ExpiresAfter + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching type: object - OpenAIFileObject: - description: OpenAI File object as defined in the OpenAI Files API. + OpenAIDeleteResponseObject: + description: Response object confirming deletion of an OpenAI response. 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 + object: + const: response + default: response + title: Object type: string - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' + deleted: + default: true + title: Deleted + type: boolean required: - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject + title: OpenAIDeleteResponseObject type: object - OpenAIFilePurpose: - description: Valid purpose values for OpenAI Files API. - enum: - - assistants - - batch - title: OpenAIFilePurpose - type: string - ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. + ListOpenAIResponseInputItem: + description: List container for OpenAI response input items. properties: data: items: - $ref: '#/components/schemas/OpenAIFileObject' + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage 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 @@ -8429,1017 +7445,1677 @@ components: type: string required: - data - - has_more - - first_id - - last_id - title: ListOpenAIFileResponse + title: ListOpenAIResponseInputItem type: object - OpenAIFileDeleteResponse: - description: Response for deleting a file in OpenAI Files API. + RunShieldResponse: + description: Response from running a safety shield. properties: - id: - title: Id - type: string - object: - const: file - default: file - title: Object - type: string - deleted: - title: Deleted - type: boolean + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation + - type: 'null' + nullable: true + title: SafetyViolation + title: RunShieldResponse + type: object + SafetyViolation: + description: Details of a safety violation detected by content moderation. + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + anyOf: + - type: string + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - id - - deleted - title: OpenAIFileDeleteResponse + - violation_level + title: SafetyViolation type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). + ViolationLevel: + description: Severity level of a safety violation. + enum: + - info + - warn + - error + title: ViolationLevel + type: string + AggregationFunctionType: + description: Types of aggregation functions for scoring results. + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + type: string + ArrayType: + description: Parameter type for array values. properties: type: - const: bf16 - default: bf16 + const: array + default: array title: Type type: string - title: Bf16QuantizationConfig + title: ArrayType type: object - EmbeddingsResponse: - description: Response containing generated embeddings. + BasicScoringFnParams: + description: Parameters for basic scoring function configuration. properties: - embeddings: + type: + const: basic + default: basic + title: Type + type: string + aggregation_functions: + description: Aggregation functions to apply to the scores of each row items: - items: - type: number - type: array - title: Embeddings + $ref: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions type: array - required: - - embeddings - title: EmbeddingsResponse + title: BasicScoringFnParams type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. + BooleanType: + description: Parameter type for boolean values. properties: type: - const: fp8_mixed - default: fp8_mixed + const: boolean + default: boolean title: Type type: string - title: Fp8QuantizationConfig + title: BooleanType type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. + ChatCompletionInputType: + description: Parameter type for chat completion input. properties: type: - const: int4_mixed - default: int4_mixed + const: chat_completion_input + default: chat_completion_input title: Type type: string - scheme: - anyOf: - - type: string - - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig + title: ChatCompletionInputType type: object - OpenAIChatCompletionUsage: - description: Usage information for OpenAI chat completion. + CompletionInputType: + description: Parameter type for completion input. 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: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' - title: OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - completion_tokens_details: + type: + const: completion_input + default: completion_input + title: Type + type: string + title: CompletionInputType + type: object + JsonType: + description: Parameter type for JSON values. + properties: + type: + const: json + default: json + title: Type + type: string + title: JsonType + type: object + LLMAsJudgeScoringFnParams: + description: Parameters for LLM-as-judge scoring function configuration. + properties: + type: + const: llm_as_judge + default: llm_as_judge + title: Type + type: string + judge_model: + title: Judge Model + type: string + prompt_template: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' - title: OpenAIChatCompletionUsageCompletionTokensDetails + - type: string - type: 'null' nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage + - judge_model + title: LLMAsJudgeScoringFnParams + type: object + NumberType: + description: Parameter type for numeric values. + properties: + type: + const: number + default: number + title: Type + type: string + title: NumberType + type: object + ObjectType: + description: Parameter type for object values. + properties: + type: + const: object + default: object + title: Type + type: string + title: ObjectType + type: object + RegexParserScoringFnParams: + description: Parameters for regex parser scoring function configuration. + 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: '#/components/schemas/AggregationFunctionType' + title: Aggregation Functions + type: array + title: RegexParserScoringFnParams type: object - OpenAIChatCompletionUsageCompletionTokensDetails: - description: Token details for output tokens in OpenAI chat completion usage. + ScoringFn: + description: A scoring function resource for evaluating model outputs. properties: - reasoning_tokens: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier + type: string + provider_resource_id: anyOf: - - type: integer + - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object - OpenAIChatCompletionUsagePromptTokensDetails: - description: Token details for prompt tokens in OpenAI chat completion usage. - properties: - cached_tokens: + 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: integer + - type: string - type: 'null' nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - type: object - OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. - properties: - message: + 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: - assistant: '#/components/schemas/OpenAIAssistantMessageParam' - developer: '#/components/schemas/OpenAIDeveloperMessageParam' - system: '#/components/schemas/OpenAISystemMessageParam' - tool: '#/components/schemas/OpenAIToolMessageParam' - user: '#/components/schemas/OpenAIUserMessageParam' - propertyName: role + 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/OpenAIUserMessageParam' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + - $ref: '#/components/schemas/StringType' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + params: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + title: Params nullable: true - title: OpenAIChoiceLogprobs required: - - message - - finish_reason - - index - title: OpenAIChoice + - identifier + - provider_id + - return_type + title: ScoringFn type: object - OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + StringType: + description: Parameter type for string values. properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - nullable: true - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - nullable: true - title: OpenAIChoiceLogprobs + type: + const: string + default: string + title: Type + type: string + title: StringType type: object - OpenAICompletionWithInputMessages: + UnionType: + description: Parameter type for union values. properties: - id: - title: Id + type: + const: union + default: union + title: Type type: string - choices: + title: UnionType + type: object + ListScoringFunctionsResponse: + properties: + data: items: - $ref: '#/components/schemas/OpenAIChoice' - title: Choices + $ref: '#/components/schemas/ScoringFn' + title: Data 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: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsage - input_messages: + required: + - data + title: ListScoringFunctionsResponse + type: object + ScoreResponse: + description: The response from scoring. + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object + required: + - results + title: ScoreResponse + type: object + ScoringResult: + description: A scoring result for a single row. + properties: + score_rows: 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Input Messages + additionalProperties: true + type: object + title: Score Rows type: array + aggregated_results: + additionalProperties: true + title: Aggregated Results + type: object required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages + - score_rows + - aggregated_results + title: ScoringResult 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 + ScoreBatchResponse: + description: Response from batch scoring operations on datasets. properties: - token: - title: Token - type: string - bytes: + dataset_id: anyOf: - - items: - type: integer - type: array + - type: string - type: 'null' nullable: true - logprob: - title: Logprob - type: number - top_logprobs: - items: - $ref: '#/components/schemas/OpenAITopLogProb' - title: Top Logprobs - type: array + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Results + type: object required: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb + - results + title: ScoreBatchResponse 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 + Shield: + description: A safety shield resource that can be used to check content. properties: - token: - title: Token + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - bytes: + provider_resource_id: anyOf: - - items: - type: integer - type: array + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string + type: + const: shield + default: shield + title: Type + type: string + params: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - logprob: - title: Logprob - type: number required: - - token - - logprob - title: OpenAITopLogProb + - identifier + - provider_id + title: Shield type: object - ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. + ListShieldsResponse: properties: data: items: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + $ref: '#/components/schemas/Shield' 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 + title: ListShieldsResponse type: object - OpenAIChatCompletion: - description: Response from an OpenAI-compatible chat completion request. + ImageContentItem: + description: A image content item properties: - id: - title: Id + type: + const: image + default: image + title: Type type: string - choices: - items: - $ref: '#/components/schemas/OpenAIChoice' - title: Choices - type: array - object: - const: chat.completion - default: chat.completion - title: Object + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + TextContentItem: + description: A text content item + properties: + type: + const: text + default: text + title: Type type: string - created: - title: Created - type: integer - model: - title: Model + text: + title: Text type: string - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsage required: - - id - - choices - - created - - model - title: OpenAIChatCompletion + - text + title: TextContentItem type: object - OpenAIChoiceDelta: - description: A delta from an OpenAI-compatible chat completion streaming response. + ToolInvocationResult: + description: Result of a tool invocation. properties: content: anyOf: - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true + error_message: + anyOf: + - type: string + - type: 'null' + nullable: true + error_code: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true - refusal: + title: ToolInvocationResult + type: object + URL: + description: A URL reference to external content. + properties: + uri: + title: Uri + type: string + required: + - uri + title: URL + type: object + ToolDef: + description: Tool definition used in runtime contexts. + properties: + toolgroup_id: anyOf: - type: string - type: 'null' nullable: true - role: + name: + title: Name + type: string + description: anyOf: - type: string - type: 'null' nullable: true - tool_calls: + input_schema: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - reasoning_content: + output_schema: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceDelta - type: object - OpenAIChunkChoice: - description: A chunk choice from an OpenAI-compatible chat completion streaming response. - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: + metadata: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAIChoiceLogprobs required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice + - name + title: ToolDef type: object - OpenAIChatCompletionChunk: - description: Chunk from a streaming response to an OpenAI-compatible chat completion request. + ListToolDefsResponse: + description: Response containing a list of tool definitions. properties: - id: - title: Id - type: string - choices: + data: items: - $ref: '#/components/schemas/OpenAIChunkChoice' - title: Choices + $ref: '#/components/schemas/ToolDef' + title: Data type: array - object: - const: chat.completion.chunk - default: chat.completion.chunk - title: Object - type: string - created: - title: Created - type: integer - model: - title: Model + required: + - data + title: ListToolDefsResponse + type: object + ToolGroup: + description: A group of related tools managed together. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - usage: + provider_resource_id: anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage + - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true - title: OpenAIChatCompletionUsage - required: - - id - - choices - - created - - model - title: OpenAIChatCompletionChunk - type: object - OpenAIChatCompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible chat completion endpoint. - properties: - model: - title: Model + provider_id: + description: ID of the provider that owns this resource + title: Provider Id type: string - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - minItems: 1 - title: Messages - type: array - frequency_penalty: + type: + const: tool_group + default: tool_group + title: Type + type: string + mcp_endpoint: anyOf: - - type: number + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true - function_call: + title: URL + args: anyOf: - - type: string - additionalProperties: true type: object - type: 'null' - title: string | object nullable: true - functions: + required: + - identifier + - provider_id + title: ToolGroup + type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object + Chunk: + description: A chunk of content that can be inserted into a vector database. + properties: + content: anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: - additionalProperties: true - type: object + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - - type: 'null' - nullable: true - logit_bias: + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: anyOf: - - additionalProperties: + - items: type: number - type: object - - type: 'null' - nullable: true - logprobs: - anyOf: - - type: boolean - - type: 'null' - nullable: true - max_completion_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - max_tokens: - anyOf: - - type: integer + type: array - type: 'null' nullable: true - n: + chunk_metadata: anyOf: - - type: integer + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true - parallel_tool_calls: + title: ChunkMetadata + required: + - content + - chunk_id + 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. + properties: + chunk_id: anyOf: - - type: boolean + - type: string - type: 'null' nullable: true - presence_penalty: + document_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - response_format: + source: anyOf: - - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: string - type: 'null' - title: Response Format nullable: true - seed: + created_timestamp: anyOf: - type: integer - type: 'null' nullable: true - stop: + updated_timestamp: anyOf: - - type: string - - items: - type: string - type: array - title: list[string] + - type: integer - type: 'null' - title: string | list[string] nullable: true - stream: + chunk_window: anyOf: - - type: boolean + - type: string - type: 'null' nullable: true - stream_options: + chunk_tokenizer: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - temperature: + chunk_embedding_model: anyOf: - - type: number + - type: string - type: 'null' nullable: true - tool_choice: + chunk_embedding_dimension: anyOf: - - type: string - - additionalProperties: true - type: object + - type: integer - type: 'null' - title: string | object nullable: true - tools: + content_token_count: anyOf: - - items: - additionalProperties: true - type: object - type: array + - type: integer - type: 'null' nullable: true - top_logprobs: + metadata_token_count: anyOf: - type: integer - type: 'null' nullable: true - top_p: + title: ChunkMetadata + type: object + QueryChunksResponse: + description: Response from querying chunks in a vector database. + properties: + chunks: + items: + $ref: '#/components/schemas/Chunk' + title: Chunks + type: array + scores: + items: + type: number + title: Scores + type: array + required: + - chunks + - scores + title: QueryChunksResponse + type: object + VectorStoreFileCounts: + description: File processing status counts for a 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 + VectorStoreListResponse: + description: Response from listing vector stores. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - user: + last_id: anyOf: - type: string - type: 'null' nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody + - data + title: VectorStoreListResponse 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 + VectorStoreObject: + description: OpenAI Vector Store object. properties: - finish_reason: - title: Finish Reason + id: + title: Id type: string - text: - title: Text + object: + default: vector_store + title: Object type: string - index: - title: Index + created_at: + title: Created At type: integer - logprobs: + name: anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs + - type: string - type: 'null' nullable: true - title: OpenAIChoiceLogprobs + usage_bytes: + default: 0 + title: Usage Bytes + type: integer + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + default: completed + title: Status + type: string + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + expires_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + last_active_at: + anyOf: + - type: integer + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object required: - - finish_reason - - text - - index - title: OpenAICompletionChoice + - id + - created_at + - file_counts + title: VectorStoreObject type: object - OpenAICompletion: - 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" + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + VectorStoreChunkingStrategyAuto: + description: Automatic chunking strategy for vector store files. properties: - id: - title: Id - type: string - choices: - items: - $ref: '#/components/schemas/OpenAICompletionChoice' - title: Choices - type: array - created: - title: Created - type: integer - model: - title: Model + type: + const: auto + default: auto + title: Type type: string - object: - const: text_completion - default: text_completion - title: Object + title: VectorStoreChunkingStrategyAuto + type: object + VectorStoreChunkingStrategyStatic: + description: Static chunking strategy with configurable parameters. + properties: + type: + const: static + default: static + title: Type type: string + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' required: - - id - - choices - - created - - model - title: OpenAICompletion + - static + title: VectorStoreChunkingStrategyStatic type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens + VectorStoreChunkingStrategyStaticConfig: + description: Configuration for static chunking strategy. properties: - text_offset: - anyOf: - - items: - type: integer - type: array - - type: 'null' - nullable: true - token_logprobs: + 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 + OpenAICreateVectorStoreRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store with extra_body support. + properties: + name: anyOf: - - items: - type: number - type: array + - type: string - type: 'null' nullable: true - tokens: + file_ids: anyOf: - items: type: string type: array - type: 'null' nullable: true - top_logprobs: + expires_after: anyOf: - - items: - additionalProperties: - type: number - type: object - type: array + - additionalProperties: true + type: object - type: 'null' nullable: true - title: OpenAICompletionLogprobs - type: object - OpenAICompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible completion endpoint. - properties: - model: - title: Model - type: string - prompt: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - items: - type: integer - type: array - title: list[integer] - - items: - items: - type: integer - type: array - type: array - title: list[array] - title: string | ... (4 variants) - best_of: + chunking_strategy: anyOf: - - type: integer + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' + title: Chunking Strategy nullable: true - echo: + metadata: anyOf: - - type: boolean + - additionalProperties: true + type: object - type: 'null' nullable: true - frequency_penalty: + title: OpenAICreateVectorStoreRequestWithExtraBody + type: object + VectorStoreDeleteResponse: + description: Response from deleting a vector store. + 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 + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + additionalProperties: true + description: Request to create a vector store file batch with extra_body support. + properties: + file_ids: + items: + type: string + title: File Ids + type: array + attributes: anyOf: - - type: number + - additionalProperties: true + type: object - type: 'null' nullable: true - logit_bias: + chunking_strategy: anyOf: - - additionalProperties: - type: number - type: object + - discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' + title: Chunking Strategy nullable: true - logprobs: + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + type: object + VectorStoreFileBatchObject: + description: OpenAI Vector Store File Batch object. + 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: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + required: + - id + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + type: object + VectorStoreFileStatus: + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + VectorStoreFileLastError: + description: Error information for failed vector store file processing. + properties: + code: + title: Code + type: string + enum: + - server_error + - rate_limit_exceeded + default: server_error + message: + title: Message + type: string + required: + - code + - message + title: VectorStoreFileLastError + type: object + VectorStoreFileObject: + description: OpenAI Vector Store File object. + 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: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + created_at: + title: Created At + type: integer + last_error: anyOf: - - type: boolean + - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError - type: 'null' nullable: true - max_tokens: + title: VectorStoreFileLastError + status: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + 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 + VectorStoreFilesListInBatchResponse: + description: Response from listing files in a vector store file batch. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - n: + last_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - presence_penalty: + 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. + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: anyOf: - - type: number + - type: string - type: 'null' nullable: true - seed: + last_id: anyOf: - - type: integer + - type: string - type: 'null' nullable: true - stop: + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListFilesResponse + type: object + VectorStoreFileDeleteResponse: + description: Response from deleting a vector store file. + 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 + VectorStoreContent: + description: Content item from a vector store file or search result. + properties: + type: + const: text + title: Type + type: string + text: + title: Text + type: string + embedding: anyOf: - - type: string - items: - type: string + type: number type: array - title: list[string] - type: 'null' - title: string | list[string] nullable: true - stream: + chunk_metadata: anyOf: - - type: boolean + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata - type: 'null' nullable: true - stream_options: + title: ChunkMetadata + metadata: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - temperature: + required: + - type + - text + title: VectorStoreContent + type: object + VectorStoreFileContentResponse: + description: Represents the parsed content of a vector store file. + properties: + object: + const: vector_store.file_content.page + default: vector_store.file_content.page + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: anyOf: - - type: number + - type: string - type: 'null' nullable: true - top_p: + required: + - data + title: VectorStoreFileContentResponse + type: object + VectorStoreSearchResponse: + description: Response from searching a vector store. + properties: + file_id: + title: File Id + type: string + filename: + title: Filename + type: string + score: + title: Score + type: number + attributes: anyOf: - - type: number + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + title: string | number | boolean + type: object - type: 'null' nullable: true - user: + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Content + type: array + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + type: object + VectorStoreSearchResponsePage: + description: Paginated response from searching a vector store. + properties: + object: + default: vector_store.search_results.page + title: Object + type: string + search_query: + items: + type: string + title: Search Query + type: array + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + title: Data + type: array + has_more: + default: false + title: Has More + type: boolean + next_page: anyOf: - type: string - type: 'null' nullable: true - suffix: + required: + - search_query + - data + title: VectorStoreSearchResponsePage + type: object + VersionInfo: + description: Version information for the service. + properties: + version: + title: Version + type: string + required: + - version + title: VersionInfo + type: object + PaginatedResponse: + description: A generic paginated response that follows a simple format. + properties: + data: + items: + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - data + - has_more + title: PaginatedResponse + type: object + Dataset: + description: Dataset resource for storing and accessing training or evaluation data. + 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 nullable: true + 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: '#/components/schemas/DatasetPurpose' + source: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + metadata: + additionalProperties: true + description: Any additional metadata for this dataset + title: Metadata + type: object required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody + - identifier + - provider_id + - purpose + - source + title: Dataset type: object - OpenAIEmbeddingData: - description: A single embedding data object from an OpenAI-compatible embeddings response. + RowsDataSource: + description: A dataset stored in rows. properties: - object: - const: embedding - default: embedding - title: Object + type: + const: rows + default: rows + title: Type type: string - embedding: - anyOf: - - items: - type: number - type: array - title: list[number] - - type: string - title: list[number] | string - index: - title: Index - type: integer + rows: + items: + additionalProperties: true + type: object + title: Rows + type: array required: - - embedding - - index - title: OpenAIEmbeddingData + - rows + title: RowsDataSource type: object - OpenAIEmbeddingUsage: - description: Usage information for an OpenAI-compatible embeddings response. + URIDataSource: + description: A dataset that can be obtained from a URI. properties: - prompt_tokens: - title: Prompt Tokens - type: integer - total_tokens: - title: Total Tokens - type: integer + type: + const: uri + default: uri + title: Type + type: string + uri: + title: Uri + type: string required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage + - uri + title: URIDataSource type: object - OpenAIEmbeddingsRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible embeddings endpoint. + ListDatasetsResponse: + description: Response from listing datasets. properties: - model: - title: Model + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object + Benchmark: + description: A benchmark resource for evaluating model performance. + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier type: string - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - encoding_format: - anyOf: - - type: string - - type: 'null' - default: float - dimensions: - anyOf: - - type: integer - - type: 'null' - nullable: true - user: + provider_resource_id: anyOf: - type: string - type: 'null' + description: Unique identifier for this resource in the provider nullable: true + 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: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark type: object - OpenAIEmbeddingsResponse: - description: Response from an OpenAI-compatible embeddings request. + ListBenchmarksResponse: properties: - object: - const: list - default: list - title: Object - type: string data: items: - $ref: '#/components/schemas/OpenAIEmbeddingData' + $ref: '#/components/schemas/Benchmark' title: Data type: array - model: - title: Model - type: string - usage: - $ref: '#/components/schemas/OpenAIEmbeddingUsage' required: - data - - model - - usage - title: OpenAIEmbeddingsResponse + title: ListBenchmarksResponse type: object - RerankData: - description: A single rerank result from a reranking response. + BenchmarkConfig: + description: A benchmark configuration for evaluation. properties: - index: - title: Index - type: integer - relevance_score: - title: Relevance Score - type: number + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + description: Map between scoring function id and parameters for each scoring function you want to run + title: Scoring Params + type: object + num_examples: + anyOf: + - type: integer + - type: 'null' + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + nullable: true required: - - index - - relevance_score - title: RerankData + - eval_candidate + title: BenchmarkConfig type: object - RerankResponse: - description: Response from a reranking request. + GreedySamplingStrategy: + description: Greedy sampling strategy that selects the highest probability token at each step. properties: - data: - items: - $ref: '#/components/schemas/RerankData' - title: Data - type: array + type: + const: greedy + default: greedy + title: Type + type: string + title: GreedySamplingStrategy + type: object + ModelCandidate: + description: A model candidate for evaluation. + properties: + type: + const: model + default: model + title: Type + type: string + model: + title: Model + type: string + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage + - type: 'null' + nullable: true + title: SystemMessage required: - - data - title: RerankResponse + - model + - sampling_params + title: ModelCandidate type: object - TokenLogProbs: - description: Log probabilities for generated tokens. + SamplingParams: + description: Sampling parameters. properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs + strategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + max_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + repetition_penalty: + anyOf: + - type: number + - type: 'null' + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + title: SamplingParams type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. + SystemMessage: + description: A system message providing instructions or context to the model. properties: role: - const: tool - default: tool + const: system + default: system title: Role type: string - call_id: - title: Call Id - type: string content: anyOf: - type: string @@ -9470,195 +9146,229 @@ components: title: list[ImageContentItem | TextContentItem] title: string | list[ImageContentItem | TextContentItem] required: - - call_id - content - title: ToolResponseMessage + title: SystemMessage type: object - UserMessage: - description: A message from the user in a chat conversation. + TopKSamplingStrategy: + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. properties: - role: - const: user - default: user - title: Role + type: + const: top_k + default: top_k + title: Type type: string - content: + 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. + properties: + type: + const: top_p + default: top_p + title: Type + type: string + temperature: anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: + - type: number + minimum: 0.0 + - type: 'null' + top_p: anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] + - type: number - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true + default: 0.95 required: - - content - title: UserMessage + - temperature + title: TopPSamplingStrategy type: object - HealthStatus: - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - type: string - HealthInfo: - description: Health status information for the service. + EvaluateResponse: + description: The response from an evaluation. + properties: + generations: + items: + additionalProperties: true + type: object + title: Generations + type: array + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + title: Scores + type: object + required: + - generations + - scores + title: EvaluateResponse + type: object + Job: + description: A job execution instance with status tracking. properties: + job_id: + title: Job Id + type: string status: - $ref: '#/components/schemas/HealthStatus' + $ref: '#/components/schemas/JobStatus' required: + - job_id - status - title: HealthInfo + title: Job type: object - RouteInfo: - description: Information about an API route including its path, method, and implementing providers. + RerankData: + description: A single rerank result from a reranking response. properties: - route: - title: Route - type: string - method: - title: Method - type: string - provider_types: + index: + title: Index + type: integer + relevance_score: + title: Relevance Score + type: number + required: + - index + - relevance_score + title: RerankData + type: object + RerankResponse: + description: Response from a reranking request. + properties: + data: items: - type: string - title: Provider Types + $ref: '#/components/schemas/RerankData' + title: Data type: array required: - - route - - method - - provider_types - title: RouteInfo + - data + title: RerankResponse + type: object + Checkpoint: + description: Checkpoint created during training runs. + 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: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric + - type: 'null' + nullable: true + title: PostTrainingMetric + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint type: object - ListRoutesResponse: - description: Response containing a list of all available API routes. + PostTrainingJobArtifactsResponse: + description: Artifacts of a finetuning job. properties: - data: + job_uuid: + title: Job Uuid + type: string + checkpoints: items: - $ref: '#/components/schemas/RouteInfo' - title: Data + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints type: array required: - - data - title: ListRoutesResponse + - job_uuid + title: PostTrainingJobArtifactsResponse type: object - VersionInfo: - description: Version information for the service. + PostTrainingMetric: + description: Training metrics captured during post-training jobs. properties: - version: - title: Version - type: string + 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: - - version - title: VersionInfo + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric type: object - OpenAIModel: - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata + PostTrainingJobStatusResponse: + description: Status of a finetuning job. properties: - id: - title: Id - type: string - object: - const: model - default: model - title: Object - type: string - created: - title: Created - type: integer - owned_by: - title: Owned By + job_uuid: + title: Job Uuid type: string - custom_metadata: + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + started_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + completed_at: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array required: - - id - - created - - owned_by - title: OpenAIModel + - job_uuid + - status + title: PostTrainingJobStatusResponse type: object - OpenAIListModelsResponse: + ListPostTrainingJobsResponse: properties: data: items: - $ref: '#/components/schemas/OpenAIModel' + $ref: '#/components/schemas/PostTrainingJob' title: Data type: array required: - data - title: OpenAIListModelsResponse + title: ListPostTrainingJobsResponse type: object - DPOLossType: - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - type: string DPOAlignmentConfig: description: Configuration for Direct Preference Optimization (DPO) alignment. properties: @@ -9672,12 +9382,13 @@ components: - beta title: DPOAlignmentConfig type: object - DatasetFormat: - description: Format of the training dataset. + DPOLossType: enum: - - instruct - - dialog - title: DatasetFormat + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType type: string DataConfig: description: Configuration for training data and data loading. @@ -9695,1280 +9406,1635 @@ components: $ref: '#/components/schemas/DatasetFormat' validation_dataset_id: anyOf: - - type: string + - type: string + - type: 'null' + nullable: true + packed: + anyOf: + - type: boolean + - type: 'null' + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + default: false + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + type: object + DatasetFormat: + description: Format of the training dataset. + enum: + - instruct + - dialog + title: DatasetFormat + type: string + EfficiencyConfig: + description: Configuration for memory and compute efficiency optimizations. + properties: + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + default: false + title: EfficiencyConfig + type: object + OptimizerConfig: + description: Configuration parameters for the optimization algorithm. + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + lr: + title: Lr + type: number + weight_decay: + title: Weight Decay + type: number + num_warmup_steps: + title: Num Warmup Steps + type: integer + required: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + type: object + OptimizerType: + description: Available optimizer algorithms for training. + enum: + - adam + - adamw + - sgd + title: OptimizerType + type: string + TrainingConfig: + description: Comprehensive configuration for the training process. + properties: + n_epochs: + title: N Epochs + type: integer + max_steps_per_epoch: + default: 1 + title: Max Steps Per Epoch + type: integer + gradient_accumulation_steps: + default: 1 + title: Gradient Accumulation Steps + type: integer + max_validation_steps: + anyOf: + - type: integer + - type: 'null' + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + title: DataConfig + - type: 'null' + nullable: true + title: DataConfig + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig - type: 'null' nullable: true - packed: + title: OptimizerConfig + efficiency_config: anyOf: - - type: boolean + - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig - type: 'null' - default: false - train_on_input: + nullable: true + title: EfficiencyConfig + dtype: anyOf: - - type: boolean + - type: string - type: 'null' - default: false + default: bf16 required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig + - n_epochs + title: TrainingConfig type: object - EfficiencyConfig: - description: Configuration for memory and compute efficiency optimizations. + PostTrainingJob: properties: - enable_activation_checkpointing: - anyOf: - - type: boolean - - type: 'null' - default: false - enable_activation_offloading: - anyOf: - - type: boolean - - type: 'null' - default: false - memory_efficient_fsdp_wrap: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + LoraFinetuningConfig: + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + properties: + type: + const: LoRA + default: LoRA + title: Type + type: string + lora_attn_modules: + items: + type: string + title: Lora Attn Modules + type: array + apply_lora_to_mlp: + title: Apply Lora To Mlp + type: boolean + apply_lora_to_output: + title: Apply Lora To Output + type: boolean + rank: + title: Rank + type: integer + alpha: + title: Alpha + type: integer + use_dora: anyOf: - type: boolean - type: 'null' default: false - fsdp_cpu_offload: + quantize_base: anyOf: - type: boolean - type: 'null' default: false - title: EfficiencyConfig + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig type: object - PostTrainingJob: + QATFinetuningConfig: + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: - job_uuid: - title: Job Uuid + type: + const: QAT + default: QAT + title: Type + type: string + quantizer_name: + title: Quantizer Name type: string + group_size: + title: Group Size + type: integer required: - - job_uuid - title: PostTrainingJob + - quantizer_name + - group_size + title: QATFinetuningConfig type: object - ListPostTrainingJobsResponse: + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + _URLOrData: + description: A URL or a base64 encoded string properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL data: - items: - $ref: '#/components/schemas/PostTrainingJob' - title: Data - type: array + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + nullable: true + title: _URLOrData + type: object + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object required: - - data - title: ListPostTrainingJobsResponse + - bnf + title: GrammarResponseFormat type: object - OptimizerType: - description: Available optimizer algorithms for training. - enum: - - adam - - adamw - - sgd - title: OptimizerType - type: string - OptimizerConfig: - description: Configuration parameters for the optimization algorithm. + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. properties: - optimizer_type: - $ref: '#/components/schemas/OptimizerType' - lr: - title: Lr - type: number - weight_decay: - title: Weight Decay - type: number - num_warmup_steps: - title: Num Warmup Steps - type: integer + type: + const: json_schema + default: json_schema + title: Type + type: string + json_schema: + additionalProperties: true + title: Json Schema + type: object required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig + - json_schema + title: JsonSchemaResponseFormat type: object - PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + MCPListToolsTool: + description: Tool definition returned by MCP list tools operation. properties: - job_uuid: - title: Job Uuid + input_schema: + additionalProperties: true + title: Input Schema + type: object + name: + title: Name type: string - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array + description: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - job_uuid - title: PostTrainingJobArtifactsResponse + - input_schema + - name + title: MCPListToolsTool type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. + OpenAIResponseOutputMessageFileSearchToolCallResults: + description: Search results returned by the file search operation. properties: - job_uuid: - title: Job Uuid + 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 - log_lines: - items: - type: string - title: Log Lines - type: array required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream + - attributes + - file_id + - filename + - score + - text + title: OpenAIResponseOutputMessageFileSearchToolCallResults type: object - PostTrainingJobStatusResponse: - description: Status of a finetuning job. + AllowedToolsFilter: + description: Filter configuration for restricting which MCP tools can be used. properties: - job_uuid: - title: Job Uuid - type: string - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - format: date-time - type: string - - type: 'null' - nullable: true - started_at: + tool_names: anyOf: - - format: date-time - type: string + - items: + type: string + type: array - type: 'null' nullable: true - completed_at: + title: AllowedToolsFilter + type: object + ApprovalFilter: + description: Filter configuration for MCP tool approval requirements. + properties: + always: anyOf: - - format: date-time - type: string + - items: + type: string + type: array - type: 'null' nullable: true - resources_allocated: + never: anyOf: - - additionalProperties: true - type: object + - items: + type: string + type: array - type: 'null' nullable: true - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse + title: ApprovalFilter type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - TrainingConfig: - description: Comprehensive configuration for the training process. + SearchRankingOptions: + description: Options for ranking and filtering search results. properties: - n_epochs: - title: N Epochs - type: integer - max_steps_per_epoch: - default: 1 - title: Max Steps Per Epoch - type: integer - gradient_accumulation_steps: - default: 1 - title: Gradient Accumulation Steps - type: integer - max_validation_steps: + ranker: anyOf: - - type: integer + - type: string - type: 'null' - default: 1 - data_config: + nullable: true + score_threshold: anyOf: - - $ref: '#/components/schemas/DataConfig' - title: DataConfig + - type: number - type: 'null' - nullable: true - title: DataConfig - optimizer_config: + default: 0.0 + title: SearchRankingOptions + type: object + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + OpenAIResponseTextFormat: + description: Configuration for Responses API text format. + properties: + type: + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text + name: anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - title: OptimizerConfig + - type: string - type: 'null' - nullable: true - title: OptimizerConfig - efficiency_config: + schema: anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - title: EfficiencyConfig + - additionalProperties: true + type: object - type: 'null' - nullable: true - title: EfficiencyConfig - dtype: + description: anyOf: - type: string - type: 'null' - default: bf16 - required: - - n_epochs - title: TrainingConfig - type: object - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. - properties: - job_uuid: - title: Job Uuid - type: string - finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id - type: string - validation_dataset_id: - title: Validation Dataset Id - type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - title: Hyperparam Search Config - type: object - logger_config: - additionalProperties: true - title: Logger Config - type: object - required: - - job_uuid - - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - - algorithm_config - - optimizer_config - - training_config - - hyperparam_search_config - - logger_config - title: PostTrainingRLHFRequest + strict: + anyOf: + - type: boolean + - type: 'null' + title: OpenAIResponseTextFormat type: object - Prompt: - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. + OpenAIResponseUsageInputTokensDetails: + description: Token details for input tokens in OpenAI response usage. properties: - prompt: + cached_tokens: anyOf: - - type: string + - type: integer - type: 'null' - description: The system prompt with variable placeholders nullable: true - version: - description: Version (integer starting at 1, incremented on save) - minimum: 1 - title: Version - type: integer - prompt_id: - description: Unique identifier in format 'pmpt_<48-digit-hash>' - title: Prompt Id - type: string - variables: - description: List of variable names that can be used in the prompt template - items: - type: string - title: Variables - type: array - is_default: - default: false - description: Boolean indicating whether this version is the default version - title: Is Default - type: boolean - required: - - version - - prompt_id - title: Prompt + title: OpenAIResponseUsageInputTokensDetails type: object - ListPromptsResponse: - description: Response model to list prompts. + OpenAIResponseUsageOutputTokensDetails: + description: Token details for output tokens in OpenAI response usage. properties: - data: - items: - $ref: '#/components/schemas/Prompt' - title: Data - type: array - required: - - data - title: ListPromptsResponse + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIResponseUsageOutputTokensDetails type: object - ProviderInfo: - description: Information about a registered provider including its configuration and health status. + SpanEndPayload: + description: Payload for a span end event. properties: - api: - title: Api - type: string - provider_id: - title: Provider Id - type: string - provider_type: - title: Provider Type + type: + const: span_end + default: span_end + title: Type type: string - config: - additionalProperties: true - title: Config - type: object - health: - additionalProperties: true - title: Health - type: object + status: + $ref: '#/components/schemas/SpanStatus' required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo + - status + title: SpanEndPayload type: object - ListProvidersResponse: - description: Response containing a list of all available providers. + SpanStartPayload: + description: Payload for a span start event. properties: - data: - items: - $ref: '#/components/schemas/ProviderInfo' - title: Data - type: array + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true required: - - data - title: ListProvidersResponse + - name + title: SpanStartPayload type: object - ModerationObjectResults: - description: A moderation object. + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. properties: - flagged: - title: Flagged - type: boolean - categories: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - type: boolean + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - category_applied_input_types: + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - items: - type: string - type: array + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - category_scores: + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - additionalProperties: - type: number + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - nullable: true - user_message: - anyOf: - - type: string - - type: 'null' - nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - flagged - title: ModerationObjectResults - type: object - ModerationObject: - description: A moderation object. - properties: - id: - title: Id + type: + const: unstructured_log + default: unstructured_log + title: Type type: string - model: - title: Model + message: + title: Message type: string - results: - items: - $ref: '#/components/schemas/ModerationObjectResults' - title: Results - type: array + severity: + $ref: '#/components/schemas/LogSeverity' required: - - id - - model - - results - title: ModerationObject + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent type: object - SafetyViolation: - description: Details of a safety violation detected by content moderation. + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + BatchError: + additionalProperties: true properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - user_message: + code: anyOf: - type: string - type: 'null' nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - violation_level - title: SafetyViolation - type: object - ViolationLevel: - description: Severity level of a safety violation. - enum: - - info - - warn - - error - title: ViolationLevel - type: string - RunShieldResponse: - description: Response from running a safety shield. - properties: - violation: + line: anyOf: - - $ref: '#/components/schemas/SafetyViolation' - title: SafetyViolation + - type: integer - type: 'null' nullable: true - title: SafetyViolation - title: RunShieldResponse - type: object - ScoreBatchResponse: - description: Response from batch scoring operations on datasets. - properties: - dataset_id: + message: anyOf: - type: string - type: 'null' nullable: true - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Results - type: object - required: - - results - title: ScoreBatchResponse + param: + anyOf: + - type: string + - type: 'null' + nullable: true + title: BatchError type: object - ScoreResponse: - description: The response from scoring. + BatchRequestCounts: + additionalProperties: true properties: - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - title: Results - type: object + completed: + title: Completed + type: integer + failed: + title: Failed + type: integer + total: + title: Total + type: integer required: - - results - title: ScoreResponse + - completed + - failed + - total + title: BatchRequestCounts type: object - ListScoringFunctionsResponse: + BatchUsage: + additionalProperties: true properties: - data: - items: - $ref: '#/components/schemas/ScoringFn' - title: Data - type: array + input_tokens: + title: Input Tokens + type: integer + input_tokens_details: + $ref: '#/components/schemas/InputTokensDetails' + output_tokens: + title: Output Tokens + type: integer + output_tokens_details: + $ref: '#/components/schemas/OutputTokensDetails' + total_tokens: + title: Total Tokens + type: integer required: - - data - title: ListScoringFunctionsResponse + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage type: object - ListShieldsResponse: + Errors: + additionalProperties: true properties: data: - items: - $ref: '#/components/schemas/Shield' - title: Data - type: array - required: - - data - title: ListShieldsResponse - type: object - ToolDef: - description: Tool definition used in runtime contexts. - properties: - toolgroup_id: anyOf: - - type: string + - items: + $ref: '#/components/schemas/BatchError' + type: array - type: 'null' nullable: true - name: - title: Name - type: string - description: + object: anyOf: - type: string - type: 'null' nullable: true - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true + title: Errors + type: object + InputTokensDetails: + additionalProperties: true + properties: + cached_tokens: + title: Cached Tokens + type: integer required: - - name - title: ToolDef + - cached_tokens + title: InputTokensDetails type: object - ListToolDefsResponse: - description: Response containing a list of tool definitions. + OutputTokensDetails: + additionalProperties: true properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - title: Data - type: array + reasoning_tokens: + title: Reasoning Tokens + type: integer + required: + - reasoning_tokens + title: OutputTokensDetails + type: object + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string required: - - data - title: ListToolDefsResponse + - image + title: ImageDelta type: object - ListToolGroupsResponse: - description: Response containing a list of tool groups. + TextDelta: + description: A text content delta for streaming responses. properties: - data: - items: - $ref: '#/components/schemas/ToolGroup' - title: Data - type: array + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string required: - - data - title: ListToolGroupsResponse + - text + title: TextDelta type: object - ToolGroupInput: - description: Input data for registering a tool group. + JobStatus: + description: Status of a job execution. + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + type: string + MetricInResponse: + description: A metric value included in API responses. properties: - toolgroup_id: - title: Toolgroup Id - type: string - provider_id: - title: Provider Id + metric: + title: Metric type: string - args: + value: anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: + - type: integer + - type: number + title: integer | number + unit: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string - type: 'null' nullable: true - title: URL required: - - toolgroup_id - - provider_id - title: ToolGroupInput + - metric + - value + title: MetricInResponse type: object - ToolInvocationResult: - description: Result of a tool invocation. + DialogType: + description: Parameter type for dialog data with semantic output labels. properties: - content: - anyOf: - - type: string - - discriminator: + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true - error_message: - anyOf: - - type: string - - type: 'null' - nullable: true - error_code: - anyOf: - - type: integer - - type: 'null' - nullable: true - metadata: - anyOf: - - additionalProperties: true + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array + required: + - items + title: ConversationItemCreateRequest + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true type: object - - type: 'null' - nullable: true - title: ToolInvocationResult + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage 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. + DatasetPurpose: + description: Purpose of the dataset. Each purpose has a required input data schema. + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + title: DatasetPurpose + type: string + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + InlineProviderSpec: properties: - chunk_id: - anyOf: - - type: string - - type: 'null' - nullable: true - document_id: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - source: + deprecation_error: anyOf: - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - created_timestamp: - anyOf: - - type: integer - - type: 'null' - nullable: true - updated_timestamp: - anyOf: - - type: integer - - type: 'null' - nullable: true - chunk_window: + module: anyOf: - type: string - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - chunk_tokenizer: + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - type: string - type: 'null' nullable: true - chunk_embedding_model: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: anyOf: - type: string - type: 'null' + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. nullable: true - chunk_embedding_dimension: - anyOf: - - type: integer - - type: 'null' - nullable: true - content_token_count: - anyOf: - - type: integer - - type: 'null' - nullable: true - metadata_token_count: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: ChunkMetadata - type: object - Chunk: - description: A chunk of content that can be inserted into a vector database. - properties: - content: + description: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id - type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. nullable: true - title: ChunkMetadata required: - - content - - chunk_id - title: Chunk + - api + - provider_type + - config_class + title: InlineProviderSpec type: object - OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store file batch with extra_body support. + ProviderSpec: properties: - file_ids: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality items: - type: string - title: File Ids + $ref: '#/components/schemas/Api' + title: Api Dependencies type: array - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - chunking_strategy: - anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - nullable: true - required: - - file_ids - title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - type: object - OpenAICreateVectorStoreRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store with extra_body support. - properties: - name: + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - file_ids: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - expires_after: + deprecation_error: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - chunking_strategy: + module: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: string - type: 'null' - title: Chunking Strategy + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - metadata: + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - title: OpenAICreateVectorStoreRequestWithExtraBody - type: object - QueryChunksResponse: - description: Response from querying chunks in a vector database. - properties: - chunks: - items: - $ref: '#/components/schemas/Chunk' - title: Chunks - type: array - scores: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: items: - type: number - title: Scores + type: string + title: Deps type: array required: - - chunks - - scores - title: QueryChunksResponse + - api + - provider_type + - config_class + title: ProviderSpec type: object - VectorStoreContent: - description: Content item from a vector store file or search result. + RemoteProviderSpec: properties: - type: - const: text - title: Type + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - text: - title: Text + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class type: string - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: string - type: 'null' + description: If this provider is deprecated, specify the warning message here nullable: true - title: ChunkMetadata - metadata: + deprecation_error: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here nullable: true - required: - - type - - text - title: VectorStoreContent - type: object - VectorStoreCreateRequest: - description: Request to create a vector store. - properties: - name: + module: anyOf: - type: string - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true - file_ids: + pip_packages: + description: The pip dependencies needed for this implementation items: type: string - title: File Ids + title: Pip Packages type: array - expires_after: + provider_data_validator: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' nullable: true - chunking_strategy: + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type + type: string + description: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - title: VectorStoreCreateRequest + required: + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec type: object - VectorStoreDeleteResponse: - description: Response from deleting a vector store. + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). properties: - id: - title: Id - type: string - object: - default: vector_store.deleted - title: Object + type: + const: bf16 + default: bf16 + title: Type type: string - deleted: - default: true - title: Deleted - type: boolean - required: - - id - title: VectorStoreDeleteResponse + title: Bf16QuantizationConfig type: object - VectorStoreFileCounts: - description: File processing status counts for a vector store. + EmbeddingsResponse: + description: Response containing generated embeddings. 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 + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts + - embeddings + title: EmbeddingsResponse type: object - VectorStoreFileBatchObject: - description: OpenAI Vector Store File Batch object. + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. 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: - title: Status + type: + const: fp8_mixed + default: fp8_mixed + title: Type type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - required: - - id - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject + title: Fp8QuantizationConfig type: object - VectorStoreFileContentResponse: - description: Represents the parsed content of a vector store file. + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. properties: - object: - const: vector_store.file_content.page - default: vector_store.file_content.page - title: Object + type: + const: int4_mixed + default: int4_mixed + title: Type type: string - data: - items: - $ref: '#/components/schemas/VectorStoreContent' - title: Data - type: array - has_more: - default: false - title: Has More - type: boolean - next_page: + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig + type: object + OpenAIChatCompletionUsageCompletionTokensDetails: + description: Token details for output tokens in OpenAI chat completion usage. + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + nullable: true + title: OpenAIChatCompletionUsageCompletionTokensDetails + type: object + OpenAIChatCompletionUsagePromptTokensDetails: + description: Token details for prompt tokens in OpenAI chat completion usage. + properties: + cached_tokens: anyOf: - - type: string + - type: integer - type: 'null' nullable: true - required: - - data - title: VectorStoreFileContentResponse + title: OpenAIChatCompletionUsagePromptTokensDetails type: object - VectorStoreFileDeleteResponse: - description: Response from deleting a vector store file. + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens 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 + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs type: object - VectorStoreFileLastError: - description: Error information for failed vector store file processing. + TokenLogProbs: + description: Log probabilities for generated tokens. properties: - code: - title: Code - type: string - enum: - - server_error - - rate_limit_exceeded - default: server_error - message: - title: Message - type: string + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object required: - - code - - message - title: VectorStoreFileLastError + - logprobs_by_token + title: TokenLogProbs type: object - VectorStoreFileObject: - description: OpenAI Vector Store File object. + ToolResponseMessage: + description: A message representing the result of a tool invocation. properties: - id: - title: Id + role: + const: tool + default: tool + title: Role type: string - object: - default: vector_store.file - title: Object + call_id: + title: Call Id type: string - attributes: - additionalProperties: true - title: Attributes - type: object - chunking_strategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - created_at: - title: Created At - type: integer - last_error: + content: anyOf: - - $ref: '#/components/schemas/VectorStoreFileLastError' - title: VectorStoreFileLastError - - type: 'null' - nullable: true - title: VectorStoreFileLastError - status: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - vector_store_id: - title: Vector Store Id - type: string + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - - id - - chunking_strategy - - created_at - - status - - vector_store_id - title: VectorStoreFileObject + - call_id + - content + title: ToolResponseMessage type: object - VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. + UserMessage: + description: A message from the user in a chat conversation. properties: - object: - default: list - title: Object + role: + const: user + default: user + title: Role type: string - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data - type: array - first_id: + content: anyOf: - type: string - - type: 'null' - nullable: true - last_id: + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: anyOf: - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] - type: 'null' + title: string | list[ImageContentItem | TextContentItem] nullable: true - has_more: - default: false - title: Has More - type: boolean required: - - data - title: VectorStoreFilesListInBatchResponse + - content + title: UserMessage type: object - VectorStoreListFilesResponse: - description: Response from listing files in a vector store. + HealthStatus: + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + type: string + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: - object: - default: list - title: Object + job_uuid: + title: Job Uuid type: string - data: + log_lines: items: - $ref: '#/components/schemas/VectorStoreFileObject' - title: Data + type: string + title: Log Lines type: array - first_id: + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream + type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. + properties: + job_uuid: + title: Job Uuid + type: string + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id + type: string + provider_id: + title: Provider Id + type: string + args: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' nullable: true - last_id: + mcp_endpoint: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' nullable: true - has_more: - default: false - title: Has More - type: boolean + title: URL required: - - data - title: VectorStoreListFilesResponse + - toolgroup_id + - provider_id + title: ToolGroupInput type: object - VectorStoreObject: - description: OpenAI Vector Store object. + VectorStoreCreateRequest: + description: Request to create a 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' nullable: true - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - status: - default: completed - title: Status - type: string + file_ids: + items: + type: string + title: File Ids + type: array expires_after: anyOf: - additionalProperties: true type: object - type: 'null' nullable: true - expires_at: - anyOf: - - type: integer - - type: 'null' - nullable: true - last_active_at: + chunking_strategy: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' nullable: true metadata: additionalProperties: true title: Metadata type: object - required: - - id - - created_at - - file_counts - title: VectorStoreObject - type: object - VectorStoreListResponse: - description: Response from listing vector stores. - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - nullable: true - last_id: - anyOf: - - type: string - - type: 'null' - nullable: true - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListResponse + title: VectorStoreCreateRequest type: object VectorStoreModifyRequest: description: Request to modify a vector store. @@ -11027,69 +11093,3 @@ components: - query title: VectorStoreSearchRequest type: object - VectorStoreSearchResponse: - description: Response from searching a vector store. - 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 - title: string | number | boolean - type: object - - type: 'null' - nullable: true - content: - items: - $ref: '#/components/schemas/VectorStoreContent' - title: Content - type: array - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - type: object - VectorStoreSearchResponsePage: - description: Paginated response from searching a vector store. - properties: - object: - default: vector_store.search_results.page - title: Object - type: string - search_query: - items: - type: string - title: Search Query - type: array - data: - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - title: Data - type: array - has_more: - default: false - title: Has More - type: boolean - next_page: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - search_query - - data - title: VectorStoreSearchResponsePage - type: object diff --git a/scripts/openapi_generator/_legacy_order.py b/scripts/openapi_generator/_legacy_order.py new file mode 100644 index 0000000000..254243d81c --- /dev/null +++ b/scripts/openapi_generator/_legacy_order.py @@ -0,0 +1,410 @@ +#!/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. + +""" +Temporary ordering helpers extracted from origin/main client-sdks/stainless/openapi.yml. + +These lists help the new generator match the previous ordering so that diffs +remain readable while we debug schema content regressions. Remove once stable. +""" + +# TODO: remove once generator output stabilizes +LEGACY_PATH_ORDER = ['/v1/batches', + '/v1/batches/{batch_id}', + '/v1/batches/{batch_id}/cancel', + '/v1/chat/completions', + '/v1/chat/completions/{completion_id}', + '/v1/completions', + '/v1/conversations', + '/v1/conversations/{conversation_id}', + '/v1/conversations/{conversation_id}/items', + '/v1/conversations/{conversation_id}/items/{item_id}', + '/v1/embeddings', + '/v1/files', + '/v1/files/{file_id}', + '/v1/files/{file_id}/content', + '/v1/health', + '/v1/inspect/routes', + '/v1/models', + '/v1/models/{model_id}', + '/v1/moderations', + '/v1/prompts', + '/v1/prompts/{prompt_id}', + '/v1/prompts/{prompt_id}/set-default-version', + '/v1/prompts/{prompt_id}/versions', + '/v1/providers', + '/v1/providers/{provider_id}', + '/v1/responses', + '/v1/responses/{response_id}', + '/v1/responses/{response_id}/input_items', + '/v1/safety/run-shield', + '/v1/scoring-functions', + '/v1/scoring-functions/{scoring_fn_id}', + '/v1/scoring/score', + '/v1/scoring/score-batch', + '/v1/shields', + '/v1/shields/{identifier}', + '/v1/tool-runtime/invoke', + '/v1/tool-runtime/list-tools', + '/v1/toolgroups', + '/v1/toolgroups/{toolgroup_id}', + '/v1/tools', + '/v1/tools/{tool_name}', + '/v1/vector-io/insert', + '/v1/vector-io/query', + '/v1/vector_stores', + '/v1/vector_stores/{vector_store_id}', + '/v1/vector_stores/{vector_store_id}/file_batches', + '/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}', + '/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel', + '/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files', + '/v1/vector_stores/{vector_store_id}/files', + '/v1/vector_stores/{vector_store_id}/files/{file_id}', + '/v1/vector_stores/{vector_store_id}/files/{file_id}/content', + '/v1/vector_stores/{vector_store_id}/search', + '/v1/version', + '/v1beta/datasetio/append-rows/{dataset_id}', + '/v1beta/datasetio/iterrows/{dataset_id}', + '/v1beta/datasets', + '/v1beta/datasets/{dataset_id}', + '/v1alpha/eval/benchmarks', + '/v1alpha/eval/benchmarks/{benchmark_id}', + '/v1alpha/eval/benchmarks/{benchmark_id}/evaluations', + '/v1alpha/eval/benchmarks/{benchmark_id}/jobs', + '/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}', + '/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result', + '/v1alpha/inference/rerank', + '/v1alpha/post-training/job/artifacts', + '/v1alpha/post-training/job/cancel', + '/v1alpha/post-training/job/status', + '/v1alpha/post-training/jobs', + '/v1alpha/post-training/preference-optimize', + '/v1alpha/post-training/supervised-fine-tune'] + +LEGACY_SCHEMA_ORDER = ['Error', + 'ListBatchesResponse', + 'CreateBatchRequest', + 'Batch', + 'Order', + 'ListOpenAIChatCompletionResponse', + 'OpenAIAssistantMessageParam', + 'OpenAIChatCompletionContentPartImageParam', + 'OpenAIChatCompletionContentPartParam', + 'OpenAIChatCompletionContentPartTextParam', + 'OpenAIChatCompletionToolCall', + 'OpenAIChatCompletionToolCallFunction', + 'OpenAIChatCompletionUsage', + 'OpenAIChoice', + 'OpenAIChoiceLogprobs', + 'OpenAIDeveloperMessageParam', + 'OpenAIFile', + 'OpenAIFileFile', + 'OpenAIImageURL', + 'OpenAIMessageParam', + 'OpenAISystemMessageParam', + 'OpenAITokenLogProb', + 'OpenAIToolMessageParam', + 'OpenAITopLogProb', + 'OpenAIUserMessageParam', + 'OpenAIJSONSchema', + 'OpenAIResponseFormatJSONObject', + 'OpenAIResponseFormatJSONSchema', + 'OpenAIResponseFormatParam', + 'OpenAIResponseFormatText', + 'OpenAIChatCompletionRequestWithExtraBody', + 'OpenAIChatCompletion', + 'OpenAIChatCompletionChunk', + 'OpenAIChoiceDelta', + 'OpenAIChunkChoice', + 'OpenAICompletionWithInputMessages', + 'OpenAICompletionRequestWithExtraBody', + 'OpenAICompletion', + 'OpenAICompletionChoice', + 'ConversationItem', + 'OpenAIResponseAnnotationCitation', + 'OpenAIResponseAnnotationContainerFileCitation', + 'OpenAIResponseAnnotationFileCitation', + 'OpenAIResponseAnnotationFilePath', + 'OpenAIResponseAnnotations', + 'OpenAIResponseContentPartRefusal', + 'OpenAIResponseInputFunctionToolCallOutput', + 'OpenAIResponseInputMessageContent', + 'OpenAIResponseInputMessageContentFile', + 'OpenAIResponseInputMessageContentImage', + 'OpenAIResponseInputMessageContentText', + 'OpenAIResponseMCPApprovalRequest', + 'OpenAIResponseMCPApprovalResponse', + 'OpenAIResponseMessage', + 'OpenAIResponseOutputMessageContent', + 'OpenAIResponseOutputMessageContentOutputText', + 'OpenAIResponseOutputMessageFileSearchToolCall', + 'OpenAIResponseOutputMessageFunctionToolCall', + 'OpenAIResponseOutputMessageMCPCall', + 'OpenAIResponseOutputMessageMCPListTools', + 'OpenAIResponseOutputMessageWebSearchToolCall', + 'CreateConversationRequest', + 'Conversation', + 'UpdateConversationRequest', + 'ConversationDeletedResource', + 'ConversationItemList', + 'AddItemsRequest', + 'ConversationItemDeletedResource', + 'OpenAIEmbeddingsRequestWithExtraBody', + 'OpenAIEmbeddingData', + 'OpenAIEmbeddingUsage', + 'OpenAIEmbeddingsResponse', + 'OpenAIFilePurpose', + 'ListOpenAIFileResponse', + 'OpenAIFileObject', + 'ExpiresAfter', + 'OpenAIFileDeleteResponse', + 'Response', + 'HealthInfo', + 'RouteInfo', + 'ListRoutesResponse', + 'OpenAIModel', + 'OpenAIListModelsResponse', + 'Model', + 'ModelType', + 'RunModerationRequest', + 'ModerationObject', + 'ModerationObjectResults', + 'Prompt', + 'ListPromptsResponse', + 'CreatePromptRequest', + 'UpdatePromptRequest', + 'SetDefaultVersionRequest', + 'ProviderInfo', + 'ListProvidersResponse', + 'ListOpenAIResponseObject', + 'OpenAIResponseError', + 'OpenAIResponseInput', + 'OpenAIResponseInputToolFileSearch', + 'OpenAIResponseInputToolFunction', + 'OpenAIResponseInputToolWebSearch', + 'OpenAIResponseObjectWithInput', + 'OpenAIResponseOutput', + 'OpenAIResponsePrompt', + 'OpenAIResponseText', + 'OpenAIResponseTool', + 'OpenAIResponseToolMCP', + 'OpenAIResponseUsage', + 'ResponseGuardrailSpec', + 'OpenAIResponseInputTool', + 'OpenAIResponseInputToolMCP', + 'CreateOpenaiResponseRequest', + 'OpenAIResponseObject', + 'OpenAIResponseContentPartOutputText', + 'OpenAIResponseContentPartReasoningSummary', + 'OpenAIResponseContentPartReasoningText', + 'OpenAIResponseObjectStream', + 'OpenAIResponseObjectStreamResponseCompleted', + 'OpenAIResponseObjectStreamResponseContentPartAdded', + 'OpenAIResponseObjectStreamResponseContentPartDone', + 'OpenAIResponseObjectStreamResponseCreated', + 'OpenAIResponseObjectStreamResponseFailed', + 'OpenAIResponseObjectStreamResponseFileSearchCallCompleted', + 'OpenAIResponseObjectStreamResponseFileSearchCallInProgress', + 'OpenAIResponseObjectStreamResponseFileSearchCallSearching', + 'OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta', + 'OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone', + 'OpenAIResponseObjectStreamResponseInProgress', + 'OpenAIResponseObjectStreamResponseIncomplete', + 'OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta', + 'OpenAIResponseObjectStreamResponseMcpCallArgumentsDone', + 'OpenAIResponseObjectStreamResponseMcpCallCompleted', + 'OpenAIResponseObjectStreamResponseMcpCallFailed', + 'OpenAIResponseObjectStreamResponseMcpCallInProgress', + 'OpenAIResponseObjectStreamResponseMcpListToolsCompleted', + 'OpenAIResponseObjectStreamResponseMcpListToolsFailed', + 'OpenAIResponseObjectStreamResponseMcpListToolsInProgress', + 'OpenAIResponseObjectStreamResponseOutputItemAdded', + 'OpenAIResponseObjectStreamResponseOutputItemDone', + 'OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded', + 'OpenAIResponseObjectStreamResponseOutputTextDelta', + 'OpenAIResponseObjectStreamResponseOutputTextDone', + 'OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded', + 'OpenAIResponseObjectStreamResponseReasoningSummaryPartDone', + 'OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta', + 'OpenAIResponseObjectStreamResponseReasoningSummaryTextDone', + 'OpenAIResponseObjectStreamResponseReasoningTextDelta', + 'OpenAIResponseObjectStreamResponseReasoningTextDone', + 'OpenAIResponseObjectStreamResponseRefusalDelta', + 'OpenAIResponseObjectStreamResponseRefusalDone', + 'OpenAIResponseObjectStreamResponseWebSearchCallCompleted', + 'OpenAIResponseObjectStreamResponseWebSearchCallInProgress', + 'OpenAIResponseObjectStreamResponseWebSearchCallSearching', + 'OpenAIDeleteResponseObject', + 'ListOpenAIResponseInputItem', + 'RunShieldRequest', + 'RunShieldResponse', + 'SafetyViolation', + 'ViolationLevel', + 'AggregationFunctionType', + 'ArrayType', + 'BasicScoringFnParams', + 'BooleanType', + 'ChatCompletionInputType', + 'CompletionInputType', + 'JsonType', + 'LLMAsJudgeScoringFnParams', + 'NumberType', + 'ObjectType', + 'RegexParserScoringFnParams', + 'ScoringFn', + 'ScoringFnParams', + 'ScoringFnParamsType', + 'StringType', + 'UnionType', + 'ListScoringFunctionsResponse', + 'ScoreRequest', + 'ScoreResponse', + 'ScoringResult', + 'ScoreBatchRequest', + 'ScoreBatchResponse', + 'Shield', + 'ListShieldsResponse', + 'InvokeToolRequest', + 'ImageContentItem', + 'InterleavedContent', + 'InterleavedContentItem', + 'TextContentItem', + 'ToolInvocationResult', + 'URL', + 'ToolDef', + 'ListToolDefsResponse', + 'ToolGroup', + 'ListToolGroupsResponse', + 'Chunk', + 'ChunkMetadata', + 'InsertChunksRequest', + 'QueryChunksRequest', + 'QueryChunksResponse', + 'VectorStoreFileCounts', + 'VectorStoreListResponse', + 'VectorStoreObject', + 'VectorStoreChunkingStrategy', + 'VectorStoreChunkingStrategyAuto', + 'VectorStoreChunkingStrategyStatic', + 'VectorStoreChunkingStrategyStaticConfig', + 'OpenAICreateVectorStoreRequestWithExtraBody', + 'OpenaiUpdateVectorStoreRequest', + 'VectorStoreDeleteResponse', + 'OpenAICreateVectorStoreFileBatchRequestWithExtraBody', + 'VectorStoreFileBatchObject', + 'VectorStoreFileStatus', + 'VectorStoreFileLastError', + 'VectorStoreFileObject', + 'VectorStoreFilesListInBatchResponse', + 'VectorStoreListFilesResponse', + 'OpenaiAttachFileToVectorStoreRequest', + 'OpenaiUpdateVectorStoreFileRequest', + 'VectorStoreFileDeleteResponse', + 'bool', + 'VectorStoreContent', + 'VectorStoreFileContentResponse', + 'OpenaiSearchVectorStoreRequest', + 'VectorStoreSearchResponse', + 'VectorStoreSearchResponsePage', + 'VersionInfo', + 'AppendRowsRequest', + 'PaginatedResponse', + 'Dataset', + 'RowsDataSource', + 'URIDataSource', + 'ListDatasetsResponse', + 'Benchmark', + 'ListBenchmarksResponse', + 'BenchmarkConfig', + 'GreedySamplingStrategy', + 'ModelCandidate', + 'SamplingParams', + 'SystemMessage', + 'TopKSamplingStrategy', + 'TopPSamplingStrategy', + 'EvaluateRowsRequest', + 'EvaluateResponse', + 'RunEvalRequest', + 'Job', + 'RerankRequest', + 'RerankData', + 'RerankResponse', + 'Checkpoint', + 'PostTrainingJobArtifactsResponse', + 'PostTrainingMetric', + 'CancelTrainingJobRequest', + 'PostTrainingJobStatusResponse', + 'ListPostTrainingJobsResponse', + 'DPOAlignmentConfig', + 'DPOLossType', + 'DataConfig', + 'DatasetFormat', + 'EfficiencyConfig', + 'OptimizerConfig', + 'OptimizerType', + 'TrainingConfig', + 'PreferenceOptimizeRequest', + 'PostTrainingJob', + 'AlgorithmConfig', + 'LoraFinetuningConfig', + 'QATFinetuningConfig', + 'SupervisedFineTuneRequest', + 'RegisterModelRequest', + 'ParamType', + 'RegisterScoringFunctionRequest', + 'RegisterShieldRequest', + 'RegisterToolGroupRequest', + 'DataSource', + 'RegisterDatasetRequest', + 'RegisterBenchmarkRequest'] + +LEGACY_RESPONSE_ORDER = ['BadRequest400', 'TooManyRequests429', 'InternalServerError500', 'DefaultError'] + +LEGACY_TAG_ORDER = ['Agents', + 'Batches', + 'Benchmarks', + 'Conversations', + 'DatasetIO', + 'Datasets', + 'Eval', + 'Files', + 'Inference', + 'Inspect', + 'Models', + 'PostTraining (Coming Soon)', + 'Prompts', + 'Providers', + 'Safety', + 'Scoring', + 'ScoringFunctions', + 'Shields', + 'ToolGroups', + 'ToolRuntime', + 'VectorIO'] + +LEGACY_TAG_GROUPS = [{'name': 'Operations', + 'tags': ['Agents', + 'Batches', + 'Benchmarks', + 'Conversations', + 'DatasetIO', + 'Datasets', + 'Eval', + 'Files', + 'Inference', + 'Inspect', + 'Models', + 'PostTraining (Coming Soon)', + 'Prompts', + 'Providers', + 'Safety', + 'Scoring', + 'ScoringFunctions', + 'Shields', + 'ToolGroups', + 'ToolRuntime', + 'VectorIO']}] diff --git a/scripts/openapi_generator/main.py b/scripts/openapi_generator/main.py index e5949933d8..6231557847 100755 --- a/scripts/openapi_generator/main.py +++ b/scripts/openapi_generator/main.py @@ -141,6 +141,7 @@ def generate_openapi_spec(output_dir: str) -> dict[str, Any]: for schema, _ in schemas_to_validate: schema_transforms._fix_schema_issues(schema) + schema_transforms._apply_legacy_sorting(schema) print("\n🔍 Validating generated schemas...") failed_schemas = [ diff --git a/scripts/openapi_generator/schema_transforms.py b/scripts/openapi_generator/schema_transforms.py index 0be9874bbe..bd8cad64a6 100644 --- a/scripts/openapi_generator/schema_transforms.py +++ b/scripts/openapi_generator/schema_transforms.py @@ -9,6 +9,7 @@ """ import copy +from collections import OrderedDict from pathlib import Path from typing import Any @@ -17,6 +18,13 @@ from openapi_spec_validator.exceptions import OpenAPISpecValidatorError from . import endpoints, schema_collection +from ._legacy_order import ( + LEGACY_PATH_ORDER, + LEGACY_RESPONSE_ORDER, + LEGACY_SCHEMA_ORDER, + LEGACY_TAG_GROUPS, + LEGACY_TAG_ORDER, +) from .state import _extra_body_fields @@ -821,6 +829,62 @@ def _write_yaml_file(file_path: Path, schema: dict[str, Any]) -> None: f.writelines(cleaned_lines) +def _apply_legacy_sorting(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Temporarily match the legacy ordering from origin/main so diffs are easier to read. + Remove this once the generator output stabilizes and we no longer need legacy diffs. + """ + + def order_mapping(data: dict[str, Any], priority: list[str]) -> OrderedDict[str, Any]: + ordered: OrderedDict[str, Any] = OrderedDict() + for key in priority: + if key in data: + ordered[key] = data[key] + for key, value in data.items(): + if key not in ordered: + ordered[key] = value + return ordered + + paths = openapi_schema.get("paths") + if isinstance(paths, dict): + openapi_schema["paths"] = order_mapping(paths, LEGACY_PATH_ORDER) + + components = openapi_schema.setdefault("components", {}) + schemas = components.get("schemas") + if isinstance(schemas, dict): + components["schemas"] = order_mapping(schemas, LEGACY_SCHEMA_ORDER) + responses = components.get("responses") + if isinstance(responses, dict): + components["responses"] = order_mapping(responses, LEGACY_RESPONSE_ORDER) + + tags = openapi_schema.get("tags") + if isinstance(tags, list): + tag_priority = {name: idx for idx, name in enumerate(LEGACY_TAG_ORDER)} + + def tag_sort(tag_obj: dict[str, Any]) -> tuple[int, int | str]: + name = tag_obj.get("name", "") + if name in tag_priority: + return (0, tag_priority[name]) + return (1, name) + + openapi_schema["tags"] = sorted(tags, key=tag_sort) + + tag_groups = openapi_schema.get("x-tagGroups") + if isinstance(tag_groups, list) and LEGACY_TAG_GROUPS: + legacy_tags = LEGACY_TAG_GROUPS[0].get("tags", []) + tag_priority = {name: idx for idx, name in enumerate(legacy_tags)} + for group in tag_groups: + group_tags = group.get("tags") + if isinstance(group_tags, list): + group["tags"] = sorted( + group_tags, + key=lambda name: (0, tag_priority[name]) if name in tag_priority else (1, name), + ) + openapi_schema["x-tagGroups"] = tag_groups + + return openapi_schema + + def _fix_schema_issues(openapi_schema: dict[str, Any]) -> dict[str, Any]: """Fix common schema issues: exclusiveMinimum, null defaults, and add titles to unions.""" # Convert anyOf with const values to enums across the entire schema From 5293b4e5e9fe9748573d9af74d5e16ab1baf9d9b Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Fri, 14 Nov 2025 13:07:34 -0800 Subject: [PATCH 42/46] schema naming cleanup, should be much closer --- client-sdks/stainless/openapi.yml | 7187 +++++++++++------ docs/static/deprecated-llama-stack-spec.yaml | 5064 +++++++----- .../static/experimental-llama-stack-spec.yaml | 4142 +++++----- docs/static/llama-stack-spec.yaml | 6336 +++++++++------ docs/static/stainless-llama-stack-spec.yaml | 7187 +++++++++++------ scripts/openapi_generator/_legacy_order.py | 65 +- scripts/openapi_generator/app.py | 2 +- scripts/openapi_generator/endpoints.py | 136 +- scripts/openapi_generator/main.py | 27 +- .../openapi_generator/schema_transforms.py | 62 +- scripts/openapi_generator/state.py | 18 + 11 files changed, 19064 insertions(+), 11162 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index d5324828a2..1a55e80b60 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -16,63 +16,86 @@ servers: paths: /v1/batches: get: - tags: - - Batches - summary: List Batches - operationId: list_batches_v1_batches_get responses: '200': - description: Successful Response + description: A list of batch objects. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListBatchesResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Batches - summary: Create Batch - operationId: create_batch_v1_batches_post + summary: List Batches + description: List all batches for the current user. + operationId: list_batches_v1_batches_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + post: responses: '200': - description: Successful Response + description: The created batch object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Batch' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/batches/{batch_id}: - get: + description: Default Response tags: - Batches - summary: Retrieve Batch - operationId: retrieve_batch_v1_batches__batch_id__get + summary: Create Batch + description: Create a new batch for processing multiple API requests. + operationId: create_batch_v1_batches_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BatchesPostRequest' + /v1/batches/{batch_id}: + get: responses: '200': - description: Successful Response + description: The batch object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Batch' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -85,6 +108,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Batches + summary: Retrieve Batch + description: Retrieve information about a specific batch. + operationId: retrieve_batch_v1_batches__batch_id__get parameters: - name: batch_id in: path @@ -94,16 +122,13 @@ paths: description: 'Path parameter: batch_id' /v1/batches/{batch_id}/cancel: post: - tags: - - Batches - summary: Cancel Batch - operationId: cancel_batch_v1_batches__batch_id__cancel_post responses: '200': - description: Successful Response + description: The updated batch object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Batch' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -116,6 +141,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Batches + summary: Cancel Batch + description: Cancel a batch that is in progress. + operationId: cancel_batch_v1_batches__batch_id__cancel_post parameters: - name: batch_id in: path @@ -125,63 +155,111 @@ paths: description: 'Path parameter: batch_id' /v1/chat/completions: get: - tags: - - Inference - summary: List Chat Completions - operationId: list_chat_completions_v1_chat_completions_get responses: '200': - description: Successful Response + description: A ListOpenAIChatCompletionResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Inference - summary: Openai Chat Completion - operationId: openai_chat_completion_v1_chat_completions_post + summary: List Chat Completions + description: List chat completions. + operationId: list_chat_completions_v1_chat_completions_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + post: responses: '200': - description: Successful Response + description: An OpenAIChatCompletion. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIChatCompletion' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionChunk' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/chat/completions/{completion_id}: - get: + description: Default Response tags: - Inference - summary: Get Chat Completion - operationId: get_chat_completion_v1_chat_completions__completion_id__get + summary: Openai Chat Completion + description: |- + Create chat completions. + + Generate an OpenAI-compatible chat completion for the given messages using the specified model. + operationId: openai_chat_completion_v1_chat_completions_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody' + /v1/chat/completions/{completion_id}: + get: responses: '200': - description: Successful Response + description: A OpenAICompletionWithInputMessages. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -194,6 +272,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: Get Chat Completion + description: |- + Get chat completion. + + Describe a chat completion by its ID. + operationId: get_chat_completion_v1_chat_completions__completion_id__get parameters: - name: completion_id in: path @@ -203,16 +289,13 @@ paths: description: 'Path parameter: completion_id' /v1/completions: post: - tags: - - Inference - summary: Openai Completion - operationId: openai_completion_v1_completions_post responses: '200': - description: Successful Response + description: An OpenAICompletion. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAICompletion' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -225,18 +308,29 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: Openai Completion + description: |- + Create completion. + + Generate an OpenAI-compatible completion for the given prompt using the specified model. + operationId: openai_completion_v1_completions_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' + required: true /v1/conversations: post: - tags: - - Conversations - summary: Create Conversation - operationId: create_conversation_v1_conversations_post responses: '200': - description: Successful Response + description: The created conversation object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Conversation' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -249,18 +343,29 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/conversations/{conversation_id}: - get: tags: - Conversations - summary: Get Conversation - operationId: get_conversation_v1_conversations__conversation_id__get + summary: Create Conversation + description: |- + Create a conversation. + + Create a conversation. + operationId: create_conversation_v1_conversations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationsPostRequest' + required: true + /v1/conversations/{conversation_id}: + get: responses: '200': - description: Successful Response + description: The conversation object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Conversation' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -273,6 +378,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Get Conversation + description: |- + Retrieve a conversation. + + Get a conversation with the given ID. + operationId: get_conversation_v1_conversations__conversation_id__get parameters: - name: conversation_id in: path @@ -281,16 +394,13 @@ paths: type: string description: 'Path parameter: conversation_id' post: - tags: - - Conversations - summary: Update Conversation - operationId: update_conversation_v1_conversations__conversation_id__post responses: '200': - description: Successful Response + description: The updated conversation object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Conversation' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -303,6 +413,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Update Conversation + description: |- + Update a conversation. + + Update a conversation's metadata with the given ID. + operationId: update_conversation_v1_conversations__conversation_id__post parameters: - name: conversation_id in: path @@ -310,17 +428,20 @@ paths: schema: type: string description: 'Path parameter: conversation_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationsByConversationIdPostRequest' + required: true delete: - tags: - - Conversations - summary: Openai Delete Conversation - operationId: openai_delete_conversation_v1_conversations__conversation_id__delete responses: '200': - description: Successful Response + description: The deleted conversation resource. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ConversationDeletedResource' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -333,6 +454,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Openai Delete Conversation + description: |- + Delete a conversation. + + Delete a conversation with the given ID. + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete parameters: - name: conversation_id in: path @@ -342,58 +471,105 @@ paths: description: 'Path parameter: conversation_id' /v1/conversations/{conversation_id}/items: get: - tags: - - Conversations - summary: List Items - operationId: list_items_v1_conversations__conversation_id__items_get responses: '200': - description: Successful Response + description: List of conversation items. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ConversationItemList' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Conversations + summary: List Items + description: |- + List items. + + List items in the conversation. + operationId: list_items_v1_conversations__conversation_id__items_get parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - enum: + - asc + - desc + type: string + - type: 'null' + title: Order - name: conversation_id in: path required: true schema: type: string description: 'Path parameter: conversation_id' + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + $ref: '#/components/schemas/ConversationItemInclude' + - type: 'null' + title: Include post: - tags: - - Conversations - summary: Add Items - operationId: add_items_v1_conversations__conversation_id__items_post responses: '200': - description: Successful Response + description: List of created items. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ConversationItemList' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Conversations + summary: Add Items + description: |- + Create items. + + Create items in the conversation. + operationId: add_items_v1_conversations__conversation_id__items_post parameters: - name: conversation_id in: path @@ -401,18 +577,21 @@ paths: schema: type: string description: 'Path parameter: conversation_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationsByConversationIdItemsPostRequest' /v1/conversations/{conversation_id}/items/{item_id}: get: - tags: - - Conversations - summary: Retrieve - operationId: retrieve_v1_conversations__conversation_id__items__item_id__get responses: '200': - description: Successful Response + description: The conversation item. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIResponseMessage' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -425,6 +604,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Retrieve + description: |- + Retrieve an item. + + Retrieve a conversation item. + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get parameters: - name: conversation_id in: path @@ -439,16 +626,13 @@ paths: type: string description: 'Path parameter: item_id' delete: - tags: - - Conversations - summary: Openai Delete Conversation Item - operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete responses: '200': - description: Successful Response + description: The deleted item resource. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ConversationItemDeletedResource' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -461,6 +645,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Openai Delete Conversation Item + description: |- + Delete an item. + + Delete a conversation item. + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete parameters: - name: conversation_id in: path @@ -476,16 +668,13 @@ paths: description: 'Path parameter: item_id' /v1/embeddings: post: - tags: - - Inference - summary: Openai Embeddings - operationId: openai_embeddings_v1_embeddings_post responses: '200': - description: Successful Response + description: An OpenAIEmbeddingsResponse containing the embeddings. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIEmbeddingsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -498,65 +687,132 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: Openai Embeddings + description: |- + Create embeddings. + + Generate OpenAI-compatible embeddings for the given input using the specified model. + operationId: openai_embeddings_v1_embeddings_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' + required: true /v1/files: get: - tags: - - Files - summary: Openai List Files - operationId: openai_list_files_v1_files_get responses: '200': - description: Successful Response + description: An ListOpenAIFileResponse containing the list of files. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListOpenAIFileResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Files - summary: Openai Upload File - operationId: openai_upload_file_v1_files_post + summary: Openai List Files + description: |- + List files. + + Returns a list of files that belong to the user's organization. + operationId: openai_list_files_v1_files_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 10000 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + - name: purpose + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/OpenAIFilePurpose' + - type: 'null' + title: Purpose + post: responses: '200': - description: Successful Response + description: An OpenAIFileObject representing the uploaded file. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIFileObject' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/files/{file_id}: - get: + description: Default Response tags: - Files - summary: Openai Retrieve File - operationId: openai_retrieve_file_v1_files__file_id__get + summary: Openai Upload File + description: |- + Upload file. + + Upload a file that can be used across various endpoints. + + The file upload should be a multipart form request with: + - file: The File object (not file name) to be uploaded. + - purpose: The intended purpose of the uploaded file. + - expires_after: Optional form values describing expiration for the file. + operationId: openai_upload_file_v1_files_post + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_openai_upload_file_v1_files_post' + /v1/files/{file_id}: + get: responses: '200': - description: Successful Response + description: An OpenAIFileObject containing file information. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIFileObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -569,6 +825,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: Openai Retrieve File + description: |- + Retrieve file. + + Returns information about a specific file. + operationId: openai_retrieve_file_v1_files__file_id__get parameters: - name: file_id in: path @@ -577,16 +841,13 @@ paths: type: string description: 'Path parameter: file_id' delete: - tags: - - Files - summary: Openai Delete File - operationId: openai_delete_file_v1_files__file_id__delete responses: '200': - description: Successful Response + description: An OpenAIFileDeleteResponse indicating successful deletion. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIFileDeleteResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -599,6 +860,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: Openai Delete File + description: Delete file. + operationId: openai_delete_file_v1_files__file_id__delete parameters: - name: file_id in: path @@ -608,16 +874,13 @@ paths: description: 'Path parameter: file_id' /v1/files/{file_id}/content: get: - tags: - - Files - summary: Openai Retrieve File Content - operationId: openai_retrieve_file_content_v1_files__file_id__content_get responses: '200': - description: Successful Response + description: The raw file content as a binary response. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Response' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -630,6 +893,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: Openai Retrieve File Content + description: |- + Retrieve file content. + + Returns the contents of the specified file. + operationId: openai_retrieve_file_content_v1_files__file_id__content_get parameters: - name: file_id in: path @@ -639,16 +910,13 @@ paths: description: 'Path parameter: file_id' /v1/health: get: - tags: - - Inspect - summary: Health - operationId: health_v1_health_get responses: '200': - description: Successful Response + description: Health information indicating if the service is operational. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/HealthInfo' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -661,42 +929,66 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/inspect/routes: - get: tags: - Inspect - summary: List Routes - operationId: list_routes_v1_inspect_routes_get + summary: Health + description: |- + Get health status. + + Get the current health status of the service. + operationId: health_v1_health_get + /v1/inspect/routes: + get: responses: '200': - description: Successful Response + description: Response containing information about all available routes. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListRoutesResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Inspect + summary: List Routes + description: |- + List routes. + + List all available API routes with their methods and implementing providers. + operationId: list_routes_v1_inspect_routes_get + parameters: + - name: api_filter + in: query + required: false + schema: + anyOf: + - enum: + - v1 + - v1alpha + - v1beta + - deprecated + type: string + - type: 'null' + title: Api Filter /v1/models: get: - tags: - - Models - summary: Openai List Models - operationId: openai_list_models_v1_models_get responses: '200': - description: Successful Response + description: A OpenAIListModelsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIListModelsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -709,17 +1001,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: tags: - Models - summary: Register Model - operationId: register_model_v1_models_post + summary: Openai List Models + description: List models using the OpenAI API. + operationId: openai_list_models_v1_models_get + post: responses: '200': - description: Successful Response + description: A Model. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Model' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -732,19 +1026,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Models + summary: Register Model + description: |- + Register model. + + Register a model. + operationId: register_model_v1_models_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ModelsPostRequest' + required: true deprecated: true /v1/models/{model_id}: get: - tags: - - Models - summary: Get Model - operationId: get_model_v1_models__model_id__get responses: '200': - description: Successful Response + description: A Model. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Model' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -757,6 +1062,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Models + summary: Get Model + description: |- + Get model. + + Get a model by its identifier. + operationId: get_model_v1_models__model_id__get parameters: - name: model_id in: path @@ -765,10 +1078,6 @@ paths: type: string description: 'Path parameter: model_id' delete: - tags: - - Models - summary: Unregister Model - operationId: unregister_model_v1_models__model_id__delete responses: '200': description: Successful Response @@ -787,7 +1096,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Models + summary: Unregister Model + description: |- + Unregister model. + + Unregister a model. + operationId: unregister_model_v1_models__model_id__delete parameters: - name: model_id in: path @@ -795,18 +1111,16 @@ paths: schema: type: string description: 'Path parameter: model_id' + deprecated: true /v1/moderations: post: - tags: - - Safety - summary: Run Moderation - operationId: run_moderation_v1_moderations_post responses: '200': - description: Successful Response + description: A moderation object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ModerationObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -819,18 +1133,29 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Safety + summary: Run Moderation + description: |- + Create moderation. + + Classifies if text and/or image inputs are potentially harmful. + operationId: run_moderation_v1_moderations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ModerationsPostRequest' + required: true /v1/prompts: get: - tags: - - Prompts - summary: List Prompts - operationId: list_prompts_v1_prompts_get responses: '200': - description: Successful Response + description: A ListPromptsResponse containing all prompts. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListPromptsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -843,17 +1168,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: tags: - Prompts - summary: Create Prompt - operationId: create_prompt_v1_prompts_post + summary: List Prompts + description: List all prompts. + operationId: list_prompts_v1_prompts_get + post: responses: '200': - description: Successful Response + description: The created Prompt resource. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Prompt' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -866,31 +1193,58 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/prompts/{prompt_id}: - get: tags: - Prompts - summary: Get Prompt - operationId: get_prompt_v1_prompts__prompt_id__get + summary: Create Prompt + description: |- + Create prompt. + + Create a new prompt. + operationId: create_prompt_v1_prompts_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromptsPostRequest' + required: true + /v1/prompts/{prompt_id}: + get: responses: '200': - description: Successful Response + description: A Prompt resource. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Prompt' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Prompts + summary: Get Prompt + description: |- + Get prompt. + + Get a prompt by its identifier and optional version. + operationId: get_prompt_v1_prompts__prompt_id__get parameters: + - name: version + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Version - name: prompt_id in: path required: true @@ -898,28 +1252,33 @@ paths: type: string description: 'Path parameter: prompt_id' post: - tags: - - Prompts - summary: Update Prompt - operationId: update_prompt_v1_prompts__prompt_id__post responses: '200': - description: Successful Response + description: The updated Prompt resource with incremented version. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Prompt' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Prompts + summary: Update Prompt + description: |- + Update prompt. + + Update an existing prompt (increments version). + operationId: update_prompt_v1_prompts__prompt_id__post parameters: - name: prompt_id in: path @@ -927,11 +1286,13 @@ paths: schema: type: string description: 'Path parameter: prompt_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PromptsByPromptIdPostRequest' delete: - tags: - - Prompts - summary: Delete Prompt - operationId: delete_prompt_v1_prompts__prompt_id__delete responses: '200': description: Successful Response @@ -939,17 +1300,25 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Prompts + summary: Delete Prompt + description: |- + Delete prompt. + + Delete a prompt. + operationId: delete_prompt_v1_prompts__prompt_id__delete parameters: - name: prompt_id in: path @@ -959,16 +1328,13 @@ paths: description: 'Path parameter: prompt_id' /v1/prompts/{prompt_id}/set-default-version: post: - tags: - - Prompts - summary: Set Default Version - operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post responses: '200': - description: Successful Response + description: The prompt with the specified version now set as default. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Prompt' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -981,6 +1347,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Prompts + summary: Set Default Version + description: |- + Set prompt version. + + Set which version of a prompt should be the default in get_prompt (latest). + operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post parameters: - name: prompt_id in: path @@ -988,18 +1362,21 @@ paths: schema: type: string description: 'Path parameter: prompt_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromptsByPromptIdSetDefaultVersionPostRequest' + required: true /v1/prompts/{prompt_id}/versions: get: - tags: - - Prompts - summary: List Prompt Versions - operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get responses: '200': - description: Successful Response + description: A ListPromptsResponse containing all versions of the prompt. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListPromptsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1012,6 +1389,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Prompts + summary: List Prompt Versions + description: |- + List prompt versions. + + List all versions of a specific prompt. + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get parameters: - name: prompt_id in: path @@ -1021,16 +1406,13 @@ paths: description: 'Path parameter: prompt_id' /v1/providers: get: - tags: - - Providers - summary: List Providers - operationId: list_providers_v1_providers_get responses: '200': - description: Successful Response + description: A ListProvidersResponse containing information about all providers. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListProvidersResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1043,18 +1425,23 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/providers/{provider_id}: - get: tags: - Providers - summary: Inspect Provider - operationId: inspect_provider_v1_providers__provider_id__get + summary: List Providers + description: |- + List providers. + + List all available providers. + operationId: list_providers_v1_providers_get + /v1/providers/{provider_id}: + get: responses: '200': - description: Successful Response + description: A ProviderInfo object containing the provider's details. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ProviderInfo' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1067,6 +1454,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Providers + summary: Inspect Provider + description: |- + Get provider. + + Get detailed information about a specific provider. + operationId: inspect_provider_v1_providers__provider_id__get parameters: - name: provider_id in: path @@ -1076,63 +1471,132 @@ paths: description: 'Path parameter: provider_id' /v1/responses: get: - tags: - - Agents - summary: List Openai Responses - operationId: list_openai_responses_v1_responses_get responses: '200': - description: Successful Response + description: A ListOpenAIResponseObject. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListOpenAIResponseObject' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Agents - summary: Create Openai Response - operationId: create_openai_response_v1_responses_post + summary: List Openai Responses + description: List all responses. + operationId: list_openai_responses_v1_responses_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 50 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + post: responses: '200': - description: Successful Response + description: An OpenAIResponseObject. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIResponseObject' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIResponseObjectStream' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/responses/{response_id}: - get: + description: Default Response tags: - Agents - summary: Get Openai Response - operationId: get_openai_response_v1_responses__response_id__get + summary: Create Openai Response + description: Create a model response. + operationId: create_openai_response_v1_responses_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ResponsesPostRequest' + x-llama-stack-extra-body-params: + guardrails: + $defs: + ResponseGuardrailSpec: + description: |- + Specification for a guardrail to apply during response generation. + + :param type: The type/identifier of the guardrail. + properties: + type: + title: Type + type: string + required: + - type + title: ResponseGuardrailSpec + type: object + anyOf: + - items: + anyOf: + - type: string + - $ref: '#/components/schemas/ResponseGuardrailSpec' + type: array + - type: 'null' + description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. + /v1/responses/{response_id}: + get: responses: '200': - description: Successful Response + description: An OpenAIResponseObject. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIResponseObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1145,6 +1609,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Get Openai Response + description: Get a model response. + operationId: get_openai_response_v1_responses__response_id__get parameters: - name: response_id in: path @@ -1153,16 +1622,13 @@ paths: type: string description: 'Path parameter: response_id' delete: - tags: - - Agents - summary: Delete Openai Response - operationId: delete_openai_response_v1_responses__response_id__delete responses: '200': - description: Successful Response + description: An OpenAIDeleteResponseObject content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIDeleteResponseObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1175,6 +1641,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Delete Openai Response + description: Delete a response. + operationId: delete_openai_response_v1_responses__response_id__delete parameters: - name: response_id in: path @@ -1184,47 +1655,90 @@ paths: description: 'Path parameter: response_id' /v1/responses/{response_id}/input_items: get: - tags: - - Agents - summary: List Openai Response Input Items - operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get responses: '200': - description: Successful Response + description: An ListOpenAIResponseInputItem. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListOpenAIResponseInputItem' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Agents + summary: List Openai Response Input Items + description: List input items. + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order - name: response_id in: path required: true schema: type: string description: 'Path parameter: response_id' + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Include /v1/safety/run-shield: post: - tags: - - Safety - summary: Run Shield - operationId: run_shield_v1_safety_run_shield_post responses: '200': - description: Successful Response + description: A RunShieldResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/RunShieldResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1237,35 +1751,47 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Safety + summary: Run Shield + description: |- + Run shield. + + Run a shield. + operationId: run_shield_v1_safety_run_shield_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SafetyRunShieldPostRequest' + required: true /v1/scoring-functions: get: - tags: - - Scoring Functions - summary: List Scoring Functions - operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': - description: Successful Response + description: A ListScoringFunctionsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListScoringFunctionsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Scoring Functions - summary: Register Scoring Function - operationId: register_scoring_function_v1_scoring_functions_post + summary: List Scoring Functions + description: List all scoring functions. + operationId: list_scoring_functions_v1_scoring_functions_get + post: responses: '200': description: Successful Response @@ -1273,30 +1799,38 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Scoring Functions + summary: Register Scoring Function + description: Register a scoring function. + operationId: register_scoring_function_v1_scoring_functions_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' deprecated: true /v1/scoring-functions/{scoring_fn_id}: get: - tags: - - Scoring Functions - summary: Get Scoring Function - operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': - description: Successful Response + description: A ScoringFn. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ScoringFn' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1309,6 +1843,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Scoring Functions + summary: Get Scoring Function + description: Get a scoring function by its ID. + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get parameters: - name: scoring_fn_id in: path @@ -1317,10 +1856,6 @@ paths: type: string description: 'Path parameter: scoring_fn_id' delete: - tags: - - Scoring Functions - summary: Unregister Scoring Function - operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete responses: '200': description: Successful Response @@ -1339,7 +1874,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Scoring Functions + summary: Unregister Scoring Function + description: Unregister a scoring function. + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete parameters: - name: scoring_fn_id in: path @@ -1347,18 +1886,16 @@ paths: schema: type: string description: 'Path parameter: scoring_fn_id' + deprecated: true /v1/scoring/score: post: - tags: - - Scoring - summary: Score - operationId: score_v1_scoring_score_post responses: '200': - description: Successful Response + description: A ScoreResponse object containing rows and aggregated results. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ScoreResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1371,18 +1908,26 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring/score-batch: - post: tags: - Scoring - summary: Score Batch - operationId: score_batch_v1_scoring_score_batch_post + summary: Score + description: Score a list of rows. + operationId: score_v1_scoring_score_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScoringScorePostRequest' + required: true + /v1/scoring/score-batch: + post: responses: '200': - description: Successful Response + description: A ScoreBatchResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ScoreBatchResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1395,18 +1940,26 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Scoring + summary: Score Batch + description: Score a batch of rows. + operationId: score_batch_v1_scoring_score_batch_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScoringScoreBatchPostRequest' + required: true /v1/shields: get: - tags: - - Shields - summary: List Shields - operationId: list_shields_v1_shields_get responses: '200': - description: Successful Response + description: A ListShieldsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListShieldsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1419,17 +1972,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: tags: - Shields - summary: Register Shield - operationId: register_shield_v1_shields_post + summary: List Shields + description: List all shields. + operationId: list_shields_v1_shields_get + post: responses: '200': - description: Successful Response + description: A Shield. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Shield' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1442,19 +1997,27 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Shields + summary: Register Shield + description: Register a shield. + operationId: register_shield_v1_shields_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShieldsPostRequest' + required: true deprecated: true /v1/shields/{identifier}: get: - tags: - - Shields - summary: Get Shield - operationId: get_shield_v1_shields__identifier__get responses: '200': - description: Successful Response + description: A Shield. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Shield' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1467,6 +2030,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Shields + summary: Get Shield + description: Get a shield by its identifier. + operationId: get_shield_v1_shields__identifier__get parameters: - name: identifier in: path @@ -1475,10 +2043,6 @@ paths: type: string description: 'Path parameter: identifier' delete: - tags: - - Shields - summary: Unregister Shield - operationId: unregister_shield_v1_shields__identifier__delete responses: '200': description: Successful Response @@ -1497,7 +2061,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Shields + summary: Unregister Shield + description: Unregister a shield. + operationId: unregister_shield_v1_shields__identifier__delete parameters: - name: identifier in: path @@ -1505,18 +2073,16 @@ paths: schema: type: string description: 'Path parameter: identifier' + deprecated: true /v1/tool-runtime/invoke: post: - tags: - - Tool Runtime - summary: Invoke Tool - operationId: invoke_tool_v1_tool_runtime_invoke_post responses: '200': - description: Successful Response + description: A ToolInvocationResult. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ToolInvocationResult' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1529,59 +2095,95 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tool-runtime/list-tools: - get: tags: - Tool Runtime - summary: List Runtime Tools - operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + summary: Invoke Tool + description: Run a tool with the given arguments. + operationId: invoke_tool_v1_tool_runtime_invoke_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ToolRuntimeInvokePostRequest' + required: true + /v1/tool-runtime/list-tools: + get: responses: '200': - description: Successful Response + description: A ListToolDefsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListToolDefsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Tool Runtime + summary: List Runtime Tools + description: List all tools in the runtime. + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + parameters: + - name: authorization + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Authorization + - name: tool_group_id + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Tool Group Id + - name: mcp_endpoint + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + title: Mcp Endpoint /v1/toolgroups: get: - tags: - - Tool Groups - summary: List Tool Groups - operationId: list_tool_groups_v1_toolgroups_get responses: '200': - description: Successful Response + description: A ListToolGroupsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListToolGroupsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Tool Groups - summary: Register Tool Group - operationId: register_tool_group_v1_toolgroups_post + summary: List Tool Groups + description: List tool groups with optional provider. + operationId: list_tool_groups_v1_toolgroups_get + post: responses: '200': description: Successful Response @@ -1589,30 +2191,37 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Tool Groups + summary: Register Tool Group + description: Register a tool group. + operationId: register_tool_group_v1_toolgroups_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' deprecated: true /v1/toolgroups/{toolgroup_id}: get: - tags: - - Tool Groups - summary: Get Tool Group - operationId: get_tool_group_v1_toolgroups__toolgroup_id__get responses: '200': - description: Successful Response + description: A ToolGroup. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ToolGroup' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1625,6 +2234,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Tool Groups + summary: Get Tool Group + description: Get a tool group by its ID. + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get parameters: - name: toolgroup_id in: path @@ -1633,10 +2247,6 @@ paths: type: string description: 'Path parameter: toolgroup_id' delete: - tags: - - Tool Groups - summary: Unregister Toolgroup - operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete responses: '200': description: Successful Response @@ -1655,7 +2265,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Tool Groups + summary: Unregister Toolgroup + description: Unregister a tool group. + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete parameters: - name: toolgroup_id in: path @@ -1663,42 +2277,51 @@ paths: schema: type: string description: 'Path parameter: toolgroup_id' + deprecated: true /v1/tools: get: - tags: - - Tool Groups - summary: List Tools - operationId: list_tools_v1_tools_get responses: '200': - description: Successful Response + description: A ListToolDefsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListToolDefsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tools/{tool_name}: - get: + description: Default Response tags: - Tool Groups - summary: Get Tool - operationId: get_tool_v1_tools__tool_name__get + summary: List Tools + description: List tools with optional tool group. + operationId: list_tools_v1_tools_get + parameters: + - name: toolgroup_id + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Toolgroup Id + /v1/tools/{tool_name}: + get: responses: '200': - description: Successful Response + description: A ToolDef. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ToolDef' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1711,6 +2334,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Tool Groups + summary: Get Tool + description: Get a tool by its name. + operationId: get_tool_v1_tools__tool_name__get parameters: - name: tool_name in: path @@ -1720,10 +2348,6 @@ paths: description: 'Path parameter: tool_name' /v1/vector-io/insert: post: - tags: - - Vector Io - summary: Insert Chunks - operationId: insert_chunks_v1_vector_io_insert_post responses: '200': description: Successful Response @@ -1731,29 +2355,40 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector-io/query: - post: + description: Default Response tags: - Vector Io - summary: Query Chunks - operationId: query_chunks_v1_vector_io_query_post + summary: Insert Chunks + description: Insert chunks into a vector database. + operationId: insert_chunks_v1_vector_io_insert_post + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Chunk-Input' + title: Chunks + /v1/vector-io/query: + post: responses: '200': - description: Successful Response + description: A QueryChunksResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/QueryChunksResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1766,65 +2401,121 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector_stores: - get: tags: - Vector Io - summary: Openai List Vector Stores - operationId: openai_list_vector_stores_v1_vector_stores_get - responses: + summary: Query Chunks + description: Query chunks from a vector database. + operationId: query_chunks_v1_vector_io_query_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorIoQueryPostRequest' + required: true + /v1/vector_stores: + get: + responses: '200': - description: Successful Response + description: A VectorStoreListResponse containing the list of vector stores. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreListResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Vector Io - summary: Openai Create Vector Store - operationId: openai_create_vector_store_v1_vector_stores_post + summary: Openai List Vector Stores + description: Returns a list of vector stores. + operationId: openai_list_vector_stores_v1_vector_stores_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order + post: responses: '200': - description: Successful Response + description: A VectorStoreObject representing the created vector store. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreObject' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector_stores/{vector_store_id}: - get: + description: Default Response tags: - Vector Io - summary: Openai Retrieve Vector Store - operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get + summary: Openai Create Vector Store + description: |- + Creates a vector store. + + Generate an OpenAI-compatible vector store with the given parameters. + operationId: openai_create_vector_store_v1_vector_stores_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICreateVectorStoreRequestWithExtraBody' + /v1/vector_stores/{vector_store_id}: + get: responses: '200': - description: Successful Response + description: A VectorStoreObject representing the vector store. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1837,6 +2528,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Retrieve Vector Store + description: Retrieves a vector store. + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get parameters: - name: vector_store_id in: path @@ -1845,16 +2541,13 @@ paths: type: string description: 'Path parameter: vector_store_id' post: - tags: - - Vector Io - summary: Openai Update Vector Store - operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post responses: '200': - description: Successful Response + description: A VectorStoreObject representing the updated vector store. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1867,6 +2560,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Update Vector Store + description: Updates a vector store. + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post parameters: - name: vector_store_id in: path @@ -1874,17 +2572,20 @@ paths: schema: type: string description: 'Path parameter: vector_store_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoresByVectorStoreIdPostRequest' + required: true delete: - tags: - - Vector Io - summary: Openai Delete Vector Store - operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete responses: '200': - description: Successful Response + description: A VectorStoreDeleteResponse indicating the deletion status. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreDeleteResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1897,6 +2598,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Delete Vector Store + description: Delete a vector store. + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete parameters: - name: vector_store_id in: path @@ -1906,16 +2612,13 @@ paths: description: 'Path parameter: vector_store_id' /v1/vector_stores/{vector_store_id}/file_batches: post: - tags: - - Vector Io - summary: Openai Create Vector Store File Batch - operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post responses: '200': - description: Successful Response + description: A VectorStoreFileBatchObject representing the created file batch. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1928,6 +2631,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Create Vector Store File Batch + description: |- + Create a vector store file batch. + + Generate an OpenAI-compatible vector store file batch for the given vector store. + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post parameters: - name: vector_store_id in: path @@ -1935,18 +2646,21 @@ paths: schema: type: string description: 'Path parameter: vector_store_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICreateVectorStoreFileBatchRequestWithExtraBody' + required: true /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: get: - tags: - - Vector Io - summary: Openai Retrieve Vector Store File Batch - operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get responses: '200': - description: Successful Response + description: A VectorStoreFileBatchObject representing the file batch. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1959,6 +2673,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Retrieve Vector Store File Batch + description: Retrieve a vector store file batch. + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get parameters: - name: vector_store_id in: path @@ -1974,16 +2693,13 @@ paths: description: 'Path parameter: batch_id' /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: post: - tags: - - Vector Io - summary: Openai Cancel Vector Store File Batch - operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post responses: '200': - description: Successful Response + description: A VectorStoreFileBatchObject representing the cancelled file batch. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1996,6 +2712,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Cancel Vector Store File Batch + description: Cancels a vector store file batch. + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post parameters: - name: vector_store_id in: path @@ -2011,29 +2732,73 @@ paths: description: 'Path parameter: batch_id' /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: get: - tags: - - Vector Io - summary: Openai List Files In Vector Store File Batch - operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get responses: '200': - description: Successful Response + description: A VectorStoreFilesListInBatchResponse containing the list of files in the batch. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Vector Io + summary: Openai List Files In Vector Store File Batch + description: Returns a list of vector store files in a batch. + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: filter + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Filter + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order - name: vector_store_id in: path required: true @@ -2048,29 +2813,78 @@ paths: description: 'Path parameter: batch_id' /v1/vector_stores/{vector_store_id}/files: get: - tags: - - Vector Io - summary: Openai List Files In Vector Store - operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get responses: '200': - description: Successful Response + description: A VectorStoreListFilesResponse containing the list of files. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreListFilesResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Vector Io + summary: Openai List Files In Vector Store + description: List files in a vector store. + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: filter + in: query + required: false + schema: + title: Filter + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + nullable: true + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order - name: vector_store_id in: path required: true @@ -2078,28 +2892,30 @@ paths: type: string description: 'Path parameter: vector_store_id' post: - tags: - - Vector Io - summary: Openai Attach File To Vector Store - operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post responses: '200': - description: Successful Response + description: A VectorStoreFileObject representing the attached file. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileObject' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Vector Io + summary: Openai Attach File To Vector Store + description: Attach a file to a vector store. + operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post parameters: - name: vector_store_id in: path @@ -2107,18 +2923,21 @@ paths: schema: type: string description: 'Path parameter: vector_store_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoresByVectorStoreIdFilesPostRequest' /v1/vector_stores/{vector_store_id}/files/{file_id}: get: - tags: - - Vector Io - summary: Openai Retrieve Vector Store File - operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get responses: '200': - description: Successful Response + description: A VectorStoreFileObject representing the file. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2131,6 +2950,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Retrieve Vector Store File + description: Retrieves a vector store file. + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get parameters: - name: vector_store_id in: path @@ -2145,16 +2969,13 @@ paths: type: string description: 'Path parameter: file_id' post: - tags: - - Vector Io - summary: Openai Update Vector Store File - operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post responses: '200': - description: Successful Response + description: A VectorStoreFileObject representing the updated file. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2167,6 +2988,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Update Vector Store File + description: Updates a vector store file. + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post parameters: - name: vector_store_id in: path @@ -2180,17 +3006,20 @@ paths: schema: type: string description: 'Path parameter: file_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoresByVectorStoreIdFilesByFileIdPostRequest' + required: true delete: - tags: - - Vector Io - summary: Openai Delete Vector Store File - operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete responses: '200': - description: Successful Response + description: A VectorStoreFileDeleteResponse indicating the deletion status. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileDeleteResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2203,9 +3032,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: vector_store_id - in: path + tags: + - Vector Io + summary: Openai Delete Vector Store File + description: Delete a vector store file. + 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 @@ -2218,29 +3052,49 @@ paths: description: 'Path parameter: file_id' /v1/vector_stores/{vector_store_id}/files/{file_id}/content: get: - tags: - - Vector Io - summary: Openai Retrieve Vector Store File Contents - operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get responses: '200': - description: Successful Response + description: File contents, optionally with embeddings and metadata based on query parameters. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileContentResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Vector Io + summary: Openai Retrieve Vector Store File Contents + description: Retrieves the contents of a vector store file. + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get parameters: + - name: include_embeddings + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Include Embeddings + - name: include_metadata + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Include Metadata - name: vector_store_id in: path required: true @@ -2255,16 +3109,13 @@ paths: description: 'Path parameter: file_id' /v1/vector_stores/{vector_store_id}/search: post: - tags: - - Vector Io - summary: Openai Search Vector Store - operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post responses: '200': - description: Successful Response + description: A VectorStoreSearchResponse containing the search results. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreSearchResponsePage' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2277,6 +3128,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Search Vector Store + description: |- + Search for chunks in a vector store. + + Searches a vector store for relevant chunks based on a query and optional file attribute filters. + operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post parameters: - name: vector_store_id in: path @@ -2284,18 +3143,21 @@ paths: schema: type: string description: 'Path parameter: vector_store_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoresByVectorStoreIdSearchPostRequest' + required: true /v1/version: get: - tags: - - Inspect - summary: Version - operationId: version_v1_version_get responses: '200': - description: Successful Response + description: Version information containing the service version number. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VersionInfo' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2308,12 +3170,16 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Inspect + summary: Version + description: |- + Get version. + + Get the version of the service. + operationId: version_v1_version_get /v1beta/datasetio/append-rows/{dataset_id}: post: - tags: - - Datasetio - summary: Append Rows - operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post responses: '200': description: Successful Response @@ -2332,6 +3198,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Datasetio + summary: Append Rows + description: Append rows to a dataset. + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post parameters: - name: dataset_id in: path @@ -2339,31 +3210,68 @@ paths: schema: type: string description: 'Path parameter: dataset_id' + requestBody: + content: + application/json: + schema: + items: + additionalProperties: true + type: object + type: array + title: Rows + required: true /v1beta/datasetio/iterrows/{dataset_id}: get: - tags: - - Datasetio - summary: Iterrows - operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get responses: '200': - description: Successful Response + description: A PaginatedResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/PaginatedResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Datasetio + summary: Iterrows + 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. + operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get parameters: + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Limit + - name: start_index + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Start Index - name: dataset_id in: path required: true @@ -2372,16 +3280,13 @@ paths: description: 'Path parameter: dataset_id' /v1beta/datasets: get: - tags: - - Datasets - summary: List Datasets - operationId: list_datasets_v1beta_datasets_get responses: '200': - description: Successful Response + description: A ListDatasetsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListDatasetsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2394,17 +3299,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: tags: - Datasets - summary: Register Dataset - operationId: register_dataset_v1beta_datasets_post + summary: List Datasets + description: List all datasets. + operationId: list_datasets_v1beta_datasets_get + post: responses: '200': - description: Successful Response + description: A Dataset. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Dataset' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2417,19 +3324,27 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Datasets + summary: Register Dataset + description: Register a new dataset. + operationId: register_dataset_v1beta_datasets_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1BetaDatasetsPostRequestLoose' + required: true deprecated: true /v1beta/datasets/{dataset_id}: get: - tags: - - Datasets - summary: Get Dataset - operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': - description: Successful Response + description: A Dataset. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Dataset' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2442,6 +3357,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Datasets + summary: Get Dataset + description: Get a dataset by its ID. + operationId: get_dataset_v1beta_datasets__dataset_id__get parameters: - name: dataset_id in: path @@ -2450,10 +3370,6 @@ paths: type: string description: 'Path parameter: dataset_id' delete: - tags: - - Datasets - summary: Unregister Dataset - operationId: unregister_dataset_v1beta_datasets__dataset_id__delete responses: '200': description: Successful Response @@ -2472,7 +3388,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Datasets + summary: Unregister Dataset + description: Unregister a dataset by its ID. + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete parameters: - name: dataset_id in: path @@ -2480,35 +3400,34 @@ paths: schema: type: string description: 'Path parameter: dataset_id' + deprecated: true /v1alpha/eval/benchmarks: get: - tags: - - Benchmarks - summary: List Benchmarks - operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': - description: Successful Response + description: A ListBenchmarksResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListBenchmarksResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Benchmarks - summary: Register Benchmark - operationId: register_benchmark_v1alpha_eval_benchmarks_post + summary: List Benchmarks + description: List all benchmarks. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get + post: responses: '200': description: Successful Response @@ -2516,30 +3435,38 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Benchmarks + summary: Register Benchmark + description: Register a benchmark. + operationId: register_benchmark_v1alpha_eval_benchmarks_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_benchmark_v1alpha_eval_benchmarks_post' deprecated: true /v1alpha/eval/benchmarks/{benchmark_id}: get: - tags: - - Benchmarks - summary: Get Benchmark - operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': - description: Successful Response + description: A Benchmark. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Benchmark' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2552,6 +3479,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Benchmarks + summary: Get Benchmark + description: Get a benchmark by its ID. + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get parameters: - name: benchmark_id in: path @@ -2560,10 +3492,6 @@ paths: type: string description: 'Path parameter: benchmark_id' delete: - tags: - - Benchmarks - summary: Unregister Benchmark - operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete responses: '200': description: Successful Response @@ -2582,7 +3510,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Benchmarks + summary: Unregister Benchmark + description: Unregister a benchmark. + operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete parameters: - name: benchmark_id in: path @@ -2590,18 +3522,16 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' + deprecated: true /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: - tags: - - Eval - summary: Evaluate Rows - operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post responses: '200': - description: Successful Response + description: EvaluateResponse object containing generations and scores. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/EvaluateResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2614,6 +3544,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Evaluate Rows + description: Evaluate a list of rows on a benchmark. + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post parameters: - name: benchmark_id in: path @@ -2621,18 +3556,21 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest' + required: true /v1alpha/eval/benchmarks/{benchmark_id}/jobs: post: - tags: - - Eval - summary: Run Eval - operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post responses: '200': - description: Successful Response + description: The job that was created to run the evaluation. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Job' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2645,6 +3583,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Run Eval + description: Run an evaluation on a benchmark. + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post parameters: - name: benchmark_id in: path @@ -2652,18 +3595,21 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BenchmarkConfig' + required: true /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: get: - tags: - - Eval - summary: Job Status - operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': - description: Successful Response + description: The status of the evaluation job. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Job' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2676,6 +3622,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Job Status + description: Get the status of a job. + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get parameters: - name: benchmark_id in: path @@ -2690,10 +3641,6 @@ paths: type: string description: 'Path parameter: job_id' delete: - tags: - - Eval - summary: Job Cancel - operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete responses: '200': description: Successful Response @@ -2712,6 +3659,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Job Cancel + description: Cancel a job. + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete parameters: - name: benchmark_id in: path @@ -2727,16 +3679,13 @@ paths: description: 'Path parameter: job_id' /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: get: - tags: - - Eval - summary: Job Result - operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get responses: '200': - description: Successful Response + description: The result of the job. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/EvaluateResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2749,6 +3698,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Job Result + description: Get the result of a job. + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get parameters: - name: benchmark_id in: path @@ -2764,16 +3718,13 @@ paths: description: 'Path parameter: job_id' /v1alpha/inference/rerank: post: - tags: - - Inference - summary: Rerank - operationId: rerank_v1alpha_inference_rerank_post responses: '200': - description: Successful Response + description: RerankResponse with indices sorted by relevance score (descending). content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/RerankResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2786,12 +3737,52 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/artifacts: + tags: + - Inference + summary: Rerank + description: Rerank a list of documents based on their relevance to a query. + operationId: rerank_v1alpha_inference_rerank_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1AlphaInferenceRerankPostRequest' + required: true + /v1alpha/post-training/job/artifacts: get: + responses: + '200': + description: A PostTrainingJobArtifactsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + '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 tags: - Post Training summary: Get Training Job Artifacts + description: Get the artifacts of a training job. 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 + /v1alpha/post-training/job/cancel: + post: responses: '200': description: Successful Response @@ -2799,53 +3790,71 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/cancel: - post: + description: Default Response tags: - Post Training summary: Cancel Training Job + description: Cancel a training job. operationId: cancel_training_job_v1alpha_post_training_job_cancel_post + parameters: + - name: job_uuid + in: query + required: true + schema: + type: string + title: Job Uuid + /v1alpha/post-training/job/status: + get: responses: '200': - description: Successful Response + description: A PostTrainingJobStatusResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/PostTrainingJobStatusResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/status: - get: + description: Default Response tags: - Post Training summary: Get Training Job Status + description: Get the status of a training job. 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 + /v1alpha/post-training/jobs: + get: responses: '200': - description: Successful Response + description: A ListPostTrainingJobsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListPostTrainingJobsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2858,18 +3867,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/jobs: - get: tags: - Post Training summary: Get Training Jobs + description: Get all training jobs. operationId: get_training_jobs_v1alpha_post_training_jobs_get + /v1alpha/post-training/preference-optimize: + post: responses: '200': - description: Successful Response + description: A PostTrainingJob. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/PostTrainingJob' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2882,18 +3893,26 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/preference-optimize: - post: tags: - Post Training summary: Preference Optimize + description: Run preference optimization of a model. operationId: preference_optimize_v1alpha_post_training_preference_optimize_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1AlphaPostTrainingPreferenceOptimizePostRequest' + required: true + /v1alpha/post-training/supervised-fine-tune: + post: responses: '200': - description: Successful Response + description: A PostTrainingJob. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/PostTrainingJob' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2906,68 +3925,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/supervised-fine-tune: - post: tags: - Post Training summary: Supervised Fine Tune + description: Run supervised fine-tuning of a model. operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1AlphaPostTrainingSupervisedFineTunePostRequest' + required: true components: - responses: - BadRequest400: - description: The request was invalid or malformed - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 400 - 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 - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 429 - title: Too Many Requests - detail: You have exceeded the rate limit. Please try again later. - InternalServerError500: - description: The server encountered an unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 500 - title: Internal Server Error - detail: An unexpected error occurred - DefaultError: - description: An error occurred - content: - application/json: - schema: - $ref: '#/components/schemas/Error' schemas: Error: description: Error response from the API. Roughly follows RFC 7807. @@ -2993,63 +3962,61 @@ components: title: Error type: object ListBatchesResponse: - description: Response containing a list of batch objects. properties: object: + type: string const: list - default: list title: Object - type: string + default: list data: - description: List of batch objects items: $ref: '#/components/schemas/Batch' - title: Data type: array + title: Data + description: List of batch objects first_id: anyOf: - type: string - type: 'null' description: ID of the first batch in the list - nullable: true last_id: anyOf: - type: string - type: 'null' description: ID of the last batch in the list - nullable: true has_more: - default: false - description: Whether there are more batches available - title: Has More type: boolean + title: Has More + description: Whether there are more batches available + default: false + type: object required: - data title: ListBatchesResponse - type: object + description: Response containing a list of batch objects. Batch: - additionalProperties: true properties: id: - title: Id type: string + title: Id completion_window: - title: Completion Window type: string + title: Completion Window created_at: - title: Created At type: integer + title: Created At endpoint: - title: Endpoint type: string + title: Endpoint input_file_id: - title: Input File Id type: string + title: Input File Id object: + type: string const: batch title: Object - type: string status: + type: string enum: - validating - failed @@ -3060,90 +4027,76 @@ components: - cancelling - cancelled title: Status - type: string cancelled_at: anyOf: - type: integer - type: 'null' - nullable: true cancelling_at: anyOf: - type: integer - type: 'null' - nullable: true completed_at: anyOf: - type: integer - type: 'null' - nullable: true error_file_id: anyOf: - type: string - type: 'null' - nullable: true errors: anyOf: - $ref: '#/components/schemas/Errors' title: Errors - type: 'null' - nullable: true title: Errors expired_at: anyOf: - type: integer - type: 'null' - nullable: true expires_at: anyOf: - type: integer - type: 'null' - nullable: true failed_at: anyOf: - type: integer - type: 'null' - nullable: true finalizing_at: anyOf: - type: integer - type: 'null' - nullable: true in_progress_at: anyOf: - type: integer - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - nullable: true model: anyOf: - type: string - type: 'null' - nullable: true output_file_id: anyOf: - type: string - type: 'null' - nullable: true request_counts: anyOf: - $ref: '#/components/schemas/BatchRequestCounts' title: BatchRequestCounts - type: 'null' - nullable: true title: BatchRequestCounts usage: anyOf: - $ref: '#/components/schemas/BatchUsage' title: BatchUsage - type: 'null' - nullable: true title: BatchUsage + additionalProperties: true + type: object required: - id - completion_window @@ -3153,36 +4106,42 @@ components: - object - status title: Batch - type: object + Order: + type: string + enum: + - asc + - desc + title: Order + description: Sort order for paginated responses. ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. properties: data: items: $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIChatCompletionResponse - type: object + description: Response from listing OpenAI-compatible chat completions. OpenAIAssistantMessageParam: description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: @@ -3216,19 +4175,19 @@ components: title: OpenAIAssistantMessageParam type: object OpenAIChatCompletionContentPartImageParam: - description: Image content part for OpenAI-compatible chat completion messages. properties: type: + type: string const: image_url - default: image_url title: Type - type: string + default: image_url image_url: $ref: '#/components/schemas/OpenAIImageURL' + type: object required: - image_url title: OpenAIChatCompletionContentPartImageParam - type: object + description: Image content part for OpenAI-compatible chat completion messages. OpenAIChatCompletionContentPartParam: discriminator: mapping: @@ -3245,139 +4204,130 @@ components: title: OpenAIFile title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: - description: Text content part for OpenAI-compatible chat completion messages. properties: type: + type: string const: text - default: text title: Type - type: string + default: text text: - title: Text type: string + title: Text + type: object required: - text title: OpenAIChatCompletionContentPartTextParam - type: object + description: Text content part for OpenAI-compatible chat completion messages. OpenAIChatCompletionToolCall: - description: Tool call specification for OpenAI-compatible chat completion responses. properties: index: anyOf: - type: integer - type: 'null' - nullable: true id: anyOf: - type: string - type: 'null' - nullable: true type: + type: string const: function - default: function title: Type - type: string + default: function function: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' title: OpenAIChatCompletionToolCallFunction - type: 'null' - nullable: true title: OpenAIChatCompletionToolCallFunction - title: OpenAIChatCompletionToolCall type: object + title: OpenAIChatCompletionToolCall + description: Tool call specification for OpenAI-compatible chat completion responses. OpenAIChatCompletionToolCallFunction: - description: Function call details for OpenAI-compatible tool calls. properties: name: anyOf: - type: string - type: 'null' - nullable: true arguments: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIChatCompletionToolCallFunction type: object + title: OpenAIChatCompletionToolCallFunction + description: Function call details for OpenAI-compatible tool calls. OpenAIChatCompletionUsage: - description: Usage information for OpenAI chat completion. properties: prompt_tokens: - title: Prompt Tokens type: integer + title: Prompt Tokens completion_tokens: - title: Completion Tokens type: integer + title: Completion Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens prompt_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' - nullable: true title: OpenAIChatCompletionUsagePromptTokensDetails completion_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' - nullable: true title: OpenAIChatCompletionUsageCompletionTokensDetails + type: object required: - prompt_tokens - completion_tokens - total_tokens title: OpenAIChatCompletionUsage - type: object + description: Usage information for OpenAI chat completion. OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) + title: OpenAIUserMessageParam-Output | ... (5 variants) + 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: - title: Finish Reason type: string + title: Finish Reason index: - title: Index type: integer + title: Index logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' title: OpenAIChoiceLogprobs - type: 'null' - nullable: true title: OpenAIChoiceLogprobs + type: object required: - message - finish_reason - index title: OpenAIChoice - type: object + description: A choice from an OpenAI-compatible chat completion response. OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. properties: content: anyOf: @@ -3385,24 +4335,22 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - nullable: true refusal: anyOf: - items: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - nullable: true - title: OpenAIChoiceLogprobs type: object + title: OpenAIChoiceLogprobs + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. OpenAIDeveloperMessageParam: - description: A message from the developer in an OpenAI-compatible chat completion request. properties: role: + type: string const: developer - default: developer title: Role - type: string + default: developer content: anyOf: - type: string @@ -3415,58 +4363,54 @@ components: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - content title: OpenAIDeveloperMessageParam - type: object + description: A message from the developer in an OpenAI-compatible chat completion request. OpenAIFile: properties: type: + type: string const: file - default: file title: Type - type: string + default: file file: $ref: '#/components/schemas/OpenAIFileFile' + type: object required: - file title: OpenAIFile - type: object OpenAIFileFile: properties: file_data: anyOf: - type: string - type: 'null' - nullable: true file_id: anyOf: - type: string - type: 'null' - nullable: true filename: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIFileFile type: object + title: OpenAIFileFile OpenAIImageURL: - description: Image URL specification for OpenAI-compatible chat completion messages. properties: url: - title: Url type: string + title: Url detail: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - url title: OpenAIImageURL - type: object + description: Image URL specification for OpenAI-compatible chat completion messages. OpenAIMessageParam: discriminator: mapping: @@ -3489,13 +4433,12 @@ components: title: OpenAIDeveloperMessageParam title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: - description: A system message providing instructions or context to the model. properties: role: + type: string const: system - default: system title: Role - type: string + default: system content: anyOf: - type: string @@ -3508,55 +4451,53 @@ components: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - content title: OpenAISystemMessageParam - type: object + description: A system message providing instructions or context to the model. 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 + title: Token bytes: anyOf: - items: type: integer type: array - type: 'null' - nullable: true logprob: - title: Logprob type: number + title: Logprob top_logprobs: items: $ref: '#/components/schemas/OpenAITopLogProb' - title: Top Logprobs type: array + title: Top Logprobs + type: object required: - token - logprob - top_logprobs title: OpenAITokenLogProb - type: object + 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 OpenAIToolMessageParam: - description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. properties: role: + type: string const: tool - default: tool title: Role - type: string + default: tool tool_call_id: - title: Tool Call Id type: string + title: Tool Call Id content: anyOf: - type: string @@ -3565,37 +4506,37 @@ components: type: array title: list[OpenAIChatCompletionContentPartTextParam] title: string | list[OpenAIChatCompletionContentPartTextParam] + type: object required: - tool_call_id - content title: OpenAIToolMessageParam - type: object + description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. 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 + title: Token bytes: anyOf: - items: type: integer type: array - type: 'null' - nullable: true logprob: - title: Logprob type: number + title: Logprob + type: object required: - token - logprob title: OpenAITopLogProb - type: object + 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 OpenAIUserMessageParam: description: A message from the user in an OpenAI-compatible chat completion request. properties: @@ -3635,11 +4576,10 @@ components: title: OpenAIUserMessageParam type: object OpenAIJSONSchema: - description: JSON schema specification for OpenAI-compatible structured response format. properties: name: - title: Name type: string + title: Name description: anyOf: - type: string @@ -3653,32 +4593,33 @@ components: - additionalProperties: true type: object - type: 'null' - title: OpenAIJSONSchema type: object + title: OpenAIJSONSchema + description: JSON schema specification for OpenAI-compatible structured response format. OpenAIResponseFormatJSONObject: - description: JSON object response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: json_object - default: json_object title: Type - type: string - title: OpenAIResponseFormatJSONObject + default: json_object type: object + title: OpenAIResponseFormatJSONObject + description: JSON object response format for OpenAI-compatible chat completion requests. OpenAIResponseFormatJSONSchema: - description: JSON schema response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: json_schema - default: json_schema title: Type - type: string + default: json_schema json_schema: $ref: '#/components/schemas/OpenAIJSONSchema' + type: object required: - json_schema title: OpenAIResponseFormatJSONSchema - type: object + description: JSON schema response format for OpenAI-compatible chat completion requests. OpenAIResponseFormatParam: discriminator: mapping: @@ -3695,52 +4636,49 @@ components: title: OpenAIResponseFormatJSONObject title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject OpenAIResponseFormatText: - description: Text response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: text - default: text title: Type - type: string - title: OpenAIResponseFormatText + default: text type: object + title: OpenAIResponseFormatText + description: Text response format for OpenAI-compatible chat completion requests. OpenAIChatCompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible chat completion endpoint. properties: model: - title: Model type: string + title: Model 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) + 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) + type: array minItems: 1 title: Messages - type: array frequency_penalty: anyOf: - type: number - type: 'null' - nullable: true function_call: anyOf: - type: string @@ -3748,7 +4686,6 @@ components: type: object - type: 'null' title: string | object - nullable: true functions: anyOf: - items: @@ -3756,68 +4693,58 @@ components: type: object type: array - type: 'null' - nullable: true logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true logprobs: anyOf: - type: boolean - type: 'null' - nullable: true max_completion_tokens: anyOf: - type: integer - type: 'null' - nullable: true max_tokens: anyOf: - type: integer - type: 'null' - nullable: true n: anyOf: - type: integer - type: 'null' - nullable: true parallel_tool_calls: anyOf: - type: boolean - type: 'null' - nullable: true presence_penalty: anyOf: - type: number - type: 'null' - nullable: true response_format: anyOf: - - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' title: OpenAIResponseFormatJSONObject + discriminator: + propertyName: type + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - type: 'null' title: Response Format - nullable: true seed: anyOf: - type: integer - type: 'null' - nullable: true stop: anyOf: - type: string @@ -3827,23 +4754,19 @@ components: title: list[string] - type: 'null' title: string | list[string] - nullable: true stream: anyOf: - type: boolean - type: 'null' - nullable: true stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true temperature: anyOf: - type: number - type: 'null' - nullable: true tool_choice: anyOf: - type: string @@ -3851,7 +4774,6 @@ components: type: object - type: 'null' title: string | object - nullable: true tools: anyOf: - items: @@ -3859,63 +4781,60 @@ components: type: object type: array - type: 'null' - nullable: true top_logprobs: anyOf: - type: integer - type: 'null' - nullable: true top_p: anyOf: - type: number - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - messages title: OpenAIChatCompletionRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible chat completion endpoint. OpenAIChatCompletion: - description: Response from an OpenAI-compatible chat completion request. properties: id: - title: Id type: string + title: Id choices: items: $ref: '#/components/schemas/OpenAIChoice' - title: Choices type: array + title: Choices object: + type: string const: chat.completion - default: chat.completion title: Object - type: string + default: chat.completion created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' title: OpenAIChatCompletionUsage - type: 'null' - nullable: true title: OpenAIChatCompletionUsage + type: object required: - id - choices - created - model title: OpenAIChatCompletion - type: object + description: Response from an OpenAI-compatible chat completion request. OpenAIChatCompletionChunk: description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: @@ -4011,55 +4930,55 @@ components: OpenAICompletionWithInputMessages: properties: id: - title: Id type: string + title: Id choices: items: $ref: '#/components/schemas/OpenAIChoice' - title: Choices type: array + title: Choices object: + type: string const: chat.completion - default: chat.completion title: Object - type: string + default: chat.completion created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' title: OpenAIChatCompletionUsage - type: 'null' - nullable: true title: OpenAIChatCompletionUsage 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Input Messages + 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' + title: OpenAIUserMessageParam-Output | ... (5 variants) type: array + title: Input Messages + type: object required: - id - choices @@ -4067,14 +4986,11 @@ components: - model - input_messages title: OpenAICompletionWithInputMessages - type: object OpenAICompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible completion endpoint. properties: model: - title: Model type: string + title: Model prompt: anyOf: - type: string @@ -4097,49 +5013,40 @@ components: anyOf: - type: integer - type: 'null' - nullable: true echo: anyOf: - type: boolean - type: 'null' - nullable: true frequency_penalty: anyOf: - type: number - type: 'null' - nullable: true logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true logprobs: anyOf: - type: boolean - type: 'null' - nullable: true max_tokens: anyOf: - type: integer - type: 'null' - nullable: true n: anyOf: - type: integer - type: 'null' - nullable: true presence_penalty: anyOf: - type: number - type: 'null' - nullable: true seed: anyOf: - type: integer - type: 'null' - nullable: true stop: anyOf: - type: string @@ -4149,110 +5056,104 @@ components: title: list[string] - type: 'null' title: string | list[string] - nullable: true stream: anyOf: - type: boolean - type: 'null' - nullable: true stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true temperature: anyOf: - type: number - type: 'null' - nullable: true top_p: anyOf: - type: number - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true suffix: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - prompt title: OpenAICompletionRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible completion endpoint. OpenAICompletion: - 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 + title: Id choices: items: $ref: '#/components/schemas/OpenAICompletionChoice' - title: Choices type: array + title: Choices created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model object: + type: string const: text_completion - default: text_completion title: Object - type: string + default: text_completion + type: object required: - id - choices - created - model title: OpenAICompletion - type: object - OpenAICompletionChoice: description: |- - A choice from an OpenAI-compatible completion response. + Response from an OpenAI-compatible completion request. - :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 + :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" + OpenAICompletionChoice: properties: finish_reason: - title: Finish Reason type: string + title: Finish Reason text: - title: Text type: string + title: Text index: - title: Index type: integer + title: Index logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' title: OpenAIChoiceLogprobs - type: 'null' - nullable: true title: OpenAIChoiceLogprobs + type: object required: - finish_reason - text - index title: OpenAICompletionChoice - type: object + 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 ConversationItem: discriminator: mapping: @@ -4287,54 +5188,55 @@ components: title: OpenAIResponseOutputMessageMCPListTools title: OpenAIResponseMessage | ... (9 variants) OpenAIResponseAnnotationCitation: - description: URL citation annotation for referencing external web resources. properties: type: + type: string const: url_citation - default: url_citation title: Type - type: string + default: url_citation end_index: - title: End Index type: integer + title: End Index start_index: - title: Start Index type: integer + title: Start Index title: - title: Title type: string + title: Title url: - title: Url type: string + title: Url + type: object required: - end_index - start_index - title - url title: OpenAIResponseAnnotationCitation - type: object + description: URL citation annotation for referencing external web resources. OpenAIResponseAnnotationContainerFileCitation: properties: type: + type: string const: container_file_citation - default: container_file_citation title: Type - type: string + default: container_file_citation container_id: - title: Container Id type: string + title: Container Id end_index: - title: End Index type: integer + title: End Index file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename start_index: - title: Start Index type: integer + title: Start Index + type: object required: - container_id - end_index @@ -4342,48 +5244,47 @@ components: - filename - start_index title: OpenAIResponseAnnotationContainerFileCitation - type: object OpenAIResponseAnnotationFileCitation: - description: File citation annotation for referencing specific files in response content. properties: type: + type: string const: file_citation - default: file_citation title: Type - type: string + default: file_citation file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename index: - title: Index type: integer + title: Index + type: object required: - file_id - filename - index title: OpenAIResponseAnnotationFileCitation - type: object + description: File citation annotation for referencing specific files in response content. OpenAIResponseAnnotationFilePath: properties: type: + type: string const: file_path - default: file_path title: Type - type: string + default: file_path file_id: - title: File Id type: string + title: File Id index: - title: Index type: integer + title: Index + type: object required: - file_id - index title: OpenAIResponseAnnotationFilePath - type: object OpenAIResponseAnnotations: discriminator: mapping: @@ -4403,49 +5304,47 @@ components: title: OpenAIResponseAnnotationFilePath title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseContentPartRefusal: - description: Refusal content within a streamed response part. properties: type: + type: string const: refusal - default: refusal title: Type - type: string + default: refusal refusal: - title: Refusal type: string + title: Refusal + type: object required: - refusal title: OpenAIResponseContentPartRefusal - type: object + description: Refusal content within a streamed response part. 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 + title: Call Id output: - title: Output type: string + title: Output type: + type: string const: function_call_output - default: function_call_output title: Type - type: string + default: function_call_output id: anyOf: - type: string - type: 'null' - nullable: true status: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - call_id - output title: OpenAIResponseInputFunctionToolCallOutput - type: object + description: This represents the output of a function call that gets passed back to the model. OpenAIResponseInputMessageContent: discriminator: mapping: @@ -4462,134 +5361,126 @@ components: title: OpenAIResponseInputMessageContentFile title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseInputMessageContentFile: - description: File content for input messages in OpenAI response format. properties: type: + type: string const: input_file - default: input_file title: Type - type: string + default: input_file file_data: anyOf: - type: string - type: 'null' - nullable: true file_id: anyOf: - type: string - type: 'null' - nullable: true file_url: anyOf: - type: string - type: 'null' - nullable: true filename: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIResponseInputMessageContentFile type: object + title: OpenAIResponseInputMessageContentFile + description: File content for input messages in OpenAI response format. OpenAIResponseInputMessageContentImage: - description: Image content for input messages in OpenAI response format. properties: detail: - default: auto title: Detail + default: auto type: string enum: - low - high - auto type: + type: string const: input_image - default: input_image title: Type - type: string + default: input_image file_id: anyOf: - type: string - type: 'null' - nullable: true image_url: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIResponseInputMessageContentImage type: object + title: OpenAIResponseInputMessageContentImage + description: Image content for input messages in OpenAI response format. OpenAIResponseInputMessageContentText: - description: Text content for input messages in OpenAI response format. properties: text: - title: Text type: string + title: Text type: + type: string const: input_text - default: input_text title: Type - type: string + default: input_text + type: object required: - text title: OpenAIResponseInputMessageContentText - type: object + description: Text content for input messages in OpenAI response format. OpenAIResponseMCPApprovalRequest: - description: A request for human approval of a tool invocation. properties: arguments: - title: Arguments type: string + title: Arguments id: - title: Id type: string + title: Id name: - title: Name type: string + title: Name server_label: - title: Server Label type: string + title: Server Label type: + type: string const: mcp_approval_request - default: mcp_approval_request title: Type - type: string + default: mcp_approval_request + type: object required: - arguments - id - name - server_label title: OpenAIResponseMCPApprovalRequest - type: object + description: A request for human approval of a tool invocation. OpenAIResponseMCPApprovalResponse: - description: A response to an MCP approval request. properties: approval_request_id: - title: Approval Request Id type: string + title: Approval Request Id approve: - title: Approve type: boolean + title: Approve type: + type: string const: mcp_approval_response - default: mcp_approval_response title: Type - type: string + default: mcp_approval_response id: anyOf: - type: string - type: 'null' - nullable: true reason: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - approval_request_id - approve title: OpenAIResponseMCPApprovalResponse - type: object + description: A response to an MCP approval request. OpenAIResponseMessage: description: |- Corresponds to the various Message types in the Responses API. @@ -4676,22 +5567,15 @@ components: OpenAIResponseOutputMessageContentOutputText: properties: text: - title: Text type: string + title: Text type: + type: string const: output_text - default: output_text title: Type - type: string + default: output_text annotations: items: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' title: OpenAIResponseAnnotationFileCitation @@ -4701,176 +5585,177 @@ components: title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' title: 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' title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations type: array + title: Annotations + type: object required: - text title: OpenAIResponseOutputMessageContentOutputText - type: object OpenAIResponseOutputMessageFileSearchToolCall: - description: File search tool call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id queries: items: type: string - title: Queries type: array + title: Queries status: - title: Status type: string + title: Status type: + type: string const: file_search_call - default: file_search_call title: Type - type: string + default: file_search_call results: anyOf: - items: $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' - nullable: true + type: object required: - id - queries - status title: OpenAIResponseOutputMessageFileSearchToolCall - type: object + description: File search tool call output message for OpenAI responses. OpenAIResponseOutputMessageFunctionToolCall: - description: Function tool call output message for OpenAI responses. properties: call_id: - title: Call Id type: string + title: Call Id name: - title: Name type: string + title: Name arguments: - title: Arguments type: string + title: Arguments type: + type: string const: function_call - default: function_call title: Type - type: string + default: function_call id: anyOf: - type: string - type: 'null' - nullable: true status: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - call_id - name - arguments title: OpenAIResponseOutputMessageFunctionToolCall - type: object + description: Function tool call output message for OpenAI responses. OpenAIResponseOutputMessageMCPCall: - description: Model Context Protocol (MCP) call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id type: + type: string const: mcp_call - default: mcp_call title: Type - type: string + default: mcp_call arguments: - title: Arguments type: string + title: Arguments name: - title: Name type: string + title: Name server_label: - title: Server Label type: string + title: Server Label error: anyOf: - type: string - type: 'null' - nullable: true output: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - id - arguments - name - server_label title: OpenAIResponseOutputMessageMCPCall - type: object + description: Model Context Protocol (MCP) call output message for OpenAI responses. OpenAIResponseOutputMessageMCPListTools: - description: MCP list tools output message containing available tools from an MCP server. properties: id: - title: Id type: string + title: Id type: + type: string const: mcp_list_tools - default: mcp_list_tools title: Type - type: string + default: mcp_list_tools server_label: - title: Server Label type: string + title: Server Label tools: items: $ref: '#/components/schemas/MCPListToolsTool' - title: Tools type: array + title: Tools + type: object required: - id - server_label - tools title: OpenAIResponseOutputMessageMCPListTools - type: object + description: MCP list tools output message containing available tools from an MCP server. OpenAIResponseOutputMessageWebSearchToolCall: - description: Web search tool call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id status: - title: Status type: string + title: Status type: + type: string const: web_search_call - default: web_search_call title: Type - type: string + default: web_search_call + type: object required: - id - status title: OpenAIResponseOutputMessageWebSearchToolCall - type: object + description: Web search tool call output message for OpenAI responses. Conversation: - description: OpenAI-compatible conversation object. properties: id: - description: The unique ID of the conversation. - title: Id type: string + title: Id + description: The unique ID of the conversation. object: + type: string const: conversation - default: conversation - description: The object type, which is always conversation. title: Object - type: string + description: The object type, which is always conversation. + default: conversation created_at: - description: The time at which the conversation was created, measured in seconds since the Unix epoch. - title: Created At type: integer + title: Created At + description: The time at which the conversation was created, measured in seconds since the Unix epoch. metadata: anyOf: - additionalProperties: @@ -4878,7 +5763,6 @@ components: 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. - nullable: true items: anyOf: - items: @@ -4887,59 +5771,45 @@ components: type: array - type: 'null' description: Initial items to include in the conversation context. You may add up to 20 items at a time. - nullable: true + type: object required: - id - created_at title: Conversation - type: object + description: OpenAI-compatible conversation object. ConversationDeletedResource: - description: Response for deleted conversation. properties: id: - description: The deleted conversation identifier - title: Id type: string + title: Id + description: The deleted conversation identifier object: - default: conversation.deleted - description: Object type - title: Object type: string + title: Object + description: Object type + default: conversation.deleted deleted: - default: true - description: Whether the object was deleted - title: Deleted type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object required: - id title: ConversationDeletedResource - type: object + description: Response for deleted conversation. ConversationItemList: - description: List of conversation items with pagination. properties: object: - default: list - description: Object type - title: Object type: string + title: Object + description: Object type + default: list data: - description: List of conversation items items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -4956,58 +5826,68 @@ components: title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - title: Data + 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' + title: OpenAIResponseMessage-Output | ... (9 variants) type: array + title: Data + description: List of conversation items first_id: anyOf: - type: string - type: 'null' description: The ID of the first item in the list - nullable: true last_id: anyOf: - type: string - type: 'null' description: The ID of the last item in the list - nullable: true has_more: - default: false - description: Whether there are more items available - title: Has More type: boolean + title: Has More + description: Whether there are more items available + default: false + type: object required: - data title: ConversationItemList - type: object + description: List of conversation items with pagination. ConversationItemDeletedResource: - description: Response for deleted conversation item. properties: id: - description: The deleted item identifier - title: Id type: string + title: Id + description: The deleted item identifier object: - default: conversation.item.deleted - description: Object type - title: Object type: string + title: Object + description: Object type + default: conversation.item.deleted deleted: - default: true - description: Whether the object was deleted - title: Deleted type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object required: - id title: ConversationItemDeletedResource - type: object + description: Response for deleted conversation item. OpenAIEmbeddingsRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible embeddings endpoint. properties: model: - title: Model type: string + title: Model input: anyOf: - type: string @@ -5025,25 +5905,24 @@ components: anyOf: - type: integer - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - input title: OpenAIEmbeddingsRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible embeddings endpoint. OpenAIEmbeddingData: - description: A single embedding data object from an OpenAI-compatible embeddings response. properties: object: + type: string const: embedding - default: embedding title: Object - type: string + default: embedding embedding: anyOf: - items: @@ -5053,112 +5932,113 @@ components: - type: string title: list[number] | string index: - title: Index type: integer + title: Index + type: object required: - embedding - index title: OpenAIEmbeddingData - type: object + description: A single embedding data object from an OpenAI-compatible embeddings response. OpenAIEmbeddingUsage: - description: Usage information for an OpenAI-compatible embeddings response. properties: prompt_tokens: - title: Prompt Tokens type: integer + title: Prompt Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens + type: object required: - prompt_tokens - total_tokens title: OpenAIEmbeddingUsage - type: object + description: Usage information for an OpenAI-compatible embeddings response. OpenAIEmbeddingsResponse: - description: Response from an OpenAI-compatible embeddings request. properties: object: + type: string const: list - default: list title: Object - type: string + default: list data: items: $ref: '#/components/schemas/OpenAIEmbeddingData' - title: Data type: array + title: Data model: - title: Model type: string + title: Model usage: $ref: '#/components/schemas/OpenAIEmbeddingUsage' + type: object required: - data - model - usage title: OpenAIEmbeddingsResponse - type: object + description: Response from an OpenAI-compatible embeddings request. OpenAIFilePurpose: - description: Valid purpose values for OpenAI Files API. + type: string enum: - assistants - batch title: OpenAIFilePurpose - type: string + description: Valid purpose values for OpenAI Files API. ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. properties: data: items: $ref: '#/components/schemas/OpenAIFileObject' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIFileResponse - type: object + description: Response for listing files in OpenAI Files API. OpenAIFileObject: - description: OpenAI File object as defined in the OpenAI Files API. properties: object: + type: string const: file - default: file title: Object - type: string + default: file id: - title: Id type: string + title: Id bytes: - title: Bytes type: integer + title: Bytes created_at: - title: Created At type: integer + title: Created At expires_at: - title: Expires At type: integer + title: Expires At filename: - title: Filename type: string + title: Filename purpose: $ref: '#/components/schemas/OpenAIFilePurpose' + type: object required: - id - bytes @@ -5167,212 +6047,211 @@ components: - filename - purpose title: OpenAIFileObject - type: object + description: OpenAI File object as defined in the OpenAI Files API. 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: + type: string const: created_at title: Anchor - type: string seconds: - maximum: 2592000 - minimum: 3600 - title: Seconds type: integer + maximum: 2592000.0 + minimum: 3600.0 + title: Seconds + type: object required: - anchor - seconds title: ExpiresAfter - type: object - OpenAIFileDeleteResponse: - description: Response for deleting a file in OpenAI Files API. + 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) + OpenAIFileDeleteResponse: properties: id: - title: Id type: string + title: Id object: + type: string const: file - default: file title: Object - type: string + default: file deleted: - title: Deleted type: boolean + title: Deleted + type: object required: - id - deleted title: OpenAIFileDeleteResponse + description: Response for deleting a file in OpenAI Files API. + Response: + title: Response type: object HealthInfo: - description: Health status information for the service. properties: status: $ref: '#/components/schemas/HealthStatus' + type: object required: - status title: HealthInfo - type: object + description: Health status information for the service. RouteInfo: - description: Information about an API route including its path, method, and implementing providers. properties: route: - title: Route type: string + title: Route method: - title: Method type: string + title: Method provider_types: items: type: string - title: Provider Types type: array + title: Provider Types + type: object required: - route - method - provider_types title: RouteInfo - type: object + description: Information about an API route including its path, method, and implementing providers. ListRoutesResponse: - description: Response containing a list of all available API routes. properties: data: items: $ref: '#/components/schemas/RouteInfo' - title: Data type: array + title: Data + type: object required: - data title: ListRoutesResponse - type: object + description: Response containing a list of all available API routes. OpenAIModel: - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: id: - title: Id type: string + title: Id object: + type: string const: model - default: model title: Object - type: string + default: model created: - title: Created type: integer + title: Created owned_by: - title: Owned By type: string + title: Owned By custom_metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - id - created - owned_by title: OpenAIModel - type: object + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata OpenAIListModelsResponse: properties: data: items: $ref: '#/components/schemas/OpenAIModel' - title: Data type: array + title: Data + type: object required: - data title: OpenAIListModelsResponse - type: object Model: - description: A model resource representing an AI model registered in Llama Stack. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: model - default: model title: Type - type: string + default: model metadata: additionalProperties: true - description: Any additional metadata for this model - title: Metadata 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 - type: object + description: A model resource representing an AI model registered in Llama Stack. ModelType: - description: Enumeration of supported model types in Llama Stack. + type: string enum: - llm - embedding - rerank title: ModelType - type: string + description: Enumeration of supported model types in Llama Stack. ModerationObject: - description: A moderation object. properties: id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model results: items: $ref: '#/components/schemas/ModerationObjectResults' - title: Results type: array + title: Results + type: object required: - id - model - results title: ModerationObject - type: object - ModerationObjectResults: description: A moderation object. + ModerationObjectResults: properties: flagged: - title: Flagged type: boolean + title: Flagged categories: anyOf: - additionalProperties: type: boolean type: object - type: 'null' - nullable: true category_applied_input_types: anyOf: - additionalProperties: @@ -5381,93 +6260,90 @@ components: type: array type: object - type: 'null' - nullable: true category_scores: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true user_message: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - flagged title: ModerationObjectResults - type: object + description: A moderation object. Prompt: - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. properties: prompt: anyOf: - type: string - type: 'null' description: The system prompt with variable placeholders - nullable: true version: - description: Version (integer starting at 1, incremented on save) - minimum: 1 - title: Version type: integer + minimum: 1.0 + title: Version + description: Version (integer starting at 1, incremented on save) prompt_id: - description: Unique identifier in format 'pmpt_<48-digit-hash>' - title: Prompt Id type: string + title: Prompt Id + description: Unique identifier in format 'pmpt_<48-digit-hash>' variables: - description: List of variable names that can be used in the prompt template items: type: string - title: Variables type: array + title: Variables + description: List of variable names that can be used in the prompt template is_default: - default: false - description: Boolean indicating whether this version is the default version - title: 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 - type: object + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. ListPromptsResponse: - description: Response model to list prompts. properties: data: items: $ref: '#/components/schemas/Prompt' - title: Data type: array + title: Data + type: object required: - data title: ListPromptsResponse - type: object + description: Response model to list prompts. ProviderInfo: - description: Information about a registered provider including its configuration and health status. properties: api: - title: Api type: string + title: Api provider_id: - title: Provider Id type: string + title: Provider Id provider_type: - title: Provider Type type: string + title: Provider Type config: additionalProperties: true - title: Config type: object + title: Config health: additionalProperties: true - title: Health type: object + title: Health + type: object required: - api - provider_id @@ -5475,62 +6351,62 @@ components: - config - health title: ProviderInfo - type: object + description: Information about a registered provider including its configuration and health status. ListProvidersResponse: - description: Response containing a list of all available providers. properties: data: items: $ref: '#/components/schemas/ProviderInfo' - title: Data type: array + title: Data + type: object required: - data title: ListProvidersResponse - type: object + description: Response containing a list of all available providers. ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. properties: data: items: $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIResponseObject - type: object + description: Paginated list of OpenAI response objects with navigation metadata. OpenAIResponseError: - description: Error details for failed OpenAI response requests. properties: code: - title: Code type: string + title: Code message: - title: Message type: string + title: Message + type: object required: - code - message title: OpenAIResponseError - type: object + description: Error details for failed OpenAI response requests. OpenAIResponseInput: anyOf: - discriminator: @@ -5567,29 +6443,27 @@ components: title: OpenAIResponseMessage title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage OpenAIResponseInputToolFileSearch: - description: File search tool configuration for OpenAI response inputs. properties: type: + type: string const: file_search - default: file_search title: Type - type: string + default: file_search vector_store_ids: items: type: string - title: Vector Store Ids type: array + title: Vector Store Ids filters: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true max_num_results: anyOf: - - maximum: 50 - minimum: 1 - type: integer + - type: integer + maximum: 50.0 + minimum: 1.0 - type: 'null' default: 10 ranking_options: @@ -5597,28 +6471,26 @@ components: - $ref: '#/components/schemas/SearchRankingOptions' title: SearchRankingOptions - type: 'null' - nullable: true title: SearchRankingOptions + type: object required: - vector_store_ids title: OpenAIResponseInputToolFileSearch - type: object + description: File search tool configuration for OpenAI response inputs. OpenAIResponseInputToolFunction: - description: Function tool configuration for OpenAI response inputs. properties: type: + type: string const: function - default: function title: Type - type: string + default: function name: - title: Name type: string + title: Name description: anyOf: - type: string - type: 'null' - nullable: true parameters: anyOf: - additionalProperties: true @@ -5628,18 +6500,17 @@ components: anyOf: - type: boolean - type: 'null' - nullable: true + type: object required: - name - parameters title: OpenAIResponseInputToolFunction - type: object + description: Function tool configuration for OpenAI response inputs. OpenAIResponseInputToolWebSearch: - description: Web search tool configuration for OpenAI response inputs. properties: type: - default: web_search title: Type + default: web_search type: string enum: - web_search @@ -5648,51 +6519,40 @@ components: - web_search_2025_08_26 search_context_size: anyOf: - - pattern: ^low|medium|high$ - type: string + - type: string + pattern: ^low|medium|high$ - type: 'null' default: medium - title: OpenAIResponseInputToolWebSearch type: object + title: OpenAIResponseInputToolWebSearch + description: Web search tool configuration for OpenAI response inputs. OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. properties: created_at: - title: Created At type: integer + title: Created At error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' title: OpenAIResponseError - type: 'null' - nullable: true title: OpenAIResponseError id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model object: + type: string const: response - default: response title: Object - type: string + default: response 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' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -5705,33 +6565,40 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output - type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: - anyOf: - - type: string + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) + type: array + title: Output + parallel_tool_calls: + type: boolean + title: Parallel Tool Calls + default: false + previous_response_id: + anyOf: + - type: string - type: 'null' - nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' title: OpenAIResponsePrompt - type: 'null' - nullable: true title: OpenAIResponsePrompt status: - title: Status type: string + title: Status temperature: anyOf: - type: number - type: 'null' - nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -5741,20 +6608,9 @@ components: anyOf: - type: number - type: 'null' - nullable: true tools: anyOf: - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' title: OpenAIResponseInputToolWebSearch @@ -5764,48 +6620,43 @@ components: title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - nullable: true truncation: anyOf: - type: string - type: 'null' - nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' title: OpenAIResponseUsage - type: 'null' - nullable: true title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - nullable: true max_tool_calls: anyOf: - type: integer - type: 'null' - 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' - title: OpenAIResponseMessage + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -5818,16 +6669,27 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Input + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array + title: Input + type: object required: - created_at - id @@ -5836,7 +6698,7 @@ components: - status - input title: OpenAIResponseObjectWithInput - type: object + description: OpenAI response object extended with input context information. OpenAIResponseOutput: discriminator: mapping: @@ -5865,20 +6727,13 @@ components: title: OpenAIResponseMCPApprovalRequest title: OpenAIResponseMessage | ... (7 variants) OpenAIResponsePrompt: - description: OpenAI compatible Prompt object that is used in OpenAI responses. properties: id: - title: Id type: string + title: Id variables: anyOf: - additionalProperties: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText @@ -5886,31 +6741,35 @@ components: title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: object - type: 'null' - nullable: true version: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - id title: OpenAIResponsePrompt - type: object + description: OpenAI compatible Prompt object that is used in OpenAI responses. OpenAIResponseText: - description: Text response configuration for OpenAI responses. properties: format: anyOf: - $ref: '#/components/schemas/OpenAIResponseTextFormat' title: OpenAIResponseTextFormat - type: 'null' - nullable: true title: OpenAIResponseTextFormat - title: OpenAIResponseText type: object + title: OpenAIResponseText + description: Text response configuration for OpenAI responses. OpenAIResponseTool: discriminator: mapping: @@ -5933,16 +6792,15 @@ components: title: OpenAIResponseToolMCP title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. properties: type: + type: string const: mcp - default: mcp title: Type - type: string + default: mcp server_label: - title: Server Label type: string + title: Server Label allowed_tools: anyOf: - items: @@ -5953,43 +6811,41 @@ components: title: AllowedToolsFilter - type: 'null' title: list[string] | AllowedToolsFilter - nullable: true + type: object required: - server_label title: OpenAIResponseToolMCP - type: object + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. OpenAIResponseUsage: - description: Usage information for OpenAI response. properties: input_tokens: - title: Input Tokens type: integer + title: Input Tokens output_tokens: - title: Output Tokens type: integer + title: Output Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens input_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' title: OpenAIResponseUsageInputTokensDetails - type: 'null' - nullable: true title: OpenAIResponseUsageInputTokensDetails output_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' title: OpenAIResponseUsageOutputTokensDetails - type: 'null' - nullable: true title: OpenAIResponseUsageOutputTokensDetails + type: object required: - input_tokens - output_tokens - total_tokens title: OpenAIResponseUsage - type: object + description: Usage information for OpenAI response. ResponseGuardrailSpec: description: Specification for a guardrail to apply during response generation. properties: @@ -6022,40 +6878,37 @@ components: title: OpenAIResponseInputToolMCP title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: type: + type: string const: mcp - default: mcp title: Type - type: string + default: mcp server_label: - title: Server Label type: string + title: Server Label server_url: - title: Server Url type: string + title: Server Url headers: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true authorization: anyOf: - type: string - type: 'null' - nullable: true require_approval: anyOf: - - const: always - type: string - - const: never - type: string + - type: string + const: always + - type: string + const: never - $ref: '#/components/schemas/ApprovalFilter' title: ApprovalFilter - default: never title: string | ApprovalFilter + default: never allowed_tools: anyOf: - items: @@ -6066,51 +6919,39 @@ components: title: AllowedToolsFilter - type: 'null' title: list[string] | AllowedToolsFilter - nullable: true + type: object required: - server_label - server_url title: OpenAIResponseInputToolMCP - type: object + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. OpenAIResponseObject: - description: Complete OpenAI response object containing generation results and metadata. properties: created_at: - title: Created At type: integer + title: Created At error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' title: OpenAIResponseError - type: 'null' - nullable: true title: OpenAIResponseError id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model object: + type: string const: response - default: response title: Object - type: string + default: response 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' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -6123,33 +6964,40 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array + title: Output parallel_tool_calls: - default: false - title: Parallel Tool Calls type: boolean + title: Parallel Tool Calls + default: false previous_response_id: anyOf: - type: string - type: 'null' - nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' title: OpenAIResponsePrompt - type: 'null' - nullable: true title: OpenAIResponsePrompt status: - title: Status type: string + title: Status temperature: anyOf: - type: number - type: 'null' - nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -6159,20 +7007,9 @@ components: anyOf: - type: number - type: 'null' - nullable: true tools: anyOf: - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' title: OpenAIResponseInputToolWebSearch @@ -6182,32 +7019,38 @@ components: title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - nullable: true truncation: anyOf: - type: string - type: 'null' - nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' title: OpenAIResponseUsage - type: 'null' - nullable: true title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - nullable: true max_tool_calls: anyOf: - type: integer - type: 'null' - nullable: true + type: object required: - created_at - id @@ -6215,7 +7058,7 @@ components: - output - status title: OpenAIResponseObject - type: object + description: Complete OpenAI response object containing generation results and metadata. OpenAIResponseContentPartOutputText: description: Text content within a streamed response part. properties: @@ -7379,43 +8222,32 @@ components: title: OpenAIResponseObjectStreamResponseWebSearchCallSearching type: object OpenAIDeleteResponseObject: - description: Response object confirming deletion of an OpenAI response. properties: id: - title: Id type: string + title: Id object: + type: string const: response - default: response title: Object - type: string + default: response deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: OpenAIDeleteResponseObject - type: object + description: Response object confirming deletion of an OpenAI response. ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. 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' - title: OpenAIResponseMessage + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -7428,39 +8260,48 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Data + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array + title: Data object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data title: ListOpenAIResponseInputItem - type: object + description: List container for OpenAI response input items. RunShieldResponse: - description: Response from running a safety shield. properties: violation: anyOf: - $ref: '#/components/schemas/SafetyViolation' title: SafetyViolation - type: 'null' - nullable: true title: SafetyViolation - title: RunShieldResponse type: object + title: RunShieldResponse + description: Response from running a safety shield. SafetyViolation: - description: Details of a safety violation detected by content moderation. properties: violation_level: $ref: '#/components/schemas/ViolationLevel' @@ -7468,25 +8309,25 @@ components: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - violation_level title: SafetyViolation - type: object + description: Details of a safety violation detected by content moderation. ViolationLevel: - description: Severity level of a safety violation. + type: string enum: - info - warn - error title: ViolationLevel - type: string + description: Severity level of a safety violation. AggregationFunctionType: - description: Types of aggregation functions for scoring results. + type: string enum: - average - weighted_average @@ -7494,193 +8335,176 @@ components: - categorical_count - accuracy title: AggregationFunctionType - type: string + description: Types of aggregation functions for scoring results. ArrayType: - description: Parameter type for array values. properties: type: + type: string const: array - default: array title: Type - type: string - title: ArrayType + default: array type: object + title: ArrayType + description: Parameter type for array values. BasicScoringFnParams: - description: Parameters for basic scoring function configuration. properties: type: + type: string const: basic - default: basic title: Type - type: string + default: basic aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array - title: BasicScoringFnParams + 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. BooleanType: - description: Parameter type for boolean values. properties: type: + type: string const: boolean - default: boolean title: Type - type: string - title: BooleanType + default: boolean type: object + title: BooleanType + description: Parameter type for boolean values. ChatCompletionInputType: - description: Parameter type for chat completion input. properties: type: + type: string const: chat_completion_input - default: chat_completion_input title: Type - type: string - title: ChatCompletionInputType + default: chat_completion_input type: object + title: ChatCompletionInputType + description: Parameter type for chat completion input. CompletionInputType: - description: Parameter type for completion input. properties: type: + type: string const: completion_input - default: completion_input title: Type - type: string - title: CompletionInputType + default: completion_input type: object + title: CompletionInputType + description: Parameter type for completion input. JsonType: - description: Parameter type for JSON values. properties: type: + type: string const: json - default: json title: Type - type: string - title: JsonType + default: json type: object + title: JsonType + description: Parameter type for JSON values. LLMAsJudgeScoringFnParams: - description: Parameters for LLM-as-judge scoring function configuration. properties: type: + type: string const: llm_as_judge - default: llm_as_judge title: Type - type: string + default: llm_as_judge judge_model: - title: Judge Model type: string + title: Judge Model prompt_template: anyOf: - type: string - type: 'null' - nullable: true judge_score_regexes: - description: Regexes to extract the answer from generated response items: type: string - title: Judge Score Regexes type: array + title: Judge Score Regexes + description: Regexes to extract the answer from generated response aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array + title: Aggregation Functions + description: Aggregation functions to apply to the scores of each row + type: object required: - judge_model title: LLMAsJudgeScoringFnParams - type: object + description: Parameters for LLM-as-judge scoring function configuration. NumberType: - description: Parameter type for numeric values. properties: type: + type: string const: number - default: number title: Type - type: string - title: NumberType + default: number type: object + title: NumberType + description: Parameter type for numeric values. ObjectType: - description: Parameter type for object values. properties: type: + type: string const: object - default: object title: Type - type: string - title: ObjectType + default: object type: object + title: ObjectType + description: Parameter type for object values. RegexParserScoringFnParams: - description: Parameters for regex parser scoring function configuration. properties: type: + type: string const: regex_parser - default: regex_parser title: Type - type: string + default: regex_parser parsing_regexes: - description: Regex to extract the answer from generated response items: type: string - title: Parsing Regexes type: array + title: Parsing Regexes + description: Regex to extract the answer from generated response aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array - title: RegexParserScoringFnParams + 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. ScoringFn: - description: A scoring function resource for evaluating model outputs. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: scoring_function - default: scoring_function title: Type - type: string + default: scoring_function description: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - description: Any additional metadata for this definition - title: Metadata type: object + title: Metadata + description: Any additional metadata for this definition return_type: - description: The return type of the deterministic function - discriminator: - mapping: - 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' title: StringType @@ -7701,32 +8525,45 @@ components: - $ref: '#/components/schemas/CompletionInputType' title: CompletionInputType title: StringType | ... (9 variants) + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + 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: anyOf: - - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval title: Params - nullable: true + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + type: object required: - identifier - provider_id - return_type title: ScoringFn - type: object + description: A scoring function resource for evaluating model outputs. ScoringFnParams: discriminator: mapping: @@ -7743,127 +8580,124 @@ components: title: BasicScoringFnParams title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams StringType: - description: Parameter type for string values. properties: type: + type: string const: string - default: string title: Type - type: string - title: StringType + default: string type: object + title: StringType + description: Parameter type for string values. UnionType: - description: Parameter type for union values. properties: type: + type: string const: union - default: union title: Type - type: string - title: UnionType + default: union type: object + title: UnionType + description: Parameter type for union values. ListScoringFunctionsResponse: properties: data: items: $ref: '#/components/schemas/ScoringFn' - title: Data type: array + title: Data + type: object required: - data title: ListScoringFunctionsResponse - type: object ScoreResponse: - description: The response from scoring. properties: results: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Results type: object + title: Results + type: object required: - results title: ScoreResponse - type: object + description: The response from scoring. ScoringResult: - description: A scoring result for a single row. properties: score_rows: items: additionalProperties: true type: object - title: Score Rows type: array + title: Score Rows aggregated_results: additionalProperties: true - title: Aggregated Results type: object + title: Aggregated Results + type: object required: - score_rows - aggregated_results title: ScoringResult - type: object + description: A scoring result for a single row. ScoreBatchResponse: - description: Response from batch scoring operations on datasets. properties: dataset_id: anyOf: - type: string - type: 'null' - nullable: true results: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Results type: object + title: Results + type: object required: - results title: ScoreBatchResponse - type: object + description: Response from batch scoring operations on datasets. Shield: - description: A safety shield resource that can be used to check content. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: shield - default: shield title: Type - type: string + default: shield params: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - identifier - provider_id title: Shield - type: object + description: A safety shield resource that can be used to check content. ListShieldsResponse: properties: data: items: $ref: '#/components/schemas/Shield' - title: Data type: array + title: Data + type: object required: - data title: ListShieldsResponse - type: object ImageContentItem: description: A image content item properties: @@ -7920,184 +8754,172 @@ components: title: TextContentItem title: ImageContentItem | TextContentItem TextContentItem: - description: A text content item properties: type: + type: string const: text - default: text title: Type - type: string + default: text text: - title: Text type: string + title: Text + type: object required: - text title: TextContentItem - type: object + description: A text content item ToolInvocationResult: - description: Result of a tool invocation. properties: content: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array - title: list[ImageContentItem | TextContentItem] + title: list[ImageContentItem-Output | TextContentItem] - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true + title: string | list[ImageContentItem-Output | TextContentItem] error_message: anyOf: - type: string - type: 'null' - nullable: true error_code: anyOf: - type: integer - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true - title: ToolInvocationResult type: object + title: ToolInvocationResult + description: Result of a tool invocation. URL: - description: A URL reference to external content. properties: uri: - title: Uri type: string + title: Uri + type: object required: - uri title: URL - type: object + description: A URL reference to external content. ToolDef: - description: Tool definition used in runtime contexts. properties: toolgroup_id: anyOf: - type: string - type: 'null' - nullable: true name: - title: Name type: string + title: Name description: anyOf: - type: string - type: 'null' - nullable: true input_schema: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true output_schema: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - name title: ToolDef - type: object + description: Tool definition used in runtime contexts. ListToolDefsResponse: - description: Response containing a list of tool definitions. properties: data: items: $ref: '#/components/schemas/ToolDef' - title: Data type: array + title: Data + type: object required: - data title: ListToolDefsResponse - type: object + description: Response containing a list of tool definitions. ToolGroup: - description: A group of related tools managed together. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: tool_group - default: tool_group title: Type - type: string + default: tool_group mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' title: URL - type: 'null' - nullable: true title: URL args: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - identifier - provider_id title: ToolGroup - type: object + description: A group of related tools managed together. ListToolGroupsResponse: - description: Response containing a list of tool groups. properties: data: items: $ref: '#/components/schemas/ToolGroup' - title: Data type: array + title: Data + type: object required: - data title: ListToolGroupsResponse - type: object + description: Response containing a list of tool groups. Chunk: description: A chunk of content that can be inserted into a vector database. properties: @@ -8157,105 +8979,94 @@ components: 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. properties: chunk_id: anyOf: - type: string - type: 'null' - nullable: true document_id: anyOf: - type: string - type: 'null' - nullable: true source: anyOf: - type: string - type: 'null' - nullable: true created_timestamp: anyOf: - type: integer - type: 'null' - nullable: true updated_timestamp: anyOf: - type: integer - type: 'null' - nullable: true chunk_window: anyOf: - type: string - type: 'null' - nullable: true chunk_tokenizer: anyOf: - type: string - type: 'null' - nullable: true chunk_embedding_model: anyOf: - type: string - type: 'null' - nullable: true chunk_embedding_dimension: anyOf: - type: integer - type: 'null' - nullable: true content_token_count: anyOf: - type: integer - type: 'null' - nullable: true metadata_token_count: anyOf: - type: integer - type: 'null' - nullable: true - title: ChunkMetadata type: object + title: 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. QueryChunksResponse: - description: Response from querying chunks in a vector database. properties: chunks: items: - $ref: '#/components/schemas/Chunk' - title: Chunks + $ref: '#/components/schemas/Chunk-Output' type: array + title: Chunks scores: items: type: number - title: Scores type: array + title: Scores + type: object required: - chunks - scores title: QueryChunksResponse - type: object + description: Response from querying chunks in a vector database. VectorStoreFileCounts: - description: File processing status counts for a vector store. properties: completed: - title: Completed type: integer + title: Completed cancelled: - title: Cancelled type: integer + title: Cancelled failed: - title: Failed type: integer + title: Failed in_progress: - title: In Progress type: integer + title: In Progress total: - title: Total type: integer + title: Total + type: object required: - completed - cancelled @@ -8263,91 +9074,85 @@ components: - in_progress - total title: VectorStoreFileCounts - type: object + description: File processing status counts for a vector store. VectorStoreListResponse: - description: Response from listing vector stores. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreListResponse - type: object + description: Response from listing vector stores. VectorStoreObject: - description: OpenAI Vector Store object. properties: id: - title: Id type: string + title: Id object: - default: vector_store - title: Object type: string + title: Object + default: vector_store created_at: - title: Created At type: integer + title: Created At name: anyOf: - type: string - type: 'null' - nullable: true usage_bytes: - default: 0 - title: Usage Bytes type: integer + title: Usage Bytes + default: 0 file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' status: - default: completed - title: Status type: string + title: Status + default: completed expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true expires_at: anyOf: - type: integer - type: 'null' - nullable: true last_active_at: anyOf: - type: integer - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - id - created_at - file_counts title: VectorStoreObject - type: object + description: OpenAI Vector Store object. VectorStoreChunkingStrategy: discriminator: mapping: @@ -8361,159 +9166,151 @@ components: title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreChunkingStrategyAuto: - description: Automatic chunking strategy for vector store files. properties: type: + type: string const: auto - default: auto title: Type - type: string - title: VectorStoreChunkingStrategyAuto + default: auto type: object + title: VectorStoreChunkingStrategyAuto + description: Automatic chunking strategy for vector store files. VectorStoreChunkingStrategyStatic: - description: Static chunking strategy with configurable parameters. properties: type: + type: string const: static - default: static title: Type - type: string + default: static static: $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + type: object required: - static title: VectorStoreChunkingStrategyStatic - type: object + description: Static chunking strategy with configurable parameters. VectorStoreChunkingStrategyStaticConfig: - description: Configuration for static chunking strategy. properties: chunk_overlap_tokens: - default: 400 - title: Chunk Overlap Tokens type: integer + title: Chunk Overlap Tokens + default: 400 max_chunk_size_tokens: - default: 800 - maximum: 4096 - minimum: 100 - title: Max Chunk Size Tokens type: integer - title: VectorStoreChunkingStrategyStaticConfig + maximum: 4096.0 + minimum: 100.0 + title: Max Chunk Size Tokens + default: 800 type: object + title: VectorStoreChunkingStrategyStaticConfig + description: Configuration for static chunking strategy. OpenAICreateVectorStoreRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store with extra_body support. properties: name: anyOf: - type: string - type: 'null' - nullable: true file_ids: anyOf: - items: type: string type: array - type: 'null' - nullable: true expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true chunking_strategy: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true - title: OpenAICreateVectorStoreRequestWithExtraBody + additionalProperties: true type: object + title: OpenAICreateVectorStoreRequestWithExtraBody + description: Request to create a vector store with extra_body support. VectorStoreDeleteResponse: - description: Response from deleting a vector store. properties: id: - title: Id type: string + title: Id object: - default: vector_store.deleted - title: Object type: string + title: Object + default: vector_store.deleted deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: VectorStoreDeleteResponse - type: object + description: Response from deleting a vector store. OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store file batch with extra_body support. properties: file_ids: items: type: string - title: File Ids type: array + title: File Ids attributes: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true chunking_strategy: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - nullable: true + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + additionalProperties: true + type: object required: - file_ids title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - type: object + description: Request to create a vector store file batch with extra_body support. VectorStoreFileBatchObject: - description: OpenAI Vector Store File Batch object. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file_batch - title: Object type: string + title: Object + default: vector_store.file_batch created_at: - title: Created At type: integer + title: Created At vector_store_id: - title: Vector Store Id type: string + title: Vector Store Id status: title: Status type: string @@ -8525,6 +9322,7 @@ components: default: completed file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' + type: object required: - id - created_at @@ -8532,7 +9330,7 @@ components: - status - file_counts title: VectorStoreFileBatchObject - type: object + description: OpenAI Vector Store File Batch object. VectorStoreFileStatus: type: string enum: @@ -8542,7 +9340,6 @@ components: - failed default: completed VectorStoreFileLastError: - description: Error information for failed vector store file processing. properties: code: title: Code @@ -8552,48 +9349,47 @@ components: - rate_limit_exceeded default: server_error message: - title: Message type: string + title: Message + type: object required: - code - message title: VectorStoreFileLastError - type: object + description: Error information for failed vector store file processing. VectorStoreFileObject: - description: OpenAI Vector Store File object. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file - title: Object type: string + title: Object + default: vector_store.file attributes: additionalProperties: true - title: Attributes type: object + title: Attributes chunking_strategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' created_at: - title: Created At type: integer + title: Created At last_error: anyOf: - $ref: '#/components/schemas/VectorStoreFileLastError' title: VectorStoreFileLastError - type: 'null' - nullable: true title: VectorStoreFileLastError status: title: Status @@ -8605,12 +9401,13 @@ components: - failed default: completed usage_bytes: - default: 0 - title: Usage Bytes type: integer + title: Usage Bytes + default: 0 vector_store_id: - title: Vector Store Id type: string + title: Vector Store Id + type: object required: - id - chunking_strategy @@ -8618,158 +9415,149 @@ components: - status - vector_store_id title: VectorStoreFileObject - type: object + description: OpenAI Vector Store File object. VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreFileObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreFilesListInBatchResponse - type: object + description: Response from listing files in a vector store file batch. VectorStoreListFilesResponse: - description: Response from listing files in a vector store. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreFileObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreListFilesResponse - type: object + description: Response from listing files in a vector store. VectorStoreFileDeleteResponse: - description: Response from deleting a vector store file. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file.deleted - title: Object type: string + title: Object + default: vector_store.file.deleted deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: VectorStoreFileDeleteResponse - type: object + description: Response from deleting a vector store file. VectorStoreContent: - description: Content item from a vector store file or search result. properties: type: + type: string const: text title: Type - type: string text: - title: Text type: string + title: Text embedding: anyOf: - items: type: number type: array - type: 'null' - nullable: true chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' title: ChunkMetadata - type: 'null' - nullable: true title: ChunkMetadata metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - type - text title: VectorStoreContent - type: object + description: Content item from a vector store file or search result. VectorStoreFileContentResponse: - description: Represents the parsed content of a vector store file. properties: object: + type: string const: vector_store.file_content.page - default: vector_store.file_content.page title: Object - type: string + default: vector_store.file_content.page data: items: $ref: '#/components/schemas/VectorStoreContent' - title: Data type: array + title: Data has_more: - default: false - title: Has More type: boolean + title: Has More + default: false next_page: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - data title: VectorStoreFileContentResponse - type: object + description: Represents the parsed content of a vector store file. VectorStoreSearchResponse: - description: Response from searching a vector store. properties: file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename score: - title: Score type: number + title: Score attributes: anyOf: - additionalProperties: @@ -8780,241 +9568,230 @@ components: title: string | number | boolean type: object - type: 'null' - nullable: true content: items: $ref: '#/components/schemas/VectorStoreContent' - title: Content type: array + title: Content + type: object required: - file_id - filename - score - content title: VectorStoreSearchResponse - type: object + description: Response from searching a vector store. VectorStoreSearchResponsePage: - description: Paginated response from searching a vector store. properties: object: - default: vector_store.search_results.page - title: Object type: string + title: Object + default: vector_store.search_results.page search_query: items: type: string - title: Search Query type: array + title: Search Query data: items: $ref: '#/components/schemas/VectorStoreSearchResponse' - title: Data type: array + title: Data has_more: - default: false - title: Has More type: boolean + title: Has More + default: false next_page: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - search_query - data title: VectorStoreSearchResponsePage - type: object + description: Paginated response from searching a vector store. VersionInfo: - description: Version information for the service. properties: version: - title: Version type: string + title: Version + type: object required: - version title: VersionInfo - type: object + description: Version information for the service. PaginatedResponse: - description: A generic paginated response that follows a simple format. properties: data: items: additionalProperties: true type: object - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More url: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - data - has_more title: PaginatedResponse - type: object + description: A generic paginated response that follows a simple format. Dataset: - description: Dataset resource for storing and accessing training or evaluation data. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: dataset - default: dataset title: Type - type: string + default: dataset purpose: $ref: '#/components/schemas/DatasetPurpose' source: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type oneOf: - $ref: '#/components/schemas/URIDataSource' title: URIDataSource - $ref: '#/components/schemas/RowsDataSource' title: RowsDataSource title: URIDataSource | RowsDataSource + discriminator: + propertyName: type + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' metadata: additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata type: object + title: Metadata + description: Any additional metadata for this dataset + type: object required: - identifier - provider_id - purpose - source title: Dataset - type: object + description: Dataset resource for storing and accessing training or evaluation data. RowsDataSource: - description: A dataset stored in rows. properties: type: + type: string const: rows - default: rows title: Type - type: string + default: rows rows: items: additionalProperties: true type: object - title: Rows type: array + title: Rows + type: object required: - rows title: RowsDataSource - type: object + description: A dataset stored in rows. URIDataSource: - description: A dataset that can be obtained from a URI. properties: type: + type: string const: uri - default: uri title: Type - type: string + default: uri uri: - title: Uri type: string + title: Uri + type: object required: - uri title: URIDataSource - type: object + description: A dataset that can be obtained from a URI. ListDatasetsResponse: - description: Response from listing datasets. properties: data: items: $ref: '#/components/schemas/Dataset' - title: Data type: array + title: Data + type: object required: - data title: ListDatasetsResponse - type: object + description: Response from listing datasets. Benchmark: - description: A benchmark resource for evaluating model performance. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: benchmark - default: benchmark title: Type - type: string + default: benchmark dataset_id: - title: Dataset Id type: string + title: Dataset Id scoring_functions: items: type: string - title: Scoring Functions type: array + title: Scoring Functions metadata: additionalProperties: true - description: Metadata for this evaluation task - title: Metadata type: object + title: Metadata + description: Metadata for this evaluation task + type: object required: - identifier - provider_id - dataset_id - scoring_functions title: Benchmark - type: object + description: A benchmark resource for evaluating model performance. ListBenchmarksResponse: properties: data: items: $ref: '#/components/schemas/Benchmark' - title: Data type: array + title: Data + type: object required: - data title: ListBenchmarksResponse - type: object BenchmarkConfig: - description: A benchmark configuration for evaluation. properties: eval_candidate: $ref: '#/components/schemas/ModelCandidate' scoring_params: additionalProperties: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' title: LLMAsJudgeScoringFnParams @@ -9022,41 +9799,46 @@ components: title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - description: Map between scoring function id and parameters for each scoring function you want to run - title: Scoring Params type: object + title: Scoring Params + description: Map between scoring function id and parameters for each scoring function you want to run num_examples: anyOf: - type: integer - type: 'null' description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - nullable: true + type: object required: - eval_candidate title: BenchmarkConfig - type: object + description: A benchmark configuration for evaluation. GreedySamplingStrategy: - description: Greedy sampling strategy that selects the highest probability token at each step. properties: type: + type: string const: greedy - default: greedy title: Type - type: string - title: GreedySamplingStrategy + default: greedy type: object + title: GreedySamplingStrategy + description: Greedy sampling strategy that selects the highest probability token at each step. ModelCandidate: - description: A model candidate for evaluation. properties: type: + type: string const: model - default: model title: Type - type: string + default: model model: - title: Model type: string + title: Model sampling_params: $ref: '#/components/schemas/SamplingParams' system_message: @@ -9064,23 +9846,16 @@ components: - $ref: '#/components/schemas/SystemMessage' title: SystemMessage - type: 'null' - nullable: true title: SystemMessage + type: object required: - model - sampling_params title: ModelCandidate - type: object + description: A model candidate for evaluation. SamplingParams: - description: Sampling parameters. properties: strategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' title: GreedySamplingStrategy @@ -9089,11 +9864,16 @@ components: - $ref: '#/components/schemas/TopKSamplingStrategy' title: TopKSamplingStrategy title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' max_tokens: anyOf: - type: integer - type: 'null' - nullable: true repetition_penalty: anyOf: - type: number @@ -9105,74 +9885,73 @@ components: type: string type: array - type: 'null' - nullable: true - title: SamplingParams type: object + title: SamplingParams + description: Sampling parameters. SystemMessage: - description: A system message providing instructions or context to the model. properties: role: + type: string const: system - default: system title: Role - type: string + default: system content: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + type: object required: - content title: SystemMessage - type: object + description: A system message providing instructions or context to the model. TopKSamplingStrategy: - description: Top-k sampling strategy that restricts sampling to the k most likely tokens. properties: type: + type: string const: top_k - default: top_k title: Type - type: string + default: top_k top_k: - minimum: 1 - title: Top K type: integer + minimum: 1.0 + title: Top K + type: object required: - top_k title: TopKSamplingStrategy - type: object + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. TopPSamplingStrategy: - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. properties: type: + type: string const: top_p - default: top_p title: Type - type: string + default: top_p temperature: anyOf: - type: number @@ -9183,94 +9962,94 @@ components: - type: number - type: 'null' default: 0.95 + type: object required: - temperature title: TopPSamplingStrategy - type: object + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. EvaluateResponse: - description: The response from an evaluation. properties: generations: items: additionalProperties: true type: object - title: Generations type: array + title: Generations scores: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Scores type: object + title: Scores + type: object required: - generations - scores title: EvaluateResponse - type: object + description: The response from an evaluation. Job: - description: A job execution instance with status tracking. properties: job_id: - title: Job Id type: string + title: Job Id status: $ref: '#/components/schemas/JobStatus' + type: object required: - job_id - status title: Job - type: object + description: A job execution instance with status tracking. RerankData: - description: A single rerank result from a reranking response. properties: index: - title: Index type: integer + title: Index relevance_score: - title: Relevance Score type: number + title: Relevance Score + type: object required: - index - relevance_score title: RerankData - type: object + description: A single rerank result from a reranking response. RerankResponse: - description: Response from a reranking request. properties: data: items: $ref: '#/components/schemas/RerankData' - title: Data type: array + title: Data + type: object required: - data title: RerankResponse - type: object + description: Response from a reranking request. Checkpoint: - description: Checkpoint created during training runs. properties: identifier: - title: Identifier type: string + title: Identifier created_at: + type: string format: date-time title: Created At - type: string epoch: - title: Epoch type: integer + title: Epoch post_training_job_id: - title: Post Training Job Id type: string + title: Post Training Job Id path: - title: Path type: string + title: Path training_metrics: anyOf: - $ref: '#/components/schemas/PostTrainingMetric' title: PostTrainingMetric - type: 'null' - nullable: true title: PostTrainingMetric + type: object required: - identifier - created_at @@ -9278,137 +10057,131 @@ components: - post_training_job_id - path title: Checkpoint - type: object + description: Checkpoint created during training runs. PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid checkpoints: items: $ref: '#/components/schemas/Checkpoint' - title: Checkpoints type: array + title: Checkpoints + type: object required: - job_uuid title: PostTrainingJobArtifactsResponse - type: object + description: Artifacts of a finetuning job. PostTrainingMetric: - description: Training metrics captured during post-training jobs. properties: epoch: - title: Epoch type: integer + title: Epoch train_loss: - title: Train Loss type: number + title: Train Loss validation_loss: - title: Validation Loss type: number + title: Validation Loss perplexity: - title: Perplexity type: number + title: Perplexity + type: object required: - epoch - train_loss - validation_loss - perplexity title: PostTrainingMetric - type: object + description: Training metrics captured during post-training jobs. PostTrainingJobStatusResponse: - description: Status of a finetuning job. properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid status: $ref: '#/components/schemas/JobStatus' scheduled_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true started_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true completed_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true checkpoints: items: $ref: '#/components/schemas/Checkpoint' - title: Checkpoints type: array + title: Checkpoints + type: object required: - job_uuid - status title: PostTrainingJobStatusResponse - type: object + description: Status of a finetuning job. ListPostTrainingJobsResponse: properties: data: items: $ref: '#/components/schemas/PostTrainingJob' - title: Data type: array + title: Data + type: object required: - data title: ListPostTrainingJobsResponse - type: object DPOAlignmentConfig: - description: Configuration for Direct Preference Optimization (DPO) alignment. properties: beta: - title: Beta type: number + title: Beta loss_type: $ref: '#/components/schemas/DPOLossType' default: sigmoid + type: object required: - beta title: DPOAlignmentConfig - type: object + description: Configuration for Direct Preference Optimization (DPO) alignment. DPOLossType: + type: string enum: - sigmoid - hinge - ipo - kto_pair title: DPOLossType - type: string DataConfig: - description: Configuration for training data and data loading. properties: dataset_id: - title: Dataset Id type: string + title: Dataset Id batch_size: - title: Batch Size type: integer + title: Batch Size shuffle: - title: Shuffle type: boolean + title: Shuffle data_format: $ref: '#/components/schemas/DatasetFormat' validation_dataset_id: anyOf: - type: string - type: 'null' - nullable: true packed: anyOf: - type: boolean @@ -9419,22 +10192,22 @@ components: - type: boolean - type: 'null' default: false + type: object required: - dataset_id - batch_size - shuffle - data_format title: DataConfig - type: object + description: Configuration for training data and data loading. DatasetFormat: - description: Format of the training dataset. + type: string enum: - instruct - dialog title: DatasetFormat - type: string + description: Format of the training dataset. EfficiencyConfig: - description: Configuration for memory and compute efficiency optimizations. properties: enable_activation_checkpointing: anyOf: @@ -9456,51 +10229,51 @@ components: - type: boolean - type: 'null' default: false - title: EfficiencyConfig type: object + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. OptimizerConfig: - description: Configuration parameters for the optimization algorithm. properties: optimizer_type: $ref: '#/components/schemas/OptimizerType' lr: - title: Lr type: number + title: Lr weight_decay: - title: Weight Decay type: number + title: Weight Decay num_warmup_steps: - title: Num Warmup Steps type: integer + title: Num Warmup Steps + type: object required: - optimizer_type - lr - weight_decay - num_warmup_steps title: OptimizerConfig - type: object + description: Configuration parameters for the optimization algorithm. OptimizerType: - description: Available optimizer algorithms for training. + type: string enum: - adam - adamw - sgd title: OptimizerType - type: string + description: Available optimizer algorithms for training. TrainingConfig: - description: Comprehensive configuration for the training process. properties: n_epochs: - title: N Epochs type: integer + title: N Epochs max_steps_per_epoch: - default: 1 - title: Max Steps Per Epoch type: integer - gradient_accumulation_steps: + title: Max Steps Per Epoch default: 1 - title: Gradient Accumulation Steps + gradient_accumulation_steps: type: integer + title: Gradient Accumulation Steps + default: 1 max_validation_steps: anyOf: - type: integer @@ -9511,40 +10284,38 @@ components: - $ref: '#/components/schemas/DataConfig' title: DataConfig - type: 'null' - nullable: true title: DataConfig optimizer_config: anyOf: - $ref: '#/components/schemas/OptimizerConfig' title: OptimizerConfig - type: 'null' - nullable: true title: OptimizerConfig efficiency_config: anyOf: - $ref: '#/components/schemas/EfficiencyConfig' title: EfficiencyConfig - type: 'null' - nullable: true title: EfficiencyConfig dtype: anyOf: - type: string - type: 'null' default: bf16 + type: object required: - n_epochs title: TrainingConfig - type: object + description: Comprehensive configuration for the training process. PostTrainingJob: properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid + type: object required: - job_uuid title: PostTrainingJob - type: object AlgorithmConfig: discriminator: mapping: @@ -9558,30 +10329,29 @@ components: title: QATFinetuningConfig title: LoraFinetuningConfig | QATFinetuningConfig LoraFinetuningConfig: - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. properties: type: + type: string const: LoRA - default: LoRA title: Type - type: string + default: LoRA lora_attn_modules: items: type: string - title: Lora Attn Modules type: array + title: Lora Attn Modules apply_lora_to_mlp: - title: Apply Lora To Mlp type: boolean + title: Apply Lora To Mlp apply_lora_to_output: - title: Apply Lora To Output type: boolean + title: Apply Lora To Output rank: - title: Rank type: integer + title: Rank alpha: - title: Alpha type: integer + title: Alpha use_dora: anyOf: - type: boolean @@ -9592,6 +10362,7 @@ components: - type: boolean - type: 'null' default: false + type: object required: - lora_attn_modules - apply_lora_to_mlp @@ -9599,26 +10370,26 @@ components: - rank - alpha title: LoraFinetuningConfig - type: object + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. QATFinetuningConfig: - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: type: + type: string const: QAT - default: QAT title: Type - type: string + default: QAT quantizer_name: - title: Quantizer Name type: string + title: Quantizer Name group_size: - title: Group Size type: integer + title: Group Size + type: object required: - quantizer_name - group_size title: QATFinetuningConfig - type: object + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. ParamType: discriminator: mapping: @@ -9664,132 +10435,7 @@ components: - $ref: '#/components/schemas/RowsDataSource' title: RowsDataSource title: URIDataSource | RowsDataSource - _URLOrData: - description: A URL or a base64 encoded string - properties: - url: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - nullable: true - title: URL - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - nullable: true - title: _URLOrData - type: object - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat - type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. - 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 - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - MCPListToolsTool: - description: Tool definition returned by MCP list tools operation. - properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - input_schema - - name - title: MCPListToolsTool - type: object - OpenAIResponseOutputMessageFileSearchToolCallResults: - description: Search results returned by the file search operation. - 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 AllowedToolsFilter: - description: Filter configuration for restricting which MCP tools can be used. properties: tool_names: anyOf: @@ -9797,11 +10443,10 @@ components: type: string type: array - type: 'null' - nullable: true - title: AllowedToolsFilter type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. properties: always: anyOf: @@ -9809,31 +10454,1640 @@ components: type: string type: array - type: 'null' - nullable: true never: anyOf: - items: type: string type: array - type: 'null' - nullable: true - title: ApprovalFilter type: object - SearchRankingOptions: - description: Options for ranking and filtering search results. + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. + BatchError: properties: - ranker: + code: anyOf: - type: string - type: 'null' - nullable: true - score_threshold: + line: anyOf: - - type: number + - type: integer - type: 'null' - default: 0.0 - title: SearchRankingOptions + message: + anyOf: + - type: string + - type: 'null' + param: + anyOf: + - type: string + - type: 'null' + 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 + BatchesPostRequest: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + const: 24h + title: Completion Window + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + idempotency_key: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_file_id + - endpoint + - completion_window + title: BatchesPostRequest + Body_openai_upload_file_v1_files_post: + properties: + file: + type: string + format: binary + title: File + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + expires_after: + anyOf: + - $ref: '#/components/schemas/ExpiresAfter' + title: ExpiresAfter + - type: 'null' + title: ExpiresAfter + type: object + required: + - file + - purpose + title: Body_openai_upload_file_v1_files_post + Body_register_benchmark_v1alpha_eval_benchmarks_post: + properties: + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - scoring_functions + title: Body_register_benchmark_v1alpha_eval_benchmarks_post + Body_register_scoring_function_v1_scoring_functions_post: + properties: + return_type: + anyOf: + - $ref: '#/components/schemas/StringType' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + params: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: Params + type: object + required: + - return_type + title: Body_register_scoring_function_v1_scoring_functions_post + Body_register_tool_group_v1_toolgroups_post: + properties: + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + title: URL + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + title: Body_register_tool_group_v1_toolgroups_post + Chunk-Input: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + Chunk-Output: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + type: array + title: list[ImageContentItem-Output | TextContentItem] + title: string | list[ImageContentItem-Output | TextContentItem] + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + 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. + ConversationsByConversationIdItemsPostRequest: + properties: + items: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + title: Items + type: object + required: + - items + title: ConversationsByConversationIdItemsPostRequest + ConversationsByConversationIdPostRequest: + properties: + metadata: + additionalProperties: + type: string + type: object + title: Metadata + type: object + required: + - metadata + title: ConversationsByConversationIdPostRequest + ConversationsPostRequest: + properties: + items: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + - type: 'null' + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + type: object + title: ConversationsPostRequest + 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. + Errors: + properties: + data: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + object: + anyOf: + - type: string + - type: 'null' + additionalProperties: true + type: object + title: Errors + 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 + 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 + InputTokensDetails: + properties: + cached_tokens: + type: integer + title: Cached Tokens + additionalProperties: true + type: object + required: + - cached_tokens + title: InputTokensDetails + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + ModelsPostRequest: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + model_type: + anyOf: + - $ref: '#/components/schemas/ModelType' + title: ModelType + - type: 'null' + title: ModelType + type: object + required: + - model_id + title: ModelsPostRequest + ModerationsPostRequest: + properties: + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + model: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input + title: ModerationsPostRequest + OpenAIAssistantMessageParam-Input: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + OpenAIResponseMessage-Input: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + type: string + const: message + title: Type + default: message + id: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + 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. + OpenAIResponseMessage-Output: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + type: string + const: message + title: Type + default: message + id: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + 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. + 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. + OpenAIResponseTextFormat: + properties: + type: + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text + name: + anyOf: + - type: string + - type: 'null' + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + description: + anyOf: + - type: string + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + OpenAIUserMessageParam-Input: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OpenAIUserMessageParam-Output: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OutputTokensDetails: + properties: + reasoning_tokens: + type: integer + title: Reasoning Tokens + additionalProperties: true + type: object + required: + - reasoning_tokens + title: OutputTokensDetails + PromptsByPromptIdPostRequest: + properties: + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt + - version + title: PromptsByPromptIdPostRequest + PromptsByPromptIdSetDefaultVersionPostRequest: + properties: + version: + type: integer + title: Version + type: object + required: + - version + title: PromptsByPromptIdSetDefaultVersionPostRequest + PromptsPostRequest: + properties: + prompt: + type: string + title: Prompt + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + required: + - prompt + title: PromptsPostRequest + ResponsesPostRequest: + properties: + input: + anyOf: + - type: string + - items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input + type: array + title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + model: + type: string + title: Model + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + title: OpenAIResponsePrompt + instructions: + anyOf: + - type: string + - type: 'null' + previous_response_id: + anyOf: + - type: string + - type: 'null' + conversation: + anyOf: + - type: string + - type: 'null' + store: + anyOf: + - type: boolean + - type: 'null' + default: true + stream: + anyOf: + - type: boolean + - type: 'null' + default: false + temperature: + anyOf: + - type: number + - type: 'null' + text: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseText' + title: OpenAIResponseText + - type: 'null' + title: OpenAIResponseText + tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + include: + anyOf: + - items: + type: string + type: array + - type: 'null' + max_infer_iters: + anyOf: + - type: integer + - type: 'null' + default: 10 + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - input + - model + title: ResponsesPostRequest + SafetyRunShieldPostRequest: + properties: + shield_id: + type: string + title: Shield Id + messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) + type: array + title: Messages + params: + additionalProperties: true + type: object + title: Params + type: object + required: + - shield_id + - messages + - params + title: SafetyRunShieldPostRequest + ScoringScoreBatchPostRequest: + properties: + dataset_id: + type: string + title: Dataset Id + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + save_results_dataset: + type: boolean + title: Save Results Dataset + default: false + type: object + required: + - dataset_id + - scoring_functions + title: ScoringScoreBatchPostRequest + ScoringScorePostRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + type: object + required: + - input_rows + - scoring_functions + title: ScoringScorePostRequest + SearchRankingOptions: + properties: + ranker: + anyOf: + - type: string + - type: 'null' + score_threshold: + anyOf: + - type: number + - type: 'null' + default: 0.0 + type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + ShieldsPostRequest: + properties: + shield_id: + type: string + title: Shield Id + provider_shield_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - shield_id + title: ShieldsPostRequest + ToolRuntimeInvokePostRequest: + properties: + tool_name: + type: string + title: Tool Name + kwargs: + additionalProperties: true + type: object + title: Kwargs + authorization: + anyOf: + - type: string + - type: 'null' + type: object + required: + - tool_name + - kwargs + title: ToolRuntimeInvokePostRequest + V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + type: object + required: + - input_rows + - scoring_functions + - benchmark_config + title: V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest + V1AlphaInferenceRerankPostRequest: + properties: + model: + type: string + title: Model + query: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + items: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + type: array + title: Items + max_num_results: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - model + - query + - items + title: V1AlphaInferenceRerankPostRequest + V1AlphaPostTrainingPreferenceOptimizePostRequest: + properties: + job_uuid: + type: string + title: Job Uuid + finetuned_model: + type: string + title: Finetuned Model + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: V1AlphaPostTrainingPreferenceOptimizePostRequest + V1AlphaPostTrainingSupervisedFineTunePostRequest: + properties: + job_uuid: + type: string + title: Job Uuid + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + model: + anyOf: + - type: string + - type: 'null' + description: Model descriptor for training if not in provider config` + checkpoint_dir: + anyOf: + - type: string + - type: 'null' + algorithm_config: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + title: LoraFinetuningConfig | QATFinetuningConfig + - type: 'null' + title: Algorithm Config + type: object + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: V1AlphaPostTrainingSupervisedFineTunePostRequest + V1BetaDatasetsPostRequestLoose: + properties: + purpose: + title: Purpose + source: + title: Source + metadata: + title: Metadata + dataset_id: + title: Dataset Id + type: object + required: + - purpose + - source + title: V1BetaDatasetsPostRequestLoose + VectorIoQueryPostRequest: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - vector_store_id + - query + title: VectorIoQueryPostRequest + VectorStoresByVectorStoreIdFilesByFileIdPostRequest: + properties: + attributes: + additionalProperties: true + type: object + title: Attributes + type: object + required: + - attributes + title: VectorStoresByVectorStoreIdFilesByFileIdPostRequest + VectorStoresByVectorStoreIdFilesPostRequest: + properties: + file_id: + type: string + title: File Id + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + chunking_strategy: + anyOf: + - oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + type: object + required: + - file_id + title: VectorStoresByVectorStoreIdFilesPostRequest + VectorStoresByVectorStoreIdPostRequest: + properties: + name: + anyOf: + - type: string + - type: 'null' + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + title: VectorStoresByVectorStoreIdPostRequest + VectorStoresByVectorStoreIdSearchPostRequest: + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + max_num_results: + anyOf: + - type: integer + - type: 'null' + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + title: SearchRankingOptions + rewrite_query: + anyOf: + - type: boolean + - type: 'null' + default: false + search_mode: + anyOf: + - type: string + - type: 'null' + default: vector + type: object + required: + - query + title: VectorStoresByVectorStoreIdSearchPostRequest + _URLOrData: + properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + title: URL + data: + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + type: object + title: _URLOrData + description: A URL or a base64 encoded string + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat OpenAIResponseContentPart: discriminator: mapping: @@ -9849,56 +12103,6 @@ components: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' title: OpenAIResponseContentPartReasoningText title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseTextFormat: - description: Configuration for Responses API text format. - properties: - type: - title: Type - type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - title: OpenAIResponseTextFormat - type: object - OpenAIResponseUsageInputTokensDetails: - description: Token details for input tokens in OpenAI response usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageInputTokensDetails - type: object - OpenAIResponseUsageOutputTokensDetails: - description: Token details for output tokens in OpenAI response usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageOutputTokensDetails - type: object SpanEndPayload: description: Payload for a span end event. properties: @@ -10120,110 +12324,6 @@ components: - $ref: '#/components/schemas/StructuredLogEvent' title: StructuredLogEvent title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - BatchError: - additionalProperties: true - properties: - code: - anyOf: - - type: string - - type: 'null' - nullable: true - line: - anyOf: - - type: integer - - type: 'null' - nullable: true - message: - anyOf: - - type: string - - type: 'null' - nullable: true - param: - anyOf: - - type: string - - type: 'null' - nullable: true - title: BatchError - type: object - BatchRequestCounts: - additionalProperties: true - properties: - completed: - title: Completed - type: integer - failed: - title: Failed - type: integer - total: - title: Total - type: integer - required: - - completed - - failed - - total - title: BatchRequestCounts - type: object - BatchUsage: - additionalProperties: true - properties: - input_tokens: - title: Input Tokens - type: integer - input_tokens_details: - $ref: '#/components/schemas/InputTokensDetails' - output_tokens: - title: Output Tokens - type: integer - output_tokens_details: - $ref: '#/components/schemas/OutputTokensDetails' - total_tokens: - title: Total Tokens - type: integer - required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage - type: object - Errors: - additionalProperties: true - properties: - data: - anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array - - type: 'null' - nullable: true - object: - anyOf: - - type: string - - type: 'null' - nullable: true - title: Errors - type: object - InputTokensDetails: - additionalProperties: true - properties: - cached_tokens: - title: Cached Tokens - type: integer - required: - - cached_tokens - title: InputTokensDetails - type: object - OutputTokensDetails: - additionalProperties: true - properties: - reasoning_tokens: - title: Reasoning Tokens - type: integer - required: - - reasoning_tokens - title: OutputTokensDetails - type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -10255,16 +12355,6 @@ components: - text title: TextDelta type: object - JobStatus: - description: Status of a job execution. - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string MetricInResponse: description: A metric value included in API responses. properties: @@ -10380,14 +12470,6 @@ components: - status title: ConversationMessage type: object - DatasetPurpose: - description: Purpose of the dataset. Each purpose has a required input data schema. - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string Api: description: Enumeration of all available APIs in the Llama Stack system. enum: @@ -10716,26 +12798,6 @@ components: default: int4_weight_int8_dynamic_activation title: Int4QuantizationConfig type: object - OpenAIChatCompletionUsageCompletionTokensDetails: - description: Token details for output tokens in OpenAI chat completion usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object - OpenAIChatCompletionUsagePromptTokensDetails: - description: Token details for prompt tokens in OpenAI chat completion usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - type: object OpenAICompletionLogprobs: description: |- The log probabilities for the tokens in the message from an OpenAI-compatible completion response. @@ -10906,13 +12968,6 @@ components: - content title: UserMessage type: object - HealthStatus: - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - type: string PostTrainingJobLogStream: description: Stream of logs from a finetuning job. properties: @@ -11093,3 +13148,131 @@ components: - query title: VectorStoreSearchRequest type: object + responses: + BadRequest400: + description: The request was invalid or malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 400 + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 429 + title: Too Many Requests + detail: You have exceeded the rate limit. Please try again later. + InternalServerError500: + description: The server encountered an unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 500 + title: Internal Server Error + detail: An unexpected error occurred + DefaultError: + description: An error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/Error' +tags: +- description: APIs for creating and interacting with agentic systems. + name: Agents + x-displayName: Agents +- description: |- + The API is designed to allow use of openai client libraries for seamless integration. + + This API provides the following extensions: + - idempotent batch creation + + Note: This API is currently under active development and may undergo changes. + name: Batches + x-displayName: The Batches API enables efficient processing of multiple requests in a single operation, particularly useful for processing large datasets, batch evaluation workflows, and cost-effective inference at scale. +- description: '' + name: Benchmarks +- description: Protocol for conversation management operations. + name: Conversations + x-displayName: Conversations +- description: '' + name: DatasetIO +- description: '' + name: Datasets +- description: Llama Stack Evaluation API for running evaluations on model and agent candidates. + name: Eval + x-displayName: Evaluations +- description: This API is used to upload documents that can be used with other Llama Stack APIs. + name: Files + x-displayName: Files +- description: |- + Llama Stack Inference API for generating completions, chat completions, and embeddings. + + This API provides the raw interface to the underlying models. Three kinds of models are supported: + - LLM models: these models generate "raw" and "chat" (conversational) completions. + - Embedding models: these models generate embeddings to be used for semantic search. + - Rerank models: these models reorder the documents based on their relevance to a query. + name: Inference + x-displayName: Inference +- description: APIs for inspecting the Llama Stack service, including health status, available API routes with methods and implementing providers. + name: Inspect + x-displayName: Inspect +- description: '' + name: Models +- description: '' + name: PostTraining (Coming Soon) +- description: Protocol for prompt management operations. + name: Prompts + x-displayName: Prompts +- description: Providers API for inspecting, listing, and modifying providers and their configurations. + name: Providers + x-displayName: Providers +- description: OpenAI-compatible Moderations API. + name: Safety + x-displayName: Safety +- description: '' + name: Scoring +- description: '' + name: ScoringFunctions +- description: '' + name: Shields +- description: '' + name: ToolGroups +- description: '' + name: ToolRuntime +- description: '' + name: VectorIO +x-tagGroups: +- name: Operations + tags: + - Agents + - Batches + - Benchmarks + - Conversations + - DatasetIO + - Datasets + - Eval + - Files + - Inference + - Inspect + - Models + - PostTraining (Coming Soon) + - Prompts + - Providers + - Safety + - Scoring + - ScoringFunctions + - Shields + - ToolGroups + - ToolRuntime + - VectorIO +security: +- Default: [] diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index b306799d1a..06112396f3 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -15,16 +15,13 @@ servers: paths: /v1/models: get: - tags: - - Models - summary: Openai List Models - operationId: openai_list_models_v1_models_get responses: '200': - description: Successful Response + description: A OpenAIListModelsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIListModelsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -37,17 +34,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: tags: - Models - summary: Register Model - operationId: register_model_v1_models_post + summary: Openai List Models + description: List models using the OpenAI API. + operationId: openai_list_models_v1_models_get + post: responses: '200': - description: Successful Response + description: A Model. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Model' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -60,19 +59,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Models + summary: Register Model + description: |- + Register model. + + Register a model. + operationId: register_model_v1_models_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ModelsPostRequest' + required: true deprecated: true /v1/models/{model_id}: get: - tags: - - Models - summary: Get Model - operationId: get_model_v1_models__model_id__get responses: '200': - description: Successful Response + description: A Model. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Model' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -85,6 +95,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Models + summary: Get Model + description: |- + Get model. + + Get a model by its identifier. + operationId: get_model_v1_models__model_id__get parameters: - name: model_id in: path @@ -93,10 +111,6 @@ paths: type: string description: 'Path parameter: model_id' delete: - tags: - - Models - summary: Unregister Model - operationId: unregister_model_v1_models__model_id__delete responses: '200': description: Successful Response @@ -115,7 +129,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Models + summary: Unregister Model + description: |- + Unregister model. + + Unregister a model. + operationId: unregister_model_v1_models__model_id__delete parameters: - name: model_id in: path @@ -123,35 +144,34 @@ paths: schema: type: string description: 'Path parameter: model_id' + deprecated: true /v1/scoring-functions: get: - tags: - - Scoring Functions - summary: List Scoring Functions - operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': - description: Successful Response + description: A ListScoringFunctionsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListScoringFunctionsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Scoring Functions - summary: Register Scoring Function - operationId: register_scoring_function_v1_scoring_functions_post + summary: List Scoring Functions + description: List all scoring functions. + operationId: list_scoring_functions_v1_scoring_functions_get + post: responses: '200': description: Successful Response @@ -159,30 +179,38 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Scoring Functions + summary: Register Scoring Function + description: Register a scoring function. + operationId: register_scoring_function_v1_scoring_functions_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' deprecated: true /v1/scoring-functions/{scoring_fn_id}: get: - tags: - - Scoring Functions - summary: Get Scoring Function - operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': - description: Successful Response + description: A ScoringFn. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ScoringFn' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -195,6 +223,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Scoring Functions + summary: Get Scoring Function + description: Get a scoring function by its ID. + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get parameters: - name: scoring_fn_id in: path @@ -203,10 +236,6 @@ paths: type: string description: 'Path parameter: scoring_fn_id' delete: - tags: - - Scoring Functions - summary: Unregister Scoring Function - operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete responses: '200': description: Successful Response @@ -225,7 +254,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Scoring Functions + summary: Unregister Scoring Function + description: Unregister a scoring function. + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete parameters: - name: scoring_fn_id in: path @@ -233,18 +266,16 @@ paths: schema: type: string description: 'Path parameter: scoring_fn_id' + deprecated: true /v1/shields: get: - tags: - - Shields - summary: List Shields - operationId: list_shields_v1_shields_get responses: '200': - description: Successful Response + description: A ListShieldsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListShieldsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -257,17 +288,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: tags: - Shields - summary: Register Shield - operationId: register_shield_v1_shields_post + summary: List Shields + description: List all shields. + operationId: list_shields_v1_shields_get + post: responses: '200': - description: Successful Response + description: A Shield. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Shield' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -280,19 +313,27 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Shields + summary: Register Shield + description: Register a shield. + operationId: register_shield_v1_shields_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShieldsPostRequest' + required: true deprecated: true /v1/shields/{identifier}: get: - tags: - - Shields - summary: Get Shield - operationId: get_shield_v1_shields__identifier__get responses: '200': - description: Successful Response + description: A Shield. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Shield' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -305,6 +346,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Shields + summary: Get Shield + description: Get a shield by its identifier. + operationId: get_shield_v1_shields__identifier__get parameters: - name: identifier in: path @@ -313,10 +359,6 @@ paths: type: string description: 'Path parameter: identifier' delete: - tags: - - Shields - summary: Unregister Shield - operationId: unregister_shield_v1_shields__identifier__delete responses: '200': description: Successful Response @@ -335,7 +377,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Shields + summary: Unregister Shield + description: Unregister a shield. + operationId: unregister_shield_v1_shields__identifier__delete parameters: - name: identifier in: path @@ -343,35 +389,34 @@ paths: schema: type: string description: 'Path parameter: identifier' + deprecated: true /v1/toolgroups: get: - tags: - - Tool Groups - summary: List Tool Groups - operationId: list_tool_groups_v1_toolgroups_get responses: '200': - description: Successful Response + description: A ListToolGroupsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListToolGroupsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Tool Groups - summary: Register Tool Group - operationId: register_tool_group_v1_toolgroups_post + summary: List Tool Groups + description: List tool groups with optional provider. + operationId: list_tool_groups_v1_toolgroups_get + post: responses: '200': description: Successful Response @@ -379,30 +424,37 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Tool Groups + summary: Register Tool Group + description: Register a tool group. + operationId: register_tool_group_v1_toolgroups_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' deprecated: true /v1/toolgroups/{toolgroup_id}: get: - tags: - - Tool Groups - summary: Get Tool Group - operationId: get_tool_group_v1_toolgroups__toolgroup_id__get responses: '200': - description: Successful Response + description: A ToolGroup. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ToolGroup' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -415,6 +467,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Tool Groups + summary: Get Tool Group + description: Get a tool group by its ID. + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get parameters: - name: toolgroup_id in: path @@ -423,10 +480,6 @@ paths: type: string description: 'Path parameter: toolgroup_id' delete: - tags: - - Tool Groups - summary: Unregister Toolgroup - operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete responses: '200': description: Successful Response @@ -445,7 +498,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Tool Groups + summary: Unregister Toolgroup + description: Unregister a tool group. + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete parameters: - name: toolgroup_id in: path @@ -453,18 +510,16 @@ paths: schema: type: string description: 'Path parameter: toolgroup_id' + deprecated: true /v1beta/datasets: get: - tags: - - Datasets - summary: List Datasets - operationId: list_datasets_v1beta_datasets_get responses: '200': - description: Successful Response + description: A ListDatasetsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListDatasetsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -477,17 +532,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: tags: - Datasets - summary: Register Dataset - operationId: register_dataset_v1beta_datasets_post + summary: List Datasets + description: List all datasets. + operationId: list_datasets_v1beta_datasets_get + post: responses: '200': - description: Successful Response + description: A Dataset. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Dataset' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -500,19 +557,27 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Datasets + summary: Register Dataset + description: Register a new dataset. + operationId: register_dataset_v1beta_datasets_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1BetaDatasetsPostRequestLoose' + required: true deprecated: true /v1beta/datasets/{dataset_id}: get: - tags: - - Datasets - summary: Get Dataset - operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': - description: Successful Response + description: A Dataset. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Dataset' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -525,6 +590,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Datasets + summary: Get Dataset + description: Get a dataset by its ID. + operationId: get_dataset_v1beta_datasets__dataset_id__get parameters: - name: dataset_id in: path @@ -533,10 +603,6 @@ paths: type: string description: 'Path parameter: dataset_id' delete: - tags: - - Datasets - summary: Unregister Dataset - operationId: unregister_dataset_v1beta_datasets__dataset_id__delete responses: '200': description: Successful Response @@ -555,7 +621,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Datasets + summary: Unregister Dataset + description: Unregister a dataset by its ID. + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete parameters: - name: dataset_id in: path @@ -563,35 +633,34 @@ paths: schema: type: string description: 'Path parameter: dataset_id' + deprecated: true /v1alpha/eval/benchmarks: get: - tags: - - Benchmarks - summary: List Benchmarks - operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': - description: Successful Response + description: A ListBenchmarksResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListBenchmarksResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Benchmarks - summary: Register Benchmark - operationId: register_benchmark_v1alpha_eval_benchmarks_post + summary: List Benchmarks + description: List all benchmarks. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get + post: responses: '200': description: Successful Response @@ -599,30 +668,38 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Benchmarks + summary: Register Benchmark + description: Register a benchmark. + operationId: register_benchmark_v1alpha_eval_benchmarks_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_benchmark_v1alpha_eval_benchmarks_post' deprecated: true /v1alpha/eval/benchmarks/{benchmark_id}: get: - tags: - - Benchmarks - summary: Get Benchmark - operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': - description: Successful Response + description: A Benchmark. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Benchmark' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -635,6 +712,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Benchmarks + summary: Get Benchmark + description: Get a benchmark by its ID. + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get parameters: - name: benchmark_id in: path @@ -643,10 +725,6 @@ paths: type: string description: 'Path parameter: benchmark_id' delete: - tags: - - Benchmarks - summary: Unregister Benchmark - operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete responses: '200': description: Successful Response @@ -665,7 +743,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Benchmarks + summary: Unregister Benchmark + description: Unregister a benchmark. + operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete parameters: - name: benchmark_id in: path @@ -673,44 +755,8 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' + deprecated: true components: - responses: - BadRequest400: - description: The request was invalid or malformed - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 400 - 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 - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 429 - title: Too Many Requests - detail: You have exceeded the rate limit. Please try again later. - InternalServerError500: - description: The server encountered an unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 500 - title: Internal Server Error - detail: An unexpected error occurred - DefaultError: - description: An error occurred - content: - application/json: - schema: - $ref: '#/components/schemas/Error' schemas: Error: description: Error response from the API. Roughly follows RFC 7807. @@ -736,63 +782,61 @@ components: title: Error type: object ListBatchesResponse: - description: Response containing a list of batch objects. properties: object: + type: string const: list - default: list title: Object - type: string + default: list data: - description: List of batch objects items: $ref: '#/components/schemas/Batch' - title: Data type: array + title: Data + description: List of batch objects first_id: anyOf: - type: string - type: 'null' description: ID of the first batch in the list - nullable: true last_id: anyOf: - type: string - type: 'null' description: ID of the last batch in the list - nullable: true has_more: - default: false - description: Whether there are more batches available - title: Has More type: boolean + title: Has More + description: Whether there are more batches available + default: false + type: object required: - data title: ListBatchesResponse - type: object + description: Response containing a list of batch objects. Batch: - additionalProperties: true properties: id: - title: Id type: string + title: Id completion_window: - title: Completion Window type: string + title: Completion Window created_at: - title: Created At type: integer + title: Created At endpoint: - title: Endpoint type: string + title: Endpoint input_file_id: - title: Input File Id type: string + title: Input File Id object: + type: string const: batch title: Object - type: string status: + type: string enum: - validating - failed @@ -803,90 +847,76 @@ components: - cancelling - cancelled title: Status - type: string cancelled_at: anyOf: - type: integer - type: 'null' - nullable: true cancelling_at: anyOf: - type: integer - type: 'null' - nullable: true completed_at: anyOf: - type: integer - type: 'null' - nullable: true error_file_id: anyOf: - type: string - type: 'null' - nullable: true errors: anyOf: - $ref: '#/components/schemas/Errors' title: Errors - type: 'null' - nullable: true title: Errors expired_at: anyOf: - type: integer - type: 'null' - nullable: true expires_at: anyOf: - type: integer - type: 'null' - nullable: true failed_at: anyOf: - type: integer - type: 'null' - nullable: true finalizing_at: anyOf: - type: integer - type: 'null' - nullable: true in_progress_at: anyOf: - type: integer - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - nullable: true model: anyOf: - type: string - type: 'null' - nullable: true output_file_id: anyOf: - type: string - type: 'null' - nullable: true request_counts: anyOf: - $ref: '#/components/schemas/BatchRequestCounts' title: BatchRequestCounts - type: 'null' - nullable: true title: BatchRequestCounts usage: anyOf: - $ref: '#/components/schemas/BatchUsage' title: BatchUsage - type: 'null' - nullable: true title: BatchUsage + additionalProperties: true + type: object required: - id - completion_window @@ -896,36 +926,42 @@ components: - object - status title: Batch - type: object + Order: + type: string + enum: + - asc + - desc + title: Order + description: Sort order for paginated responses. ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. properties: data: items: $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIChatCompletionResponse - type: object + description: Response from listing OpenAI-compatible chat completions. OpenAIAssistantMessageParam: description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: @@ -959,19 +995,19 @@ components: title: OpenAIAssistantMessageParam type: object OpenAIChatCompletionContentPartImageParam: - description: Image content part for OpenAI-compatible chat completion messages. properties: type: + type: string const: image_url - default: image_url title: Type - type: string + default: image_url image_url: $ref: '#/components/schemas/OpenAIImageURL' + type: object required: - image_url title: OpenAIChatCompletionContentPartImageParam - type: object + description: Image content part for OpenAI-compatible chat completion messages. OpenAIChatCompletionContentPartParam: discriminator: mapping: @@ -988,139 +1024,130 @@ components: title: OpenAIFile title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: - description: Text content part for OpenAI-compatible chat completion messages. properties: type: + type: string const: text - default: text title: Type - type: string + default: text text: - title: Text type: string + title: Text + type: object required: - text title: OpenAIChatCompletionContentPartTextParam - type: object + description: Text content part for OpenAI-compatible chat completion messages. OpenAIChatCompletionToolCall: - description: Tool call specification for OpenAI-compatible chat completion responses. properties: index: anyOf: - type: integer - type: 'null' - nullable: true id: anyOf: - type: string - type: 'null' - nullable: true type: + type: string const: function - default: function title: Type - type: string + default: function function: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' title: OpenAIChatCompletionToolCallFunction - type: 'null' - nullable: true title: OpenAIChatCompletionToolCallFunction - title: OpenAIChatCompletionToolCall type: object + title: OpenAIChatCompletionToolCall + description: Tool call specification for OpenAI-compatible chat completion responses. OpenAIChatCompletionToolCallFunction: - description: Function call details for OpenAI-compatible tool calls. properties: name: anyOf: - type: string - type: 'null' - nullable: true arguments: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIChatCompletionToolCallFunction type: object + title: OpenAIChatCompletionToolCallFunction + description: Function call details for OpenAI-compatible tool calls. OpenAIChatCompletionUsage: - description: Usage information for OpenAI chat completion. properties: prompt_tokens: - title: Prompt Tokens type: integer + title: Prompt Tokens completion_tokens: - title: Completion Tokens type: integer + title: Completion Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens prompt_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' - nullable: true title: OpenAIChatCompletionUsagePromptTokensDetails completion_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' - nullable: true title: OpenAIChatCompletionUsageCompletionTokensDetails + type: object required: - prompt_tokens - completion_tokens - total_tokens title: OpenAIChatCompletionUsage - type: object + description: Usage information for OpenAI chat completion. OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) + title: OpenAIUserMessageParam-Output | ... (5 variants) + 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: - title: Finish Reason type: string + title: Finish Reason index: - title: Index type: integer + title: Index logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' title: OpenAIChoiceLogprobs - type: 'null' - nullable: true title: OpenAIChoiceLogprobs + type: object required: - message - finish_reason - index title: OpenAIChoice - type: object + description: A choice from an OpenAI-compatible chat completion response. OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. properties: content: anyOf: @@ -1128,24 +1155,22 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - nullable: true refusal: anyOf: - items: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - nullable: true - title: OpenAIChoiceLogprobs type: object + title: OpenAIChoiceLogprobs + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. OpenAIDeveloperMessageParam: - description: A message from the developer in an OpenAI-compatible chat completion request. properties: role: + type: string const: developer - default: developer title: Role - type: string + default: developer content: anyOf: - type: string @@ -1158,58 +1183,54 @@ components: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - content title: OpenAIDeveloperMessageParam - type: object + description: A message from the developer in an OpenAI-compatible chat completion request. OpenAIFile: properties: type: + type: string const: file - default: file title: Type - type: string + default: file file: $ref: '#/components/schemas/OpenAIFileFile' + type: object required: - file title: OpenAIFile - type: object OpenAIFileFile: properties: file_data: anyOf: - type: string - type: 'null' - nullable: true file_id: anyOf: - type: string - type: 'null' - nullable: true filename: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIFileFile type: object + title: OpenAIFileFile OpenAIImageURL: - description: Image URL specification for OpenAI-compatible chat completion messages. properties: url: - title: Url type: string + title: Url detail: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - url title: OpenAIImageURL - type: object + description: Image URL specification for OpenAI-compatible chat completion messages. OpenAIMessageParam: discriminator: mapping: @@ -1232,13 +1253,12 @@ components: title: OpenAIDeveloperMessageParam title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: - description: A system message providing instructions or context to the model. properties: role: + type: string const: system - default: system title: Role - type: string + default: system content: anyOf: - type: string @@ -1251,55 +1271,53 @@ components: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - content title: OpenAISystemMessageParam - type: object + description: A system message providing instructions or context to the model. 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 + title: Token bytes: anyOf: - items: type: integer type: array - type: 'null' - nullable: true logprob: - title: Logprob type: number + title: Logprob top_logprobs: items: $ref: '#/components/schemas/OpenAITopLogProb' - title: Top Logprobs type: array + title: Top Logprobs + type: object required: - token - logprob - top_logprobs title: OpenAITokenLogProb - type: object + 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 OpenAIToolMessageParam: - description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. properties: role: + type: string const: tool - default: tool title: Role - type: string + default: tool tool_call_id: - title: Tool Call Id type: string + title: Tool Call Id content: anyOf: - type: string @@ -1308,37 +1326,37 @@ components: type: array title: list[OpenAIChatCompletionContentPartTextParam] title: string | list[OpenAIChatCompletionContentPartTextParam] + type: object required: - tool_call_id - content title: OpenAIToolMessageParam - type: object + description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. 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 + title: Token bytes: anyOf: - items: type: integer type: array - type: 'null' - nullable: true logprob: - title: Logprob type: number + title: Logprob + type: object required: - token - logprob title: OpenAITopLogProb - type: object + 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 OpenAIUserMessageParam: description: A message from the user in an OpenAI-compatible chat completion request. properties: @@ -1378,11 +1396,10 @@ components: title: OpenAIUserMessageParam type: object OpenAIJSONSchema: - description: JSON schema specification for OpenAI-compatible structured response format. properties: name: - title: Name type: string + title: Name description: anyOf: - type: string @@ -1396,32 +1413,33 @@ components: - additionalProperties: true type: object - type: 'null' - title: OpenAIJSONSchema type: object + title: OpenAIJSONSchema + description: JSON schema specification for OpenAI-compatible structured response format. OpenAIResponseFormatJSONObject: - description: JSON object response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: json_object - default: json_object title: Type - type: string - title: OpenAIResponseFormatJSONObject + default: json_object type: object + title: OpenAIResponseFormatJSONObject + description: JSON object response format for OpenAI-compatible chat completion requests. OpenAIResponseFormatJSONSchema: - description: JSON schema response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: json_schema - default: json_schema title: Type - type: string + default: json_schema json_schema: $ref: '#/components/schemas/OpenAIJSONSchema' + type: object required: - json_schema title: OpenAIResponseFormatJSONSchema - type: object + description: JSON schema response format for OpenAI-compatible chat completion requests. OpenAIResponseFormatParam: discriminator: mapping: @@ -1438,52 +1456,49 @@ components: title: OpenAIResponseFormatJSONObject title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject OpenAIResponseFormatText: - description: Text response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: text - default: text title: Type - type: string - title: OpenAIResponseFormatText + default: text type: object + title: OpenAIResponseFormatText + description: Text response format for OpenAI-compatible chat completion requests. OpenAIChatCompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible chat completion endpoint. properties: model: - title: Model type: string + title: Model 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) + 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) + type: array minItems: 1 title: Messages - type: array frequency_penalty: anyOf: - type: number - type: 'null' - nullable: true function_call: anyOf: - type: string @@ -1491,7 +1506,6 @@ components: type: object - type: 'null' title: string | object - nullable: true functions: anyOf: - items: @@ -1499,68 +1513,58 @@ components: type: object type: array - type: 'null' - nullable: true logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true logprobs: anyOf: - type: boolean - type: 'null' - nullable: true max_completion_tokens: anyOf: - type: integer - type: 'null' - nullable: true max_tokens: anyOf: - type: integer - type: 'null' - nullable: true n: anyOf: - type: integer - type: 'null' - nullable: true parallel_tool_calls: anyOf: - type: boolean - type: 'null' - nullable: true presence_penalty: anyOf: - type: number - type: 'null' - nullable: true response_format: anyOf: - - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' title: OpenAIResponseFormatJSONObject + discriminator: + propertyName: type + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - type: 'null' title: Response Format - nullable: true seed: anyOf: - type: integer - type: 'null' - nullable: true stop: anyOf: - type: string @@ -1570,23 +1574,19 @@ components: title: list[string] - type: 'null' title: string | list[string] - nullable: true stream: anyOf: - type: boolean - type: 'null' - nullable: true stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true temperature: anyOf: - type: number - type: 'null' - nullable: true tool_choice: anyOf: - type: string @@ -1594,7 +1594,6 @@ components: type: object - type: 'null' title: string | object - nullable: true tools: anyOf: - items: @@ -1602,63 +1601,60 @@ components: type: object type: array - type: 'null' - nullable: true top_logprobs: anyOf: - type: integer - type: 'null' - nullable: true top_p: anyOf: - type: number - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - messages title: OpenAIChatCompletionRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible chat completion endpoint. OpenAIChatCompletion: - description: Response from an OpenAI-compatible chat completion request. properties: id: - title: Id type: string + title: Id choices: items: $ref: '#/components/schemas/OpenAIChoice' - title: Choices type: array + title: Choices object: + type: string const: chat.completion - default: chat.completion title: Object - type: string + default: chat.completion created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' title: OpenAIChatCompletionUsage - type: 'null' - nullable: true title: OpenAIChatCompletionUsage + type: object required: - id - choices - created - model title: OpenAIChatCompletion - type: object + description: Response from an OpenAI-compatible chat completion request. OpenAIChatCompletionChunk: description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: @@ -1754,55 +1750,55 @@ components: OpenAICompletionWithInputMessages: properties: id: - title: Id type: string + title: Id choices: items: $ref: '#/components/schemas/OpenAIChoice' - title: Choices type: array + title: Choices object: + type: string const: chat.completion - default: chat.completion title: Object - type: string + default: chat.completion created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' title: OpenAIChatCompletionUsage - type: 'null' - nullable: true title: OpenAIChatCompletionUsage 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Input Messages + 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' + title: OpenAIUserMessageParam-Output | ... (5 variants) type: array + title: Input Messages + type: object required: - id - choices @@ -1810,14 +1806,11 @@ components: - model - input_messages title: OpenAICompletionWithInputMessages - type: object OpenAICompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible completion endpoint. properties: model: - title: Model type: string + title: Model prompt: anyOf: - type: string @@ -1840,49 +1833,40 @@ components: anyOf: - type: integer - type: 'null' - nullable: true echo: anyOf: - type: boolean - type: 'null' - nullable: true frequency_penalty: anyOf: - type: number - type: 'null' - nullable: true logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true logprobs: anyOf: - type: boolean - type: 'null' - nullable: true max_tokens: anyOf: - type: integer - type: 'null' - nullable: true n: anyOf: - type: integer - type: 'null' - nullable: true presence_penalty: anyOf: - type: number - type: 'null' - nullable: true seed: anyOf: - type: integer - type: 'null' - nullable: true stop: anyOf: - type: string @@ -1892,110 +1876,104 @@ components: title: list[string] - type: 'null' title: string | list[string] - nullable: true stream: anyOf: - type: boolean - type: 'null' - nullable: true stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true temperature: anyOf: - type: number - type: 'null' - nullable: true top_p: anyOf: - type: number - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true suffix: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - prompt title: OpenAICompletionRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible completion endpoint. OpenAICompletion: - 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 + title: Id choices: items: $ref: '#/components/schemas/OpenAICompletionChoice' - title: Choices type: array + title: Choices created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model object: + type: string const: text_completion - default: text_completion title: Object - type: string + default: text_completion + type: object required: - id - choices - created - model title: OpenAICompletion - type: object - OpenAICompletionChoice: description: |- - A choice from an OpenAI-compatible completion response. + Response from an OpenAI-compatible completion request. - :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 + :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" + OpenAICompletionChoice: properties: finish_reason: - title: Finish Reason type: string + title: Finish Reason text: - title: Text type: string + title: Text index: - title: Index type: integer + title: Index logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' title: OpenAIChoiceLogprobs - type: 'null' - nullable: true title: OpenAIChoiceLogprobs + type: object required: - finish_reason - text - index title: OpenAICompletionChoice - type: object + 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 ConversationItem: discriminator: mapping: @@ -2030,54 +2008,55 @@ components: title: OpenAIResponseOutputMessageMCPListTools title: OpenAIResponseMessage | ... (9 variants) OpenAIResponseAnnotationCitation: - description: URL citation annotation for referencing external web resources. properties: type: + type: string const: url_citation - default: url_citation title: Type - type: string + default: url_citation end_index: - title: End Index type: integer + title: End Index start_index: - title: Start Index type: integer + title: Start Index title: - title: Title type: string + title: Title url: - title: Url type: string + title: Url + type: object required: - end_index - start_index - title - url title: OpenAIResponseAnnotationCitation - type: object + description: URL citation annotation for referencing external web resources. OpenAIResponseAnnotationContainerFileCitation: properties: type: + type: string const: container_file_citation - default: container_file_citation title: Type - type: string + default: container_file_citation container_id: - title: Container Id type: string + title: Container Id end_index: - title: End Index type: integer + title: End Index file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename start_index: - title: Start Index type: integer + title: Start Index + type: object required: - container_id - end_index @@ -2085,48 +2064,47 @@ components: - filename - start_index title: OpenAIResponseAnnotationContainerFileCitation - type: object OpenAIResponseAnnotationFileCitation: - description: File citation annotation for referencing specific files in response content. properties: type: + type: string const: file_citation - default: file_citation title: Type - type: string + default: file_citation file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename index: - title: Index type: integer + title: Index + type: object required: - file_id - filename - index title: OpenAIResponseAnnotationFileCitation - type: object + description: File citation annotation for referencing specific files in response content. OpenAIResponseAnnotationFilePath: properties: type: + type: string const: file_path - default: file_path title: Type - type: string + default: file_path file_id: - title: File Id type: string + title: File Id index: - title: Index type: integer + title: Index + type: object required: - file_id - index title: OpenAIResponseAnnotationFilePath - type: object OpenAIResponseAnnotations: discriminator: mapping: @@ -2146,49 +2124,47 @@ components: title: OpenAIResponseAnnotationFilePath title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseContentPartRefusal: - description: Refusal content within a streamed response part. properties: type: + type: string const: refusal - default: refusal title: Type - type: string + default: refusal refusal: - title: Refusal type: string + title: Refusal + type: object required: - refusal title: OpenAIResponseContentPartRefusal - type: object + description: Refusal content within a streamed response part. 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 + title: Call Id output: - title: Output type: string + title: Output type: + type: string const: function_call_output - default: function_call_output title: Type - type: string + default: function_call_output id: anyOf: - type: string - type: 'null' - nullable: true status: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - call_id - output title: OpenAIResponseInputFunctionToolCallOutput - type: object + description: This represents the output of a function call that gets passed back to the model. OpenAIResponseInputMessageContent: discriminator: mapping: @@ -2205,134 +2181,126 @@ components: title: OpenAIResponseInputMessageContentFile title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseInputMessageContentFile: - description: File content for input messages in OpenAI response format. properties: type: + type: string const: input_file - default: input_file title: Type - type: string + default: input_file file_data: anyOf: - type: string - type: 'null' - nullable: true file_id: anyOf: - type: string - type: 'null' - nullable: true file_url: anyOf: - type: string - type: 'null' - nullable: true filename: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIResponseInputMessageContentFile type: object + title: OpenAIResponseInputMessageContentFile + description: File content for input messages in OpenAI response format. OpenAIResponseInputMessageContentImage: - description: Image content for input messages in OpenAI response format. properties: detail: - default: auto title: Detail + default: auto type: string enum: - low - high - auto type: + type: string const: input_image - default: input_image title: Type - type: string + default: input_image file_id: anyOf: - type: string - type: 'null' - nullable: true image_url: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIResponseInputMessageContentImage type: object + title: OpenAIResponseInputMessageContentImage + description: Image content for input messages in OpenAI response format. OpenAIResponseInputMessageContentText: - description: Text content for input messages in OpenAI response format. properties: text: - title: Text type: string + title: Text type: + type: string const: input_text - default: input_text title: Type - type: string + default: input_text + type: object required: - text title: OpenAIResponseInputMessageContentText - type: object + description: Text content for input messages in OpenAI response format. OpenAIResponseMCPApprovalRequest: - description: A request for human approval of a tool invocation. properties: arguments: - title: Arguments type: string + title: Arguments id: - title: Id type: string + title: Id name: - title: Name type: string + title: Name server_label: - title: Server Label type: string + title: Server Label type: + type: string const: mcp_approval_request - default: mcp_approval_request title: Type - type: string + default: mcp_approval_request + type: object required: - arguments - id - name - server_label title: OpenAIResponseMCPApprovalRequest - type: object + description: A request for human approval of a tool invocation. OpenAIResponseMCPApprovalResponse: - description: A response to an MCP approval request. properties: approval_request_id: - title: Approval Request Id type: string + title: Approval Request Id approve: - title: Approve type: boolean + title: Approve type: + type: string const: mcp_approval_response - default: mcp_approval_response title: Type - type: string + default: mcp_approval_response id: anyOf: - type: string - type: 'null' - nullable: true reason: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - approval_request_id - approve title: OpenAIResponseMCPApprovalResponse - type: object + description: A response to an MCP approval request. OpenAIResponseMessage: description: |- Corresponds to the various Message types in the Responses API. @@ -2419,22 +2387,15 @@ components: OpenAIResponseOutputMessageContentOutputText: properties: text: - title: Text type: string + title: Text type: + type: string const: output_text - default: output_text title: Type - type: string + default: output_text annotations: items: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' title: OpenAIResponseAnnotationFileCitation @@ -2444,176 +2405,177 @@ components: title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' title: 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' title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations type: array + title: Annotations + type: object required: - text title: OpenAIResponseOutputMessageContentOutputText - type: object OpenAIResponseOutputMessageFileSearchToolCall: - description: File search tool call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id queries: items: type: string - title: Queries type: array + title: Queries status: - title: Status type: string + title: Status type: + type: string const: file_search_call - default: file_search_call title: Type - type: string + default: file_search_call results: anyOf: - items: $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' - nullable: true + type: object required: - id - queries - status title: OpenAIResponseOutputMessageFileSearchToolCall - type: object + description: File search tool call output message for OpenAI responses. OpenAIResponseOutputMessageFunctionToolCall: - description: Function tool call output message for OpenAI responses. properties: call_id: - title: Call Id type: string + title: Call Id name: - title: Name type: string + title: Name arguments: - title: Arguments type: string + title: Arguments type: + type: string const: function_call - default: function_call title: Type - type: string + default: function_call id: anyOf: - type: string - type: 'null' - nullable: true status: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - call_id - name - arguments title: OpenAIResponseOutputMessageFunctionToolCall - type: object + description: Function tool call output message for OpenAI responses. OpenAIResponseOutputMessageMCPCall: - description: Model Context Protocol (MCP) call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id type: + type: string const: mcp_call - default: mcp_call title: Type - type: string + default: mcp_call arguments: - title: Arguments type: string + title: Arguments name: - title: Name type: string + title: Name server_label: - title: Server Label type: string + title: Server Label error: anyOf: - type: string - type: 'null' - nullable: true output: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - id - arguments - name - server_label title: OpenAIResponseOutputMessageMCPCall - type: object + description: Model Context Protocol (MCP) call output message for OpenAI responses. OpenAIResponseOutputMessageMCPListTools: - description: MCP list tools output message containing available tools from an MCP server. properties: id: - title: Id type: string + title: Id type: + type: string const: mcp_list_tools - default: mcp_list_tools title: Type - type: string + default: mcp_list_tools server_label: - title: Server Label type: string + title: Server Label tools: items: $ref: '#/components/schemas/MCPListToolsTool' - title: Tools type: array + title: Tools + type: object required: - id - server_label - tools title: OpenAIResponseOutputMessageMCPListTools - type: object + description: MCP list tools output message containing available tools from an MCP server. OpenAIResponseOutputMessageWebSearchToolCall: - description: Web search tool call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id status: - title: Status type: string + title: Status type: + type: string const: web_search_call - default: web_search_call title: Type - type: string + default: web_search_call + type: object required: - id - status title: OpenAIResponseOutputMessageWebSearchToolCall - type: object + description: Web search tool call output message for OpenAI responses. Conversation: - description: OpenAI-compatible conversation object. properties: id: - description: The unique ID of the conversation. - title: Id type: string + title: Id + description: The unique ID of the conversation. object: + type: string const: conversation - default: conversation - description: The object type, which is always conversation. title: Object - type: string + description: The object type, which is always conversation. + default: conversation created_at: - description: The time at which the conversation was created, measured in seconds since the Unix epoch. - title: Created At type: integer + title: Created At + description: The time at which the conversation was created, measured in seconds since the Unix epoch. metadata: anyOf: - additionalProperties: @@ -2621,7 +2583,6 @@ components: 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. - nullable: true items: anyOf: - items: @@ -2630,59 +2591,45 @@ components: type: array - type: 'null' description: Initial items to include in the conversation context. You may add up to 20 items at a time. - nullable: true + type: object required: - id - created_at title: Conversation - type: object + description: OpenAI-compatible conversation object. ConversationDeletedResource: - description: Response for deleted conversation. properties: id: - description: The deleted conversation identifier - title: Id type: string + title: Id + description: The deleted conversation identifier object: - default: conversation.deleted - description: Object type - title: Object type: string + title: Object + description: Object type + default: conversation.deleted deleted: - default: true - description: Whether the object was deleted - title: Deleted type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object required: - id title: ConversationDeletedResource - type: object + description: Response for deleted conversation. ConversationItemList: - description: List of conversation items with pagination. properties: object: - default: list - description: Object type - title: Object type: string + title: Object + description: Object type + default: list data: - description: List of conversation items items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -2699,58 +2646,68 @@ components: title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - title: Data + 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' + title: OpenAIResponseMessage-Output | ... (9 variants) type: array + title: Data + description: List of conversation items first_id: anyOf: - type: string - type: 'null' description: The ID of the first item in the list - nullable: true last_id: anyOf: - type: string - type: 'null' description: The ID of the last item in the list - nullable: true has_more: - default: false - description: Whether there are more items available - title: Has More type: boolean + title: Has More + description: Whether there are more items available + default: false + type: object required: - data title: ConversationItemList - type: object + description: List of conversation items with pagination. ConversationItemDeletedResource: - description: Response for deleted conversation item. properties: id: - description: The deleted item identifier - title: Id type: string + title: Id + description: The deleted item identifier object: - default: conversation.item.deleted - description: Object type - title: Object type: string + title: Object + description: Object type + default: conversation.item.deleted deleted: - default: true - description: Whether the object was deleted - title: Deleted type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object required: - id title: ConversationItemDeletedResource - type: object + description: Response for deleted conversation item. OpenAIEmbeddingsRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible embeddings endpoint. properties: model: - title: Model type: string + title: Model input: anyOf: - type: string @@ -2768,25 +2725,24 @@ components: anyOf: - type: integer - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - input title: OpenAIEmbeddingsRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible embeddings endpoint. OpenAIEmbeddingData: - description: A single embedding data object from an OpenAI-compatible embeddings response. properties: object: + type: string const: embedding - default: embedding title: Object - type: string + default: embedding embedding: anyOf: - items: @@ -2796,112 +2752,113 @@ components: - type: string title: list[number] | string index: - title: Index type: integer + title: Index + type: object required: - embedding - index title: OpenAIEmbeddingData - type: object + description: A single embedding data object from an OpenAI-compatible embeddings response. OpenAIEmbeddingUsage: - description: Usage information for an OpenAI-compatible embeddings response. properties: prompt_tokens: - title: Prompt Tokens type: integer + title: Prompt Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens + type: object required: - prompt_tokens - total_tokens title: OpenAIEmbeddingUsage - type: object + description: Usage information for an OpenAI-compatible embeddings response. OpenAIEmbeddingsResponse: - description: Response from an OpenAI-compatible embeddings request. properties: object: + type: string const: list - default: list title: Object - type: string + default: list data: items: $ref: '#/components/schemas/OpenAIEmbeddingData' - title: Data type: array + title: Data model: - title: Model type: string + title: Model usage: $ref: '#/components/schemas/OpenAIEmbeddingUsage' + type: object required: - data - model - usage title: OpenAIEmbeddingsResponse - type: object + description: Response from an OpenAI-compatible embeddings request. OpenAIFilePurpose: - description: Valid purpose values for OpenAI Files API. + type: string enum: - assistants - batch title: OpenAIFilePurpose - type: string + description: Valid purpose values for OpenAI Files API. ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. properties: data: items: $ref: '#/components/schemas/OpenAIFileObject' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIFileResponse - type: object + description: Response for listing files in OpenAI Files API. OpenAIFileObject: - description: OpenAI File object as defined in the OpenAI Files API. properties: object: + type: string const: file - default: file title: Object - type: string + default: file id: - title: Id type: string + title: Id bytes: - title: Bytes type: integer + title: Bytes created_at: - title: Created At type: integer + title: Created At expires_at: - title: Expires At type: integer + title: Expires At filename: - title: Filename type: string + title: Filename purpose: $ref: '#/components/schemas/OpenAIFilePurpose' + type: object required: - id - bytes @@ -2910,212 +2867,211 @@ components: - filename - purpose title: OpenAIFileObject - type: object + description: OpenAI File object as defined in the OpenAI Files API. 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: + type: string const: created_at title: Anchor - type: string seconds: - maximum: 2592000 - minimum: 3600 - title: Seconds type: integer + maximum: 2592000.0 + minimum: 3600.0 + title: Seconds + type: object required: - anchor - seconds title: ExpiresAfter - type: object + 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) OpenAIFileDeleteResponse: - description: Response for deleting a file in OpenAI Files API. properties: id: - title: Id type: string + title: Id object: + type: string const: file - default: file title: Object - type: string + default: file deleted: - title: Deleted type: boolean + title: Deleted + type: object required: - id - deleted title: OpenAIFileDeleteResponse + description: Response for deleting a file in OpenAI Files API. + Response: + title: Response type: object HealthInfo: - description: Health status information for the service. properties: status: $ref: '#/components/schemas/HealthStatus' + type: object required: - status title: HealthInfo - type: object + description: Health status information for the service. RouteInfo: - description: Information about an API route including its path, method, and implementing providers. properties: route: - title: Route type: string + title: Route method: - title: Method type: string + title: Method provider_types: items: type: string - title: Provider Types type: array + title: Provider Types + type: object required: - route - method - provider_types title: RouteInfo - type: object + description: Information about an API route including its path, method, and implementing providers. ListRoutesResponse: - description: Response containing a list of all available API routes. properties: data: items: $ref: '#/components/schemas/RouteInfo' - title: Data type: array + title: Data + type: object required: - data title: ListRoutesResponse - type: object + description: Response containing a list of all available API routes. OpenAIModel: - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: id: - title: Id type: string + title: Id object: + type: string const: model - default: model title: Object - type: string + default: model created: - title: Created type: integer + title: Created owned_by: - title: Owned By type: string + title: Owned By custom_metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - id - created - owned_by title: OpenAIModel - type: object + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata OpenAIListModelsResponse: properties: data: items: $ref: '#/components/schemas/OpenAIModel' - title: Data type: array + title: Data + type: object required: - data title: OpenAIListModelsResponse - type: object Model: - description: A model resource representing an AI model registered in Llama Stack. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: model - default: model title: Type - type: string + default: model metadata: additionalProperties: true - description: Any additional metadata for this model - title: Metadata 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 - type: object + description: A model resource representing an AI model registered in Llama Stack. ModelType: - description: Enumeration of supported model types in Llama Stack. + type: string enum: - llm - embedding - rerank title: ModelType - type: string + description: Enumeration of supported model types in Llama Stack. ModerationObject: - description: A moderation object. properties: id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model results: items: $ref: '#/components/schemas/ModerationObjectResults' - title: Results type: array + title: Results + type: object required: - id - model - results title: ModerationObject - type: object - ModerationObjectResults: description: A moderation object. + ModerationObjectResults: properties: flagged: - title: Flagged type: boolean + title: Flagged categories: anyOf: - additionalProperties: type: boolean type: object - type: 'null' - nullable: true category_applied_input_types: anyOf: - additionalProperties: @@ -3124,93 +3080,90 @@ components: type: array type: object - type: 'null' - nullable: true category_scores: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true user_message: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - flagged title: ModerationObjectResults - type: object + description: A moderation object. Prompt: - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. properties: prompt: anyOf: - type: string - type: 'null' description: The system prompt with variable placeholders - nullable: true version: - description: Version (integer starting at 1, incremented on save) - minimum: 1 - title: Version type: integer + minimum: 1.0 + title: Version + description: Version (integer starting at 1, incremented on save) prompt_id: - description: Unique identifier in format 'pmpt_<48-digit-hash>' - title: Prompt Id type: string + title: Prompt Id + description: Unique identifier in format 'pmpt_<48-digit-hash>' variables: - description: List of variable names that can be used in the prompt template items: type: string - title: Variables type: array + title: Variables + description: List of variable names that can be used in the prompt template is_default: - default: false - description: Boolean indicating whether this version is the default version - title: 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 - type: object + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. ListPromptsResponse: - description: Response model to list prompts. properties: data: items: $ref: '#/components/schemas/Prompt' - title: Data type: array + title: Data + type: object required: - data title: ListPromptsResponse - type: object + description: Response model to list prompts. ProviderInfo: - description: Information about a registered provider including its configuration and health status. properties: api: - title: Api type: string + title: Api provider_id: - title: Provider Id type: string + title: Provider Id provider_type: - title: Provider Type type: string + title: Provider Type config: additionalProperties: true - title: Config type: object + title: Config health: additionalProperties: true - title: Health type: object + title: Health + type: object required: - api - provider_id @@ -3218,62 +3171,62 @@ components: - config - health title: ProviderInfo - type: object + description: Information about a registered provider including its configuration and health status. ListProvidersResponse: - description: Response containing a list of all available providers. properties: data: items: $ref: '#/components/schemas/ProviderInfo' - title: Data type: array + title: Data + type: object required: - data title: ListProvidersResponse - type: object + description: Response containing a list of all available providers. ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. properties: data: items: $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIResponseObject - type: object + description: Paginated list of OpenAI response objects with navigation metadata. OpenAIResponseError: - description: Error details for failed OpenAI response requests. properties: code: - title: Code type: string + title: Code message: - title: Message type: string + title: Message + type: object required: - code - message title: OpenAIResponseError - type: object + description: Error details for failed OpenAI response requests. OpenAIResponseInput: anyOf: - discriminator: @@ -3310,29 +3263,27 @@ components: title: OpenAIResponseMessage title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage OpenAIResponseInputToolFileSearch: - description: File search tool configuration for OpenAI response inputs. properties: type: + type: string const: file_search - default: file_search title: Type - type: string + default: file_search vector_store_ids: items: type: string - title: Vector Store Ids type: array + title: Vector Store Ids filters: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true max_num_results: anyOf: - - maximum: 50 - minimum: 1 - type: integer + - type: integer + maximum: 50.0 + minimum: 1.0 - type: 'null' default: 10 ranking_options: @@ -3340,28 +3291,26 @@ components: - $ref: '#/components/schemas/SearchRankingOptions' title: SearchRankingOptions - type: 'null' - nullable: true title: SearchRankingOptions + type: object required: - vector_store_ids title: OpenAIResponseInputToolFileSearch - type: object + description: File search tool configuration for OpenAI response inputs. OpenAIResponseInputToolFunction: - description: Function tool configuration for OpenAI response inputs. properties: type: + type: string const: function - default: function title: Type - type: string + default: function name: - title: Name type: string + title: Name description: anyOf: - type: string - type: 'null' - nullable: true parameters: anyOf: - additionalProperties: true @@ -3371,18 +3320,17 @@ components: anyOf: - type: boolean - type: 'null' - nullable: true + type: object required: - name - parameters title: OpenAIResponseInputToolFunction - type: object + description: Function tool configuration for OpenAI response inputs. OpenAIResponseInputToolWebSearch: - description: Web search tool configuration for OpenAI response inputs. properties: type: - default: web_search title: Type + default: web_search type: string enum: - web_search @@ -3391,51 +3339,40 @@ components: - web_search_2025_08_26 search_context_size: anyOf: - - pattern: ^low|medium|high$ - type: string + - type: string + pattern: ^low|medium|high$ - type: 'null' default: medium - title: OpenAIResponseInputToolWebSearch type: object + title: OpenAIResponseInputToolWebSearch + description: Web search tool configuration for OpenAI response inputs. OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. properties: created_at: - title: Created At type: integer + title: Created At error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' title: OpenAIResponseError - type: 'null' - nullable: true title: OpenAIResponseError id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model object: + type: string const: response - default: response title: Object - type: string + default: response 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' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -3448,33 +3385,40 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array + title: Output parallel_tool_calls: - default: false - title: Parallel Tool Calls type: boolean + title: Parallel Tool Calls + default: false previous_response_id: anyOf: - type: string - type: 'null' - nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' title: OpenAIResponsePrompt - type: 'null' - nullable: true title: OpenAIResponsePrompt status: - title: Status type: string + title: Status temperature: anyOf: - type: number - type: 'null' - nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -3484,20 +3428,9 @@ components: anyOf: - type: number - type: 'null' - nullable: true tools: anyOf: - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' title: OpenAIResponseInputToolWebSearch @@ -3507,48 +3440,43 @@ components: title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - nullable: true truncation: anyOf: - type: string - type: 'null' - nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' title: OpenAIResponseUsage - type: 'null' - nullable: true title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - nullable: true max_tool_calls: anyOf: - type: integer - type: 'null' - 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' - title: OpenAIResponseMessage + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -3561,16 +3489,27 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Input + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array + title: Input + type: object required: - created_at - id @@ -3579,7 +3518,7 @@ components: - status - input title: OpenAIResponseObjectWithInput - type: object + description: OpenAI response object extended with input context information. OpenAIResponseOutput: discriminator: mapping: @@ -3608,20 +3547,13 @@ components: title: OpenAIResponseMCPApprovalRequest title: OpenAIResponseMessage | ... (7 variants) OpenAIResponsePrompt: - description: OpenAI compatible Prompt object that is used in OpenAI responses. properties: id: - title: Id type: string + title: Id variables: anyOf: - additionalProperties: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText @@ -3629,31 +3561,35 @@ components: title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: object - - type: 'null' - nullable: true + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: object + - type: 'null' version: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - id title: OpenAIResponsePrompt - type: object + description: OpenAI compatible Prompt object that is used in OpenAI responses. OpenAIResponseText: - description: Text response configuration for OpenAI responses. properties: format: anyOf: - $ref: '#/components/schemas/OpenAIResponseTextFormat' title: OpenAIResponseTextFormat - type: 'null' - nullable: true title: OpenAIResponseTextFormat - title: OpenAIResponseText type: object + title: OpenAIResponseText + description: Text response configuration for OpenAI responses. OpenAIResponseTool: discriminator: mapping: @@ -3676,16 +3612,15 @@ components: title: OpenAIResponseToolMCP title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. properties: type: + type: string const: mcp - default: mcp title: Type - type: string + default: mcp server_label: - title: Server Label type: string + title: Server Label allowed_tools: anyOf: - items: @@ -3696,43 +3631,41 @@ components: title: AllowedToolsFilter - type: 'null' title: list[string] | AllowedToolsFilter - nullable: true + type: object required: - server_label title: OpenAIResponseToolMCP - type: object + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. OpenAIResponseUsage: - description: Usage information for OpenAI response. properties: input_tokens: - title: Input Tokens type: integer + title: Input Tokens output_tokens: - title: Output Tokens type: integer + title: Output Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens input_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' title: OpenAIResponseUsageInputTokensDetails - type: 'null' - nullable: true title: OpenAIResponseUsageInputTokensDetails output_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' title: OpenAIResponseUsageOutputTokensDetails - type: 'null' - nullable: true title: OpenAIResponseUsageOutputTokensDetails + type: object required: - input_tokens - output_tokens - total_tokens title: OpenAIResponseUsage - type: object + description: Usage information for OpenAI response. ResponseGuardrailSpec: description: Specification for a guardrail to apply during response generation. properties: @@ -3765,40 +3698,37 @@ components: title: OpenAIResponseInputToolMCP title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: type: + type: string const: mcp - default: mcp title: Type - type: string + default: mcp server_label: - title: Server Label type: string + title: Server Label server_url: - title: Server Url type: string + title: Server Url headers: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true authorization: anyOf: - type: string - type: 'null' - nullable: true require_approval: anyOf: - - const: always - type: string - - const: never - type: string + - type: string + const: always + - type: string + const: never - $ref: '#/components/schemas/ApprovalFilter' title: ApprovalFilter - default: never title: string | ApprovalFilter + default: never allowed_tools: anyOf: - items: @@ -3809,51 +3739,39 @@ components: title: AllowedToolsFilter - type: 'null' title: list[string] | AllowedToolsFilter - nullable: true + type: object required: - server_label - server_url title: OpenAIResponseInputToolMCP - type: object + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. OpenAIResponseObject: - description: Complete OpenAI response object containing generation results and metadata. properties: created_at: - title: Created At type: integer + title: Created At error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' title: OpenAIResponseError - type: 'null' - nullable: true title: OpenAIResponseError id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model object: + type: string const: response - default: response title: Object - type: string + default: response 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' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -3866,33 +3784,40 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array + title: Output parallel_tool_calls: - default: false - title: Parallel Tool Calls type: boolean + title: Parallel Tool Calls + default: false previous_response_id: anyOf: - type: string - type: 'null' - nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' title: OpenAIResponsePrompt - type: 'null' - nullable: true title: OpenAIResponsePrompt status: - title: Status type: string + title: Status temperature: anyOf: - type: number - type: 'null' - nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -3902,20 +3827,9 @@ components: anyOf: - type: number - type: 'null' - nullable: true tools: anyOf: - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' title: OpenAIResponseInputToolWebSearch @@ -3925,32 +3839,38 @@ components: title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - nullable: true truncation: anyOf: - type: string - type: 'null' - nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' title: OpenAIResponseUsage - type: 'null' - nullable: true title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - nullable: true max_tool_calls: anyOf: - type: integer - type: 'null' - nullable: true + type: object required: - created_at - id @@ -3958,7 +3878,7 @@ components: - output - status title: OpenAIResponseObject - type: object + description: Complete OpenAI response object containing generation results and metadata. OpenAIResponseContentPartOutputText: description: Text content within a streamed response part. properties: @@ -5122,43 +5042,32 @@ components: title: OpenAIResponseObjectStreamResponseWebSearchCallSearching type: object OpenAIDeleteResponseObject: - description: Response object confirming deletion of an OpenAI response. properties: id: - title: Id type: string + title: Id object: + type: string const: response - default: response title: Object - type: string + default: response deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: OpenAIDeleteResponseObject - type: object + description: Response object confirming deletion of an OpenAI response. ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. 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' - title: OpenAIResponseMessage + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -5171,39 +5080,48 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Data + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array + title: Data object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data title: ListOpenAIResponseInputItem - type: object + description: List container for OpenAI response input items. RunShieldResponse: - description: Response from running a safety shield. properties: violation: anyOf: - $ref: '#/components/schemas/SafetyViolation' title: SafetyViolation - type: 'null' - nullable: true title: SafetyViolation - title: RunShieldResponse type: object + title: RunShieldResponse + description: Response from running a safety shield. SafetyViolation: - description: Details of a safety violation detected by content moderation. properties: violation_level: $ref: '#/components/schemas/ViolationLevel' @@ -5211,25 +5129,25 @@ components: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - violation_level title: SafetyViolation - type: object + description: Details of a safety violation detected by content moderation. ViolationLevel: - description: Severity level of a safety violation. + type: string enum: - info - warn - error title: ViolationLevel - type: string + description: Severity level of a safety violation. AggregationFunctionType: - description: Types of aggregation functions for scoring results. + type: string enum: - average - weighted_average @@ -5237,193 +5155,176 @@ components: - categorical_count - accuracy title: AggregationFunctionType - type: string + description: Types of aggregation functions for scoring results. ArrayType: - description: Parameter type for array values. properties: type: + type: string const: array - default: array title: Type - type: string - title: ArrayType + default: array type: object + title: ArrayType + description: Parameter type for array values. BasicScoringFnParams: - description: Parameters for basic scoring function configuration. properties: type: + type: string const: basic - default: basic title: Type - type: string + default: basic aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array - title: BasicScoringFnParams + 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. BooleanType: - description: Parameter type for boolean values. properties: type: + type: string const: boolean - default: boolean title: Type - type: string - title: BooleanType + default: boolean type: object + title: BooleanType + description: Parameter type for boolean values. ChatCompletionInputType: - description: Parameter type for chat completion input. properties: type: + type: string const: chat_completion_input - default: chat_completion_input title: Type - type: string - title: ChatCompletionInputType + default: chat_completion_input type: object + title: ChatCompletionInputType + description: Parameter type for chat completion input. CompletionInputType: - description: Parameter type for completion input. properties: type: + type: string const: completion_input - default: completion_input title: Type - type: string - title: CompletionInputType + default: completion_input type: object + title: CompletionInputType + description: Parameter type for completion input. JsonType: - description: Parameter type for JSON values. properties: type: + type: string const: json - default: json title: Type - type: string - title: JsonType + default: json type: object + title: JsonType + description: Parameter type for JSON values. LLMAsJudgeScoringFnParams: - description: Parameters for LLM-as-judge scoring function configuration. properties: type: + type: string const: llm_as_judge - default: llm_as_judge title: Type - type: string + default: llm_as_judge judge_model: - title: Judge Model type: string + title: Judge Model prompt_template: anyOf: - type: string - type: 'null' - nullable: true judge_score_regexes: - description: Regexes to extract the answer from generated response items: type: string - title: Judge Score Regexes type: array + title: Judge Score Regexes + description: Regexes to extract the answer from generated response aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array + title: Aggregation Functions + description: Aggregation functions to apply to the scores of each row + type: object required: - judge_model title: LLMAsJudgeScoringFnParams - type: object + description: Parameters for LLM-as-judge scoring function configuration. NumberType: - description: Parameter type for numeric values. properties: type: + type: string const: number - default: number title: Type - type: string - title: NumberType + default: number type: object + title: NumberType + description: Parameter type for numeric values. ObjectType: - description: Parameter type for object values. properties: type: + type: string const: object - default: object title: Type - type: string - title: ObjectType + default: object type: object + title: ObjectType + description: Parameter type for object values. RegexParserScoringFnParams: - description: Parameters for regex parser scoring function configuration. properties: type: + type: string const: regex_parser - default: regex_parser title: Type - type: string + default: regex_parser parsing_regexes: - description: Regex to extract the answer from generated response items: type: string - title: Parsing Regexes type: array + title: Parsing Regexes + description: Regex to extract the answer from generated response aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array - title: RegexParserScoringFnParams + 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. ScoringFn: - description: A scoring function resource for evaluating model outputs. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: scoring_function - default: scoring_function title: Type - type: string + default: scoring_function description: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - description: Any additional metadata for this definition - title: Metadata type: object + title: Metadata + description: Any additional metadata for this definition return_type: - description: The return type of the deterministic function - discriminator: - mapping: - 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' title: StringType @@ -5444,32 +5345,45 @@ components: - $ref: '#/components/schemas/CompletionInputType' title: CompletionInputType title: StringType | ... (9 variants) + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + 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: anyOf: - - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval title: Params - nullable: true + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + type: object required: - identifier - provider_id - return_type title: ScoringFn - type: object + description: A scoring function resource for evaluating model outputs. ScoringFnParams: discriminator: mapping: @@ -5486,127 +5400,124 @@ components: title: BasicScoringFnParams title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams StringType: - description: Parameter type for string values. properties: type: + type: string const: string - default: string title: Type - type: string - title: StringType + default: string type: object + title: StringType + description: Parameter type for string values. UnionType: - description: Parameter type for union values. properties: type: + type: string const: union - default: union title: Type - type: string - title: UnionType + default: union type: object + title: UnionType + description: Parameter type for union values. ListScoringFunctionsResponse: properties: data: items: $ref: '#/components/schemas/ScoringFn' - title: Data type: array + title: Data + type: object required: - data title: ListScoringFunctionsResponse - type: object ScoreResponse: - description: The response from scoring. properties: results: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Results type: object + title: Results + type: object required: - results title: ScoreResponse - type: object + description: The response from scoring. ScoringResult: - description: A scoring result for a single row. properties: score_rows: items: additionalProperties: true type: object - title: Score Rows type: array + title: Score Rows aggregated_results: additionalProperties: true - title: Aggregated Results type: object + title: Aggregated Results + type: object required: - score_rows - aggregated_results title: ScoringResult - type: object + description: A scoring result for a single row. ScoreBatchResponse: - description: Response from batch scoring operations on datasets. properties: dataset_id: anyOf: - type: string - type: 'null' - nullable: true results: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Results type: object + title: Results + type: object required: - results title: ScoreBatchResponse - type: object + description: Response from batch scoring operations on datasets. Shield: - description: A safety shield resource that can be used to check content. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: shield - default: shield title: Type - type: string + default: shield params: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - identifier - provider_id title: Shield - type: object + description: A safety shield resource that can be used to check content. ListShieldsResponse: properties: data: items: $ref: '#/components/schemas/Shield' - title: Data type: array + title: Data + type: object required: - data title: ListShieldsResponse - type: object ImageContentItem: description: A image content item properties: @@ -5663,184 +5574,172 @@ components: title: TextContentItem title: ImageContentItem | TextContentItem TextContentItem: - description: A text content item properties: type: + type: string const: text - default: text title: Type - type: string + default: text text: - title: Text type: string + title: Text + type: object required: - text title: TextContentItem - type: object + description: A text content item ToolInvocationResult: - description: Result of a tool invocation. properties: content: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array - title: list[ImageContentItem | TextContentItem] + title: list[ImageContentItem-Output | TextContentItem] - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true + title: string | list[ImageContentItem-Output | TextContentItem] error_message: anyOf: - type: string - type: 'null' - nullable: true error_code: anyOf: - type: integer - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true - title: ToolInvocationResult type: object + title: ToolInvocationResult + description: Result of a tool invocation. URL: - description: A URL reference to external content. properties: uri: - title: Uri type: string + title: Uri + type: object required: - uri title: URL - type: object + description: A URL reference to external content. ToolDef: - description: Tool definition used in runtime contexts. properties: toolgroup_id: anyOf: - type: string - type: 'null' - nullable: true name: - title: Name type: string + title: Name description: anyOf: - type: string - type: 'null' - nullable: true input_schema: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true output_schema: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - name title: ToolDef - type: object + description: Tool definition used in runtime contexts. ListToolDefsResponse: - description: Response containing a list of tool definitions. properties: data: items: $ref: '#/components/schemas/ToolDef' - title: Data type: array + title: Data + type: object required: - data title: ListToolDefsResponse - type: object + description: Response containing a list of tool definitions. ToolGroup: - description: A group of related tools managed together. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: tool_group - default: tool_group title: Type - type: string + default: tool_group mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' title: URL - type: 'null' - nullable: true title: URL args: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - identifier - provider_id title: ToolGroup - type: object + description: A group of related tools managed together. ListToolGroupsResponse: - description: Response containing a list of tool groups. properties: data: items: $ref: '#/components/schemas/ToolGroup' - title: Data type: array + title: Data + type: object required: - data title: ListToolGroupsResponse - type: object + description: Response containing a list of tool groups. Chunk: description: A chunk of content that can be inserted into a vector database. properties: @@ -5900,105 +5799,94 @@ components: 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. properties: chunk_id: anyOf: - type: string - type: 'null' - nullable: true document_id: anyOf: - type: string - type: 'null' - nullable: true source: anyOf: - type: string - type: 'null' - nullable: true created_timestamp: anyOf: - type: integer - type: 'null' - nullable: true updated_timestamp: anyOf: - type: integer - type: 'null' - nullable: true chunk_window: anyOf: - type: string - type: 'null' - nullable: true chunk_tokenizer: anyOf: - type: string - type: 'null' - nullable: true chunk_embedding_model: anyOf: - type: string - type: 'null' - nullable: true chunk_embedding_dimension: anyOf: - type: integer - type: 'null' - nullable: true content_token_count: anyOf: - type: integer - type: 'null' - nullable: true metadata_token_count: anyOf: - type: integer - type: 'null' - nullable: true - title: ChunkMetadata type: object + title: 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. QueryChunksResponse: - description: Response from querying chunks in a vector database. properties: chunks: items: - $ref: '#/components/schemas/Chunk' - title: Chunks + $ref: '#/components/schemas/Chunk-Output' type: array + title: Chunks scores: items: type: number - title: Scores type: array + title: Scores + type: object required: - chunks - scores title: QueryChunksResponse - type: object + description: Response from querying chunks in a vector database. VectorStoreFileCounts: - description: File processing status counts for a vector store. properties: completed: - title: Completed type: integer + title: Completed cancelled: - title: Cancelled type: integer + title: Cancelled failed: - title: Failed type: integer + title: Failed in_progress: - title: In Progress type: integer + title: In Progress total: - title: Total type: integer + title: Total + type: object required: - completed - cancelled @@ -6006,91 +5894,85 @@ components: - in_progress - total title: VectorStoreFileCounts - type: object + description: File processing status counts for a vector store. VectorStoreListResponse: - description: Response from listing vector stores. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreListResponse - type: object + description: Response from listing vector stores. VectorStoreObject: - description: OpenAI Vector Store object. properties: id: - title: Id type: string + title: Id object: - default: vector_store - title: Object type: string + title: Object + default: vector_store created_at: - title: Created At type: integer + title: Created At name: anyOf: - type: string - type: 'null' - nullable: true usage_bytes: - default: 0 - title: Usage Bytes type: integer + title: Usage Bytes + default: 0 file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' status: - default: completed - title: Status type: string + title: Status + default: completed expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true expires_at: anyOf: - type: integer - type: 'null' - nullable: true last_active_at: anyOf: - type: integer - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - id - created_at - file_counts title: VectorStoreObject - type: object + description: OpenAI Vector Store object. VectorStoreChunkingStrategy: discriminator: mapping: @@ -6104,159 +5986,151 @@ components: title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreChunkingStrategyAuto: - description: Automatic chunking strategy for vector store files. properties: type: + type: string const: auto - default: auto title: Type - type: string - title: VectorStoreChunkingStrategyAuto + default: auto type: object + title: VectorStoreChunkingStrategyAuto + description: Automatic chunking strategy for vector store files. VectorStoreChunkingStrategyStatic: - description: Static chunking strategy with configurable parameters. properties: type: + type: string const: static - default: static title: Type - type: string + default: static static: $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + type: object required: - static title: VectorStoreChunkingStrategyStatic - type: object + description: Static chunking strategy with configurable parameters. VectorStoreChunkingStrategyStaticConfig: - description: Configuration for static chunking strategy. properties: chunk_overlap_tokens: - default: 400 - title: Chunk Overlap Tokens type: integer + title: Chunk Overlap Tokens + default: 400 max_chunk_size_tokens: - default: 800 - maximum: 4096 - minimum: 100 - title: Max Chunk Size Tokens type: integer - title: VectorStoreChunkingStrategyStaticConfig + maximum: 4096.0 + minimum: 100.0 + title: Max Chunk Size Tokens + default: 800 type: object + title: VectorStoreChunkingStrategyStaticConfig + description: Configuration for static chunking strategy. OpenAICreateVectorStoreRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store with extra_body support. properties: name: anyOf: - type: string - type: 'null' - nullable: true file_ids: anyOf: - items: type: string type: array - type: 'null' - nullable: true expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true chunking_strategy: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true - title: OpenAICreateVectorStoreRequestWithExtraBody + additionalProperties: true type: object + title: OpenAICreateVectorStoreRequestWithExtraBody + description: Request to create a vector store with extra_body support. VectorStoreDeleteResponse: - description: Response from deleting a vector store. properties: id: - title: Id type: string + title: Id object: - default: vector_store.deleted - title: Object type: string + title: Object + default: vector_store.deleted deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: VectorStoreDeleteResponse - type: object + description: Response from deleting a vector store. OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store file batch with extra_body support. properties: file_ids: items: type: string - title: File Ids type: array + title: File Ids attributes: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true chunking_strategy: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy - nullable: true + additionalProperties: true + type: object required: - file_ids title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - type: object + description: Request to create a vector store file batch with extra_body support. VectorStoreFileBatchObject: - description: OpenAI Vector Store File Batch object. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file_batch - title: Object type: string + title: Object + default: vector_store.file_batch created_at: - title: Created At type: integer + title: Created At vector_store_id: - title: Vector Store Id type: string + title: Vector Store Id status: title: Status type: string @@ -6268,6 +6142,7 @@ components: default: completed file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' + type: object required: - id - created_at @@ -6275,7 +6150,7 @@ components: - status - file_counts title: VectorStoreFileBatchObject - type: object + description: OpenAI Vector Store File Batch object. VectorStoreFileStatus: type: string enum: @@ -6285,7 +6160,6 @@ components: - failed default: completed VectorStoreFileLastError: - description: Error information for failed vector store file processing. properties: code: title: Code @@ -6295,48 +6169,47 @@ components: - rate_limit_exceeded default: server_error message: - title: Message type: string + title: Message + type: object required: - code - message title: VectorStoreFileLastError - type: object + description: Error information for failed vector store file processing. VectorStoreFileObject: - description: OpenAI Vector Store File object. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file - title: Object type: string + title: Object + default: vector_store.file attributes: additionalProperties: true - title: Attributes type: object + title: Attributes chunking_strategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' created_at: - title: Created At type: integer + title: Created At last_error: anyOf: - $ref: '#/components/schemas/VectorStoreFileLastError' title: VectorStoreFileLastError - type: 'null' - nullable: true title: VectorStoreFileLastError status: title: Status @@ -6348,12 +6221,13 @@ components: - failed default: completed usage_bytes: - default: 0 - title: Usage Bytes type: integer + title: Usage Bytes + default: 0 vector_store_id: - title: Vector Store Id type: string + title: Vector Store Id + type: object required: - id - chunking_strategy @@ -6361,158 +6235,149 @@ components: - status - vector_store_id title: VectorStoreFileObject - type: object + description: OpenAI Vector Store File object. VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreFileObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreFilesListInBatchResponse - type: object + description: Response from listing files in a vector store file batch. VectorStoreListFilesResponse: - description: Response from listing files in a vector store. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreFileObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreListFilesResponse - type: object + description: Response from listing files in a vector store. VectorStoreFileDeleteResponse: - description: Response from deleting a vector store file. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file.deleted - title: Object type: string + title: Object + default: vector_store.file.deleted deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: VectorStoreFileDeleteResponse - type: object + description: Response from deleting a vector store file. VectorStoreContent: - description: Content item from a vector store file or search result. properties: type: + type: string const: text title: Type - type: string text: - title: Text type: string + title: Text embedding: anyOf: - items: type: number type: array - type: 'null' - nullable: true chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' title: ChunkMetadata - type: 'null' - nullable: true title: ChunkMetadata metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - type - text title: VectorStoreContent - type: object + description: Content item from a vector store file or search result. VectorStoreFileContentResponse: - description: Represents the parsed content of a vector store file. properties: object: + type: string const: vector_store.file_content.page - default: vector_store.file_content.page title: Object - type: string + default: vector_store.file_content.page data: items: $ref: '#/components/schemas/VectorStoreContent' - title: Data type: array + title: Data has_more: - default: false - title: Has More type: boolean + title: Has More + default: false next_page: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - data title: VectorStoreFileContentResponse - type: object + description: Represents the parsed content of a vector store file. VectorStoreSearchResponse: - description: Response from searching a vector store. properties: file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename score: - title: Score type: number + title: Score attributes: anyOf: - additionalProperties: @@ -6523,241 +6388,230 @@ components: title: string | number | boolean type: object - type: 'null' - nullable: true content: items: $ref: '#/components/schemas/VectorStoreContent' - title: Content type: array + title: Content + type: object required: - file_id - filename - score - content title: VectorStoreSearchResponse - type: object + description: Response from searching a vector store. VectorStoreSearchResponsePage: - description: Paginated response from searching a vector store. properties: object: - default: vector_store.search_results.page - title: Object type: string + title: Object + default: vector_store.search_results.page search_query: items: type: string - title: Search Query type: array + title: Search Query data: items: $ref: '#/components/schemas/VectorStoreSearchResponse' - title: Data type: array + title: Data has_more: - default: false - title: Has More type: boolean + title: Has More + default: false next_page: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - search_query - data title: VectorStoreSearchResponsePage - type: object + description: Paginated response from searching a vector store. VersionInfo: - description: Version information for the service. properties: version: - title: Version type: string + title: Version + type: object required: - version title: VersionInfo - type: object + description: Version information for the service. PaginatedResponse: - description: A generic paginated response that follows a simple format. properties: data: items: additionalProperties: true type: object - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More url: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - data - has_more title: PaginatedResponse - type: object + description: A generic paginated response that follows a simple format. Dataset: - description: Dataset resource for storing and accessing training or evaluation data. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: dataset - default: dataset title: Type - type: string + default: dataset purpose: $ref: '#/components/schemas/DatasetPurpose' source: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type oneOf: - $ref: '#/components/schemas/URIDataSource' title: URIDataSource - $ref: '#/components/schemas/RowsDataSource' title: RowsDataSource title: URIDataSource | RowsDataSource + discriminator: + propertyName: type + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' metadata: additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata type: object + title: Metadata + description: Any additional metadata for this dataset + type: object required: - identifier - provider_id - purpose - source title: Dataset - type: object + description: Dataset resource for storing and accessing training or evaluation data. RowsDataSource: - description: A dataset stored in rows. properties: type: + type: string const: rows - default: rows title: Type - type: string + default: rows rows: items: additionalProperties: true type: object - title: Rows type: array + title: Rows + type: object required: - rows title: RowsDataSource - type: object + description: A dataset stored in rows. URIDataSource: - description: A dataset that can be obtained from a URI. properties: type: + type: string const: uri - default: uri title: Type - type: string + default: uri uri: - title: Uri type: string + title: Uri + type: object required: - uri title: URIDataSource - type: object + description: A dataset that can be obtained from a URI. ListDatasetsResponse: - description: Response from listing datasets. properties: data: items: $ref: '#/components/schemas/Dataset' - title: Data type: array + title: Data + type: object required: - data title: ListDatasetsResponse - type: object + description: Response from listing datasets. Benchmark: - description: A benchmark resource for evaluating model performance. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: benchmark - default: benchmark title: Type - type: string + default: benchmark dataset_id: - title: Dataset Id type: string + title: Dataset Id scoring_functions: items: type: string - title: Scoring Functions type: array + title: Scoring Functions metadata: additionalProperties: true - description: Metadata for this evaluation task - title: Metadata type: object + title: Metadata + description: Metadata for this evaluation task + type: object required: - identifier - provider_id - dataset_id - scoring_functions title: Benchmark - type: object + description: A benchmark resource for evaluating model performance. ListBenchmarksResponse: properties: data: items: $ref: '#/components/schemas/Benchmark' - title: Data type: array + title: Data + type: object required: - data title: ListBenchmarksResponse - type: object BenchmarkConfig: - description: A benchmark configuration for evaluation. properties: eval_candidate: $ref: '#/components/schemas/ModelCandidate' scoring_params: additionalProperties: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' title: LLMAsJudgeScoringFnParams @@ -6765,41 +6619,46 @@ components: title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - description: Map between scoring function id and parameters for each scoring function you want to run - title: Scoring Params type: object + title: Scoring Params + description: Map between scoring function id and parameters for each scoring function you want to run num_examples: anyOf: - type: integer - type: 'null' description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - nullable: true + type: object required: - eval_candidate title: BenchmarkConfig - type: object + description: A benchmark configuration for evaluation. GreedySamplingStrategy: - description: Greedy sampling strategy that selects the highest probability token at each step. properties: type: + type: string const: greedy - default: greedy title: Type - type: string - title: GreedySamplingStrategy + default: greedy type: object + title: GreedySamplingStrategy + description: Greedy sampling strategy that selects the highest probability token at each step. ModelCandidate: - description: A model candidate for evaluation. properties: type: + type: string const: model - default: model title: Type - type: string + default: model model: - title: Model type: string + title: Model sampling_params: $ref: '#/components/schemas/SamplingParams' system_message: @@ -6807,23 +6666,16 @@ components: - $ref: '#/components/schemas/SystemMessage' title: SystemMessage - type: 'null' - nullable: true title: SystemMessage + type: object required: - model - sampling_params title: ModelCandidate - type: object + description: A model candidate for evaluation. SamplingParams: - description: Sampling parameters. properties: strategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' title: GreedySamplingStrategy @@ -6832,11 +6684,16 @@ components: - $ref: '#/components/schemas/TopKSamplingStrategy' title: TopKSamplingStrategy title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' max_tokens: anyOf: - type: integer - type: 'null' - nullable: true repetition_penalty: anyOf: - type: number @@ -6848,74 +6705,73 @@ components: type: string type: array - type: 'null' - nullable: true - title: SamplingParams type: object + title: SamplingParams + description: Sampling parameters. SystemMessage: - description: A system message providing instructions or context to the model. properties: role: + type: string const: system - default: system title: Role - type: string + default: system content: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + type: object required: - content title: SystemMessage - type: object + description: A system message providing instructions or context to the model. TopKSamplingStrategy: - description: Top-k sampling strategy that restricts sampling to the k most likely tokens. properties: type: + type: string const: top_k - default: top_k title: Type - type: string + default: top_k top_k: - minimum: 1 - title: Top K type: integer + minimum: 1.0 + title: Top K + type: object required: - top_k title: TopKSamplingStrategy - type: object + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. TopPSamplingStrategy: - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. properties: type: + type: string const: top_p - default: top_p title: Type - type: string + default: top_p temperature: anyOf: - type: number @@ -6926,94 +6782,94 @@ components: - type: number - type: 'null' default: 0.95 + type: object required: - temperature title: TopPSamplingStrategy - type: object + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. EvaluateResponse: - description: The response from an evaluation. properties: generations: items: additionalProperties: true type: object - title: Generations type: array + title: Generations scores: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Scores type: object + title: Scores + type: object required: - generations - scores title: EvaluateResponse - type: object + description: The response from an evaluation. Job: - description: A job execution instance with status tracking. properties: job_id: - title: Job Id type: string + title: Job Id status: $ref: '#/components/schemas/JobStatus' + type: object required: - job_id - status title: Job - type: object + description: A job execution instance with status tracking. RerankData: - description: A single rerank result from a reranking response. properties: index: - title: Index type: integer + title: Index relevance_score: - title: Relevance Score type: number + title: Relevance Score + type: object required: - index - relevance_score title: RerankData - type: object + description: A single rerank result from a reranking response. RerankResponse: - description: Response from a reranking request. properties: data: items: $ref: '#/components/schemas/RerankData' - title: Data type: array + title: Data + type: object required: - data title: RerankResponse - type: object + description: Response from a reranking request. Checkpoint: - description: Checkpoint created during training runs. properties: identifier: - title: Identifier type: string + title: Identifier created_at: + type: string format: date-time title: Created At - type: string epoch: - title: Epoch type: integer + title: Epoch post_training_job_id: - title: Post Training Job Id type: string + title: Post Training Job Id path: - title: Path type: string + title: Path training_metrics: anyOf: - $ref: '#/components/schemas/PostTrainingMetric' title: PostTrainingMetric - type: 'null' - nullable: true title: PostTrainingMetric + type: object required: - identifier - created_at @@ -7021,137 +6877,131 @@ components: - post_training_job_id - path title: Checkpoint - type: object + description: Checkpoint created during training runs. PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid checkpoints: items: $ref: '#/components/schemas/Checkpoint' - title: Checkpoints type: array + title: Checkpoints + type: object required: - job_uuid title: PostTrainingJobArtifactsResponse - type: object + description: Artifacts of a finetuning job. PostTrainingMetric: - description: Training metrics captured during post-training jobs. properties: epoch: - title: Epoch type: integer + title: Epoch train_loss: - title: Train Loss type: number + title: Train Loss validation_loss: - title: Validation Loss type: number + title: Validation Loss perplexity: - title: Perplexity type: number + title: Perplexity + type: object required: - epoch - train_loss - validation_loss - perplexity title: PostTrainingMetric - type: object + description: Training metrics captured during post-training jobs. PostTrainingJobStatusResponse: - description: Status of a finetuning job. properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid status: $ref: '#/components/schemas/JobStatus' scheduled_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true started_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true completed_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true checkpoints: items: $ref: '#/components/schemas/Checkpoint' - title: Checkpoints type: array + title: Checkpoints + type: object required: - job_uuid - status title: PostTrainingJobStatusResponse - type: object + description: Status of a finetuning job. ListPostTrainingJobsResponse: properties: data: items: $ref: '#/components/schemas/PostTrainingJob' - title: Data type: array + title: Data + type: object required: - data title: ListPostTrainingJobsResponse - type: object DPOAlignmentConfig: - description: Configuration for Direct Preference Optimization (DPO) alignment. properties: beta: - title: Beta type: number + title: Beta loss_type: $ref: '#/components/schemas/DPOLossType' default: sigmoid + type: object required: - beta title: DPOAlignmentConfig - type: object + description: Configuration for Direct Preference Optimization (DPO) alignment. DPOLossType: + type: string enum: - sigmoid - hinge - ipo - kto_pair title: DPOLossType - type: string DataConfig: - description: Configuration for training data and data loading. properties: dataset_id: - title: Dataset Id type: string + title: Dataset Id batch_size: - title: Batch Size type: integer + title: Batch Size shuffle: - title: Shuffle type: boolean + title: Shuffle data_format: $ref: '#/components/schemas/DatasetFormat' validation_dataset_id: anyOf: - type: string - type: 'null' - nullable: true packed: anyOf: - type: boolean @@ -7162,22 +7012,22 @@ components: - type: boolean - type: 'null' default: false + type: object required: - dataset_id - batch_size - shuffle - data_format title: DataConfig - type: object + description: Configuration for training data and data loading. DatasetFormat: - description: Format of the training dataset. + type: string enum: - instruct - dialog title: DatasetFormat - type: string + description: Format of the training dataset. EfficiencyConfig: - description: Configuration for memory and compute efficiency optimizations. properties: enable_activation_checkpointing: anyOf: @@ -7199,51 +7049,51 @@ components: - type: boolean - type: 'null' default: false - title: EfficiencyConfig type: object + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. OptimizerConfig: - description: Configuration parameters for the optimization algorithm. properties: optimizer_type: $ref: '#/components/schemas/OptimizerType' lr: - title: Lr type: number + title: Lr weight_decay: - title: Weight Decay type: number + title: Weight Decay num_warmup_steps: - title: Num Warmup Steps type: integer + title: Num Warmup Steps + type: object required: - optimizer_type - lr - weight_decay - num_warmup_steps title: OptimizerConfig - type: object + description: Configuration parameters for the optimization algorithm. OptimizerType: - description: Available optimizer algorithms for training. + type: string enum: - adam - adamw - sgd title: OptimizerType - type: string + description: Available optimizer algorithms for training. TrainingConfig: - description: Comprehensive configuration for the training process. properties: n_epochs: - title: N Epochs type: integer + title: N Epochs max_steps_per_epoch: - default: 1 - title: Max Steps Per Epoch type: integer - gradient_accumulation_steps: + title: Max Steps Per Epoch default: 1 - title: Gradient Accumulation Steps + gradient_accumulation_steps: type: integer + title: Gradient Accumulation Steps + default: 1 max_validation_steps: anyOf: - type: integer @@ -7254,40 +7104,38 @@ components: - $ref: '#/components/schemas/DataConfig' title: DataConfig - type: 'null' - nullable: true title: DataConfig optimizer_config: anyOf: - $ref: '#/components/schemas/OptimizerConfig' title: OptimizerConfig - type: 'null' - nullable: true title: OptimizerConfig efficiency_config: anyOf: - $ref: '#/components/schemas/EfficiencyConfig' title: EfficiencyConfig - type: 'null' - nullable: true title: EfficiencyConfig dtype: anyOf: - type: string - type: 'null' default: bf16 + type: object required: - n_epochs title: TrainingConfig - type: object + description: Comprehensive configuration for the training process. PostTrainingJob: properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid + type: object required: - job_uuid title: PostTrainingJob - type: object AlgorithmConfig: discriminator: mapping: @@ -7301,30 +7149,29 @@ components: title: QATFinetuningConfig title: LoraFinetuningConfig | QATFinetuningConfig LoraFinetuningConfig: - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. properties: type: + type: string const: LoRA - default: LoRA title: Type - type: string + default: LoRA lora_attn_modules: items: type: string - title: Lora Attn Modules type: array + title: Lora Attn Modules apply_lora_to_mlp: - title: Apply Lora To Mlp type: boolean + title: Apply Lora To Mlp apply_lora_to_output: - title: Apply Lora To Output type: boolean + title: Apply Lora To Output rank: - title: Rank type: integer + title: Rank alpha: - title: Alpha type: integer + title: Alpha use_dora: anyOf: - type: boolean @@ -7335,6 +7182,7 @@ components: - type: boolean - type: 'null' default: false + type: object required: - lora_attn_modules - apply_lora_to_mlp @@ -7342,26 +7190,26 @@ components: - rank - alpha title: LoraFinetuningConfig - type: object + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. QATFinetuningConfig: - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: type: + type: string const: QAT - default: QAT title: Type - type: string + default: QAT quantizer_name: - title: Quantizer Name type: string + title: Quantizer Name group_size: - title: Group Size type: integer + title: Group Size + type: object required: - quantizer_name - group_size title: QATFinetuningConfig - type: object + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. ParamType: discriminator: mapping: @@ -7407,176 +7255,1659 @@ components: - $ref: '#/components/schemas/RowsDataSource' title: RowsDataSource title: URIDataSource | RowsDataSource - _URLOrData: - description: A URL or a base64 encoded string + AllowedToolsFilter: properties: - url: + tool_names: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - items: + type: string + type: array - type: 'null' - nullable: true - title: URL - data: + type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: + properties: + always: anyOf: - - type: string + - items: + type: string + type: array + - type: 'null' + never: + anyOf: + - items: + type: string + type: array - type: 'null' - contentEncoding: base64 - nullable: true - title: _URLOrData type: object - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. + BatchError: + properties: + code: + anyOf: + - type: string + - type: 'null' + line: + anyOf: + - type: integer + - type: 'null' + message: + anyOf: + - type: string + - type: 'null' + param: + anyOf: + - type: string + - type: 'null' + 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 + BatchesPostRequest: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + const: 24h + title: Completion Window + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + idempotency_key: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_file_id + - endpoint + - completion_window + title: BatchesPostRequest + Body_openai_upload_file_v1_files_post: + properties: + file: + type: string + format: binary + title: File + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + expires_after: + anyOf: + - $ref: '#/components/schemas/ExpiresAfter' + title: ExpiresAfter + - type: 'null' + title: ExpiresAfter + type: object + required: + - file + - purpose + title: Body_openai_upload_file_v1_files_post + Body_register_benchmark_v1alpha_eval_benchmarks_post: + properties: + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - scoring_functions + title: Body_register_benchmark_v1alpha_eval_benchmarks_post + Body_register_scoring_function_v1_scoring_functions_post: + properties: + return_type: + anyOf: + - $ref: '#/components/schemas/StringType' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + params: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: Params + type: object + required: + - return_type + title: Body_register_scoring_function_v1_scoring_functions_post + Body_register_tool_group_v1_toolgroups_post: + properties: + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + title: URL + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + title: Body_register_tool_group_v1_toolgroups_post + Chunk-Input: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + Chunk-Output: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + type: array + title: list[ImageContentItem-Output | TextContentItem] + title: string | list[ImageContentItem-Output | TextContentItem] + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + 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. + ConversationsByConversationIdItemsPostRequest: + properties: + items: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + title: Items + type: object + required: + - items + title: ConversationsByConversationIdItemsPostRequest + ConversationsByConversationIdPostRequest: + properties: + metadata: + additionalProperties: + type: string + type: object + title: Metadata + type: object + required: + - metadata + title: ConversationsByConversationIdPostRequest + ConversationsPostRequest: + properties: + items: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + - type: 'null' + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + type: object + title: ConversationsPostRequest + 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. + Errors: + properties: + data: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + object: + anyOf: + - type: string + - type: 'null' + additionalProperties: true + type: object + title: Errors + 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 + 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 + InputTokensDetails: + properties: + cached_tokens: + type: integer + title: Cached Tokens + additionalProperties: true + type: object + required: + - cached_tokens + title: InputTokensDetails + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + ModelsPostRequest: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + model_type: + anyOf: + - $ref: '#/components/schemas/ModelType' + title: ModelType + - type: 'null' + title: ModelType + type: object + required: + - model_id + title: ModelsPostRequest + ModerationsPostRequest: + properties: + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + model: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input + title: ModerationsPostRequest + OpenAIAssistantMessageParam-Input: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + OpenAIResponseMessage-Input: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + type: string + const: message + title: Type + default: message + id: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + 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. + OpenAIResponseMessage-Output: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + type: string + const: message + title: Type + default: message + id: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + 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. + 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. + OpenAIResponseTextFormat: + properties: + type: + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text + name: + anyOf: + - type: string + - type: 'null' + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + description: + anyOf: + - type: string + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + OpenAIUserMessageParam-Input: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OpenAIUserMessageParam-Output: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OutputTokensDetails: + properties: + reasoning_tokens: + type: integer + title: Reasoning Tokens + additionalProperties: true + type: object + required: + - reasoning_tokens + title: OutputTokensDetails + PromptsByPromptIdPostRequest: + properties: + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt + - version + title: PromptsByPromptIdPostRequest + PromptsByPromptIdSetDefaultVersionPostRequest: + properties: + version: + type: integer + title: Version + type: object + required: + - version + title: PromptsByPromptIdSetDefaultVersionPostRequest + PromptsPostRequest: + properties: + prompt: + type: string + title: Prompt + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + required: + - prompt + title: PromptsPostRequest + ResponsesPostRequest: properties: - type: - const: grammar - default: grammar - title: Type + input: + anyOf: + - type: string + - items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input + type: array + title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + model: type: string - bnf: + title: Model + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + title: OpenAIResponsePrompt + instructions: + anyOf: + - type: string + - type: 'null' + previous_response_id: + anyOf: + - type: string + - type: 'null' + conversation: + anyOf: + - type: string + - type: 'null' + store: + anyOf: + - type: boolean + - type: 'null' + default: true + stream: + anyOf: + - type: boolean + - type: 'null' + default: false + temperature: + anyOf: + - type: number + - type: 'null' + text: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseText' + title: OpenAIResponseText + - type: 'null' + title: OpenAIResponseText + tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + include: + anyOf: + - items: + type: string + type: array + - type: 'null' + max_infer_iters: + anyOf: + - type: integer + - type: 'null' + default: 10 + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - input + - model + title: ResponsesPostRequest + SafetyRunShieldPostRequest: + properties: + shield_id: + type: string + title: Shield Id + messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) + type: array + title: Messages + params: additionalProperties: true - title: Bnf type: object + title: Params + type: object required: - - bnf - title: GrammarResponseFormat + - shield_id + - messages + - params + title: SafetyRunShieldPostRequest + ScoringScoreBatchPostRequest: + properties: + dataset_id: + type: string + title: Dataset Id + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + save_results_dataset: + type: boolean + title: Save Results Dataset + default: false type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. + required: + - dataset_id + - scoring_functions + title: ScoringScoreBatchPostRequest + ScoringScorePostRequest: properties: - type: - const: json_schema - default: json_schema - title: Type + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + type: object + required: + - input_rows + - scoring_functions + title: ScoringScorePostRequest + SearchRankingOptions: + properties: + ranker: + anyOf: + - type: string + - type: 'null' + score_threshold: + anyOf: + - type: number + - type: 'null' + default: 0.0 + type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + ShieldsPostRequest: + properties: + shield_id: + type: string + title: Shield Id + provider_shield_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - shield_id + title: ShieldsPostRequest + ToolRuntimeInvokePostRequest: + properties: + tool_name: + type: string + title: Tool Name + kwargs: + additionalProperties: true + type: object + title: Kwargs + authorization: + anyOf: + - type: string + - type: 'null' + type: object + required: + - tool_name + - kwargs + title: ToolRuntimeInvokePostRequest + V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + type: object + required: + - input_rows + - scoring_functions + - benchmark_config + title: V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest + V1AlphaInferenceRerankPostRequest: + properties: + model: + type: string + title: Model + query: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + items: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + type: array + title: Items + max_num_results: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - model + - query + - items + title: V1AlphaInferenceRerankPostRequest + V1AlphaPostTrainingPreferenceOptimizePostRequest: + properties: + job_uuid: + type: string + title: Job Uuid + finetuned_model: + type: string + title: Finetuned Model + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: V1AlphaPostTrainingPreferenceOptimizePostRequest + V1AlphaPostTrainingSupervisedFineTunePostRequest: + properties: + job_uuid: type: string - json_schema: + title: Job Uuid + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: additionalProperties: true - title: Json Schema type: object + title: Logger Config + model: + anyOf: + - type: string + - type: 'null' + description: Model descriptor for training if not in provider config` + checkpoint_dir: + anyOf: + - type: string + - type: 'null' + algorithm_config: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + title: LoraFinetuningConfig | QATFinetuningConfig + - type: 'null' + title: Algorithm Config + type: object required: - - json_schema - title: JsonSchemaResponseFormat + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: V1AlphaPostTrainingSupervisedFineTunePostRequest + V1BetaDatasetsPostRequestLoose: + properties: + purpose: + title: Purpose + source: + title: Source + metadata: + title: Metadata + dataset_id: + title: Dataset Id type: object - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - MCPListToolsTool: - description: Tool definition returned by MCP list tools operation. + required: + - purpose + - source + title: V1BetaDatasetsPostRequestLoose + VectorIoQueryPostRequest: properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name + vector_store_id: type: string - description: + title: Vector Store Id + query: anyOf: - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + params: + anyOf: + - additionalProperties: true + type: object - type: 'null' - nullable: true - required: - - input_schema - - name - title: MCPListToolsTool type: object - OpenAIResponseOutputMessageFileSearchToolCallResults: - description: Search results returned by the file search operation. + required: + - vector_store_id + - query + title: VectorIoQueryPostRequest + VectorStoresByVectorStoreIdFilesByFileIdPostRequest: properties: attributes: additionalProperties: true - title: Attributes type: object + title: Attributes + type: object + required: + - attributes + title: VectorStoresByVectorStoreIdFilesByFileIdPostRequest + VectorStoresByVectorStoreIdFilesPostRequest: + properties: file_id: - title: File Id - type: string - filename: - title: Filename - type: string - score: - title: Score - type: number - text: - title: Text type: string + title: File Id + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + chunking_strategy: + anyOf: + - oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + type: object required: - - attributes - file_id - - filename - - score - - text - title: OpenAIResponseOutputMessageFileSearchToolCallResults - type: object - AllowedToolsFilter: - description: Filter configuration for restricting which MCP tools can be used. + title: VectorStoresByVectorStoreIdFilesPostRequest + VectorStoresByVectorStoreIdPostRequest: properties: - tool_names: + name: anyOf: - - items: - type: string - type: array + - type: string + - type: 'null' + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object - type: 'null' - nullable: true - title: AllowedToolsFilter type: object - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. + title: VectorStoresByVectorStoreIdPostRequest + VectorStoresByVectorStoreIdSearchPostRequest: properties: - always: + query: anyOf: + - type: string - items: type: string type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object - type: 'null' - nullable: true - never: + max_num_results: anyOf: - - items: - type: string - type: array + - type: integer - type: 'null' - nullable: true - title: ApprovalFilter + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + title: SearchRankingOptions + rewrite_query: + anyOf: + - type: boolean + - type: 'null' + default: false + search_mode: + anyOf: + - type: string + - type: 'null' + default: vector type: object - SearchRankingOptions: - description: Options for ranking and filtering search results. + required: + - query + title: VectorStoresByVectorStoreIdSearchPostRequest + _URLOrData: properties: - ranker: + url: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - nullable: true - score_threshold: + title: URL + data: anyOf: - - type: number + - type: string - type: 'null' - default: 0.0 - title: SearchRankingOptions + contentEncoding: base64 + type: object + title: _URLOrData + description: A URL or a base64 encoded string + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat OpenAIResponseContentPart: discriminator: mapping: @@ -7592,56 +8923,6 @@ components: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' title: OpenAIResponseContentPartReasoningText title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseTextFormat: - description: Configuration for Responses API text format. - properties: - type: - title: Type - type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - title: OpenAIResponseTextFormat - type: object - OpenAIResponseUsageInputTokensDetails: - description: Token details for input tokens in OpenAI response usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageInputTokensDetails - type: object - OpenAIResponseUsageOutputTokensDetails: - description: Token details for output tokens in OpenAI response usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageOutputTokensDetails - type: object SpanEndPayload: description: Payload for a span end event. properties: @@ -7863,110 +9144,6 @@ components: - $ref: '#/components/schemas/StructuredLogEvent' title: StructuredLogEvent title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - BatchError: - additionalProperties: true - properties: - code: - anyOf: - - type: string - - type: 'null' - nullable: true - line: - anyOf: - - type: integer - - type: 'null' - nullable: true - message: - anyOf: - - type: string - - type: 'null' - nullable: true - param: - anyOf: - - type: string - - type: 'null' - nullable: true - title: BatchError - type: object - BatchRequestCounts: - additionalProperties: true - properties: - completed: - title: Completed - type: integer - failed: - title: Failed - type: integer - total: - title: Total - type: integer - required: - - completed - - failed - - total - title: BatchRequestCounts - type: object - BatchUsage: - additionalProperties: true - properties: - input_tokens: - title: Input Tokens - type: integer - input_tokens_details: - $ref: '#/components/schemas/InputTokensDetails' - output_tokens: - title: Output Tokens - type: integer - output_tokens_details: - $ref: '#/components/schemas/OutputTokensDetails' - total_tokens: - title: Total Tokens - type: integer - required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage - type: object - Errors: - additionalProperties: true - properties: - data: - anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array - - type: 'null' - nullable: true - object: - anyOf: - - type: string - - type: 'null' - nullable: true - title: Errors - type: object - InputTokensDetails: - additionalProperties: true - properties: - cached_tokens: - title: Cached Tokens - type: integer - required: - - cached_tokens - title: InputTokensDetails - type: object - OutputTokensDetails: - additionalProperties: true - properties: - reasoning_tokens: - title: Reasoning Tokens - type: integer - required: - - reasoning_tokens - title: OutputTokensDetails - type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -7998,16 +9175,6 @@ components: - text title: TextDelta type: object - JobStatus: - description: Status of a job execution. - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string MetricInResponse: description: A metric value included in API responses. properties: @@ -8123,14 +9290,6 @@ components: - status title: ConversationMessage type: object - DatasetPurpose: - description: Purpose of the dataset. Each purpose has a required input data schema. - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string Api: description: Enumeration of all available APIs in the Llama Stack system. enum: @@ -8459,26 +9618,6 @@ components: default: int4_weight_int8_dynamic_activation title: Int4QuantizationConfig type: object - OpenAIChatCompletionUsageCompletionTokensDetails: - description: Token details for output tokens in OpenAI chat completion usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object - OpenAIChatCompletionUsagePromptTokensDetails: - description: Token details for prompt tokens in OpenAI chat completion usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - type: object OpenAICompletionLogprobs: description: |- The log probabilities for the tokens in the message from an OpenAI-compatible completion response. @@ -8649,13 +9788,6 @@ components: - content title: UserMessage type: object - HealthStatus: - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - type: string PostTrainingJobLogStream: description: Stream of logs from a finetuning job. properties: @@ -8836,3 +9968,131 @@ components: - query title: VectorStoreSearchRequest type: object + responses: + BadRequest400: + description: The request was invalid or malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 400 + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 429 + title: Too Many Requests + detail: You have exceeded the rate limit. Please try again later. + InternalServerError500: + description: The server encountered an unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 500 + title: Internal Server Error + detail: An unexpected error occurred + DefaultError: + description: An error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/Error' +tags: +- description: APIs for creating and interacting with agentic systems. + name: Agents + x-displayName: Agents +- description: |- + The API is designed to allow use of openai client libraries for seamless integration. + + This API provides the following extensions: + - idempotent batch creation + + Note: This API is currently under active development and may undergo changes. + name: Batches + x-displayName: The Batches API enables efficient processing of multiple requests in a single operation, particularly useful for processing large datasets, batch evaluation workflows, and cost-effective inference at scale. +- description: '' + name: Benchmarks +- description: Protocol for conversation management operations. + name: Conversations + x-displayName: Conversations +- description: '' + name: DatasetIO +- description: '' + name: Datasets +- description: Llama Stack Evaluation API for running evaluations on model and agent candidates. + name: Eval + x-displayName: Evaluations +- description: This API is used to upload documents that can be used with other Llama Stack APIs. + name: Files + x-displayName: Files +- description: |- + Llama Stack Inference API for generating completions, chat completions, and embeddings. + + This API provides the raw interface to the underlying models. Three kinds of models are supported: + - LLM models: these models generate "raw" and "chat" (conversational) completions. + - Embedding models: these models generate embeddings to be used for semantic search. + - Rerank models: these models reorder the documents based on their relevance to a query. + name: Inference + x-displayName: Inference +- description: APIs for inspecting the Llama Stack service, including health status, available API routes with methods and implementing providers. + name: Inspect + x-displayName: Inspect +- description: '' + name: Models +- description: '' + name: PostTraining (Coming Soon) +- description: Protocol for prompt management operations. + name: Prompts + x-displayName: Prompts +- description: Providers API for inspecting, listing, and modifying providers and their configurations. + name: Providers + x-displayName: Providers +- description: OpenAI-compatible Moderations API. + name: Safety + x-displayName: Safety +- description: '' + name: Scoring +- description: '' + name: ScoringFunctions +- description: '' + name: Shields +- description: '' + name: ToolGroups +- description: '' + name: ToolRuntime +- description: '' + name: VectorIO +x-tagGroups: +- name: Operations + tags: + - Agents + - Batches + - Benchmarks + - Conversations + - DatasetIO + - Datasets + - Eval + - Files + - Inference + - Inspect + - Models + - PostTraining (Coming Soon) + - Prompts + - Providers + - Safety + - Scoring + - ScoringFunctions + - Shields + - ToolGroups + - ToolRuntime + - VectorIO +security: +- Default: [] diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index f1aae937fc..e3ae3f6118 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -15,10 +15,6 @@ servers: paths: /v1beta/datasetio/append-rows/{dataset_id}: post: - tags: - - Datasetio - summary: Append Rows - operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post responses: '200': description: Successful Response @@ -37,6 +33,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Datasetio + summary: Append Rows + description: Append rows to a dataset. + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post parameters: - name: dataset_id in: path @@ -44,31 +45,68 @@ paths: schema: type: string description: 'Path parameter: dataset_id' + requestBody: + content: + application/json: + schema: + items: + additionalProperties: true + type: object + type: array + title: Rows + required: true /v1beta/datasetio/iterrows/{dataset_id}: get: - tags: - - Datasetio - summary: Iterrows - operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get responses: '200': - description: Successful Response + description: A PaginatedResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/PaginatedResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Datasetio + summary: Iterrows + 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. + operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get parameters: + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Limit + - name: start_index + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Start Index - name: dataset_id in: path required: true @@ -77,16 +115,13 @@ paths: description: 'Path parameter: dataset_id' /v1beta/datasets: get: - tags: - - Datasets - summary: List Datasets - operationId: list_datasets_v1beta_datasets_get responses: '200': - description: Successful Response + description: A ListDatasetsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListDatasetsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -99,18 +134,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1beta/datasets/{dataset_id}: - get: tags: - Datasets - summary: Get Dataset - operationId: get_dataset_v1beta_datasets__dataset_id__get + summary: List Datasets + description: List all datasets. + operationId: list_datasets_v1beta_datasets_get + /v1beta/datasets/{dataset_id}: + get: responses: '200': - description: Successful Response + description: A Dataset. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Dataset' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -123,6 +160,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Datasets + summary: Get Dataset + description: Get a dataset by its ID. + operationId: get_dataset_v1beta_datasets__dataset_id__get parameters: - name: dataset_id in: path @@ -132,40 +174,39 @@ paths: description: 'Path parameter: dataset_id' /v1alpha/eval/benchmarks: get: - tags: - - Benchmarks - summary: List Benchmarks - operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': - description: Successful Response + description: A ListBenchmarksResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListBenchmarksResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/eval/benchmarks/{benchmark_id}: - get: + description: Default Response tags: - Benchmarks - summary: Get Benchmark - operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get + summary: List Benchmarks + description: List all benchmarks. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get + /v1alpha/eval/benchmarks/{benchmark_id}: + get: responses: '200': - description: Successful Response + description: A Benchmark. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Benchmark' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -178,6 +219,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Benchmarks + summary: Get Benchmark + description: Get a benchmark by its ID. + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get parameters: - name: benchmark_id in: path @@ -187,16 +233,13 @@ paths: description: 'Path parameter: benchmark_id' /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: - tags: - - Eval - summary: Evaluate Rows - operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post responses: '200': - description: Successful Response + description: EvaluateResponse object containing generations and scores. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/EvaluateResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -209,6 +252,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Evaluate Rows + description: Evaluate a list of rows on a benchmark. + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post parameters: - name: benchmark_id in: path @@ -216,18 +264,21 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest' + required: true /v1alpha/eval/benchmarks/{benchmark_id}/jobs: post: - tags: - - Eval - summary: Run Eval - operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post responses: '200': - description: Successful Response + description: The job that was created to run the evaluation. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Job' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -240,6 +291,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Run Eval + description: Run an evaluation on a benchmark. + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post parameters: - name: benchmark_id in: path @@ -247,18 +303,21 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BenchmarkConfig' + required: true /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: get: - tags: - - Eval - summary: Job Status - operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': - description: Successful Response + description: The status of the evaluation job. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Job' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -271,6 +330,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Job Status + description: Get the status of a job. + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get parameters: - name: benchmark_id in: path @@ -285,10 +349,6 @@ paths: type: string description: 'Path parameter: job_id' delete: - tags: - - Eval - summary: Job Cancel - operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete responses: '200': description: Successful Response @@ -307,6 +367,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Job Cancel + description: Cancel a job. + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete parameters: - name: benchmark_id in: path @@ -322,16 +387,13 @@ paths: description: 'Path parameter: job_id' /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: get: - tags: - - Eval - summary: Job Result - operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get responses: '200': - description: Successful Response + description: The result of the job. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/EvaluateResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -344,6 +406,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Job Result + description: Get the result of a job. + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get parameters: - name: benchmark_id in: path @@ -359,16 +426,13 @@ paths: description: 'Path parameter: job_id' /v1alpha/inference/rerank: post: - tags: - - Inference - summary: Rerank - operationId: rerank_v1alpha_inference_rerank_post responses: '200': - description: Successful Response + description: RerankResponse with indices sorted by relevance score (descending). content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/RerankResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -381,12 +445,52 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: Rerank + description: Rerank a list of documents based on their relevance to a query. + operationId: rerank_v1alpha_inference_rerank_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1AlphaInferenceRerankPostRequest' + required: true /v1alpha/post-training/job/artifacts: get: + responses: + '200': + description: A PostTrainingJobArtifactsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + '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 tags: - Post Training summary: Get Training Job Artifacts + description: Get the artifacts of a training job. 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 + /v1alpha/post-training/job/cancel: + post: responses: '200': description: Successful Response @@ -394,53 +498,71 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/cancel: - post: + description: Default Response tags: - Post Training summary: Cancel Training Job + description: Cancel a training job. operationId: cancel_training_job_v1alpha_post_training_job_cancel_post + parameters: + - name: job_uuid + in: query + required: true + schema: + type: string + title: Job Uuid + /v1alpha/post-training/job/status: + get: responses: '200': - description: Successful Response + description: A PostTrainingJobStatusResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/PostTrainingJobStatusResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/status: - get: + description: Default Response tags: - Post Training summary: Get Training Job Status + description: Get the status of a training job. 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 + /v1alpha/post-training/jobs: + get: responses: '200': - description: Successful Response + description: A ListPostTrainingJobsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListPostTrainingJobsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -453,18 +575,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/jobs: - get: tags: - Post Training summary: Get Training Jobs + description: Get all training jobs. operationId: get_training_jobs_v1alpha_post_training_jobs_get + /v1alpha/post-training/preference-optimize: + post: responses: '200': - description: Successful Response + description: A PostTrainingJob. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/PostTrainingJob' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -477,18 +601,26 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/preference-optimize: - post: tags: - Post Training summary: Preference Optimize + description: Run preference optimization of a model. operationId: preference_optimize_v1alpha_post_training_preference_optimize_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1AlphaPostTrainingPreferenceOptimizePostRequest' + required: true + /v1alpha/post-training/supervised-fine-tune: + post: responses: '200': - description: Successful Response + description: A PostTrainingJob. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/PostTrainingJob' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -501,68 +633,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/supervised-fine-tune: - post: tags: - Post Training summary: Supervised Fine Tune + description: Run supervised fine-tuning of a model. operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1AlphaPostTrainingSupervisedFineTunePostRequest' + required: true components: - responses: - BadRequest400: - description: The request was invalid or malformed - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 400 - 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 - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 429 - title: Too Many Requests - detail: You have exceeded the rate limit. Please try again later. - InternalServerError500: - description: The server encountered an unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 500 - title: Internal Server Error - detail: An unexpected error occurred - DefaultError: - description: An error occurred - content: - application/json: - schema: - $ref: '#/components/schemas/Error' schemas: Error: description: Error response from the API. Roughly follows RFC 7807. @@ -588,63 +670,61 @@ components: title: Error type: object ListBatchesResponse: - description: Response containing a list of batch objects. properties: object: + type: string const: list - default: list title: Object - type: string + default: list data: - description: List of batch objects items: $ref: '#/components/schemas/Batch' - title: Data type: array + title: Data + description: List of batch objects first_id: anyOf: - type: string - type: 'null' description: ID of the first batch in the list - nullable: true last_id: anyOf: - type: string - type: 'null' description: ID of the last batch in the list - nullable: true has_more: - default: false - description: Whether there are more batches available - title: Has More type: boolean + title: Has More + description: Whether there are more batches available + default: false + type: object required: - data title: ListBatchesResponse - type: object + description: Response containing a list of batch objects. Batch: - additionalProperties: true properties: id: - title: Id type: string + title: Id completion_window: - title: Completion Window type: string + title: Completion Window created_at: - title: Created At type: integer + title: Created At endpoint: - title: Endpoint type: string + title: Endpoint input_file_id: - title: Input File Id type: string + title: Input File Id object: + type: string const: batch title: Object - type: string status: + type: string enum: - validating - failed @@ -655,90 +735,76 @@ components: - cancelling - cancelled title: Status - type: string cancelled_at: anyOf: - type: integer - type: 'null' - nullable: true cancelling_at: anyOf: - type: integer - type: 'null' - nullable: true completed_at: anyOf: - type: integer - type: 'null' - nullable: true error_file_id: anyOf: - type: string - type: 'null' - nullable: true errors: anyOf: - $ref: '#/components/schemas/Errors' title: Errors - type: 'null' - nullable: true title: Errors expired_at: anyOf: - type: integer - type: 'null' - nullable: true expires_at: anyOf: - type: integer - type: 'null' - nullable: true failed_at: anyOf: - type: integer - type: 'null' - nullable: true finalizing_at: anyOf: - type: integer - type: 'null' - nullable: true in_progress_at: anyOf: - type: integer - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - nullable: true model: anyOf: - type: string - type: 'null' - nullable: true output_file_id: anyOf: - type: string - type: 'null' - nullable: true request_counts: anyOf: - $ref: '#/components/schemas/BatchRequestCounts' title: BatchRequestCounts - type: 'null' - nullable: true title: BatchRequestCounts usage: anyOf: - $ref: '#/components/schemas/BatchUsage' title: BatchUsage - type: 'null' - nullable: true title: BatchUsage + additionalProperties: true + type: object required: - id - completion_window @@ -748,36 +814,35 @@ components: - object - status title: Batch - type: object ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. properties: data: items: $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIChatCompletionResponse - type: object + description: Response from listing OpenAI-compatible chat completions. OpenAIAssistantMessageParam: description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: @@ -811,19 +876,19 @@ components: title: OpenAIAssistantMessageParam type: object OpenAIChatCompletionContentPartImageParam: - description: Image content part for OpenAI-compatible chat completion messages. properties: type: + type: string const: image_url - default: image_url title: Type - type: string + default: image_url image_url: $ref: '#/components/schemas/OpenAIImageURL' + type: object required: - image_url title: OpenAIChatCompletionContentPartImageParam - type: object + description: Image content part for OpenAI-compatible chat completion messages. OpenAIChatCompletionContentPartParam: discriminator: mapping: @@ -840,139 +905,130 @@ components: title: OpenAIFile title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: - description: Text content part for OpenAI-compatible chat completion messages. properties: type: + type: string const: text - default: text title: Type - type: string + default: text text: - title: Text type: string + title: Text + type: object required: - text title: OpenAIChatCompletionContentPartTextParam - type: object + description: Text content part for OpenAI-compatible chat completion messages. OpenAIChatCompletionToolCall: - description: Tool call specification for OpenAI-compatible chat completion responses. properties: index: anyOf: - type: integer - type: 'null' - nullable: true id: anyOf: - type: string - type: 'null' - nullable: true type: + type: string const: function - default: function title: Type - type: string + default: function function: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' title: OpenAIChatCompletionToolCallFunction - type: 'null' - nullable: true title: OpenAIChatCompletionToolCallFunction - title: OpenAIChatCompletionToolCall type: object + title: OpenAIChatCompletionToolCall + description: Tool call specification for OpenAI-compatible chat completion responses. OpenAIChatCompletionToolCallFunction: - description: Function call details for OpenAI-compatible tool calls. properties: name: anyOf: - type: string - type: 'null' - nullable: true arguments: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIChatCompletionToolCallFunction type: object + title: OpenAIChatCompletionToolCallFunction + description: Function call details for OpenAI-compatible tool calls. OpenAIChatCompletionUsage: - description: Usage information for OpenAI chat completion. properties: prompt_tokens: - title: Prompt Tokens type: integer + title: Prompt Tokens completion_tokens: - title: Completion Tokens type: integer + title: Completion Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens prompt_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' - nullable: true title: OpenAIChatCompletionUsagePromptTokensDetails completion_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' - nullable: true title: OpenAIChatCompletionUsageCompletionTokensDetails + type: object required: - prompt_tokens - completion_tokens - total_tokens title: OpenAIChatCompletionUsage - type: object + description: Usage information for OpenAI chat completion. OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) + title: OpenAIUserMessageParam-Output | ... (5 variants) + 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: - title: Finish Reason type: string + title: Finish Reason index: - title: Index type: integer + title: Index logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' title: OpenAIChoiceLogprobs - type: 'null' - nullable: true title: OpenAIChoiceLogprobs + type: object required: - message - finish_reason - index title: OpenAIChoice - type: object + description: A choice from an OpenAI-compatible chat completion response. OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. properties: content: anyOf: @@ -980,24 +1036,22 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - nullable: true refusal: anyOf: - items: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - nullable: true - title: OpenAIChoiceLogprobs type: object + title: OpenAIChoiceLogprobs + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. OpenAIDeveloperMessageParam: - description: A message from the developer in an OpenAI-compatible chat completion request. properties: role: + type: string const: developer - default: developer title: Role - type: string + default: developer content: anyOf: - type: string @@ -1010,58 +1064,54 @@ components: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - content title: OpenAIDeveloperMessageParam - type: object + description: A message from the developer in an OpenAI-compatible chat completion request. OpenAIFile: properties: type: + type: string const: file - default: file title: Type - type: string + default: file file: $ref: '#/components/schemas/OpenAIFileFile' + type: object required: - file title: OpenAIFile - type: object OpenAIFileFile: properties: file_data: anyOf: - type: string - type: 'null' - nullable: true file_id: anyOf: - type: string - type: 'null' - nullable: true filename: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIFileFile type: object + title: OpenAIFileFile OpenAIImageURL: - description: Image URL specification for OpenAI-compatible chat completion messages. properties: url: - title: Url type: string + title: Url detail: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - url title: OpenAIImageURL - type: object + description: Image URL specification for OpenAI-compatible chat completion messages. OpenAIMessageParam: discriminator: mapping: @@ -1084,13 +1134,12 @@ components: title: OpenAIDeveloperMessageParam title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: - description: A system message providing instructions or context to the model. properties: role: + type: string const: system - default: system title: Role - type: string + default: system content: anyOf: - type: string @@ -1103,55 +1152,53 @@ components: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - content title: OpenAISystemMessageParam - type: object + description: A system message providing instructions or context to the model. 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 + title: Token bytes: anyOf: - items: type: integer type: array - type: 'null' - nullable: true logprob: - title: Logprob type: number + title: Logprob top_logprobs: items: $ref: '#/components/schemas/OpenAITopLogProb' - title: Top Logprobs type: array + title: Top Logprobs + type: object required: - token - logprob - top_logprobs title: OpenAITokenLogProb - type: object + 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 OpenAIToolMessageParam: - description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. properties: role: + type: string const: tool - default: tool title: Role - type: string + default: tool tool_call_id: - title: Tool Call Id type: string + title: Tool Call Id content: anyOf: - type: string @@ -1160,37 +1207,37 @@ components: type: array title: list[OpenAIChatCompletionContentPartTextParam] title: string | list[OpenAIChatCompletionContentPartTextParam] + type: object required: - tool_call_id - content title: OpenAIToolMessageParam - type: object + description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. 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 + title: Token bytes: anyOf: - items: type: integer type: array - type: 'null' - nullable: true logprob: - title: Logprob type: number + title: Logprob + type: object required: - token - logprob title: OpenAITopLogProb - type: object + 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 OpenAIUserMessageParam: description: A message from the user in an OpenAI-compatible chat completion request. properties: @@ -1230,11 +1277,10 @@ components: title: OpenAIUserMessageParam type: object OpenAIJSONSchema: - description: JSON schema specification for OpenAI-compatible structured response format. properties: name: - title: Name type: string + title: Name description: anyOf: - type: string @@ -1248,32 +1294,33 @@ components: - additionalProperties: true type: object - type: 'null' - title: OpenAIJSONSchema type: object + title: OpenAIJSONSchema + description: JSON schema specification for OpenAI-compatible structured response format. OpenAIResponseFormatJSONObject: - description: JSON object response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: json_object - default: json_object title: Type - type: string - title: OpenAIResponseFormatJSONObject + default: json_object type: object + title: OpenAIResponseFormatJSONObject + description: JSON object response format for OpenAI-compatible chat completion requests. OpenAIResponseFormatJSONSchema: - description: JSON schema response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: json_schema - default: json_schema title: Type - type: string + default: json_schema json_schema: $ref: '#/components/schemas/OpenAIJSONSchema' + type: object required: - json_schema title: OpenAIResponseFormatJSONSchema - type: object + description: JSON schema response format for OpenAI-compatible chat completion requests. OpenAIResponseFormatParam: discriminator: mapping: @@ -1290,52 +1337,49 @@ components: title: OpenAIResponseFormatJSONObject title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject OpenAIResponseFormatText: - description: Text response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: text - default: text title: Type - type: string - title: OpenAIResponseFormatText + default: text type: object + title: OpenAIResponseFormatText + description: Text response format for OpenAI-compatible chat completion requests. OpenAIChatCompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible chat completion endpoint. properties: model: - title: Model type: string + title: Model 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) + 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) + type: array minItems: 1 title: Messages - type: array frequency_penalty: anyOf: - type: number - type: 'null' - nullable: true function_call: anyOf: - type: string @@ -1343,7 +1387,6 @@ components: type: object - type: 'null' title: string | object - nullable: true functions: anyOf: - items: @@ -1351,68 +1394,58 @@ components: type: object type: array - type: 'null' - nullable: true logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true logprobs: anyOf: - type: boolean - type: 'null' - nullable: true max_completion_tokens: anyOf: - type: integer - type: 'null' - nullable: true max_tokens: anyOf: - type: integer - type: 'null' - nullable: true n: anyOf: - type: integer - type: 'null' - nullable: true parallel_tool_calls: anyOf: - type: boolean - type: 'null' - nullable: true presence_penalty: anyOf: - type: number - type: 'null' - nullable: true response_format: anyOf: - - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' title: OpenAIResponseFormatJSONObject + discriminator: + propertyName: type + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - type: 'null' title: Response Format - nullable: true seed: anyOf: - type: integer - type: 'null' - nullable: true stop: anyOf: - type: string @@ -1422,23 +1455,19 @@ components: title: list[string] - type: 'null' title: string | list[string] - nullable: true stream: anyOf: - type: boolean - type: 'null' - nullable: true stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true temperature: anyOf: - type: number - type: 'null' - nullable: true tool_choice: anyOf: - type: string @@ -1446,7 +1475,6 @@ components: type: object - type: 'null' title: string | object - nullable: true tools: anyOf: - items: @@ -1454,63 +1482,60 @@ components: type: object type: array - type: 'null' - nullable: true top_logprobs: anyOf: - type: integer - type: 'null' - nullable: true top_p: anyOf: - type: number - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - messages title: OpenAIChatCompletionRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible chat completion endpoint. OpenAIChatCompletion: - description: Response from an OpenAI-compatible chat completion request. properties: id: - title: Id type: string + title: Id choices: items: $ref: '#/components/schemas/OpenAIChoice' - title: Choices type: array + title: Choices object: + type: string const: chat.completion - default: chat.completion title: Object - type: string + default: chat.completion created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' title: OpenAIChatCompletionUsage - type: 'null' - nullable: true title: OpenAIChatCompletionUsage + type: object required: - id - choices - created - model title: OpenAIChatCompletion - type: object + description: Response from an OpenAI-compatible chat completion request. OpenAIChatCompletionChunk: description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: @@ -1606,55 +1631,55 @@ components: OpenAICompletionWithInputMessages: properties: id: - title: Id type: string + title: Id choices: items: $ref: '#/components/schemas/OpenAIChoice' - title: Choices type: array + title: Choices object: + type: string const: chat.completion - default: chat.completion title: Object - type: string + default: chat.completion created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' title: OpenAIChatCompletionUsage - type: 'null' - nullable: true title: OpenAIChatCompletionUsage 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Input Messages + 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' + title: OpenAIUserMessageParam-Output | ... (5 variants) type: array + title: Input Messages + type: object required: - id - choices @@ -1662,14 +1687,11 @@ components: - model - input_messages title: OpenAICompletionWithInputMessages - type: object OpenAICompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible completion endpoint. properties: model: - title: Model type: string + title: Model prompt: anyOf: - type: string @@ -1692,49 +1714,40 @@ components: anyOf: - type: integer - type: 'null' - nullable: true echo: anyOf: - type: boolean - type: 'null' - nullable: true frequency_penalty: anyOf: - type: number - type: 'null' - nullable: true logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true logprobs: anyOf: - type: boolean - type: 'null' - nullable: true max_tokens: anyOf: - type: integer - type: 'null' - nullable: true n: anyOf: - type: integer - type: 'null' - nullable: true presence_penalty: anyOf: - type: number - type: 'null' - nullable: true seed: anyOf: - type: integer - type: 'null' - nullable: true stop: anyOf: - type: string @@ -1744,110 +1757,104 @@ components: title: list[string] - type: 'null' title: string | list[string] - nullable: true stream: anyOf: - type: boolean - type: 'null' - nullable: true stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true temperature: anyOf: - type: number - type: 'null' - nullable: true top_p: anyOf: - type: number - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true suffix: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - prompt title: OpenAICompletionRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible completion endpoint. OpenAICompletion: - 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 + title: Id choices: items: $ref: '#/components/schemas/OpenAICompletionChoice' - title: Choices type: array + title: Choices created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model object: + type: string const: text_completion - default: text_completion title: Object - type: string + default: text_completion + type: object required: - id - choices - created - model title: OpenAICompletion - type: object - OpenAICompletionChoice: description: |- - A choice from an OpenAI-compatible completion response. + Response from an OpenAI-compatible completion request. - :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 + :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" + OpenAICompletionChoice: properties: finish_reason: - title: Finish Reason type: string + title: Finish Reason text: - title: Text type: string + title: Text index: - title: Index type: integer + title: Index logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' title: OpenAIChoiceLogprobs - type: 'null' - nullable: true title: OpenAIChoiceLogprobs + type: object required: - finish_reason - text - index title: OpenAICompletionChoice - type: object + 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 ConversationItem: discriminator: mapping: @@ -1882,54 +1889,55 @@ components: title: OpenAIResponseOutputMessageMCPListTools title: OpenAIResponseMessage | ... (9 variants) OpenAIResponseAnnotationCitation: - description: URL citation annotation for referencing external web resources. properties: type: + type: string const: url_citation - default: url_citation title: Type - type: string + default: url_citation end_index: - title: End Index type: integer + title: End Index start_index: - title: Start Index type: integer + title: Start Index title: - title: Title type: string + title: Title url: - title: Url type: string + title: Url + type: object required: - end_index - start_index - title - url title: OpenAIResponseAnnotationCitation - type: object + description: URL citation annotation for referencing external web resources. OpenAIResponseAnnotationContainerFileCitation: properties: type: + type: string const: container_file_citation - default: container_file_citation title: Type - type: string + default: container_file_citation container_id: - title: Container Id type: string + title: Container Id end_index: - title: End Index type: integer + title: End Index file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename start_index: - title: Start Index type: integer + title: Start Index + type: object required: - container_id - end_index @@ -1937,48 +1945,47 @@ components: - filename - start_index title: OpenAIResponseAnnotationContainerFileCitation - type: object OpenAIResponseAnnotationFileCitation: - description: File citation annotation for referencing specific files in response content. properties: type: + type: string const: file_citation - default: file_citation title: Type - type: string + default: file_citation file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename index: - title: Index type: integer + title: Index + type: object required: - file_id - filename - index title: OpenAIResponseAnnotationFileCitation - type: object + description: File citation annotation for referencing specific files in response content. OpenAIResponseAnnotationFilePath: properties: type: + type: string const: file_path - default: file_path title: Type - type: string + default: file_path file_id: - title: File Id type: string + title: File Id index: - title: Index type: integer + title: Index + type: object required: - file_id - index title: OpenAIResponseAnnotationFilePath - type: object OpenAIResponseAnnotations: discriminator: mapping: @@ -1998,49 +2005,47 @@ components: title: OpenAIResponseAnnotationFilePath title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseContentPartRefusal: - description: Refusal content within a streamed response part. properties: type: + type: string const: refusal - default: refusal title: Type - type: string + default: refusal refusal: - title: Refusal type: string + title: Refusal + type: object required: - refusal title: OpenAIResponseContentPartRefusal - type: object + description: Refusal content within a streamed response part. 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 + title: Call Id output: - title: Output type: string + title: Output type: + type: string const: function_call_output - default: function_call_output title: Type - type: string + default: function_call_output id: anyOf: - type: string - type: 'null' - nullable: true status: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - call_id - output title: OpenAIResponseInputFunctionToolCallOutput - type: object + description: This represents the output of a function call that gets passed back to the model. OpenAIResponseInputMessageContent: discriminator: mapping: @@ -2057,134 +2062,126 @@ components: title: OpenAIResponseInputMessageContentFile title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseInputMessageContentFile: - description: File content for input messages in OpenAI response format. properties: type: + type: string const: input_file - default: input_file title: Type - type: string + default: input_file file_data: anyOf: - type: string - type: 'null' - nullable: true file_id: anyOf: - type: string - type: 'null' - nullable: true file_url: anyOf: - type: string - type: 'null' - nullable: true filename: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIResponseInputMessageContentFile type: object + title: OpenAIResponseInputMessageContentFile + description: File content for input messages in OpenAI response format. OpenAIResponseInputMessageContentImage: - description: Image content for input messages in OpenAI response format. properties: detail: - default: auto title: Detail + default: auto type: string enum: - low - high - auto type: + type: string const: input_image - default: input_image title: Type - type: string + default: input_image file_id: anyOf: - type: string - type: 'null' - nullable: true image_url: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIResponseInputMessageContentImage type: object + title: OpenAIResponseInputMessageContentImage + description: Image content for input messages in OpenAI response format. OpenAIResponseInputMessageContentText: - description: Text content for input messages in OpenAI response format. properties: text: - title: Text type: string + title: Text type: + type: string const: input_text - default: input_text title: Type - type: string + default: input_text + type: object required: - text title: OpenAIResponseInputMessageContentText - type: object + description: Text content for input messages in OpenAI response format. OpenAIResponseMCPApprovalRequest: - description: A request for human approval of a tool invocation. properties: arguments: - title: Arguments type: string + title: Arguments id: - title: Id type: string + title: Id name: - title: Name type: string + title: Name server_label: - title: Server Label type: string + title: Server Label type: + type: string const: mcp_approval_request - default: mcp_approval_request title: Type - type: string + default: mcp_approval_request + type: object required: - arguments - id - name - server_label title: OpenAIResponseMCPApprovalRequest - type: object + description: A request for human approval of a tool invocation. OpenAIResponseMCPApprovalResponse: - description: A response to an MCP approval request. properties: approval_request_id: - title: Approval Request Id type: string + title: Approval Request Id approve: - title: Approve type: boolean + title: Approve type: + type: string const: mcp_approval_response - default: mcp_approval_response title: Type - type: string + default: mcp_approval_response id: anyOf: - type: string - type: 'null' - nullable: true reason: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - approval_request_id - approve title: OpenAIResponseMCPApprovalResponse - type: object + description: A response to an MCP approval request. OpenAIResponseMessage: description: |- Corresponds to the various Message types in the Responses API. @@ -2271,22 +2268,15 @@ components: OpenAIResponseOutputMessageContentOutputText: properties: text: - title: Text type: string + title: Text type: + type: string const: output_text - default: output_text title: Type - type: string + default: output_text annotations: items: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' title: OpenAIResponseAnnotationFileCitation @@ -2296,176 +2286,177 @@ components: title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' title: 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' title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations type: array + title: Annotations + type: object required: - text title: OpenAIResponseOutputMessageContentOutputText - type: object OpenAIResponseOutputMessageFileSearchToolCall: - description: File search tool call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id queries: items: type: string - title: Queries type: array + title: Queries status: - title: Status type: string + title: Status type: + type: string const: file_search_call - default: file_search_call title: Type - type: string + default: file_search_call results: anyOf: - items: $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' - nullable: true + type: object required: - id - queries - status title: OpenAIResponseOutputMessageFileSearchToolCall - type: object + description: File search tool call output message for OpenAI responses. OpenAIResponseOutputMessageFunctionToolCall: - description: Function tool call output message for OpenAI responses. properties: call_id: - title: Call Id type: string + title: Call Id name: - title: Name type: string + title: Name arguments: - title: Arguments type: string + title: Arguments type: + type: string const: function_call - default: function_call title: Type - type: string + default: function_call id: anyOf: - type: string - type: 'null' - nullable: true status: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - call_id - name - arguments title: OpenAIResponseOutputMessageFunctionToolCall - type: object + description: Function tool call output message for OpenAI responses. OpenAIResponseOutputMessageMCPCall: - description: Model Context Protocol (MCP) call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id type: + type: string const: mcp_call - default: mcp_call title: Type - type: string + default: mcp_call arguments: - title: Arguments type: string + title: Arguments name: - title: Name type: string + title: Name server_label: - title: Server Label type: string + title: Server Label error: anyOf: - type: string - type: 'null' - nullable: true output: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - id - arguments - name - server_label title: OpenAIResponseOutputMessageMCPCall - type: object + description: Model Context Protocol (MCP) call output message for OpenAI responses. OpenAIResponseOutputMessageMCPListTools: - description: MCP list tools output message containing available tools from an MCP server. properties: id: - title: Id type: string + title: Id type: + type: string const: mcp_list_tools - default: mcp_list_tools title: Type - type: string + default: mcp_list_tools server_label: - title: Server Label type: string + title: Server Label tools: items: $ref: '#/components/schemas/MCPListToolsTool' - title: Tools type: array + title: Tools + type: object required: - id - server_label - tools title: OpenAIResponseOutputMessageMCPListTools - type: object + description: MCP list tools output message containing available tools from an MCP server. OpenAIResponseOutputMessageWebSearchToolCall: - description: Web search tool call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id status: - title: Status type: string + title: Status type: + type: string const: web_search_call - default: web_search_call title: Type - type: string + default: web_search_call + type: object required: - id - status title: OpenAIResponseOutputMessageWebSearchToolCall - type: object + description: Web search tool call output message for OpenAI responses. Conversation: - description: OpenAI-compatible conversation object. properties: id: - description: The unique ID of the conversation. - title: Id type: string + title: Id + description: The unique ID of the conversation. object: + type: string const: conversation - default: conversation - description: The object type, which is always conversation. title: Object - type: string + description: The object type, which is always conversation. + default: conversation created_at: - description: The time at which the conversation was created, measured in seconds since the Unix epoch. - title: Created At type: integer + title: Created At + description: The time at which the conversation was created, measured in seconds since the Unix epoch. metadata: anyOf: - additionalProperties: @@ -2473,7 +2464,6 @@ components: 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. - nullable: true items: anyOf: - items: @@ -2482,59 +2472,45 @@ components: type: array - type: 'null' description: Initial items to include in the conversation context. You may add up to 20 items at a time. - nullable: true + type: object required: - id - created_at title: Conversation - type: object + description: OpenAI-compatible conversation object. ConversationDeletedResource: - description: Response for deleted conversation. properties: id: - description: The deleted conversation identifier - title: Id type: string + title: Id + description: The deleted conversation identifier object: - default: conversation.deleted - description: Object type - title: Object type: string + title: Object + description: Object type + default: conversation.deleted deleted: - default: true - description: Whether the object was deleted - title: Deleted type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object required: - id title: ConversationDeletedResource - type: object + description: Response for deleted conversation. ConversationItemList: - description: List of conversation items with pagination. properties: object: - default: list - description: Object type - title: Object type: string + title: Object + description: Object type + default: list data: - description: List of conversation items items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -2551,58 +2527,68 @@ components: title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - title: Data + 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' + title: OpenAIResponseMessage-Output | ... (9 variants) type: array + title: Data + description: List of conversation items first_id: anyOf: - type: string - type: 'null' description: The ID of the first item in the list - nullable: true last_id: anyOf: - type: string - type: 'null' description: The ID of the last item in the list - nullable: true has_more: - default: false - description: Whether there are more items available - title: Has More type: boolean + title: Has More + description: Whether there are more items available + default: false + type: object required: - data title: ConversationItemList - type: object + description: List of conversation items with pagination. ConversationItemDeletedResource: - description: Response for deleted conversation item. properties: id: - description: The deleted item identifier - title: Id type: string + title: Id + description: The deleted item identifier object: - default: conversation.item.deleted - description: Object type - title: Object type: string + title: Object + description: Object type + default: conversation.item.deleted deleted: - default: true - description: Whether the object was deleted - title: Deleted type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object required: - id title: ConversationItemDeletedResource - type: object + description: Response for deleted conversation item. OpenAIEmbeddingsRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible embeddings endpoint. properties: model: - title: Model type: string + title: Model input: anyOf: - type: string @@ -2620,25 +2606,24 @@ components: anyOf: - type: integer - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - input title: OpenAIEmbeddingsRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible embeddings endpoint. OpenAIEmbeddingData: - description: A single embedding data object from an OpenAI-compatible embeddings response. properties: object: + type: string const: embedding - default: embedding title: Object - type: string + default: embedding embedding: anyOf: - items: @@ -2648,112 +2633,113 @@ components: - type: string title: list[number] | string index: - title: Index type: integer + title: Index + type: object required: - embedding - index title: OpenAIEmbeddingData - type: object + description: A single embedding data object from an OpenAI-compatible embeddings response. OpenAIEmbeddingUsage: - description: Usage information for an OpenAI-compatible embeddings response. properties: prompt_tokens: - title: Prompt Tokens type: integer + title: Prompt Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens + type: object required: - prompt_tokens - total_tokens title: OpenAIEmbeddingUsage - type: object + description: Usage information for an OpenAI-compatible embeddings response. OpenAIEmbeddingsResponse: - description: Response from an OpenAI-compatible embeddings request. properties: object: + type: string const: list - default: list title: Object - type: string + default: list data: items: $ref: '#/components/schemas/OpenAIEmbeddingData' - title: Data type: array + title: Data model: - title: Model type: string + title: Model usage: $ref: '#/components/schemas/OpenAIEmbeddingUsage' + type: object required: - data - model - usage title: OpenAIEmbeddingsResponse - type: object + description: Response from an OpenAI-compatible embeddings request. OpenAIFilePurpose: - description: Valid purpose values for OpenAI Files API. + type: string enum: - assistants - batch title: OpenAIFilePurpose - type: string + description: Valid purpose values for OpenAI Files API. ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. properties: data: items: $ref: '#/components/schemas/OpenAIFileObject' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIFileResponse - type: object + description: Response for listing files in OpenAI Files API. OpenAIFileObject: - description: OpenAI File object as defined in the OpenAI Files API. properties: object: + type: string const: file - default: file title: Object - type: string + default: file id: - title: Id type: string + title: Id bytes: - title: Bytes type: integer + title: Bytes created_at: - title: Created At type: integer + title: Created At expires_at: - title: Expires At type: integer + title: Expires At filename: - title: Filename type: string + title: Filename purpose: $ref: '#/components/schemas/OpenAIFilePurpose' + type: object required: - id - bytes @@ -2762,212 +2748,208 @@ components: - filename - purpose title: OpenAIFileObject - type: object + description: OpenAI File object as defined in the OpenAI Files API. 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: + type: string const: created_at title: Anchor - type: string seconds: - maximum: 2592000 - minimum: 3600 - title: Seconds type: integer + maximum: 2592000.0 + minimum: 3600.0 + title: Seconds + type: object required: - anchor - seconds title: ExpiresAfter - type: object + 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) OpenAIFileDeleteResponse: - description: Response for deleting a file in OpenAI Files API. properties: id: - title: Id type: string + title: Id object: + type: string const: file - default: file title: Object - type: string + default: file deleted: - title: Deleted type: boolean + title: Deleted + type: object required: - id - deleted title: OpenAIFileDeleteResponse - type: object + description: Response for deleting a file in OpenAI Files API. HealthInfo: - description: Health status information for the service. properties: status: $ref: '#/components/schemas/HealthStatus' + type: object required: - status title: HealthInfo - type: object + description: Health status information for the service. RouteInfo: - description: Information about an API route including its path, method, and implementing providers. properties: route: - title: Route type: string + title: Route method: - title: Method type: string + title: Method provider_types: items: type: string - title: Provider Types type: array + title: Provider Types + type: object required: - route - method - provider_types title: RouteInfo - type: object + description: Information about an API route including its path, method, and implementing providers. ListRoutesResponse: - description: Response containing a list of all available API routes. properties: data: items: $ref: '#/components/schemas/RouteInfo' - title: Data type: array + title: Data + type: object required: - data title: ListRoutesResponse - type: object + description: Response containing a list of all available API routes. OpenAIModel: - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: id: - title: Id type: string + title: Id object: + type: string const: model - default: model title: Object - type: string + default: model created: - title: Created type: integer + title: Created owned_by: - title: Owned By type: string + title: Owned By custom_metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - id - created - owned_by title: OpenAIModel - type: object + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata OpenAIListModelsResponse: properties: data: items: $ref: '#/components/schemas/OpenAIModel' - title: Data type: array + title: Data + type: object required: - data title: OpenAIListModelsResponse - type: object Model: - description: A model resource representing an AI model registered in Llama Stack. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: model - default: model title: Type - type: string + default: model metadata: additionalProperties: true - description: Any additional metadata for this model - title: Metadata 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 - type: object + description: A model resource representing an AI model registered in Llama Stack. ModelType: - description: Enumeration of supported model types in Llama Stack. + type: string enum: - llm - embedding - rerank title: ModelType - type: string + description: Enumeration of supported model types in Llama Stack. ModerationObject: - description: A moderation object. properties: id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model results: items: $ref: '#/components/schemas/ModerationObjectResults' - title: Results type: array + title: Results + type: object required: - id - model - results title: ModerationObject - type: object - ModerationObjectResults: description: A moderation object. + ModerationObjectResults: properties: flagged: - title: Flagged type: boolean + title: Flagged categories: anyOf: - additionalProperties: type: boolean type: object - type: 'null' - nullable: true category_applied_input_types: anyOf: - additionalProperties: @@ -2976,93 +2958,90 @@ components: type: array type: object - type: 'null' - nullable: true category_scores: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true user_message: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - flagged title: ModerationObjectResults - type: object + description: A moderation object. Prompt: - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. properties: prompt: anyOf: - type: string - type: 'null' description: The system prompt with variable placeholders - nullable: true version: - description: Version (integer starting at 1, incremented on save) - minimum: 1 - title: Version type: integer + minimum: 1.0 + title: Version + description: Version (integer starting at 1, incremented on save) prompt_id: - description: Unique identifier in format 'pmpt_<48-digit-hash>' - title: Prompt Id type: string + title: Prompt Id + description: Unique identifier in format 'pmpt_<48-digit-hash>' variables: - description: List of variable names that can be used in the prompt template items: type: string - title: Variables type: array + title: Variables + description: List of variable names that can be used in the prompt template is_default: - default: false - description: Boolean indicating whether this version is the default version - title: 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 - type: object + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. ListPromptsResponse: - description: Response model to list prompts. properties: data: items: $ref: '#/components/schemas/Prompt' - title: Data type: array + title: Data + type: object required: - data title: ListPromptsResponse - type: object + description: Response model to list prompts. ProviderInfo: - description: Information about a registered provider including its configuration and health status. properties: api: - title: Api type: string + title: Api provider_id: - title: Provider Id type: string + title: Provider Id provider_type: - title: Provider Type type: string + title: Provider Type config: additionalProperties: true - title: Config type: object + title: Config health: additionalProperties: true - title: Health type: object + title: Health + type: object required: - api - provider_id @@ -3070,62 +3049,62 @@ components: - config - health title: ProviderInfo - type: object + description: Information about a registered provider including its configuration and health status. ListProvidersResponse: - description: Response containing a list of all available providers. properties: data: items: $ref: '#/components/schemas/ProviderInfo' - title: Data type: array + title: Data + type: object required: - data title: ListProvidersResponse - type: object + description: Response containing a list of all available providers. ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. properties: data: items: $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIResponseObject - type: object + description: Paginated list of OpenAI response objects with navigation metadata. OpenAIResponseError: - description: Error details for failed OpenAI response requests. properties: code: - title: Code type: string + title: Code message: - title: Message type: string + title: Message + type: object required: - code - message title: OpenAIResponseError - type: object + description: Error details for failed OpenAI response requests. OpenAIResponseInput: anyOf: - discriminator: @@ -3162,29 +3141,27 @@ components: title: OpenAIResponseMessage title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage OpenAIResponseInputToolFileSearch: - description: File search tool configuration for OpenAI response inputs. properties: type: + type: string const: file_search - default: file_search title: Type - type: string + default: file_search vector_store_ids: items: type: string - title: Vector Store Ids type: array + title: Vector Store Ids filters: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true max_num_results: anyOf: - - maximum: 50 - minimum: 1 - type: integer + - type: integer + maximum: 50.0 + minimum: 1.0 - type: 'null' default: 10 ranking_options: @@ -3192,28 +3169,26 @@ components: - $ref: '#/components/schemas/SearchRankingOptions' title: SearchRankingOptions - type: 'null' - nullable: true title: SearchRankingOptions + type: object required: - vector_store_ids title: OpenAIResponseInputToolFileSearch - type: object + description: File search tool configuration for OpenAI response inputs. OpenAIResponseInputToolFunction: - description: Function tool configuration for OpenAI response inputs. properties: type: + type: string const: function - default: function title: Type - type: string + default: function name: - title: Name type: string + title: Name description: anyOf: - type: string - type: 'null' - nullable: true parameters: anyOf: - additionalProperties: true @@ -3223,18 +3198,17 @@ components: anyOf: - type: boolean - type: 'null' - nullable: true + type: object required: - name - parameters title: OpenAIResponseInputToolFunction - type: object + description: Function tool configuration for OpenAI response inputs. OpenAIResponseInputToolWebSearch: - description: Web search tool configuration for OpenAI response inputs. properties: type: - default: web_search title: Type + default: web_search type: string enum: - web_search @@ -3243,51 +3217,40 @@ components: - web_search_2025_08_26 search_context_size: anyOf: - - pattern: ^low|medium|high$ - type: string + - type: string + pattern: ^low|medium|high$ - type: 'null' default: medium - title: OpenAIResponseInputToolWebSearch type: object + title: OpenAIResponseInputToolWebSearch + description: Web search tool configuration for OpenAI response inputs. OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. properties: created_at: - title: Created At type: integer + title: Created At error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' title: OpenAIResponseError - type: 'null' - nullable: true title: OpenAIResponseError id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model object: + type: string const: response - default: response title: Object - type: string + default: response 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' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -3300,33 +3263,40 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array + title: Output parallel_tool_calls: - default: false - title: Parallel Tool Calls type: boolean + title: Parallel Tool Calls + default: false previous_response_id: anyOf: - type: string - type: 'null' - nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' title: OpenAIResponsePrompt - type: 'null' - nullable: true title: OpenAIResponsePrompt status: - title: Status type: string + title: Status temperature: anyOf: - type: number - type: 'null' - nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -3336,20 +3306,9 @@ components: anyOf: - type: number - type: 'null' - nullable: true tools: anyOf: - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' title: OpenAIResponseInputToolWebSearch @@ -3359,48 +3318,43 @@ components: title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - nullable: true truncation: anyOf: - type: string - type: 'null' - nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' title: OpenAIResponseUsage - type: 'null' - nullable: true title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - nullable: true max_tool_calls: anyOf: - type: integer - type: 'null' - 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' - title: OpenAIResponseMessage + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -3413,16 +3367,27 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Input + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array + title: Input + type: object required: - created_at - id @@ -3431,7 +3396,7 @@ components: - status - input title: OpenAIResponseObjectWithInput - type: object + description: OpenAI response object extended with input context information. OpenAIResponseOutput: discriminator: mapping: @@ -3460,20 +3425,13 @@ components: title: OpenAIResponseMCPApprovalRequest title: OpenAIResponseMessage | ... (7 variants) OpenAIResponsePrompt: - description: OpenAI compatible Prompt object that is used in OpenAI responses. properties: id: - title: Id type: string + title: Id variables: anyOf: - additionalProperties: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText @@ -3481,31 +3439,35 @@ components: title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: object - type: 'null' - nullable: true version: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - id title: OpenAIResponsePrompt - type: object + description: OpenAI compatible Prompt object that is used in OpenAI responses. OpenAIResponseText: - description: Text response configuration for OpenAI responses. properties: format: anyOf: - $ref: '#/components/schemas/OpenAIResponseTextFormat' title: OpenAIResponseTextFormat - type: 'null' - nullable: true title: OpenAIResponseTextFormat - title: OpenAIResponseText type: object + title: OpenAIResponseText + description: Text response configuration for OpenAI responses. OpenAIResponseTool: discriminator: mapping: @@ -3528,16 +3490,15 @@ components: title: OpenAIResponseToolMCP title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. properties: type: + type: string const: mcp - default: mcp title: Type - type: string + default: mcp server_label: - title: Server Label type: string + title: Server Label allowed_tools: anyOf: - items: @@ -3548,43 +3509,41 @@ components: title: AllowedToolsFilter - type: 'null' title: list[string] | AllowedToolsFilter - nullable: true + type: object required: - server_label title: OpenAIResponseToolMCP - type: object + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. OpenAIResponseUsage: - description: Usage information for OpenAI response. properties: input_tokens: - title: Input Tokens type: integer + title: Input Tokens output_tokens: - title: Output Tokens type: integer + title: Output Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens input_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' title: OpenAIResponseUsageInputTokensDetails - type: 'null' - nullable: true title: OpenAIResponseUsageInputTokensDetails output_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' title: OpenAIResponseUsageOutputTokensDetails - type: 'null' - nullable: true title: OpenAIResponseUsageOutputTokensDetails + type: object required: - input_tokens - output_tokens - total_tokens title: OpenAIResponseUsage - type: object + description: Usage information for OpenAI response. ResponseGuardrailSpec: description: Specification for a guardrail to apply during response generation. properties: @@ -3617,40 +3576,37 @@ components: title: OpenAIResponseInputToolMCP title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: type: + type: string const: mcp - default: mcp title: Type - type: string + default: mcp server_label: - title: Server Label type: string + title: Server Label server_url: - title: Server Url type: string + title: Server Url headers: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true authorization: anyOf: - type: string - type: 'null' - nullable: true require_approval: anyOf: - - const: always - type: string - - const: never - type: string + - type: string + const: always + - type: string + const: never - $ref: '#/components/schemas/ApprovalFilter' title: ApprovalFilter - default: never title: string | ApprovalFilter + default: never allowed_tools: anyOf: - items: @@ -3661,51 +3617,39 @@ components: title: AllowedToolsFilter - type: 'null' title: list[string] | AllowedToolsFilter - nullable: true + type: object required: - server_label - server_url title: OpenAIResponseInputToolMCP - type: object + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. OpenAIResponseObject: - description: Complete OpenAI response object containing generation results and metadata. properties: created_at: - title: Created At type: integer + title: Created At error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' title: OpenAIResponseError - type: 'null' - nullable: true title: OpenAIResponseError id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model object: + type: string const: response - default: response title: Object - type: string + default: response 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' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -3718,33 +3662,40 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array + title: Output parallel_tool_calls: - default: false - title: Parallel Tool Calls type: boolean + title: Parallel Tool Calls + default: false previous_response_id: anyOf: - type: string - type: 'null' - nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' title: OpenAIResponsePrompt - type: 'null' - nullable: true title: OpenAIResponsePrompt status: - title: Status type: string + title: Status temperature: anyOf: - type: number - type: 'null' - nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -3754,20 +3705,9 @@ components: anyOf: - type: number - type: 'null' - nullable: true tools: anyOf: - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' title: OpenAIResponseInputToolWebSearch @@ -3777,32 +3717,38 @@ components: title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - nullable: true truncation: anyOf: - type: string - type: 'null' - nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' title: OpenAIResponseUsage - type: 'null' - nullable: true title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - nullable: true max_tool_calls: anyOf: - type: integer - type: 'null' - nullable: true + type: object required: - created_at - id @@ -3810,7 +3756,7 @@ components: - output - status title: OpenAIResponseObject - type: object + description: Complete OpenAI response object containing generation results and metadata. OpenAIResponseContentPartOutputText: description: Text content within a streamed response part. properties: @@ -4974,43 +4920,32 @@ components: title: OpenAIResponseObjectStreamResponseWebSearchCallSearching type: object OpenAIDeleteResponseObject: - description: Response object confirming deletion of an OpenAI response. properties: id: - title: Id type: string + title: Id object: + type: string const: response - default: response title: Object - type: string + default: response deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: OpenAIDeleteResponseObject - type: object + description: Response object confirming deletion of an OpenAI response. ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. 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' - title: OpenAIResponseMessage + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -5023,39 +4958,48 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Data + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array + title: Data object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data title: ListOpenAIResponseInputItem - type: object + description: List container for OpenAI response input items. RunShieldResponse: - description: Response from running a safety shield. properties: violation: anyOf: - $ref: '#/components/schemas/SafetyViolation' title: SafetyViolation - type: 'null' - nullable: true title: SafetyViolation - title: RunShieldResponse type: object + title: RunShieldResponse + description: Response from running a safety shield. SafetyViolation: - description: Details of a safety violation detected by content moderation. properties: violation_level: $ref: '#/components/schemas/ViolationLevel' @@ -5063,25 +5007,25 @@ components: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - violation_level title: SafetyViolation - type: object + description: Details of a safety violation detected by content moderation. ViolationLevel: - description: Severity level of a safety violation. + type: string enum: - info - warn - error title: ViolationLevel - type: string + description: Severity level of a safety violation. AggregationFunctionType: - description: Types of aggregation functions for scoring results. + type: string enum: - average - weighted_average @@ -5089,193 +5033,176 @@ components: - categorical_count - accuracy title: AggregationFunctionType - type: string + description: Types of aggregation functions for scoring results. ArrayType: - description: Parameter type for array values. properties: type: + type: string const: array - default: array title: Type - type: string - title: ArrayType + default: array type: object + title: ArrayType + description: Parameter type for array values. BasicScoringFnParams: - description: Parameters for basic scoring function configuration. properties: type: + type: string const: basic - default: basic title: Type - type: string + default: basic aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array - title: BasicScoringFnParams + 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. BooleanType: - description: Parameter type for boolean values. properties: type: + type: string const: boolean - default: boolean title: Type - type: string - title: BooleanType + default: boolean type: object + title: BooleanType + description: Parameter type for boolean values. ChatCompletionInputType: - description: Parameter type for chat completion input. properties: type: + type: string const: chat_completion_input - default: chat_completion_input title: Type - type: string - title: ChatCompletionInputType + default: chat_completion_input type: object + title: ChatCompletionInputType + description: Parameter type for chat completion input. CompletionInputType: - description: Parameter type for completion input. properties: type: + type: string const: completion_input - default: completion_input title: Type - type: string - title: CompletionInputType + default: completion_input type: object + title: CompletionInputType + description: Parameter type for completion input. JsonType: - description: Parameter type for JSON values. properties: type: + type: string const: json - default: json title: Type - type: string - title: JsonType + default: json type: object + title: JsonType + description: Parameter type for JSON values. LLMAsJudgeScoringFnParams: - description: Parameters for LLM-as-judge scoring function configuration. properties: type: + type: string const: llm_as_judge - default: llm_as_judge title: Type - type: string + default: llm_as_judge judge_model: - title: Judge Model type: string + title: Judge Model prompt_template: anyOf: - type: string - type: 'null' - nullable: true judge_score_regexes: - description: Regexes to extract the answer from generated response items: type: string - title: Judge Score Regexes type: array + title: Judge Score Regexes + description: Regexes to extract the answer from generated response aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array + title: Aggregation Functions + description: Aggregation functions to apply to the scores of each row + type: object required: - judge_model title: LLMAsJudgeScoringFnParams - type: object + description: Parameters for LLM-as-judge scoring function configuration. NumberType: - description: Parameter type for numeric values. properties: type: + type: string const: number - default: number title: Type - type: string - title: NumberType + default: number type: object + title: NumberType + description: Parameter type for numeric values. ObjectType: - description: Parameter type for object values. properties: type: + type: string const: object - default: object title: Type - type: string - title: ObjectType + default: object type: object + title: ObjectType + description: Parameter type for object values. RegexParserScoringFnParams: - description: Parameters for regex parser scoring function configuration. properties: type: + type: string const: regex_parser - default: regex_parser title: Type - type: string + default: regex_parser parsing_regexes: - description: Regex to extract the answer from generated response items: type: string - title: Parsing Regexes type: array + title: Parsing Regexes + description: Regex to extract the answer from generated response aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array - title: RegexParserScoringFnParams - type: object + 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. ScoringFn: - description: A scoring function resource for evaluating model outputs. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: scoring_function - default: scoring_function title: Type - type: string + default: scoring_function description: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - description: Any additional metadata for this definition - title: Metadata type: object + title: Metadata + description: Any additional metadata for this definition return_type: - description: The return type of the deterministic function - discriminator: - mapping: - 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' title: StringType @@ -5296,32 +5223,45 @@ components: - $ref: '#/components/schemas/CompletionInputType' title: CompletionInputType title: StringType | ... (9 variants) + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + 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: anyOf: - - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval title: Params - nullable: true + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + type: object required: - identifier - provider_id - return_type title: ScoringFn - type: object + description: A scoring function resource for evaluating model outputs. ScoringFnParams: discriminator: mapping: @@ -5338,127 +5278,124 @@ components: title: BasicScoringFnParams title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams StringType: - description: Parameter type for string values. properties: type: + type: string const: string - default: string title: Type - type: string - title: StringType + default: string type: object + title: StringType + description: Parameter type for string values. UnionType: - description: Parameter type for union values. properties: type: + type: string const: union - default: union title: Type - type: string - title: UnionType + default: union type: object + title: UnionType + description: Parameter type for union values. ListScoringFunctionsResponse: properties: data: items: $ref: '#/components/schemas/ScoringFn' - title: Data type: array + title: Data + type: object required: - data title: ListScoringFunctionsResponse - type: object ScoreResponse: - description: The response from scoring. properties: results: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Results type: object + title: Results + type: object required: - results title: ScoreResponse - type: object + description: The response from scoring. ScoringResult: - description: A scoring result for a single row. properties: score_rows: items: additionalProperties: true type: object - title: Score Rows type: array + title: Score Rows aggregated_results: additionalProperties: true - title: Aggregated Results type: object + title: Aggregated Results + type: object required: - score_rows - aggregated_results title: ScoringResult - type: object + description: A scoring result for a single row. ScoreBatchResponse: - description: Response from batch scoring operations on datasets. properties: dataset_id: anyOf: - type: string - type: 'null' - nullable: true results: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Results type: object + title: Results + type: object required: - results title: ScoreBatchResponse - type: object + description: Response from batch scoring operations on datasets. Shield: - description: A safety shield resource that can be used to check content. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: shield - default: shield title: Type - type: string + default: shield params: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - identifier - provider_id title: Shield - type: object + description: A safety shield resource that can be used to check content. ListShieldsResponse: properties: data: items: $ref: '#/components/schemas/Shield' - title: Data type: array + title: Data + type: object required: - data title: ListShieldsResponse - type: object ImageContentItem: description: A image content item properties: @@ -5515,184 +5452,172 @@ components: title: TextContentItem title: ImageContentItem | TextContentItem TextContentItem: - description: A text content item properties: type: + type: string const: text - default: text title: Type - type: string + default: text text: - title: Text type: string + title: Text + type: object required: - text title: TextContentItem - type: object + description: A text content item ToolInvocationResult: - description: Result of a tool invocation. properties: content: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array - title: list[ImageContentItem | TextContentItem] + title: list[ImageContentItem-Output | TextContentItem] - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true + title: string | list[ImageContentItem-Output | TextContentItem] error_message: anyOf: - type: string - type: 'null' - nullable: true error_code: anyOf: - type: integer - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true - title: ToolInvocationResult type: object + title: ToolInvocationResult + description: Result of a tool invocation. URL: - description: A URL reference to external content. properties: uri: - title: Uri type: string + title: Uri + type: object required: - uri title: URL - type: object + description: A URL reference to external content. ToolDef: - description: Tool definition used in runtime contexts. properties: toolgroup_id: anyOf: - type: string - type: 'null' - nullable: true name: - title: Name type: string + title: Name description: anyOf: - type: string - type: 'null' - nullable: true input_schema: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true output_schema: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - name title: ToolDef - type: object + description: Tool definition used in runtime contexts. ListToolDefsResponse: - description: Response containing a list of tool definitions. properties: data: items: $ref: '#/components/schemas/ToolDef' - title: Data type: array + title: Data + type: object required: - data title: ListToolDefsResponse - type: object + description: Response containing a list of tool definitions. ToolGroup: - description: A group of related tools managed together. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: tool_group - default: tool_group title: Type - type: string + default: tool_group mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' title: URL - type: 'null' - nullable: true title: URL args: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - identifier - provider_id title: ToolGroup - type: object + description: A group of related tools managed together. ListToolGroupsResponse: - description: Response containing a list of tool groups. properties: data: items: $ref: '#/components/schemas/ToolGroup' - title: Data type: array + title: Data + type: object required: - data title: ListToolGroupsResponse - type: object + description: Response containing a list of tool groups. Chunk: description: A chunk of content that can be inserted into a vector database. properties: @@ -5752,105 +5677,94 @@ components: 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. properties: chunk_id: anyOf: - type: string - type: 'null' - nullable: true document_id: anyOf: - type: string - type: 'null' - nullable: true source: anyOf: - type: string - type: 'null' - nullable: true created_timestamp: anyOf: - type: integer - type: 'null' - nullable: true updated_timestamp: anyOf: - type: integer - type: 'null' - nullable: true chunk_window: anyOf: - type: string - type: 'null' - nullable: true chunk_tokenizer: anyOf: - type: string - type: 'null' - nullable: true chunk_embedding_model: anyOf: - type: string - type: 'null' - nullable: true chunk_embedding_dimension: anyOf: - type: integer - type: 'null' - nullable: true content_token_count: anyOf: - type: integer - type: 'null' - nullable: true metadata_token_count: anyOf: - type: integer - type: 'null' - nullable: true - title: ChunkMetadata type: object + title: 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. QueryChunksResponse: - description: Response from querying chunks in a vector database. properties: chunks: items: - $ref: '#/components/schemas/Chunk' - title: Chunks + $ref: '#/components/schemas/Chunk-Output' type: array + title: Chunks scores: items: type: number - title: Scores type: array + title: Scores + type: object required: - chunks - scores title: QueryChunksResponse - type: object + description: Response from querying chunks in a vector database. VectorStoreFileCounts: - description: File processing status counts for a vector store. properties: completed: - title: Completed type: integer + title: Completed cancelled: - title: Cancelled type: integer + title: Cancelled failed: - title: Failed type: integer + title: Failed in_progress: - title: In Progress type: integer + title: In Progress total: - title: Total type: integer + title: Total + type: object required: - completed - cancelled @@ -5858,91 +5772,85 @@ components: - in_progress - total title: VectorStoreFileCounts - type: object + description: File processing status counts for a vector store. VectorStoreListResponse: - description: Response from listing vector stores. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreListResponse - type: object + description: Response from listing vector stores. VectorStoreObject: - description: OpenAI Vector Store object. properties: id: - title: Id type: string + title: Id object: - default: vector_store - title: Object type: string + title: Object + default: vector_store created_at: - title: Created At type: integer + title: Created At name: anyOf: - type: string - type: 'null' - nullable: true usage_bytes: - default: 0 - title: Usage Bytes type: integer + title: Usage Bytes + default: 0 file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' status: - default: completed - title: Status type: string + title: Status + default: completed expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true expires_at: anyOf: - type: integer - type: 'null' - nullable: true last_active_at: anyOf: - type: integer - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - id - created_at - file_counts title: VectorStoreObject - type: object + description: OpenAI Vector Store object. VectorStoreChunkingStrategy: discriminator: mapping: @@ -5956,159 +5864,151 @@ components: title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreChunkingStrategyAuto: - description: Automatic chunking strategy for vector store files. properties: type: + type: string const: auto - default: auto title: Type - type: string - title: VectorStoreChunkingStrategyAuto + default: auto type: object + title: VectorStoreChunkingStrategyAuto + description: Automatic chunking strategy for vector store files. VectorStoreChunkingStrategyStatic: - description: Static chunking strategy with configurable parameters. properties: type: + type: string const: static - default: static title: Type - type: string + default: static static: $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + type: object required: - static title: VectorStoreChunkingStrategyStatic - type: object + description: Static chunking strategy with configurable parameters. VectorStoreChunkingStrategyStaticConfig: - description: Configuration for static chunking strategy. properties: chunk_overlap_tokens: - default: 400 - title: Chunk Overlap Tokens type: integer + title: Chunk Overlap Tokens + default: 400 max_chunk_size_tokens: - default: 800 - maximum: 4096 - minimum: 100 - title: Max Chunk Size Tokens type: integer - title: VectorStoreChunkingStrategyStaticConfig + maximum: 4096.0 + minimum: 100.0 + title: Max Chunk Size Tokens + default: 800 type: object + title: VectorStoreChunkingStrategyStaticConfig + description: Configuration for static chunking strategy. OpenAICreateVectorStoreRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store with extra_body support. properties: name: anyOf: - type: string - type: 'null' - nullable: true file_ids: anyOf: - items: type: string type: array - type: 'null' - nullable: true expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true chunking_strategy: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true - title: OpenAICreateVectorStoreRequestWithExtraBody + additionalProperties: true type: object + title: OpenAICreateVectorStoreRequestWithExtraBody + description: Request to create a vector store with extra_body support. VectorStoreDeleteResponse: - description: Response from deleting a vector store. properties: id: - title: Id type: string + title: Id object: - default: vector_store.deleted - title: Object type: string + title: Object + default: vector_store.deleted deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: VectorStoreDeleteResponse - type: object + description: Response from deleting a vector store. OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store file batch with extra_body support. properties: file_ids: items: type: string - title: File Ids type: array + title: File Ids attributes: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true chunking_strategy: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy - nullable: true + additionalProperties: true + type: object required: - file_ids title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - type: object + description: Request to create a vector store file batch with extra_body support. VectorStoreFileBatchObject: - description: OpenAI Vector Store File Batch object. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file_batch - title: Object type: string + title: Object + default: vector_store.file_batch created_at: - title: Created At type: integer + title: Created At vector_store_id: - title: Vector Store Id type: string + title: Vector Store Id status: title: Status type: string @@ -6120,6 +6020,7 @@ components: default: completed file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' + type: object required: - id - created_at @@ -6127,7 +6028,7 @@ components: - status - file_counts title: VectorStoreFileBatchObject - type: object + description: OpenAI Vector Store File Batch object. VectorStoreFileStatus: type: string enum: @@ -6137,7 +6038,6 @@ components: - failed default: completed VectorStoreFileLastError: - description: Error information for failed vector store file processing. properties: code: title: Code @@ -6147,48 +6047,47 @@ components: - rate_limit_exceeded default: server_error message: - title: Message type: string + title: Message + type: object required: - code - message title: VectorStoreFileLastError - type: object + description: Error information for failed vector store file processing. VectorStoreFileObject: - description: OpenAI Vector Store File object. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file - title: Object type: string + title: Object + default: vector_store.file attributes: additionalProperties: true - title: Attributes type: object + title: Attributes chunking_strategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' created_at: - title: Created At type: integer + title: Created At last_error: anyOf: - $ref: '#/components/schemas/VectorStoreFileLastError' title: VectorStoreFileLastError - type: 'null' - nullable: true title: VectorStoreFileLastError status: title: Status @@ -6200,12 +6099,13 @@ components: - failed default: completed usage_bytes: - default: 0 - title: Usage Bytes type: integer + title: Usage Bytes + default: 0 vector_store_id: - title: Vector Store Id type: string + title: Vector Store Id + type: object required: - id - chunking_strategy @@ -6213,158 +6113,149 @@ components: - status - vector_store_id title: VectorStoreFileObject - type: object + description: OpenAI Vector Store File object. VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreFileObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreFilesListInBatchResponse - type: object + description: Response from listing files in a vector store file batch. VectorStoreListFilesResponse: - description: Response from listing files in a vector store. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreFileObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreListFilesResponse - type: object + description: Response from listing files in a vector store. VectorStoreFileDeleteResponse: - description: Response from deleting a vector store file. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file.deleted - title: Object type: string + title: Object + default: vector_store.file.deleted deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: VectorStoreFileDeleteResponse - type: object + description: Response from deleting a vector store file. VectorStoreContent: - description: Content item from a vector store file or search result. properties: type: + type: string const: text title: Type - type: string text: - title: Text type: string + title: Text embedding: anyOf: - items: type: number type: array - type: 'null' - nullable: true chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' title: ChunkMetadata - type: 'null' - nullable: true title: ChunkMetadata metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - type - text title: VectorStoreContent - type: object + description: Content item from a vector store file or search result. VectorStoreFileContentResponse: - description: Represents the parsed content of a vector store file. properties: object: + type: string const: vector_store.file_content.page - default: vector_store.file_content.page title: Object - type: string + default: vector_store.file_content.page data: items: $ref: '#/components/schemas/VectorStoreContent' - title: Data type: array + title: Data has_more: - default: false - title: Has More type: boolean + title: Has More + default: false next_page: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - data title: VectorStoreFileContentResponse - type: object + description: Represents the parsed content of a vector store file. VectorStoreSearchResponse: - description: Response from searching a vector store. properties: file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename score: - title: Score type: number + title: Score attributes: anyOf: - additionalProperties: @@ -6375,241 +6266,230 @@ components: title: string | number | boolean type: object - type: 'null' - nullable: true content: items: $ref: '#/components/schemas/VectorStoreContent' - title: Content type: array + title: Content + type: object required: - file_id - filename - score - content title: VectorStoreSearchResponse - type: object + description: Response from searching a vector store. VectorStoreSearchResponsePage: - description: Paginated response from searching a vector store. properties: object: - default: vector_store.search_results.page - title: Object type: string + title: Object + default: vector_store.search_results.page search_query: items: type: string - title: Search Query type: array + title: Search Query data: items: $ref: '#/components/schemas/VectorStoreSearchResponse' - title: Data type: array + title: Data has_more: - default: false - title: Has More type: boolean + title: Has More + default: false next_page: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - search_query - data title: VectorStoreSearchResponsePage - type: object + description: Paginated response from searching a vector store. VersionInfo: - description: Version information for the service. properties: version: - title: Version type: string + title: Version + type: object required: - version title: VersionInfo - type: object + description: Version information for the service. PaginatedResponse: - description: A generic paginated response that follows a simple format. properties: data: items: additionalProperties: true type: object - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More url: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - data - has_more title: PaginatedResponse - type: object + description: A generic paginated response that follows a simple format. Dataset: - description: Dataset resource for storing and accessing training or evaluation data. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: dataset - default: dataset title: Type - type: string + default: dataset purpose: $ref: '#/components/schemas/DatasetPurpose' source: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type oneOf: - $ref: '#/components/schemas/URIDataSource' title: URIDataSource - $ref: '#/components/schemas/RowsDataSource' title: RowsDataSource title: URIDataSource | RowsDataSource + discriminator: + propertyName: type + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' metadata: additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata type: object + title: Metadata + description: Any additional metadata for this dataset + type: object required: - identifier - provider_id - purpose - source title: Dataset - type: object + description: Dataset resource for storing and accessing training or evaluation data. RowsDataSource: - description: A dataset stored in rows. properties: type: + type: string const: rows - default: rows title: Type - type: string + default: rows rows: items: additionalProperties: true type: object - title: Rows type: array + title: Rows + type: object required: - rows title: RowsDataSource - type: object + description: A dataset stored in rows. URIDataSource: - description: A dataset that can be obtained from a URI. properties: type: + type: string const: uri - default: uri title: Type - type: string + default: uri uri: - title: Uri type: string + title: Uri + type: object required: - uri title: URIDataSource - type: object + description: A dataset that can be obtained from a URI. ListDatasetsResponse: - description: Response from listing datasets. properties: data: items: $ref: '#/components/schemas/Dataset' - title: Data type: array + title: Data + type: object required: - data title: ListDatasetsResponse - type: object + description: Response from listing datasets. Benchmark: - description: A benchmark resource for evaluating model performance. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: benchmark - default: benchmark title: Type - type: string + default: benchmark dataset_id: - title: Dataset Id type: string + title: Dataset Id scoring_functions: items: type: string - title: Scoring Functions type: array + title: Scoring Functions metadata: additionalProperties: true - description: Metadata for this evaluation task - title: Metadata type: object + title: Metadata + description: Metadata for this evaluation task + type: object required: - identifier - provider_id - dataset_id - scoring_functions title: Benchmark - type: object + description: A benchmark resource for evaluating model performance. ListBenchmarksResponse: properties: data: items: $ref: '#/components/schemas/Benchmark' - title: Data type: array + title: Data + type: object required: - data title: ListBenchmarksResponse - type: object BenchmarkConfig: - description: A benchmark configuration for evaluation. properties: eval_candidate: $ref: '#/components/schemas/ModelCandidate' scoring_params: additionalProperties: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' title: LLMAsJudgeScoringFnParams @@ -6617,41 +6497,46 @@ components: title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - description: Map between scoring function id and parameters for each scoring function you want to run - title: Scoring Params type: object + title: Scoring Params + description: Map between scoring function id and parameters for each scoring function you want to run num_examples: anyOf: - type: integer - type: 'null' description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - nullable: true + type: object required: - eval_candidate title: BenchmarkConfig - type: object + description: A benchmark configuration for evaluation. GreedySamplingStrategy: - description: Greedy sampling strategy that selects the highest probability token at each step. properties: type: + type: string const: greedy - default: greedy title: Type - type: string - title: GreedySamplingStrategy + default: greedy type: object + title: GreedySamplingStrategy + description: Greedy sampling strategy that selects the highest probability token at each step. ModelCandidate: - description: A model candidate for evaluation. properties: type: + type: string const: model - default: model title: Type - type: string + default: model model: - title: Model type: string + title: Model sampling_params: $ref: '#/components/schemas/SamplingParams' system_message: @@ -6659,23 +6544,16 @@ components: - $ref: '#/components/schemas/SystemMessage' title: SystemMessage - type: 'null' - nullable: true title: SystemMessage + type: object required: - model - sampling_params title: ModelCandidate - type: object + description: A model candidate for evaluation. SamplingParams: - description: Sampling parameters. properties: strategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' title: GreedySamplingStrategy @@ -6684,11 +6562,16 @@ components: - $ref: '#/components/schemas/TopKSamplingStrategy' title: TopKSamplingStrategy title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' max_tokens: anyOf: - type: integer - type: 'null' - nullable: true repetition_penalty: anyOf: - type: number @@ -6700,74 +6583,73 @@ components: type: string type: array - type: 'null' - nullable: true - title: SamplingParams type: object + title: SamplingParams + description: Sampling parameters. SystemMessage: - description: A system message providing instructions or context to the model. properties: role: + type: string const: system - default: system title: Role - type: string + default: system content: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + type: object required: - content title: SystemMessage - type: object + description: A system message providing instructions or context to the model. TopKSamplingStrategy: - description: Top-k sampling strategy that restricts sampling to the k most likely tokens. properties: type: + type: string const: top_k - default: top_k title: Type - type: string + default: top_k top_k: - minimum: 1 - title: Top K type: integer + minimum: 1.0 + title: Top K + type: object required: - top_k title: TopKSamplingStrategy - type: object + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. TopPSamplingStrategy: - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. properties: type: + type: string const: top_p - default: top_p title: Type - type: string + default: top_p temperature: anyOf: - type: number @@ -6778,94 +6660,94 @@ components: - type: number - type: 'null' default: 0.95 + type: object required: - temperature title: TopPSamplingStrategy - type: object + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. EvaluateResponse: - description: The response from an evaluation. properties: generations: items: additionalProperties: true type: object - title: Generations type: array + title: Generations scores: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Scores type: object + title: Scores + type: object required: - generations - scores title: EvaluateResponse - type: object + description: The response from an evaluation. Job: - description: A job execution instance with status tracking. properties: job_id: - title: Job Id type: string + title: Job Id status: $ref: '#/components/schemas/JobStatus' + type: object required: - job_id - status title: Job - type: object + description: A job execution instance with status tracking. RerankData: - description: A single rerank result from a reranking response. properties: index: - title: Index type: integer + title: Index relevance_score: - title: Relevance Score type: number + title: Relevance Score + type: object required: - index - relevance_score title: RerankData - type: object + description: A single rerank result from a reranking response. RerankResponse: - description: Response from a reranking request. properties: data: items: $ref: '#/components/schemas/RerankData' - title: Data type: array + title: Data + type: object required: - data title: RerankResponse - type: object + description: Response from a reranking request. Checkpoint: - description: Checkpoint created during training runs. properties: identifier: - title: Identifier type: string + title: Identifier created_at: + type: string format: date-time title: Created At - type: string epoch: - title: Epoch type: integer + title: Epoch post_training_job_id: - title: Post Training Job Id type: string + title: Post Training Job Id path: - title: Path type: string + title: Path training_metrics: anyOf: - $ref: '#/components/schemas/PostTrainingMetric' title: PostTrainingMetric - type: 'null' - nullable: true title: PostTrainingMetric + type: object required: - identifier - created_at @@ -6873,137 +6755,131 @@ components: - post_training_job_id - path title: Checkpoint - type: object + description: Checkpoint created during training runs. PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid checkpoints: items: $ref: '#/components/schemas/Checkpoint' - title: Checkpoints type: array + title: Checkpoints + type: object required: - job_uuid title: PostTrainingJobArtifactsResponse - type: object + description: Artifacts of a finetuning job. PostTrainingMetric: - description: Training metrics captured during post-training jobs. properties: epoch: - title: Epoch type: integer + title: Epoch train_loss: - title: Train Loss type: number + title: Train Loss validation_loss: - title: Validation Loss type: number + title: Validation Loss perplexity: - title: Perplexity type: number + title: Perplexity + type: object required: - epoch - train_loss - validation_loss - perplexity title: PostTrainingMetric - type: object + description: Training metrics captured during post-training jobs. PostTrainingJobStatusResponse: - description: Status of a finetuning job. properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid status: $ref: '#/components/schemas/JobStatus' scheduled_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true started_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true completed_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true checkpoints: items: $ref: '#/components/schemas/Checkpoint' - title: Checkpoints type: array + title: Checkpoints + type: object required: - job_uuid - status title: PostTrainingJobStatusResponse - type: object + description: Status of a finetuning job. ListPostTrainingJobsResponse: properties: data: items: $ref: '#/components/schemas/PostTrainingJob' - title: Data type: array + title: Data + type: object required: - data title: ListPostTrainingJobsResponse - type: object DPOAlignmentConfig: - description: Configuration for Direct Preference Optimization (DPO) alignment. properties: beta: - title: Beta type: number + title: Beta loss_type: $ref: '#/components/schemas/DPOLossType' default: sigmoid + type: object required: - beta title: DPOAlignmentConfig - type: object + description: Configuration for Direct Preference Optimization (DPO) alignment. DPOLossType: + type: string enum: - sigmoid - hinge - ipo - kto_pair title: DPOLossType - type: string DataConfig: - description: Configuration for training data and data loading. properties: dataset_id: - title: Dataset Id type: string + title: Dataset Id batch_size: - title: Batch Size type: integer + title: Batch Size shuffle: - title: Shuffle type: boolean + title: Shuffle data_format: $ref: '#/components/schemas/DatasetFormat' validation_dataset_id: anyOf: - type: string - type: 'null' - nullable: true packed: anyOf: - type: boolean @@ -7014,22 +6890,22 @@ components: - type: boolean - type: 'null' default: false + type: object required: - dataset_id - batch_size - shuffle - data_format title: DataConfig - type: object + description: Configuration for training data and data loading. DatasetFormat: - description: Format of the training dataset. + type: string enum: - instruct - dialog title: DatasetFormat - type: string + description: Format of the training dataset. EfficiencyConfig: - description: Configuration for memory and compute efficiency optimizations. properties: enable_activation_checkpointing: anyOf: @@ -7051,51 +6927,51 @@ components: - type: boolean - type: 'null' default: false - title: EfficiencyConfig type: object + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. OptimizerConfig: - description: Configuration parameters for the optimization algorithm. properties: optimizer_type: $ref: '#/components/schemas/OptimizerType' lr: - title: Lr type: number + title: Lr weight_decay: - title: Weight Decay type: number + title: Weight Decay num_warmup_steps: - title: Num Warmup Steps type: integer + title: Num Warmup Steps + type: object required: - optimizer_type - lr - weight_decay - num_warmup_steps title: OptimizerConfig - type: object + description: Configuration parameters for the optimization algorithm. OptimizerType: - description: Available optimizer algorithms for training. + type: string enum: - adam - adamw - sgd title: OptimizerType - type: string + description: Available optimizer algorithms for training. TrainingConfig: - description: Comprehensive configuration for the training process. properties: n_epochs: - title: N Epochs type: integer + title: N Epochs max_steps_per_epoch: - default: 1 - title: Max Steps Per Epoch type: integer - gradient_accumulation_steps: + title: Max Steps Per Epoch default: 1 - title: Gradient Accumulation Steps + gradient_accumulation_steps: type: integer + title: Gradient Accumulation Steps + default: 1 max_validation_steps: anyOf: - type: integer @@ -7106,40 +6982,38 @@ components: - $ref: '#/components/schemas/DataConfig' title: DataConfig - type: 'null' - nullable: true title: DataConfig optimizer_config: anyOf: - $ref: '#/components/schemas/OptimizerConfig' title: OptimizerConfig - type: 'null' - nullable: true title: OptimizerConfig efficiency_config: anyOf: - $ref: '#/components/schemas/EfficiencyConfig' title: EfficiencyConfig - type: 'null' - nullable: true title: EfficiencyConfig dtype: anyOf: - type: string - type: 'null' default: bf16 + type: object required: - n_epochs title: TrainingConfig - type: object + description: Comprehensive configuration for the training process. PostTrainingJob: properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid + type: object required: - job_uuid title: PostTrainingJob - type: object AlgorithmConfig: discriminator: mapping: @@ -7153,30 +7027,29 @@ components: title: QATFinetuningConfig title: LoraFinetuningConfig | QATFinetuningConfig LoraFinetuningConfig: - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. properties: type: + type: string const: LoRA - default: LoRA title: Type - type: string + default: LoRA lora_attn_modules: items: type: string - title: Lora Attn Modules type: array + title: Lora Attn Modules apply_lora_to_mlp: - title: Apply Lora To Mlp type: boolean + title: Apply Lora To Mlp apply_lora_to_output: - title: Apply Lora To Output type: boolean + title: Apply Lora To Output rank: - title: Rank type: integer + title: Rank alpha: - title: Alpha type: integer + title: Alpha use_dora: anyOf: - type: boolean @@ -7187,6 +7060,7 @@ components: - type: boolean - type: 'null' default: false + type: object required: - lora_attn_modules - apply_lora_to_mlp @@ -7194,26 +7068,26 @@ components: - rank - alpha title: LoraFinetuningConfig - type: object + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. QATFinetuningConfig: - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: type: + type: string const: QAT - default: QAT title: Type - type: string + default: QAT quantizer_name: - title: Quantizer Name type: string + title: Quantizer Name group_size: - title: Group Size type: integer + title: Group Size + type: object required: - quantizer_name - group_size title: QATFinetuningConfig - type: object + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. ParamType: discriminator: mapping: @@ -7259,176 +7133,773 @@ components: - $ref: '#/components/schemas/RowsDataSource' title: RowsDataSource title: URIDataSource | RowsDataSource - _URLOrData: - description: A URL or a base64 encoded string + AllowedToolsFilter: properties: - url: + tool_names: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - items: + type: string + type: array - type: 'null' - nullable: true - title: URL - data: + type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: + properties: + always: anyOf: - - type: string + - items: + type: string + type: array + - type: 'null' + never: + anyOf: + - items: + type: string + type: array - type: 'null' - contentEncoding: base64 - nullable: true - title: _URLOrData type: object - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. + BatchError: properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat + code: + anyOf: + - type: string + - type: 'null' + line: + anyOf: + - type: integer + - type: 'null' + message: + anyOf: + - type: string + - type: 'null' + param: + anyOf: + - type: string + - type: 'null' + additionalProperties: true type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. + title: BatchError + BatchRequestCounts: properties: - type: - const: json_schema - default: json_schema - title: Type + 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 + Chunk-Output: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + type: array + title: list[ImageContentItem-Output | TextContentItem] + title: string | list[ImageContentItem-Output | TextContentItem] + chunk_id: type: string - json_schema: + title: Chunk Id + metadata: additionalProperties: true - title: Json Schema type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + type: object required: - - json_schema - title: JsonSchemaResponseFormat + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + 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. + Errors: + properties: + data: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + object: + anyOf: + - type: string + - type: 'null' + additionalProperties: true type: object - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat + title: Errors + 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 + 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 + InputTokensDetails: + properties: + cached_tokens: + type: integer + title: Cached Tokens + additionalProperties: true + type: object + required: + - cached_tokens + title: InputTokensDetails + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. MCPListToolsTool: - description: Tool definition returned by MCP list tools operation. properties: input_schema: additionalProperties: true - title: Input Schema type: object + title: Input Schema name: - title: Name type: string + title: Name description: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - input_schema - name title: MCPListToolsTool - type: object - OpenAIResponseOutputMessageFileSearchToolCallResults: - description: Search results returned by the file search operation. + description: Tool definition returned by MCP list tools operation. + OpenAIAssistantMessageParam-Input: 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 + role: type: string - required: - - attributes - - file_id - - filename - - score - - text - title: OpenAIResponseOutputMessageFileSearchToolCallResults - type: object - AllowedToolsFilter: - description: Filter configuration for restricting which MCP tools can be used. - properties: - tool_names: + const: assistant + title: Role + default: assistant + content: anyOf: + - type: string - items: - type: string + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - nullable: true - title: AllowedToolsFilter - type: object - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. - properties: - always: + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' - nullable: true - never: + tool_calls: anyOf: - items: - type: string + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - type: 'null' - nullable: true - title: ApprovalFilter type: object - SearchRankingOptions: - description: Options for ranking and filtering search results. + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: properties: - ranker: + role: + type: string + const: assistant + title: Role + default: assistant + content: anyOf: - type: string - - type: 'null' - nullable: true - score_threshold: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + OpenAIResponseMessage-Output: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + type: string + const: message + title: Type + default: message + id: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + 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. + 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. + OpenAIResponseTextFormat: + properties: + type: + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text + name: + anyOf: + - type: string + - type: 'null' + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + description: + anyOf: + - type: string + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + OpenAIUserMessageParam-Input: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OpenAIUserMessageParam-Output: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OutputTokensDetails: + properties: + reasoning_tokens: + type: integer + title: Reasoning Tokens + additionalProperties: true + type: object + required: + - reasoning_tokens + title: OutputTokensDetails + SearchRankingOptions: + properties: + ranker: + anyOf: + - type: string + - type: 'null' + score_threshold: anyOf: - type: number - type: 'null' default: 0.0 + type: object title: SearchRankingOptions + description: Options for ranking and filtering search results. + V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + type: object + required: + - input_rows + - scoring_functions + - benchmark_config + title: V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest + V1AlphaInferenceRerankPostRequest: + properties: + model: + type: string + title: Model + query: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + items: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + type: array + title: Items + max_num_results: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - model + - query + - items + title: V1AlphaInferenceRerankPostRequest + V1AlphaPostTrainingPreferenceOptimizePostRequest: + properties: + job_uuid: + type: string + title: Job Uuid + finetuned_model: + type: string + title: Finetuned Model + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: V1AlphaPostTrainingPreferenceOptimizePostRequest + V1AlphaPostTrainingSupervisedFineTunePostRequest: + properties: + job_uuid: + type: string + title: Job Uuid + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + model: + anyOf: + - type: string + - type: 'null' + description: Model descriptor for training if not in provider config` + checkpoint_dir: + anyOf: + - type: string + - type: 'null' + algorithm_config: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + title: LoraFinetuningConfig | QATFinetuningConfig + - type: 'null' + title: Algorithm Config + type: object + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: V1AlphaPostTrainingSupervisedFineTunePostRequest + _URLOrData: + properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + title: URL + data: + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + type: object + title: _URLOrData + description: A URL or a base64 encoded string + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat OpenAIResponseContentPart: discriminator: mapping: @@ -7444,56 +7915,6 @@ components: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' title: OpenAIResponseContentPartReasoningText title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseTextFormat: - description: Configuration for Responses API text format. - properties: - type: - title: Type - type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - title: OpenAIResponseTextFormat - type: object - OpenAIResponseUsageInputTokensDetails: - description: Token details for input tokens in OpenAI response usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageInputTokensDetails - type: object - OpenAIResponseUsageOutputTokensDetails: - description: Token details for output tokens in OpenAI response usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageOutputTokensDetails - type: object SpanEndPayload: description: Payload for a span end event. properties: @@ -7715,110 +8136,6 @@ components: - $ref: '#/components/schemas/StructuredLogEvent' title: StructuredLogEvent title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - BatchError: - additionalProperties: true - properties: - code: - anyOf: - - type: string - - type: 'null' - nullable: true - line: - anyOf: - - type: integer - - type: 'null' - nullable: true - message: - anyOf: - - type: string - - type: 'null' - nullable: true - param: - anyOf: - - type: string - - type: 'null' - nullable: true - title: BatchError - type: object - BatchRequestCounts: - additionalProperties: true - properties: - completed: - title: Completed - type: integer - failed: - title: Failed - type: integer - total: - title: Total - type: integer - required: - - completed - - failed - - total - title: BatchRequestCounts - type: object - BatchUsage: - additionalProperties: true - properties: - input_tokens: - title: Input Tokens - type: integer - input_tokens_details: - $ref: '#/components/schemas/InputTokensDetails' - output_tokens: - title: Output Tokens - type: integer - output_tokens_details: - $ref: '#/components/schemas/OutputTokensDetails' - total_tokens: - title: Total Tokens - type: integer - required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage - type: object - Errors: - additionalProperties: true - properties: - data: - anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array - - type: 'null' - nullable: true - object: - anyOf: - - type: string - - type: 'null' - nullable: true - title: Errors - type: object - InputTokensDetails: - additionalProperties: true - properties: - cached_tokens: - title: Cached Tokens - type: integer - required: - - cached_tokens - title: InputTokensDetails - type: object - OutputTokensDetails: - additionalProperties: true - properties: - reasoning_tokens: - title: Reasoning Tokens - type: integer - required: - - reasoning_tokens - title: OutputTokensDetails - type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -7850,16 +8167,6 @@ components: - text title: TextDelta type: object - JobStatus: - description: Status of a job execution. - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string MetricInResponse: description: A metric value included in API responses. properties: @@ -7975,14 +8282,6 @@ components: - status title: ConversationMessage type: object - DatasetPurpose: - description: Purpose of the dataset. Each purpose has a required input data schema. - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string Api: description: Enumeration of all available APIs in the Llama Stack system. enum: @@ -8311,26 +8610,6 @@ components: default: int4_weight_int8_dynamic_activation title: Int4QuantizationConfig type: object - OpenAIChatCompletionUsageCompletionTokensDetails: - description: Token details for output tokens in OpenAI chat completion usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object - OpenAIChatCompletionUsagePromptTokensDetails: - description: Token details for prompt tokens in OpenAI chat completion usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - type: object OpenAICompletionLogprobs: description: |- The log probabilities for the tokens in the message from an OpenAI-compatible completion response. @@ -8501,13 +8780,6 @@ components: - content title: UserMessage type: object - HealthStatus: - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - type: string PostTrainingJobLogStream: description: Stream of logs from a finetuning job. properties: @@ -8688,3 +8960,131 @@ components: - query title: VectorStoreSearchRequest type: object + responses: + BadRequest400: + description: The request was invalid or malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 400 + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 429 + title: Too Many Requests + detail: You have exceeded the rate limit. Please try again later. + InternalServerError500: + description: The server encountered an unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 500 + title: Internal Server Error + detail: An unexpected error occurred + DefaultError: + description: An error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/Error' +tags: +- description: APIs for creating and interacting with agentic systems. + name: Agents + x-displayName: Agents +- description: |- + The API is designed to allow use of openai client libraries for seamless integration. + + This API provides the following extensions: + - idempotent batch creation + + Note: This API is currently under active development and may undergo changes. + name: Batches + x-displayName: The Batches API enables efficient processing of multiple requests in a single operation, particularly useful for processing large datasets, batch evaluation workflows, and cost-effective inference at scale. +- description: '' + name: Benchmarks +- description: Protocol for conversation management operations. + name: Conversations + x-displayName: Conversations +- description: '' + name: DatasetIO +- description: '' + name: Datasets +- description: Llama Stack Evaluation API for running evaluations on model and agent candidates. + name: Eval + x-displayName: Evaluations +- description: This API is used to upload documents that can be used with other Llama Stack APIs. + name: Files + x-displayName: Files +- description: |- + Llama Stack Inference API for generating completions, chat completions, and embeddings. + + This API provides the raw interface to the underlying models. Three kinds of models are supported: + - LLM models: these models generate "raw" and "chat" (conversational) completions. + - Embedding models: these models generate embeddings to be used for semantic search. + - Rerank models: these models reorder the documents based on their relevance to a query. + name: Inference + x-displayName: Inference +- description: APIs for inspecting the Llama Stack service, including health status, available API routes with methods and implementing providers. + name: Inspect + x-displayName: Inspect +- description: '' + name: Models +- description: '' + name: PostTraining (Coming Soon) +- description: Protocol for prompt management operations. + name: Prompts + x-displayName: Prompts +- description: Providers API for inspecting, listing, and modifying providers and their configurations. + name: Providers + x-displayName: Providers +- description: OpenAI-compatible Moderations API. + name: Safety + x-displayName: Safety +- description: '' + name: Scoring +- description: '' + name: ScoringFunctions +- description: '' + name: Shields +- description: '' + name: ToolGroups +- description: '' + name: ToolRuntime +- description: '' + name: VectorIO +x-tagGroups: +- name: Operations + tags: + - Agents + - Batches + - Benchmarks + - Conversations + - DatasetIO + - Datasets + - Eval + - Files + - Inference + - Inspect + - Models + - PostTraining (Coming Soon) + - Prompts + - Providers + - Safety + - Scoring + - ScoringFunctions + - Shields + - ToolGroups + - ToolRuntime + - VectorIO +security: +- Default: [] diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index b4d16eaed4..f9872e42bf 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -14,63 +14,86 @@ servers: paths: /v1/batches: get: - tags: - - Batches - summary: List Batches - operationId: list_batches_v1_batches_get responses: '200': - description: Successful Response + description: A list of batch objects. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListBatchesResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Batches - summary: Create Batch - operationId: create_batch_v1_batches_post + summary: List Batches + description: List all batches for the current user. + operationId: list_batches_v1_batches_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + post: responses: '200': - description: Successful Response + description: The created batch object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Batch' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/batches/{batch_id}: - get: + description: Default Response tags: - Batches - summary: Retrieve Batch - operationId: retrieve_batch_v1_batches__batch_id__get + summary: Create Batch + description: Create a new batch for processing multiple API requests. + operationId: create_batch_v1_batches_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BatchesPostRequest' + /v1/batches/{batch_id}: + get: responses: '200': - description: Successful Response + description: The batch object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Batch' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -83,6 +106,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Batches + summary: Retrieve Batch + description: Retrieve information about a specific batch. + operationId: retrieve_batch_v1_batches__batch_id__get parameters: - name: batch_id in: path @@ -92,16 +120,13 @@ paths: description: 'Path parameter: batch_id' /v1/batches/{batch_id}/cancel: post: - tags: - - Batches - summary: Cancel Batch - operationId: cancel_batch_v1_batches__batch_id__cancel_post responses: '200': - description: Successful Response + description: The updated batch object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Batch' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -114,6 +139,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Batches + summary: Cancel Batch + description: Cancel a batch that is in progress. + operationId: cancel_batch_v1_batches__batch_id__cancel_post parameters: - name: batch_id in: path @@ -123,63 +153,111 @@ paths: description: 'Path parameter: batch_id' /v1/chat/completions: get: - tags: - - Inference - summary: List Chat Completions - operationId: list_chat_completions_v1_chat_completions_get responses: '200': - description: Successful Response + description: A ListOpenAIChatCompletionResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Inference - summary: Openai Chat Completion - operationId: openai_chat_completion_v1_chat_completions_post + summary: List Chat Completions + description: List chat completions. + operationId: list_chat_completions_v1_chat_completions_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + post: responses: '200': - description: Successful Response + description: An OpenAIChatCompletion. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIChatCompletion' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionChunk' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/chat/completions/{completion_id}: - get: + description: Default Response tags: - Inference - summary: Get Chat Completion - operationId: get_chat_completion_v1_chat_completions__completion_id__get + summary: Openai Chat Completion + description: |- + Create chat completions. + + Generate an OpenAI-compatible chat completion for the given messages using the specified model. + operationId: openai_chat_completion_v1_chat_completions_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody' + /v1/chat/completions/{completion_id}: + get: responses: '200': - description: Successful Response + description: A OpenAICompletionWithInputMessages. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -192,6 +270,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: Get Chat Completion + description: |- + Get chat completion. + + Describe a chat completion by its ID. + operationId: get_chat_completion_v1_chat_completions__completion_id__get parameters: - name: completion_id in: path @@ -201,16 +287,13 @@ paths: description: 'Path parameter: completion_id' /v1/completions: post: - tags: - - Inference - summary: Openai Completion - operationId: openai_completion_v1_completions_post responses: '200': - description: Successful Response + description: An OpenAICompletion. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAICompletion' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -223,18 +306,29 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: Openai Completion + description: |- + Create completion. + + Generate an OpenAI-compatible completion for the given prompt using the specified model. + operationId: openai_completion_v1_completions_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' + required: true /v1/conversations: post: - tags: - - Conversations - summary: Create Conversation - operationId: create_conversation_v1_conversations_post responses: '200': - description: Successful Response + description: The created conversation object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Conversation' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -247,18 +341,29 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/conversations/{conversation_id}: - get: tags: - Conversations - summary: Get Conversation - operationId: get_conversation_v1_conversations__conversation_id__get + summary: Create Conversation + description: |- + Create a conversation. + + Create a conversation. + operationId: create_conversation_v1_conversations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationsPostRequest' + required: true + /v1/conversations/{conversation_id}: + get: responses: '200': - description: Successful Response + description: The conversation object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Conversation' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -271,6 +376,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Get Conversation + description: |- + Retrieve a conversation. + + Get a conversation with the given ID. + operationId: get_conversation_v1_conversations__conversation_id__get parameters: - name: conversation_id in: path @@ -279,16 +392,13 @@ paths: type: string description: 'Path parameter: conversation_id' post: - tags: - - Conversations - summary: Update Conversation - operationId: update_conversation_v1_conversations__conversation_id__post responses: '200': - description: Successful Response + description: The updated conversation object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Conversation' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -301,6 +411,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Update Conversation + description: |- + Update a conversation. + + Update a conversation's metadata with the given ID. + operationId: update_conversation_v1_conversations__conversation_id__post parameters: - name: conversation_id in: path @@ -308,17 +426,20 @@ paths: schema: type: string description: 'Path parameter: conversation_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationsByConversationIdPostRequest' + required: true delete: - tags: - - Conversations - summary: Openai Delete Conversation - operationId: openai_delete_conversation_v1_conversations__conversation_id__delete responses: '200': - description: Successful Response + description: The deleted conversation resource. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ConversationDeletedResource' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -331,6 +452,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Openai Delete Conversation + description: |- + Delete a conversation. + + Delete a conversation with the given ID. + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete parameters: - name: conversation_id in: path @@ -340,58 +469,105 @@ paths: description: 'Path parameter: conversation_id' /v1/conversations/{conversation_id}/items: get: - tags: - - Conversations - summary: List Items - operationId: list_items_v1_conversations__conversation_id__items_get responses: '200': - description: Successful Response + description: List of conversation items. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ConversationItemList' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Conversations + summary: List Items + description: |- + List items. + + List items in the conversation. + operationId: list_items_v1_conversations__conversation_id__items_get parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - enum: + - asc + - desc + type: string + - type: 'null' + title: Order - name: conversation_id in: path required: true schema: type: string description: 'Path parameter: conversation_id' + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + $ref: '#/components/schemas/ConversationItemInclude' + - type: 'null' + title: Include post: - tags: - - Conversations - summary: Add Items - operationId: add_items_v1_conversations__conversation_id__items_post responses: '200': - description: Successful Response + description: List of created items. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ConversationItemList' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Conversations + summary: Add Items + description: |- + Create items. + + Create items in the conversation. + operationId: add_items_v1_conversations__conversation_id__items_post parameters: - name: conversation_id in: path @@ -399,18 +575,21 @@ paths: schema: type: string description: 'Path parameter: conversation_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationsByConversationIdItemsPostRequest' /v1/conversations/{conversation_id}/items/{item_id}: get: - tags: - - Conversations - summary: Retrieve - operationId: retrieve_v1_conversations__conversation_id__items__item_id__get responses: '200': - description: Successful Response + description: The conversation item. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIResponseMessage' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -423,6 +602,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Retrieve + description: |- + Retrieve an item. + + Retrieve a conversation item. + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get parameters: - name: conversation_id in: path @@ -437,16 +624,13 @@ paths: type: string description: 'Path parameter: item_id' delete: - tags: - - Conversations - summary: Openai Delete Conversation Item - operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete responses: '200': - description: Successful Response + description: The deleted item resource. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ConversationItemDeletedResource' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -459,6 +643,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Openai Delete Conversation Item + description: |- + Delete an item. + + Delete a conversation item. + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete parameters: - name: conversation_id in: path @@ -474,16 +666,13 @@ paths: description: 'Path parameter: item_id' /v1/embeddings: post: - tags: - - Inference - summary: Openai Embeddings - operationId: openai_embeddings_v1_embeddings_post responses: '200': - description: Successful Response + description: An OpenAIEmbeddingsResponse containing the embeddings. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIEmbeddingsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -496,65 +685,132 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: Openai Embeddings + description: |- + Create embeddings. + + Generate OpenAI-compatible embeddings for the given input using the specified model. + operationId: openai_embeddings_v1_embeddings_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' + required: true /v1/files: get: - tags: - - Files - summary: Openai List Files - operationId: openai_list_files_v1_files_get responses: '200': - description: Successful Response + description: An ListOpenAIFileResponse containing the list of files. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListOpenAIFileResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Files - summary: Openai Upload File - operationId: openai_upload_file_v1_files_post + summary: Openai List Files + description: |- + List files. + + Returns a list of files that belong to the user's organization. + operationId: openai_list_files_v1_files_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 10000 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + - name: purpose + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/OpenAIFilePurpose' + - type: 'null' + title: Purpose + post: responses: '200': - description: Successful Response + description: An OpenAIFileObject representing the uploaded file. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIFileObject' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/files/{file_id}: - get: + description: Default Response tags: - Files - summary: Openai Retrieve File - operationId: openai_retrieve_file_v1_files__file_id__get + summary: Openai Upload File + description: |- + Upload file. + + Upload a file that can be used across various endpoints. + + The file upload should be a multipart form request with: + - file: The File object (not file name) to be uploaded. + - purpose: The intended purpose of the uploaded file. + - expires_after: Optional form values describing expiration for the file. + operationId: openai_upload_file_v1_files_post + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_openai_upload_file_v1_files_post' + /v1/files/{file_id}: + get: responses: '200': - description: Successful Response + description: An OpenAIFileObject containing file information. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIFileObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -567,6 +823,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: Openai Retrieve File + description: |- + Retrieve file. + + Returns information about a specific file. + operationId: openai_retrieve_file_v1_files__file_id__get parameters: - name: file_id in: path @@ -575,16 +839,13 @@ paths: type: string description: 'Path parameter: file_id' delete: - tags: - - Files - summary: Openai Delete File - operationId: openai_delete_file_v1_files__file_id__delete responses: '200': - description: Successful Response + description: An OpenAIFileDeleteResponse indicating successful deletion. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIFileDeleteResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -597,6 +858,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: Openai Delete File + description: Delete file. + operationId: openai_delete_file_v1_files__file_id__delete parameters: - name: file_id in: path @@ -606,16 +872,13 @@ paths: description: 'Path parameter: file_id' /v1/files/{file_id}/content: get: - tags: - - Files - summary: Openai Retrieve File Content - operationId: openai_retrieve_file_content_v1_files__file_id__content_get responses: '200': - description: Successful Response + description: The raw file content as a binary response. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Response' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -628,6 +891,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: Openai Retrieve File Content + description: |- + Retrieve file content. + + Returns the contents of the specified file. + operationId: openai_retrieve_file_content_v1_files__file_id__content_get parameters: - name: file_id in: path @@ -637,16 +908,13 @@ paths: description: 'Path parameter: file_id' /v1/health: get: - tags: - - Inspect - summary: Health - operationId: health_v1_health_get responses: '200': - description: Successful Response + description: Health information indicating if the service is operational. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/HealthInfo' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -659,42 +927,66 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/inspect/routes: - get: tags: - Inspect - summary: List Routes - operationId: list_routes_v1_inspect_routes_get + summary: Health + description: |- + Get health status. + + Get the current health status of the service. + operationId: health_v1_health_get + /v1/inspect/routes: + get: responses: '200': - description: Successful Response + description: Response containing information about all available routes. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListRoutesResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Inspect + summary: List Routes + description: |- + List routes. + + List all available API routes with their methods and implementing providers. + operationId: list_routes_v1_inspect_routes_get + parameters: + - name: api_filter + in: query + required: false + schema: + anyOf: + - enum: + - v1 + - v1alpha + - v1beta + - deprecated + type: string + - type: 'null' + title: Api Filter /v1/models: get: - tags: - - Models - summary: Openai List Models - operationId: openai_list_models_v1_models_get responses: '200': - description: Successful Response + description: A OpenAIListModelsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIListModelsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -707,18 +999,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/models/{model_id}: - get: tags: - Models - summary: Get Model - operationId: get_model_v1_models__model_id__get + summary: Openai List Models + description: List models using the OpenAI API. + operationId: openai_list_models_v1_models_get + /v1/models/{model_id}: + get: responses: '200': - description: Successful Response + description: A Model. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Model' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -731,6 +1025,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Models + summary: Get Model + description: |- + Get model. + + Get a model by its identifier. + operationId: get_model_v1_models__model_id__get parameters: - name: model_id in: path @@ -740,16 +1042,13 @@ paths: description: 'Path parameter: model_id' /v1/moderations: post: - tags: - - Safety - summary: Run Moderation - operationId: run_moderation_v1_moderations_post responses: '200': - description: Successful Response + description: A moderation object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ModerationObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -762,18 +1061,29 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Safety + summary: Run Moderation + description: |- + Create moderation. + + Classifies if text and/or image inputs are potentially harmful. + operationId: run_moderation_v1_moderations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ModerationsPostRequest' + required: true /v1/prompts: get: - tags: - - Prompts - summary: List Prompts - operationId: list_prompts_v1_prompts_get responses: '200': - description: Successful Response + description: A ListPromptsResponse containing all prompts. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListPromptsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -786,17 +1096,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: tags: - Prompts - summary: Create Prompt - operationId: create_prompt_v1_prompts_post + summary: List Prompts + description: List all prompts. + operationId: list_prompts_v1_prompts_get + post: responses: '200': - description: Successful Response + description: The created Prompt resource. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Prompt' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -809,31 +1121,58 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/prompts/{prompt_id}: - get: tags: - Prompts - summary: Get Prompt - operationId: get_prompt_v1_prompts__prompt_id__get + summary: Create Prompt + description: |- + Create prompt. + + Create a new prompt. + operationId: create_prompt_v1_prompts_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromptsPostRequest' + required: true + /v1/prompts/{prompt_id}: + get: responses: '200': - description: Successful Response + description: A Prompt resource. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Prompt' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Prompts + summary: Get Prompt + description: |- + Get prompt. + + Get a prompt by its identifier and optional version. + operationId: get_prompt_v1_prompts__prompt_id__get parameters: + - name: version + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Version - name: prompt_id in: path required: true @@ -841,28 +1180,33 @@ paths: type: string description: 'Path parameter: prompt_id' post: - tags: - - Prompts - summary: Update Prompt - operationId: update_prompt_v1_prompts__prompt_id__post responses: '200': - description: Successful Response + description: The updated Prompt resource with incremented version. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Prompt' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Prompts + summary: Update Prompt + description: |- + Update prompt. + + Update an existing prompt (increments version). + operationId: update_prompt_v1_prompts__prompt_id__post parameters: - name: prompt_id in: path @@ -870,11 +1214,13 @@ paths: schema: type: string description: 'Path parameter: prompt_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PromptsByPromptIdPostRequest' delete: - tags: - - Prompts - summary: Delete Prompt - operationId: delete_prompt_v1_prompts__prompt_id__delete responses: '200': description: Successful Response @@ -882,17 +1228,25 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Prompts + summary: Delete Prompt + description: |- + Delete prompt. + + Delete a prompt. + operationId: delete_prompt_v1_prompts__prompt_id__delete parameters: - name: prompt_id in: path @@ -902,16 +1256,13 @@ paths: description: 'Path parameter: prompt_id' /v1/prompts/{prompt_id}/set-default-version: post: - tags: - - Prompts - summary: Set Default Version - operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post responses: '200': - description: Successful Response + description: The prompt with the specified version now set as default. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Prompt' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -924,6 +1275,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Prompts + summary: Set Default Version + description: |- + Set prompt version. + + Set which version of a prompt should be the default in get_prompt (latest). + operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post parameters: - name: prompt_id in: path @@ -931,18 +1290,21 @@ paths: schema: type: string description: 'Path parameter: prompt_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromptsByPromptIdSetDefaultVersionPostRequest' + required: true /v1/prompts/{prompt_id}/versions: get: - tags: - - Prompts - summary: List Prompt Versions - operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get responses: '200': - description: Successful Response + description: A ListPromptsResponse containing all versions of the prompt. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListPromptsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -955,6 +1317,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Prompts + summary: List Prompt Versions + description: |- + List prompt versions. + + List all versions of a specific prompt. + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get parameters: - name: prompt_id in: path @@ -964,16 +1334,13 @@ paths: description: 'Path parameter: prompt_id' /v1/providers: get: - tags: - - Providers - summary: List Providers - operationId: list_providers_v1_providers_get responses: '200': - description: Successful Response + description: A ListProvidersResponse containing information about all providers. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListProvidersResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -986,18 +1353,23 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/providers/{provider_id}: - get: tags: - Providers - summary: Inspect Provider - operationId: inspect_provider_v1_providers__provider_id__get + summary: List Providers + description: |- + List providers. + + List all available providers. + operationId: list_providers_v1_providers_get + /v1/providers/{provider_id}: + get: responses: '200': - description: Successful Response + description: A ProviderInfo object containing the provider's details. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ProviderInfo' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1010,6 +1382,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Providers + summary: Inspect Provider + description: |- + Get provider. + + Get detailed information about a specific provider. + operationId: inspect_provider_v1_providers__provider_id__get parameters: - name: provider_id in: path @@ -1019,63 +1399,132 @@ paths: description: 'Path parameter: provider_id' /v1/responses: get: - tags: - - Agents - summary: List Openai Responses - operationId: list_openai_responses_v1_responses_get responses: '200': - description: Successful Response + description: A ListOpenAIResponseObject. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListOpenAIResponseObject' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Agents - summary: Create Openai Response - operationId: create_openai_response_v1_responses_post + summary: List Openai Responses + description: List all responses. + operationId: list_openai_responses_v1_responses_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 50 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + post: responses: '200': - description: Successful Response + description: An OpenAIResponseObject. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIResponseObject' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIResponseObjectStream' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/responses/{response_id}: - get: + description: Default Response tags: - Agents - summary: Get Openai Response - operationId: get_openai_response_v1_responses__response_id__get + summary: Create Openai Response + description: Create a model response. + operationId: create_openai_response_v1_responses_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ResponsesPostRequest' + x-llama-stack-extra-body-params: + guardrails: + $defs: + ResponseGuardrailSpec: + description: |- + Specification for a guardrail to apply during response generation. + + :param type: The type/identifier of the guardrail. + properties: + type: + title: Type + type: string + required: + - type + title: ResponseGuardrailSpec + type: object + anyOf: + - items: + anyOf: + - type: string + - $ref: '#/components/schemas/ResponseGuardrailSpec' + type: array + - type: 'null' + description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. + /v1/responses/{response_id}: + get: responses: '200': - description: Successful Response + description: An OpenAIResponseObject. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIResponseObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1088,6 +1537,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Get Openai Response + description: Get a model response. + operationId: get_openai_response_v1_responses__response_id__get parameters: - name: response_id in: path @@ -1096,16 +1550,13 @@ paths: type: string description: 'Path parameter: response_id' delete: - tags: - - Agents - summary: Delete Openai Response - operationId: delete_openai_response_v1_responses__response_id__delete responses: '200': - description: Successful Response + description: An OpenAIDeleteResponseObject content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIDeleteResponseObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1118,6 +1569,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Delete Openai Response + description: Delete a response. + operationId: delete_openai_response_v1_responses__response_id__delete parameters: - name: response_id in: path @@ -1127,47 +1583,90 @@ paths: description: 'Path parameter: response_id' /v1/responses/{response_id}/input_items: get: - tags: - - Agents - summary: List Openai Response Input Items - operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get responses: '200': - description: Successful Response + description: An ListOpenAIResponseInputItem. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListOpenAIResponseInputItem' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Agents + summary: List Openai Response Input Items + description: List input items. + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order - name: response_id in: path required: true schema: type: string description: 'Path parameter: response_id' + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Include /v1/safety/run-shield: post: - tags: - - Safety - summary: Run Shield - operationId: run_shield_v1_safety_run_shield_post responses: '200': - description: Successful Response + description: A RunShieldResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/RunShieldResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1180,42 +1679,55 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Safety + summary: Run Shield + description: |- + Run shield. + + Run a shield. + operationId: run_shield_v1_safety_run_shield_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SafetyRunShieldPostRequest' + required: true /v1/scoring-functions: get: - tags: - - Scoring Functions - summary: List Scoring Functions - operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': - description: Successful Response + description: A ListScoringFunctionsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListScoringFunctionsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring-functions/{scoring_fn_id}: - get: + description: Default Response tags: - Scoring Functions - summary: Get Scoring Function - operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get + summary: List Scoring Functions + description: List all scoring functions. + operationId: list_scoring_functions_v1_scoring_functions_get + /v1/scoring-functions/{scoring_fn_id}: + get: responses: '200': - description: Successful Response + description: A ScoringFn. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ScoringFn' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1228,6 +1740,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Scoring Functions + summary: Get Scoring Function + description: Get a scoring function by its ID. + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get parameters: - name: scoring_fn_id in: path @@ -1237,16 +1754,13 @@ paths: description: 'Path parameter: scoring_fn_id' /v1/scoring/score: post: - tags: - - Scoring - summary: Score - operationId: score_v1_scoring_score_post responses: '200': - description: Successful Response + description: A ScoreResponse object containing rows and aggregated results. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ScoreResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1259,18 +1773,26 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring/score-batch: - post: tags: - Scoring - summary: Score Batch - operationId: score_batch_v1_scoring_score_batch_post + summary: Score + description: Score a list of rows. + operationId: score_v1_scoring_score_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScoringScorePostRequest' + required: true + /v1/scoring/score-batch: + post: responses: '200': - description: Successful Response + description: A ScoreBatchResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ScoreBatchResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1283,18 +1805,26 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/shields: - get: tags: - - Shields - summary: List Shields - operationId: list_shields_v1_shields_get + - Scoring + summary: Score Batch + description: Score a batch of rows. + operationId: score_batch_v1_scoring_score_batch_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScoringScoreBatchPostRequest' + required: true + /v1/shields: + get: responses: '200': - description: Successful Response + description: A ListShieldsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListShieldsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1307,18 +1837,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/shields/{identifier}: - get: tags: - Shields - summary: Get Shield - operationId: get_shield_v1_shields__identifier__get + summary: List Shields + description: List all shields. + operationId: list_shields_v1_shields_get + /v1/shields/{identifier}: + get: responses: '200': - description: Successful Response + description: A Shield. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Shield' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1331,6 +1863,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Shields + summary: Get Shield + description: Get a shield by its identifier. + operationId: get_shield_v1_shields__identifier__get parameters: - name: identifier in: path @@ -1340,16 +1877,13 @@ paths: description: 'Path parameter: identifier' /v1/tool-runtime/invoke: post: - tags: - - Tool Runtime - summary: Invoke Tool - operationId: invoke_tool_v1_tool_runtime_invoke_post responses: '200': - description: Successful Response + description: A ToolInvocationResult. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ToolInvocationResult' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1362,66 +1896,103 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tool-runtime/list-tools: - get: tags: - Tool Runtime - summary: List Runtime Tools - operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + summary: Invoke Tool + description: Run a tool with the given arguments. + operationId: invoke_tool_v1_tool_runtime_invoke_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ToolRuntimeInvokePostRequest' + required: true + /v1/tool-runtime/list-tools: + get: responses: '200': - description: Successful Response + description: A ListToolDefsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListToolDefsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Tool Runtime + summary: List Runtime Tools + description: List all tools in the runtime. + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + parameters: + - name: authorization + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Authorization + - name: tool_group_id + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Tool Group Id + - name: mcp_endpoint + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + title: Mcp Endpoint /v1/toolgroups: get: - tags: - - Tool Groups - summary: List Tool Groups - operationId: list_tool_groups_v1_toolgroups_get responses: '200': - description: Successful Response + description: A ListToolGroupsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListToolGroupsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/toolgroups/{toolgroup_id}: - get: + description: Default Response tags: - Tool Groups - summary: Get Tool Group - operationId: get_tool_group_v1_toolgroups__toolgroup_id__get + summary: List Tool Groups + description: List tool groups with optional provider. + operationId: list_tool_groups_v1_toolgroups_get + /v1/toolgroups/{toolgroup_id}: + get: responses: '200': - description: Successful Response + description: A ToolGroup. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ToolGroup' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1434,6 +2005,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Tool Groups + summary: Get Tool Group + description: Get a tool group by its ID. + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get parameters: - name: toolgroup_id in: path @@ -1443,40 +2019,48 @@ paths: description: 'Path parameter: toolgroup_id' /v1/tools: get: - tags: - - Tool Groups - summary: List Tools - operationId: list_tools_v1_tools_get responses: '200': - description: Successful Response + description: A ListToolDefsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListToolDefsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tools/{tool_name}: - get: + description: Default Response tags: - Tool Groups - summary: Get Tool - operationId: get_tool_v1_tools__tool_name__get + summary: List Tools + description: List tools with optional tool group. + operationId: list_tools_v1_tools_get + parameters: + - name: toolgroup_id + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Toolgroup Id + /v1/tools/{tool_name}: + get: responses: '200': - description: Successful Response + description: A ToolDef. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ToolDef' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1489,6 +2073,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Tool Groups + summary: Get Tool + description: Get a tool by its name. + operationId: get_tool_v1_tools__tool_name__get parameters: - name: tool_name in: path @@ -1498,10 +2087,6 @@ paths: description: 'Path parameter: tool_name' /v1/vector-io/insert: post: - tags: - - Vector Io - summary: Insert Chunks - operationId: insert_chunks_v1_vector_io_insert_post responses: '200': description: Successful Response @@ -1509,29 +2094,40 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector-io/query: - post: + description: Default Response tags: - Vector Io - summary: Query Chunks - operationId: query_chunks_v1_vector_io_query_post + summary: Insert Chunks + description: Insert chunks into a vector database. + operationId: insert_chunks_v1_vector_io_insert_post + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Chunk-Input' + title: Chunks + /v1/vector-io/query: + post: responses: '200': - description: Successful Response + description: A QueryChunksResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/QueryChunksResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1544,65 +2140,121 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector_stores: - get: tags: - Vector Io - summary: Openai List Vector Stores - operationId: openai_list_vector_stores_v1_vector_stores_get + summary: Query Chunks + description: Query chunks from a vector database. + operationId: query_chunks_v1_vector_io_query_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorIoQueryPostRequest' + required: true + /v1/vector_stores: + get: responses: '200': - description: Successful Response + description: A VectorStoreListResponse containing the list of vector stores. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreListResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Vector Io - summary: Openai Create Vector Store - operationId: openai_create_vector_store_v1_vector_stores_post + summary: Openai List Vector Stores + description: Returns a list of vector stores. + operationId: openai_list_vector_stores_v1_vector_stores_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order + post: responses: '200': - description: Successful Response + description: A VectorStoreObject representing the created vector store. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreObject' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector_stores/{vector_store_id}: - get: + description: Default Response tags: - Vector Io - summary: Openai Retrieve Vector Store - operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get + summary: Openai Create Vector Store + description: |- + Creates a vector store. + + Generate an OpenAI-compatible vector store with the given parameters. + operationId: openai_create_vector_store_v1_vector_stores_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICreateVectorStoreRequestWithExtraBody' + /v1/vector_stores/{vector_store_id}: + get: responses: '200': - description: Successful Response + description: A VectorStoreObject representing the vector store. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1615,6 +2267,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Retrieve Vector Store + description: Retrieves a vector store. + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get parameters: - name: vector_store_id in: path @@ -1623,16 +2280,13 @@ paths: type: string description: 'Path parameter: vector_store_id' post: - tags: - - Vector Io - summary: Openai Update Vector Store - operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post responses: '200': - description: Successful Response + description: A VectorStoreObject representing the updated vector store. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1645,6 +2299,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Update Vector Store + description: Updates a vector store. + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post parameters: - name: vector_store_id in: path @@ -1652,17 +2311,20 @@ paths: schema: type: string description: 'Path parameter: vector_store_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoresByVectorStoreIdPostRequest' + required: true delete: - tags: - - Vector Io - summary: Openai Delete Vector Store - operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete responses: '200': - description: Successful Response + description: A VectorStoreDeleteResponse indicating the deletion status. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreDeleteResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1675,6 +2337,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Delete Vector Store + description: Delete a vector store. + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete parameters: - name: vector_store_id in: path @@ -1684,16 +2351,13 @@ paths: description: 'Path parameter: vector_store_id' /v1/vector_stores/{vector_store_id}/file_batches: post: - tags: - - Vector Io - summary: Openai Create Vector Store File Batch - operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post responses: '200': - description: Successful Response + description: A VectorStoreFileBatchObject representing the created file batch. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1706,6 +2370,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Create Vector Store File Batch + description: |- + Create a vector store file batch. + + Generate an OpenAI-compatible vector store file batch for the given vector store. + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post parameters: - name: vector_store_id in: path @@ -1713,18 +2385,21 @@ paths: schema: type: string description: 'Path parameter: vector_store_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICreateVectorStoreFileBatchRequestWithExtraBody' + required: true /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: get: - tags: - - Vector Io - summary: Openai Retrieve Vector Store File Batch - operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get responses: '200': - description: Successful Response + description: A VectorStoreFileBatchObject representing the file batch. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1737,6 +2412,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Retrieve Vector Store File Batch + description: Retrieve a vector store file batch. + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get parameters: - name: vector_store_id in: path @@ -1752,16 +2432,13 @@ paths: description: 'Path parameter: batch_id' /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: post: - tags: - - Vector Io - summary: Openai Cancel Vector Store File Batch - operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post responses: '200': - description: Successful Response + description: A VectorStoreFileBatchObject representing the cancelled file batch. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1774,6 +2451,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Cancel Vector Store File Batch + description: Cancels a vector store file batch. + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post parameters: - name: vector_store_id in: path @@ -1789,29 +2471,73 @@ paths: description: 'Path parameter: batch_id' /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: get: - tags: - - Vector Io - summary: Openai List Files In Vector Store File Batch - operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get responses: '200': - description: Successful Response + description: A VectorStoreFilesListInBatchResponse containing the list of files in the batch. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Vector Io + summary: Openai List Files In Vector Store File Batch + description: Returns a list of vector store files in a batch. + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: filter + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Filter + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order - name: vector_store_id in: path required: true @@ -1826,29 +2552,78 @@ paths: description: 'Path parameter: batch_id' /v1/vector_stores/{vector_store_id}/files: get: - tags: - - Vector Io - summary: Openai List Files In Vector Store - operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get responses: '200': - description: Successful Response + description: A VectorStoreListFilesResponse containing the list of files. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreListFilesResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Vector Io + summary: Openai List Files In Vector Store + description: List files in a vector store. + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: filter + in: query + required: false + schema: + title: Filter + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + nullable: true + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order - name: vector_store_id in: path required: true @@ -1856,28 +2631,30 @@ paths: type: string description: 'Path parameter: vector_store_id' post: - tags: - - Vector Io - summary: Openai Attach File To Vector Store - operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post responses: '200': - description: Successful Response + description: A VectorStoreFileObject representing the attached file. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileObject' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Vector Io + summary: Openai Attach File To Vector Store + description: Attach a file to a vector store. + operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post parameters: - name: vector_store_id in: path @@ -1885,18 +2662,21 @@ paths: schema: type: string description: 'Path parameter: vector_store_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoresByVectorStoreIdFilesPostRequest' /v1/vector_stores/{vector_store_id}/files/{file_id}: get: - tags: - - Vector Io - summary: Openai Retrieve Vector Store File - operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get responses: '200': - description: Successful Response + description: A VectorStoreFileObject representing the file. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1909,6 +2689,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Retrieve Vector Store File + description: Retrieves a vector store file. + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get parameters: - name: vector_store_id in: path @@ -1923,16 +2708,13 @@ paths: type: string description: 'Path parameter: file_id' post: - tags: - - Vector Io - summary: Openai Update Vector Store File - operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post responses: '200': - description: Successful Response + description: A VectorStoreFileObject representing the updated file. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1945,6 +2727,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Update Vector Store File + description: Updates a vector store file. + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post parameters: - name: vector_store_id in: path @@ -1958,17 +2745,20 @@ paths: schema: type: string description: 'Path parameter: file_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoresByVectorStoreIdFilesByFileIdPostRequest' + required: true delete: - tags: - - Vector Io - summary: Openai Delete Vector Store File - operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete responses: '200': - description: Successful Response + description: A VectorStoreFileDeleteResponse indicating the deletion status. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileDeleteResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1981,6 +2771,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Delete Vector Store File + description: Delete a vector store file. + operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete parameters: - name: vector_store_id in: path @@ -1996,29 +2791,49 @@ paths: description: 'Path parameter: file_id' /v1/vector_stores/{vector_store_id}/files/{file_id}/content: get: - tags: - - Vector Io - summary: Openai Retrieve Vector Store File Contents - operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get responses: '200': - description: Successful Response + description: File contents, optionally with embeddings and metadata based on query parameters. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileContentResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Vector Io + summary: Openai Retrieve Vector Store File Contents + description: Retrieves the contents of a vector store file. + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get parameters: + - name: include_embeddings + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Include Embeddings + - name: include_metadata + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Include Metadata - name: vector_store_id in: path required: true @@ -2033,16 +2848,13 @@ paths: description: 'Path parameter: file_id' /v1/vector_stores/{vector_store_id}/search: post: - tags: - - Vector Io - summary: Openai Search Vector Store - operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post responses: '200': - description: Successful Response + description: A VectorStoreSearchResponse containing the search results. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreSearchResponsePage' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2055,6 +2867,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Search Vector Store + description: |- + Search for chunks in a vector store. + + Searches a vector store for relevant chunks based on a query and optional file attribute filters. + operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post parameters: - name: vector_store_id in: path @@ -2062,18 +2882,21 @@ paths: schema: type: string description: 'Path parameter: vector_store_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoresByVectorStoreIdSearchPostRequest' + required: true /v1/version: get: - tags: - - Inspect - summary: Version - operationId: version_v1_version_get responses: '200': - description: Successful Response + description: Version information containing the service version number. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VersionInfo' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2086,44 +2909,15 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Inspect + summary: Version + description: |- + Get version. + + Get the version of the service. + operationId: version_v1_version_get components: - responses: - BadRequest400: - description: The request was invalid or malformed - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 400 - 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 - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 429 - title: Too Many Requests - detail: You have exceeded the rate limit. Please try again later. - InternalServerError500: - description: The server encountered an unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 500 - title: Internal Server Error - detail: An unexpected error occurred - DefaultError: - description: An error occurred - content: - application/json: - schema: - $ref: '#/components/schemas/Error' schemas: Error: description: Error response from the API. Roughly follows RFC 7807. @@ -2149,63 +2943,61 @@ components: title: Error type: object ListBatchesResponse: - description: Response containing a list of batch objects. properties: object: + type: string const: list - default: list title: Object - type: string + default: list data: - description: List of batch objects items: $ref: '#/components/schemas/Batch' - title: Data type: array + title: Data + description: List of batch objects first_id: anyOf: - type: string - type: 'null' description: ID of the first batch in the list - nullable: true last_id: anyOf: - type: string - type: 'null' description: ID of the last batch in the list - nullable: true has_more: - default: false - description: Whether there are more batches available - title: Has More type: boolean + title: Has More + description: Whether there are more batches available + default: false + type: object required: - data title: ListBatchesResponse - type: object + description: Response containing a list of batch objects. Batch: - additionalProperties: true properties: id: - title: Id type: string + title: Id completion_window: - title: Completion Window type: string + title: Completion Window created_at: - title: Created At type: integer + title: Created At endpoint: - title: Endpoint type: string + title: Endpoint input_file_id: - title: Input File Id type: string + title: Input File Id object: + type: string const: batch title: Object - type: string status: + type: string enum: - validating - failed @@ -2216,90 +3008,76 @@ components: - cancelling - cancelled title: Status - type: string cancelled_at: anyOf: - type: integer - type: 'null' - nullable: true cancelling_at: anyOf: - type: integer - type: 'null' - nullable: true completed_at: anyOf: - type: integer - type: 'null' - nullable: true error_file_id: anyOf: - type: string - type: 'null' - nullable: true errors: anyOf: - $ref: '#/components/schemas/Errors' title: Errors - type: 'null' - nullable: true title: Errors expired_at: anyOf: - type: integer - type: 'null' - nullable: true expires_at: anyOf: - type: integer - type: 'null' - nullable: true failed_at: anyOf: - type: integer - type: 'null' - nullable: true finalizing_at: anyOf: - type: integer - type: 'null' - nullable: true in_progress_at: anyOf: - type: integer - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - nullable: true model: anyOf: - type: string - type: 'null' - nullable: true output_file_id: anyOf: - type: string - type: 'null' - nullable: true request_counts: anyOf: - $ref: '#/components/schemas/BatchRequestCounts' title: BatchRequestCounts - type: 'null' - nullable: true title: BatchRequestCounts usage: anyOf: - $ref: '#/components/schemas/BatchUsage' title: BatchUsage - type: 'null' - nullable: true title: BatchUsage + additionalProperties: true + type: object required: - id - completion_window @@ -2309,36 +3087,42 @@ components: - object - status title: Batch - type: object + Order: + type: string + enum: + - asc + - desc + title: Order + description: Sort order for paginated responses. ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. properties: data: items: $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIChatCompletionResponse - type: object + description: Response from listing OpenAI-compatible chat completions. OpenAIAssistantMessageParam: description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: @@ -2372,19 +3156,19 @@ components: title: OpenAIAssistantMessageParam type: object OpenAIChatCompletionContentPartImageParam: - description: Image content part for OpenAI-compatible chat completion messages. properties: type: + type: string const: image_url - default: image_url title: Type - type: string + default: image_url image_url: $ref: '#/components/schemas/OpenAIImageURL' + type: object required: - image_url title: OpenAIChatCompletionContentPartImageParam - type: object + description: Image content part for OpenAI-compatible chat completion messages. OpenAIChatCompletionContentPartParam: discriminator: mapping: @@ -2401,139 +3185,130 @@ components: title: OpenAIFile title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: - description: Text content part for OpenAI-compatible chat completion messages. properties: type: + type: string const: text - default: text title: Type - type: string + default: text text: - title: Text type: string + title: Text + type: object required: - text title: OpenAIChatCompletionContentPartTextParam - type: object + description: Text content part for OpenAI-compatible chat completion messages. OpenAIChatCompletionToolCall: - description: Tool call specification for OpenAI-compatible chat completion responses. properties: index: anyOf: - type: integer - type: 'null' - nullable: true id: anyOf: - type: string - type: 'null' - nullable: true type: + type: string const: function - default: function title: Type - type: string + default: function function: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' title: OpenAIChatCompletionToolCallFunction - type: 'null' - nullable: true title: OpenAIChatCompletionToolCallFunction - title: OpenAIChatCompletionToolCall type: object + title: OpenAIChatCompletionToolCall + description: Tool call specification for OpenAI-compatible chat completion responses. OpenAIChatCompletionToolCallFunction: - description: Function call details for OpenAI-compatible tool calls. properties: name: anyOf: - type: string - type: 'null' - nullable: true arguments: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIChatCompletionToolCallFunction type: object + title: OpenAIChatCompletionToolCallFunction + description: Function call details for OpenAI-compatible tool calls. OpenAIChatCompletionUsage: - description: Usage information for OpenAI chat completion. properties: prompt_tokens: - title: Prompt Tokens type: integer + title: Prompt Tokens completion_tokens: - title: Completion Tokens type: integer + title: Completion Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens prompt_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' - nullable: true title: OpenAIChatCompletionUsagePromptTokensDetails completion_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' - nullable: true title: OpenAIChatCompletionUsageCompletionTokensDetails + type: object required: - prompt_tokens - completion_tokens - total_tokens title: OpenAIChatCompletionUsage - type: object + description: Usage information for OpenAI chat completion. OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) + title: OpenAIUserMessageParam-Output | ... (5 variants) + 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: - title: Finish Reason type: string + title: Finish Reason index: - title: Index type: integer + title: Index logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' title: OpenAIChoiceLogprobs - type: 'null' - nullable: true title: OpenAIChoiceLogprobs + type: object required: - message - finish_reason - index title: OpenAIChoice - type: object + description: A choice from an OpenAI-compatible chat completion response. OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. properties: content: anyOf: @@ -2541,24 +3316,22 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - nullable: true refusal: anyOf: - items: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - nullable: true - title: OpenAIChoiceLogprobs type: object + title: OpenAIChoiceLogprobs + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. OpenAIDeveloperMessageParam: - description: A message from the developer in an OpenAI-compatible chat completion request. properties: role: + type: string const: developer - default: developer title: Role - type: string + default: developer content: anyOf: - type: string @@ -2571,58 +3344,54 @@ components: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - content title: OpenAIDeveloperMessageParam - type: object + description: A message from the developer in an OpenAI-compatible chat completion request. OpenAIFile: properties: type: + type: string const: file - default: file title: Type - type: string + default: file file: $ref: '#/components/schemas/OpenAIFileFile' + type: object required: - file title: OpenAIFile - type: object OpenAIFileFile: properties: file_data: anyOf: - type: string - type: 'null' - nullable: true file_id: anyOf: - type: string - type: 'null' - nullable: true filename: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIFileFile type: object + title: OpenAIFileFile OpenAIImageURL: - description: Image URL specification for OpenAI-compatible chat completion messages. properties: url: - title: Url type: string + title: Url detail: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - url title: OpenAIImageURL - type: object + description: Image URL specification for OpenAI-compatible chat completion messages. OpenAIMessageParam: discriminator: mapping: @@ -2645,13 +3414,12 @@ components: title: OpenAIDeveloperMessageParam title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: - description: A system message providing instructions or context to the model. properties: role: + type: string const: system - default: system title: Role - type: string + default: system content: anyOf: - type: string @@ -2664,55 +3432,53 @@ components: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - content title: OpenAISystemMessageParam - type: object + description: A system message providing instructions or context to the model. 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 + title: Token bytes: anyOf: - items: type: integer type: array - type: 'null' - nullable: true logprob: - title: Logprob type: number + title: Logprob top_logprobs: items: $ref: '#/components/schemas/OpenAITopLogProb' - title: Top Logprobs type: array + title: Top Logprobs + type: object required: - token - logprob - top_logprobs title: OpenAITokenLogProb - type: object + 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 OpenAIToolMessageParam: - description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. properties: role: + type: string const: tool - default: tool title: Role - type: string + default: tool tool_call_id: - title: Tool Call Id type: string + title: Tool Call Id content: anyOf: - type: string @@ -2721,37 +3487,37 @@ components: type: array title: list[OpenAIChatCompletionContentPartTextParam] title: string | list[OpenAIChatCompletionContentPartTextParam] + type: object required: - tool_call_id - content title: OpenAIToolMessageParam - type: object + description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. 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 + title: Token bytes: anyOf: - items: type: integer type: array - type: 'null' - nullable: true logprob: - title: Logprob type: number + title: Logprob + type: object required: - token - logprob title: OpenAITopLogProb - type: object + 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 OpenAIUserMessageParam: description: A message from the user in an OpenAI-compatible chat completion request. properties: @@ -2791,11 +3557,10 @@ components: title: OpenAIUserMessageParam type: object OpenAIJSONSchema: - description: JSON schema specification for OpenAI-compatible structured response format. properties: name: - title: Name type: string + title: Name description: anyOf: - type: string @@ -2809,32 +3574,33 @@ components: - additionalProperties: true type: object - type: 'null' - title: OpenAIJSONSchema type: object + title: OpenAIJSONSchema + description: JSON schema specification for OpenAI-compatible structured response format. OpenAIResponseFormatJSONObject: - description: JSON object response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: json_object - default: json_object title: Type - type: string - title: OpenAIResponseFormatJSONObject + default: json_object type: object + title: OpenAIResponseFormatJSONObject + description: JSON object response format for OpenAI-compatible chat completion requests. OpenAIResponseFormatJSONSchema: - description: JSON schema response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: json_schema - default: json_schema title: Type - type: string + default: json_schema json_schema: $ref: '#/components/schemas/OpenAIJSONSchema' + type: object required: - json_schema title: OpenAIResponseFormatJSONSchema - type: object + description: JSON schema response format for OpenAI-compatible chat completion requests. OpenAIResponseFormatParam: discriminator: mapping: @@ -2851,52 +3617,49 @@ components: title: OpenAIResponseFormatJSONObject title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject OpenAIResponseFormatText: - description: Text response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: text - default: text title: Type - type: string - title: OpenAIResponseFormatText + default: text type: object + title: OpenAIResponseFormatText + description: Text response format for OpenAI-compatible chat completion requests. OpenAIChatCompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible chat completion endpoint. properties: model: - title: Model type: string + title: Model 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) + 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) + type: array minItems: 1 title: Messages - type: array frequency_penalty: anyOf: - type: number - type: 'null' - nullable: true function_call: anyOf: - type: string @@ -2904,7 +3667,6 @@ components: type: object - type: 'null' title: string | object - nullable: true functions: anyOf: - items: @@ -2912,68 +3674,58 @@ components: type: object type: array - type: 'null' - nullable: true logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true logprobs: anyOf: - type: boolean - type: 'null' - nullable: true max_completion_tokens: anyOf: - type: integer - type: 'null' - nullable: true max_tokens: anyOf: - type: integer - type: 'null' - nullable: true n: anyOf: - type: integer - type: 'null' - nullable: true parallel_tool_calls: anyOf: - type: boolean - type: 'null' - nullable: true presence_penalty: anyOf: - type: number - type: 'null' - nullable: true response_format: anyOf: - - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' title: OpenAIResponseFormatJSONObject + discriminator: + propertyName: type + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - type: 'null' title: Response Format - nullable: true seed: anyOf: - type: integer - type: 'null' - nullable: true stop: anyOf: - type: string @@ -2983,23 +3735,19 @@ components: title: list[string] - type: 'null' title: string | list[string] - nullable: true stream: anyOf: - type: boolean - type: 'null' - nullable: true stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true temperature: anyOf: - type: number - type: 'null' - nullable: true tool_choice: anyOf: - type: string @@ -3007,7 +3755,6 @@ components: type: object - type: 'null' title: string | object - nullable: true tools: anyOf: - items: @@ -3015,63 +3762,60 @@ components: type: object type: array - type: 'null' - nullable: true top_logprobs: anyOf: - type: integer - type: 'null' - nullable: true top_p: anyOf: - type: number - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - messages title: OpenAIChatCompletionRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible chat completion endpoint. OpenAIChatCompletion: - description: Response from an OpenAI-compatible chat completion request. properties: id: - title: Id type: string + title: Id choices: items: $ref: '#/components/schemas/OpenAIChoice' - title: Choices type: array + title: Choices object: + type: string const: chat.completion - default: chat.completion title: Object - type: string + default: chat.completion created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' title: OpenAIChatCompletionUsage - type: 'null' - nullable: true title: OpenAIChatCompletionUsage + type: object required: - id - choices - created - model title: OpenAIChatCompletion - type: object + description: Response from an OpenAI-compatible chat completion request. OpenAIChatCompletionChunk: description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: @@ -3167,55 +3911,55 @@ components: OpenAICompletionWithInputMessages: properties: id: - title: Id type: string + title: Id choices: items: $ref: '#/components/schemas/OpenAIChoice' - title: Choices type: array + title: Choices object: + type: string const: chat.completion - default: chat.completion title: Object - type: string + default: chat.completion created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' title: OpenAIChatCompletionUsage - type: 'null' - nullable: true title: OpenAIChatCompletionUsage 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Input Messages + 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' + title: OpenAIUserMessageParam-Output | ... (5 variants) type: array + title: Input Messages + type: object required: - id - choices @@ -3223,14 +3967,11 @@ components: - model - input_messages title: OpenAICompletionWithInputMessages - type: object OpenAICompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible completion endpoint. properties: model: - title: Model type: string + title: Model prompt: anyOf: - type: string @@ -3253,49 +3994,40 @@ components: anyOf: - type: integer - type: 'null' - nullable: true echo: anyOf: - type: boolean - type: 'null' - nullable: true frequency_penalty: anyOf: - type: number - type: 'null' - nullable: true logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true logprobs: anyOf: - type: boolean - type: 'null' - nullable: true max_tokens: anyOf: - type: integer - type: 'null' - nullable: true n: anyOf: - type: integer - type: 'null' - nullable: true presence_penalty: anyOf: - type: number - type: 'null' - nullable: true seed: anyOf: - type: integer - type: 'null' - nullable: true stop: anyOf: - type: string @@ -3305,110 +4037,104 @@ components: title: list[string] - type: 'null' title: string | list[string] - nullable: true stream: anyOf: - type: boolean - type: 'null' - nullable: true stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true temperature: anyOf: - type: number - type: 'null' - nullable: true top_p: anyOf: - type: number - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true suffix: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - prompt title: OpenAICompletionRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible completion endpoint. OpenAICompletion: - 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 + title: Id choices: items: $ref: '#/components/schemas/OpenAICompletionChoice' - title: Choices type: array + title: Choices created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model object: + type: string const: text_completion - default: text_completion title: Object - type: string + default: text_completion + type: object required: - id - choices - created - model title: OpenAICompletion - type: object - OpenAICompletionChoice: description: |- - A choice from an OpenAI-compatible completion response. + Response from an OpenAI-compatible completion request. - :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 + :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" + OpenAICompletionChoice: properties: finish_reason: - title: Finish Reason type: string + title: Finish Reason text: - title: Text type: string + title: Text index: - title: Index type: integer + title: Index logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' title: OpenAIChoiceLogprobs - type: 'null' - nullable: true title: OpenAIChoiceLogprobs + type: object required: - finish_reason - text - index title: OpenAICompletionChoice - type: object + 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 ConversationItem: discriminator: mapping: @@ -3443,54 +4169,55 @@ components: title: OpenAIResponseOutputMessageMCPListTools title: OpenAIResponseMessage | ... (9 variants) OpenAIResponseAnnotationCitation: - description: URL citation annotation for referencing external web resources. properties: type: + type: string const: url_citation - default: url_citation title: Type - type: string + default: url_citation end_index: - title: End Index type: integer + title: End Index start_index: - title: Start Index type: integer + title: Start Index title: - title: Title type: string + title: Title url: - title: Url type: string + title: Url + type: object required: - end_index - start_index - title - url title: OpenAIResponseAnnotationCitation - type: object + description: URL citation annotation for referencing external web resources. OpenAIResponseAnnotationContainerFileCitation: properties: type: + type: string const: container_file_citation - default: container_file_citation title: Type - type: string + default: container_file_citation container_id: - title: Container Id type: string + title: Container Id end_index: - title: End Index type: integer + title: End Index file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename start_index: - title: Start Index type: integer + title: Start Index + type: object required: - container_id - end_index @@ -3498,48 +4225,47 @@ components: - filename - start_index title: OpenAIResponseAnnotationContainerFileCitation - type: object OpenAIResponseAnnotationFileCitation: - description: File citation annotation for referencing specific files in response content. properties: type: + type: string const: file_citation - default: file_citation title: Type - type: string + default: file_citation file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename index: - title: Index type: integer + title: Index + type: object required: - file_id - filename - index title: OpenAIResponseAnnotationFileCitation - type: object + description: File citation annotation for referencing specific files in response content. OpenAIResponseAnnotationFilePath: properties: type: + type: string const: file_path - default: file_path title: Type - type: string + default: file_path file_id: - title: File Id type: string + title: File Id index: - title: Index type: integer + title: Index + type: object required: - file_id - index title: OpenAIResponseAnnotationFilePath - type: object OpenAIResponseAnnotations: discriminator: mapping: @@ -3559,49 +4285,47 @@ components: title: OpenAIResponseAnnotationFilePath title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseContentPartRefusal: - description: Refusal content within a streamed response part. properties: type: + type: string const: refusal - default: refusal title: Type - type: string + default: refusal refusal: - title: Refusal type: string + title: Refusal + type: object required: - refusal title: OpenAIResponseContentPartRefusal - type: object + description: Refusal content within a streamed response part. 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 + title: Call Id output: - title: Output type: string + title: Output type: + type: string const: function_call_output - default: function_call_output title: Type - type: string + default: function_call_output id: anyOf: - type: string - type: 'null' - nullable: true status: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - call_id - output title: OpenAIResponseInputFunctionToolCallOutput - type: object + description: This represents the output of a function call that gets passed back to the model. OpenAIResponseInputMessageContent: discriminator: mapping: @@ -3618,134 +4342,126 @@ components: title: OpenAIResponseInputMessageContentFile title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseInputMessageContentFile: - description: File content for input messages in OpenAI response format. properties: type: + type: string const: input_file - default: input_file title: Type - type: string + default: input_file file_data: anyOf: - type: string - type: 'null' - nullable: true file_id: anyOf: - type: string - type: 'null' - nullable: true file_url: anyOf: - type: string - type: 'null' - nullable: true filename: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIResponseInputMessageContentFile type: object + title: OpenAIResponseInputMessageContentFile + description: File content for input messages in OpenAI response format. OpenAIResponseInputMessageContentImage: - description: Image content for input messages in OpenAI response format. properties: detail: - default: auto title: Detail + default: auto type: string enum: - low - high - auto type: + type: string const: input_image - default: input_image title: Type - type: string + default: input_image file_id: anyOf: - type: string - type: 'null' - nullable: true image_url: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIResponseInputMessageContentImage type: object + title: OpenAIResponseInputMessageContentImage + description: Image content for input messages in OpenAI response format. OpenAIResponseInputMessageContentText: - description: Text content for input messages in OpenAI response format. properties: text: - title: Text type: string + title: Text type: + type: string const: input_text - default: input_text title: Type - type: string + default: input_text + type: object required: - text title: OpenAIResponseInputMessageContentText - type: object + description: Text content for input messages in OpenAI response format. OpenAIResponseMCPApprovalRequest: - description: A request for human approval of a tool invocation. properties: arguments: - title: Arguments type: string + title: Arguments id: - title: Id type: string + title: Id name: - title: Name type: string + title: Name server_label: - title: Server Label type: string + title: Server Label type: + type: string const: mcp_approval_request - default: mcp_approval_request title: Type - type: string + default: mcp_approval_request + type: object required: - arguments - id - name - server_label title: OpenAIResponseMCPApprovalRequest - type: object + description: A request for human approval of a tool invocation. OpenAIResponseMCPApprovalResponse: - description: A response to an MCP approval request. properties: approval_request_id: - title: Approval Request Id type: string + title: Approval Request Id approve: - title: Approve type: boolean + title: Approve type: + type: string const: mcp_approval_response - default: mcp_approval_response title: Type - type: string + default: mcp_approval_response id: anyOf: - type: string - type: 'null' - nullable: true reason: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - approval_request_id - approve title: OpenAIResponseMCPApprovalResponse - type: object + description: A response to an MCP approval request. OpenAIResponseMessage: description: |- Corresponds to the various Message types in the Responses API. @@ -3832,22 +4548,15 @@ components: OpenAIResponseOutputMessageContentOutputText: properties: text: - title: Text type: string + title: Text type: + type: string const: output_text - default: output_text title: Type - type: string + default: output_text annotations: items: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' title: OpenAIResponseAnnotationFileCitation @@ -3857,176 +4566,177 @@ components: title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' title: 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' title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations type: array + title: Annotations + type: object required: - text title: OpenAIResponseOutputMessageContentOutputText - type: object OpenAIResponseOutputMessageFileSearchToolCall: - description: File search tool call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id queries: items: type: string - title: Queries type: array + title: Queries status: - title: Status type: string + title: Status type: + type: string const: file_search_call - default: file_search_call title: Type - type: string + default: file_search_call results: anyOf: - items: $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' - nullable: true + type: object required: - id - queries - status title: OpenAIResponseOutputMessageFileSearchToolCall - type: object + description: File search tool call output message for OpenAI responses. OpenAIResponseOutputMessageFunctionToolCall: - description: Function tool call output message for OpenAI responses. properties: call_id: - title: Call Id type: string + title: Call Id name: - title: Name type: string + title: Name arguments: - title: Arguments type: string + title: Arguments type: + type: string const: function_call - default: function_call title: Type - type: string + default: function_call id: anyOf: - type: string - type: 'null' - nullable: true status: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - call_id - name - arguments title: OpenAIResponseOutputMessageFunctionToolCall - type: object + description: Function tool call output message for OpenAI responses. OpenAIResponseOutputMessageMCPCall: - description: Model Context Protocol (MCP) call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id type: + type: string const: mcp_call - default: mcp_call title: Type - type: string + default: mcp_call arguments: - title: Arguments type: string + title: Arguments name: - title: Name type: string + title: Name server_label: - title: Server Label type: string + title: Server Label error: anyOf: - type: string - type: 'null' - nullable: true output: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - id - arguments - name - server_label title: OpenAIResponseOutputMessageMCPCall - type: object + description: Model Context Protocol (MCP) call output message for OpenAI responses. OpenAIResponseOutputMessageMCPListTools: - description: MCP list tools output message containing available tools from an MCP server. properties: id: - title: Id type: string + title: Id type: + type: string const: mcp_list_tools - default: mcp_list_tools title: Type - type: string + default: mcp_list_tools server_label: - title: Server Label type: string + title: Server Label tools: items: $ref: '#/components/schemas/MCPListToolsTool' - title: Tools type: array + title: Tools + type: object required: - id - server_label - tools title: OpenAIResponseOutputMessageMCPListTools - type: object + description: MCP list tools output message containing available tools from an MCP server. OpenAIResponseOutputMessageWebSearchToolCall: - description: Web search tool call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id status: - title: Status type: string + title: Status type: + type: string const: web_search_call - default: web_search_call title: Type - type: string + default: web_search_call + type: object required: - id - status title: OpenAIResponseOutputMessageWebSearchToolCall - type: object + description: Web search tool call output message for OpenAI responses. Conversation: - description: OpenAI-compatible conversation object. properties: id: - description: The unique ID of the conversation. - title: Id type: string + title: Id + description: The unique ID of the conversation. object: + type: string const: conversation - default: conversation - description: The object type, which is always conversation. title: Object - type: string + description: The object type, which is always conversation. + default: conversation created_at: - description: The time at which the conversation was created, measured in seconds since the Unix epoch. - title: Created At type: integer + title: Created At + description: The time at which the conversation was created, measured in seconds since the Unix epoch. metadata: anyOf: - additionalProperties: @@ -4034,7 +4744,6 @@ components: 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. - nullable: true items: anyOf: - items: @@ -4043,59 +4752,45 @@ components: type: array - type: 'null' description: Initial items to include in the conversation context. You may add up to 20 items at a time. - nullable: true + type: object required: - id - created_at title: Conversation - type: object + description: OpenAI-compatible conversation object. ConversationDeletedResource: - description: Response for deleted conversation. properties: id: - description: The deleted conversation identifier - title: Id type: string + title: Id + description: The deleted conversation identifier object: - default: conversation.deleted - description: Object type - title: Object type: string + title: Object + description: Object type + default: conversation.deleted deleted: - default: true - description: Whether the object was deleted - title: Deleted type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object required: - id title: ConversationDeletedResource - type: object + description: Response for deleted conversation. ConversationItemList: - description: List of conversation items with pagination. properties: object: - default: list - description: Object type - title: Object type: string + title: Object + description: Object type + default: list data: - description: List of conversation items items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -4112,58 +4807,68 @@ components: title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - title: Data + 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' + title: OpenAIResponseMessage-Output | ... (9 variants) type: array + title: Data + description: List of conversation items first_id: anyOf: - type: string - type: 'null' description: The ID of the first item in the list - nullable: true last_id: anyOf: - type: string - type: 'null' description: The ID of the last item in the list - nullable: true has_more: - default: false - description: Whether there are more items available - title: Has More type: boolean + title: Has More + description: Whether there are more items available + default: false + type: object required: - data title: ConversationItemList - type: object + description: List of conversation items with pagination. ConversationItemDeletedResource: - description: Response for deleted conversation item. properties: id: - description: The deleted item identifier - title: Id type: string + title: Id + description: The deleted item identifier object: - default: conversation.item.deleted - description: Object type - title: Object type: string + title: Object + description: Object type + default: conversation.item.deleted deleted: - default: true - description: Whether the object was deleted - title: Deleted type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object required: - id title: ConversationItemDeletedResource - type: object + description: Response for deleted conversation item. OpenAIEmbeddingsRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible embeddings endpoint. properties: model: - title: Model type: string + title: Model input: anyOf: - type: string @@ -4181,25 +4886,24 @@ components: anyOf: - type: integer - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - input title: OpenAIEmbeddingsRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible embeddings endpoint. OpenAIEmbeddingData: - description: A single embedding data object from an OpenAI-compatible embeddings response. properties: object: + type: string const: embedding - default: embedding title: Object - type: string + default: embedding embedding: anyOf: - items: @@ -4209,112 +4913,113 @@ components: - type: string title: list[number] | string index: - title: Index type: integer + title: Index + type: object required: - embedding - index title: OpenAIEmbeddingData - type: object + description: A single embedding data object from an OpenAI-compatible embeddings response. OpenAIEmbeddingUsage: - description: Usage information for an OpenAI-compatible embeddings response. properties: prompt_tokens: - title: Prompt Tokens type: integer + title: Prompt Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens + type: object required: - prompt_tokens - total_tokens title: OpenAIEmbeddingUsage - type: object + description: Usage information for an OpenAI-compatible embeddings response. OpenAIEmbeddingsResponse: - description: Response from an OpenAI-compatible embeddings request. properties: object: + type: string const: list - default: list title: Object - type: string + default: list data: items: $ref: '#/components/schemas/OpenAIEmbeddingData' - title: Data type: array + title: Data model: - title: Model type: string + title: Model usage: $ref: '#/components/schemas/OpenAIEmbeddingUsage' + type: object required: - data - model - usage title: OpenAIEmbeddingsResponse - type: object + description: Response from an OpenAI-compatible embeddings request. OpenAIFilePurpose: - description: Valid purpose values for OpenAI Files API. + type: string enum: - assistants - batch title: OpenAIFilePurpose - type: string + description: Valid purpose values for OpenAI Files API. ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. properties: data: items: $ref: '#/components/schemas/OpenAIFileObject' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIFileResponse - type: object + description: Response for listing files in OpenAI Files API. OpenAIFileObject: - description: OpenAI File object as defined in the OpenAI Files API. properties: object: + type: string const: file - default: file title: Object - type: string + default: file id: - title: Id type: string + title: Id bytes: - title: Bytes type: integer + title: Bytes created_at: - title: Created At type: integer + title: Created At expires_at: - title: Expires At type: integer + title: Expires At filename: - title: Filename type: string + title: Filename purpose: $ref: '#/components/schemas/OpenAIFilePurpose' + type: object required: - id - bytes @@ -4323,212 +5028,211 @@ components: - filename - purpose title: OpenAIFileObject - type: object + description: OpenAI File object as defined in the OpenAI Files API. 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: + type: string const: created_at title: Anchor - type: string seconds: - maximum: 2592000 - minimum: 3600 - title: Seconds type: integer + maximum: 2592000.0 + minimum: 3600.0 + title: Seconds + type: object required: - anchor - seconds title: ExpiresAfter - type: object + 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) OpenAIFileDeleteResponse: - description: Response for deleting a file in OpenAI Files API. properties: id: - title: Id type: string + title: Id object: + type: string const: file - default: file title: Object - type: string + default: file deleted: - title: Deleted type: boolean + title: Deleted + type: object required: - id - deleted title: OpenAIFileDeleteResponse + description: Response for deleting a file in OpenAI Files API. + Response: + title: Response type: object HealthInfo: - description: Health status information for the service. properties: status: $ref: '#/components/schemas/HealthStatus' + type: object required: - status title: HealthInfo - type: object + description: Health status information for the service. RouteInfo: - description: Information about an API route including its path, method, and implementing providers. properties: route: - title: Route type: string + title: Route method: - title: Method type: string + title: Method provider_types: items: type: string - title: Provider Types type: array + title: Provider Types + type: object required: - route - method - provider_types title: RouteInfo - type: object + description: Information about an API route including its path, method, and implementing providers. ListRoutesResponse: - description: Response containing a list of all available API routes. properties: data: items: $ref: '#/components/schemas/RouteInfo' - title: Data type: array + title: Data + type: object required: - data title: ListRoutesResponse - type: object + description: Response containing a list of all available API routes. OpenAIModel: - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: id: - title: Id type: string + title: Id object: + type: string const: model - default: model title: Object - type: string + default: model created: - title: Created type: integer + title: Created owned_by: - title: Owned By type: string + title: Owned By custom_metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - id - created - owned_by title: OpenAIModel - type: object + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata OpenAIListModelsResponse: properties: data: items: $ref: '#/components/schemas/OpenAIModel' - title: Data type: array + title: Data + type: object required: - data title: OpenAIListModelsResponse - type: object Model: - description: A model resource representing an AI model registered in Llama Stack. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: model - default: model title: Type - type: string + default: model metadata: additionalProperties: true - description: Any additional metadata for this model - title: Metadata 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 - type: object + description: A model resource representing an AI model registered in Llama Stack. ModelType: - description: Enumeration of supported model types in Llama Stack. + type: string enum: - llm - embedding - rerank title: ModelType - type: string + description: Enumeration of supported model types in Llama Stack. ModerationObject: - description: A moderation object. properties: id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model results: items: $ref: '#/components/schemas/ModerationObjectResults' - title: Results type: array + title: Results + type: object required: - id - model - results title: ModerationObject - type: object - ModerationObjectResults: description: A moderation object. + ModerationObjectResults: properties: flagged: - title: Flagged type: boolean + title: Flagged categories: anyOf: - additionalProperties: type: boolean type: object - type: 'null' - nullable: true category_applied_input_types: anyOf: - additionalProperties: @@ -4537,93 +5241,90 @@ components: type: array type: object - type: 'null' - nullable: true category_scores: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true user_message: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - flagged title: ModerationObjectResults - type: object + description: A moderation object. Prompt: - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. properties: prompt: anyOf: - type: string - type: 'null' description: The system prompt with variable placeholders - nullable: true version: - description: Version (integer starting at 1, incremented on save) - minimum: 1 - title: Version type: integer + minimum: 1.0 + title: Version + description: Version (integer starting at 1, incremented on save) prompt_id: - description: Unique identifier in format 'pmpt_<48-digit-hash>' - title: Prompt Id type: string + title: Prompt Id + description: Unique identifier in format 'pmpt_<48-digit-hash>' variables: - description: List of variable names that can be used in the prompt template items: type: string - title: Variables type: array + title: Variables + description: List of variable names that can be used in the prompt template is_default: - default: false - description: Boolean indicating whether this version is the default version - title: 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 - type: object + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. ListPromptsResponse: - description: Response model to list prompts. properties: data: items: $ref: '#/components/schemas/Prompt' - title: Data type: array + title: Data + type: object required: - data title: ListPromptsResponse - type: object + description: Response model to list prompts. ProviderInfo: - description: Information about a registered provider including its configuration and health status. properties: api: - title: Api type: string + title: Api provider_id: - title: Provider Id type: string + title: Provider Id provider_type: - title: Provider Type type: string + title: Provider Type config: additionalProperties: true - title: Config type: object + title: Config health: additionalProperties: true - title: Health type: object + title: Health + type: object required: - api - provider_id @@ -4631,62 +5332,62 @@ components: - config - health title: ProviderInfo - type: object + description: Information about a registered provider including its configuration and health status. ListProvidersResponse: - description: Response containing a list of all available providers. properties: data: items: $ref: '#/components/schemas/ProviderInfo' - title: Data type: array + title: Data + type: object required: - data title: ListProvidersResponse - type: object + description: Response containing a list of all available providers. ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. properties: data: items: $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIResponseObject - type: object + description: Paginated list of OpenAI response objects with navigation metadata. OpenAIResponseError: - description: Error details for failed OpenAI response requests. properties: code: - title: Code type: string + title: Code message: - title: Message type: string + title: Message + type: object required: - code - message title: OpenAIResponseError - type: object + description: Error details for failed OpenAI response requests. OpenAIResponseInput: anyOf: - discriminator: @@ -4723,29 +5424,27 @@ components: title: OpenAIResponseMessage title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage OpenAIResponseInputToolFileSearch: - description: File search tool configuration for OpenAI response inputs. properties: type: + type: string const: file_search - default: file_search title: Type - type: string + default: file_search vector_store_ids: items: type: string - title: Vector Store Ids type: array + title: Vector Store Ids filters: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true max_num_results: anyOf: - - maximum: 50 - minimum: 1 - type: integer + - type: integer + maximum: 50.0 + minimum: 1.0 - type: 'null' default: 10 ranking_options: @@ -4753,28 +5452,26 @@ components: - $ref: '#/components/schemas/SearchRankingOptions' title: SearchRankingOptions - type: 'null' - nullable: true title: SearchRankingOptions + type: object required: - vector_store_ids title: OpenAIResponseInputToolFileSearch - type: object + description: File search tool configuration for OpenAI response inputs. OpenAIResponseInputToolFunction: - description: Function tool configuration for OpenAI response inputs. properties: type: + type: string const: function - default: function title: Type - type: string + default: function name: - title: Name type: string + title: Name description: anyOf: - type: string - type: 'null' - nullable: true parameters: anyOf: - additionalProperties: true @@ -4784,18 +5481,17 @@ components: anyOf: - type: boolean - type: 'null' - nullable: true + type: object required: - name - parameters title: OpenAIResponseInputToolFunction - type: object + description: Function tool configuration for OpenAI response inputs. OpenAIResponseInputToolWebSearch: - description: Web search tool configuration for OpenAI response inputs. properties: type: - default: web_search title: Type + default: web_search type: string enum: - web_search @@ -4804,51 +5500,40 @@ components: - web_search_2025_08_26 search_context_size: anyOf: - - pattern: ^low|medium|high$ - type: string + - type: string + pattern: ^low|medium|high$ - type: 'null' default: medium - title: OpenAIResponseInputToolWebSearch type: object + title: OpenAIResponseInputToolWebSearch + description: Web search tool configuration for OpenAI response inputs. OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. properties: created_at: - title: Created At type: integer + title: Created At error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' title: OpenAIResponseError - type: 'null' - nullable: true title: OpenAIResponseError id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model object: + type: string const: response - default: response title: Object - type: string + default: response 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' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -4861,33 +5546,40 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array + title: Output parallel_tool_calls: - default: false - title: Parallel Tool Calls type: boolean + title: Parallel Tool Calls + default: false previous_response_id: anyOf: - type: string - type: 'null' - nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' title: OpenAIResponsePrompt - type: 'null' - nullable: true title: OpenAIResponsePrompt status: - title: Status type: string + title: Status temperature: anyOf: - type: number - type: 'null' - nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -4897,20 +5589,9 @@ components: anyOf: - type: number - type: 'null' - nullable: true tools: anyOf: - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' title: OpenAIResponseInputToolWebSearch @@ -4920,48 +5601,43 @@ components: title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - nullable: true truncation: anyOf: - type: string - type: 'null' - nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' title: OpenAIResponseUsage - type: 'null' - nullable: true title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - nullable: true max_tool_calls: anyOf: - type: integer - type: 'null' - 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' - title: OpenAIResponseMessage + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -4974,16 +5650,27 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Input + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array + title: Input + type: object required: - created_at - id @@ -4992,7 +5679,7 @@ components: - status - input title: OpenAIResponseObjectWithInput - type: object + description: OpenAI response object extended with input context information. OpenAIResponseOutput: discriminator: mapping: @@ -5021,20 +5708,13 @@ components: title: OpenAIResponseMCPApprovalRequest title: OpenAIResponseMessage | ... (7 variants) OpenAIResponsePrompt: - description: OpenAI compatible Prompt object that is used in OpenAI responses. properties: id: - title: Id type: string + title: Id variables: anyOf: - additionalProperties: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText @@ -5042,31 +5722,35 @@ components: title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: object - type: 'null' - nullable: true version: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - id title: OpenAIResponsePrompt - type: object + description: OpenAI compatible Prompt object that is used in OpenAI responses. OpenAIResponseText: - description: Text response configuration for OpenAI responses. properties: format: anyOf: - $ref: '#/components/schemas/OpenAIResponseTextFormat' title: OpenAIResponseTextFormat - type: 'null' - nullable: true title: OpenAIResponseTextFormat - title: OpenAIResponseText type: object + title: OpenAIResponseText + description: Text response configuration for OpenAI responses. OpenAIResponseTool: discriminator: mapping: @@ -5089,16 +5773,15 @@ components: title: OpenAIResponseToolMCP title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. properties: type: + type: string const: mcp - default: mcp title: Type - type: string + default: mcp server_label: - title: Server Label type: string + title: Server Label allowed_tools: anyOf: - items: @@ -5109,43 +5792,41 @@ components: title: AllowedToolsFilter - type: 'null' title: list[string] | AllowedToolsFilter - nullable: true + type: object required: - server_label title: OpenAIResponseToolMCP - type: object + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. OpenAIResponseUsage: - description: Usage information for OpenAI response. properties: input_tokens: - title: Input Tokens type: integer + title: Input Tokens output_tokens: - title: Output Tokens type: integer + title: Output Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens input_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' title: OpenAIResponseUsageInputTokensDetails - type: 'null' - nullable: true title: OpenAIResponseUsageInputTokensDetails output_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' title: OpenAIResponseUsageOutputTokensDetails - type: 'null' - nullable: true title: OpenAIResponseUsageOutputTokensDetails + type: object required: - input_tokens - output_tokens - total_tokens title: OpenAIResponseUsage - type: object + description: Usage information for OpenAI response. ResponseGuardrailSpec: description: Specification for a guardrail to apply during response generation. properties: @@ -5178,40 +5859,37 @@ components: title: OpenAIResponseInputToolMCP title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: type: + type: string const: mcp - default: mcp title: Type - type: string + default: mcp server_label: - title: Server Label type: string + title: Server Label server_url: - title: Server Url type: string + title: Server Url headers: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true authorization: anyOf: - type: string - type: 'null' - nullable: true require_approval: anyOf: - - const: always - type: string - - const: never - type: string + - type: string + const: always + - type: string + const: never - $ref: '#/components/schemas/ApprovalFilter' title: ApprovalFilter - default: never title: string | ApprovalFilter + default: never allowed_tools: anyOf: - items: @@ -5222,51 +5900,39 @@ components: title: AllowedToolsFilter - type: 'null' title: list[string] | AllowedToolsFilter - nullable: true + type: object required: - server_label - server_url title: OpenAIResponseInputToolMCP - type: object + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. OpenAIResponseObject: - description: Complete OpenAI response object containing generation results and metadata. properties: created_at: - title: Created At type: integer + title: Created At error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' title: OpenAIResponseError - type: 'null' - nullable: true title: OpenAIResponseError id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model object: + type: string const: response - default: response title: Object - type: string + default: response 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' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -5279,33 +5945,40 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array + title: Output parallel_tool_calls: - default: false - title: Parallel Tool Calls type: boolean + title: Parallel Tool Calls + default: false previous_response_id: anyOf: - type: string - type: 'null' - nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' title: OpenAIResponsePrompt - type: 'null' - nullable: true title: OpenAIResponsePrompt status: - title: Status type: string + title: Status temperature: anyOf: - type: number - type: 'null' - nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -5315,20 +5988,9 @@ components: anyOf: - type: number - type: 'null' - nullable: true tools: anyOf: - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' title: OpenAIResponseInputToolWebSearch @@ -5338,32 +6000,38 @@ components: title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - nullable: true truncation: anyOf: - type: string - type: 'null' - nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' title: OpenAIResponseUsage - type: 'null' - nullable: true title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - nullable: true max_tool_calls: anyOf: - type: integer - type: 'null' - nullable: true + type: object required: - created_at - id @@ -5371,7 +6039,7 @@ components: - output - status title: OpenAIResponseObject - type: object + description: Complete OpenAI response object containing generation results and metadata. OpenAIResponseContentPartOutputText: description: Text content within a streamed response part. properties: @@ -6535,43 +7203,32 @@ components: title: OpenAIResponseObjectStreamResponseWebSearchCallSearching type: object OpenAIDeleteResponseObject: - description: Response object confirming deletion of an OpenAI response. properties: id: - title: Id type: string + title: Id object: + type: string const: response - default: response title: Object - type: string + default: response deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: OpenAIDeleteResponseObject - type: object + description: Response object confirming deletion of an OpenAI response. ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. 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' - title: OpenAIResponseMessage + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -6584,39 +7241,48 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Data + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array + title: Data object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data title: ListOpenAIResponseInputItem - type: object + description: List container for OpenAI response input items. RunShieldResponse: - description: Response from running a safety shield. properties: violation: anyOf: - $ref: '#/components/schemas/SafetyViolation' title: SafetyViolation - type: 'null' - nullable: true title: SafetyViolation - title: RunShieldResponse type: object + title: RunShieldResponse + description: Response from running a safety shield. SafetyViolation: - description: Details of a safety violation detected by content moderation. properties: violation_level: $ref: '#/components/schemas/ViolationLevel' @@ -6624,25 +7290,25 @@ components: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - violation_level title: SafetyViolation - type: object + description: Details of a safety violation detected by content moderation. ViolationLevel: - description: Severity level of a safety violation. + type: string enum: - info - warn - error title: ViolationLevel - type: string + description: Severity level of a safety violation. AggregationFunctionType: - description: Types of aggregation functions for scoring results. + type: string enum: - average - weighted_average @@ -6650,193 +7316,176 @@ components: - categorical_count - accuracy title: AggregationFunctionType - type: string + description: Types of aggregation functions for scoring results. ArrayType: - description: Parameter type for array values. properties: type: + type: string const: array - default: array title: Type - type: string - title: ArrayType + default: array type: object + title: ArrayType + description: Parameter type for array values. BasicScoringFnParams: - description: Parameters for basic scoring function configuration. properties: type: + type: string const: basic - default: basic title: Type - type: string + default: basic aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array - title: BasicScoringFnParams + 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. BooleanType: - description: Parameter type for boolean values. properties: type: + type: string const: boolean - default: boolean title: Type - type: string - title: BooleanType + default: boolean type: object + title: BooleanType + description: Parameter type for boolean values. ChatCompletionInputType: - description: Parameter type for chat completion input. properties: type: + type: string const: chat_completion_input - default: chat_completion_input title: Type - type: string - title: ChatCompletionInputType + default: chat_completion_input type: object + title: ChatCompletionInputType + description: Parameter type for chat completion input. CompletionInputType: - description: Parameter type for completion input. properties: type: + type: string const: completion_input - default: completion_input title: Type - type: string - title: CompletionInputType + default: completion_input type: object + title: CompletionInputType + description: Parameter type for completion input. JsonType: - description: Parameter type for JSON values. properties: type: + type: string const: json - default: json title: Type - type: string - title: JsonType + default: json type: object + title: JsonType + description: Parameter type for JSON values. LLMAsJudgeScoringFnParams: - description: Parameters for LLM-as-judge scoring function configuration. properties: type: + type: string const: llm_as_judge - default: llm_as_judge title: Type - type: string + default: llm_as_judge judge_model: - title: Judge Model type: string + title: Judge Model prompt_template: anyOf: - type: string - type: 'null' - nullable: true judge_score_regexes: - description: Regexes to extract the answer from generated response items: type: string - title: Judge Score Regexes type: array + title: Judge Score Regexes + description: Regexes to extract the answer from generated response aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array + title: Aggregation Functions + description: Aggregation functions to apply to the scores of each row + type: object required: - judge_model title: LLMAsJudgeScoringFnParams - type: object + description: Parameters for LLM-as-judge scoring function configuration. NumberType: - description: Parameter type for numeric values. properties: type: + type: string const: number - default: number title: Type - type: string - title: NumberType + default: number type: object + title: NumberType + description: Parameter type for numeric values. ObjectType: - description: Parameter type for object values. properties: type: + type: string const: object - default: object title: Type - type: string - title: ObjectType + default: object type: object + title: ObjectType + description: Parameter type for object values. RegexParserScoringFnParams: - description: Parameters for regex parser scoring function configuration. properties: type: + type: string const: regex_parser - default: regex_parser title: Type - type: string + default: regex_parser parsing_regexes: - description: Regex to extract the answer from generated response items: type: string - title: Parsing Regexes type: array + title: Parsing Regexes + description: Regex to extract the answer from generated response aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array - title: RegexParserScoringFnParams + 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. ScoringFn: - description: A scoring function resource for evaluating model outputs. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: scoring_function - default: scoring_function title: Type - type: string + default: scoring_function description: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - description: Any additional metadata for this definition - title: Metadata type: object + title: Metadata + description: Any additional metadata for this definition return_type: - description: The return type of the deterministic function - discriminator: - mapping: - 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' title: StringType @@ -6857,32 +7506,45 @@ components: - $ref: '#/components/schemas/CompletionInputType' title: CompletionInputType title: StringType | ... (9 variants) + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + 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: anyOf: - - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval title: Params - nullable: true + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + type: object required: - identifier - provider_id - return_type title: ScoringFn - type: object + description: A scoring function resource for evaluating model outputs. ScoringFnParams: discriminator: mapping: @@ -6899,127 +7561,124 @@ components: title: BasicScoringFnParams title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams StringType: - description: Parameter type for string values. properties: type: + type: string const: string - default: string title: Type - type: string - title: StringType + default: string type: object + title: StringType + description: Parameter type for string values. UnionType: - description: Parameter type for union values. properties: type: + type: string const: union - default: union title: Type - type: string - title: UnionType + default: union type: object + title: UnionType + description: Parameter type for union values. ListScoringFunctionsResponse: properties: data: items: $ref: '#/components/schemas/ScoringFn' - title: Data type: array + title: Data + type: object required: - data title: ListScoringFunctionsResponse - type: object ScoreResponse: - description: The response from scoring. properties: results: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Results type: object + title: Results + type: object required: - results title: ScoreResponse - type: object + description: The response from scoring. ScoringResult: - description: A scoring result for a single row. properties: score_rows: items: additionalProperties: true type: object - title: Score Rows type: array + title: Score Rows aggregated_results: additionalProperties: true - title: Aggregated Results type: object + title: Aggregated Results + type: object required: - score_rows - aggregated_results title: ScoringResult - type: object + description: A scoring result for a single row. ScoreBatchResponse: - description: Response from batch scoring operations on datasets. properties: dataset_id: anyOf: - type: string - type: 'null' - nullable: true results: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Results type: object + title: Results + type: object required: - results title: ScoreBatchResponse - type: object + description: Response from batch scoring operations on datasets. Shield: - description: A safety shield resource that can be used to check content. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: shield - default: shield title: Type - type: string + default: shield params: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - identifier - provider_id title: Shield - type: object + description: A safety shield resource that can be used to check content. ListShieldsResponse: properties: data: items: $ref: '#/components/schemas/Shield' - title: Data type: array + title: Data + type: object required: - data title: ListShieldsResponse - type: object ImageContentItem: description: A image content item properties: @@ -7076,184 +7735,172 @@ components: title: TextContentItem title: ImageContentItem | TextContentItem TextContentItem: - description: A text content item properties: type: + type: string const: text - default: text title: Type - type: string + default: text text: - title: Text type: string + title: Text + type: object required: - text title: TextContentItem - type: object + description: A text content item ToolInvocationResult: - description: Result of a tool invocation. properties: content: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array - title: list[ImageContentItem | TextContentItem] + title: list[ImageContentItem-Output | TextContentItem] - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true + title: string | list[ImageContentItem-Output | TextContentItem] error_message: anyOf: - type: string - type: 'null' - nullable: true error_code: anyOf: - type: integer - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true - title: ToolInvocationResult type: object + title: ToolInvocationResult + description: Result of a tool invocation. URL: - description: A URL reference to external content. properties: uri: - title: Uri type: string + title: Uri + type: object required: - uri title: URL - type: object + description: A URL reference to external content. ToolDef: - description: Tool definition used in runtime contexts. properties: toolgroup_id: anyOf: - type: string - type: 'null' - nullable: true name: - title: Name type: string + title: Name description: anyOf: - type: string - type: 'null' - nullable: true input_schema: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true output_schema: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - name title: ToolDef - type: object + description: Tool definition used in runtime contexts. ListToolDefsResponse: - description: Response containing a list of tool definitions. properties: data: items: $ref: '#/components/schemas/ToolDef' - title: Data type: array + title: Data + type: object required: - data title: ListToolDefsResponse - type: object + description: Response containing a list of tool definitions. ToolGroup: - description: A group of related tools managed together. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: tool_group - default: tool_group title: Type - type: string + default: tool_group mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' title: URL - type: 'null' - nullable: true title: URL args: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - identifier - provider_id title: ToolGroup - type: object + description: A group of related tools managed together. ListToolGroupsResponse: - description: Response containing a list of tool groups. properties: data: items: $ref: '#/components/schemas/ToolGroup' - title: Data type: array + title: Data + type: object required: - data title: ListToolGroupsResponse - type: object + description: Response containing a list of tool groups. Chunk: description: A chunk of content that can be inserted into a vector database. properties: @@ -7313,105 +7960,94 @@ components: 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. properties: chunk_id: anyOf: - type: string - type: 'null' - nullable: true document_id: anyOf: - type: string - type: 'null' - nullable: true source: anyOf: - type: string - type: 'null' - nullable: true created_timestamp: anyOf: - type: integer - type: 'null' - nullable: true updated_timestamp: anyOf: - type: integer - type: 'null' - nullable: true chunk_window: anyOf: - type: string - type: 'null' - nullable: true chunk_tokenizer: anyOf: - type: string - type: 'null' - nullable: true chunk_embedding_model: anyOf: - type: string - type: 'null' - nullable: true chunk_embedding_dimension: anyOf: - type: integer - type: 'null' - nullable: true content_token_count: anyOf: - type: integer - type: 'null' - nullable: true metadata_token_count: anyOf: - type: integer - type: 'null' - nullable: true - title: ChunkMetadata type: object + title: 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. QueryChunksResponse: - description: Response from querying chunks in a vector database. properties: chunks: items: - $ref: '#/components/schemas/Chunk' - title: Chunks + $ref: '#/components/schemas/Chunk-Output' type: array + title: Chunks scores: items: type: number - title: Scores type: array + title: Scores + type: object required: - chunks - scores title: QueryChunksResponse - type: object + description: Response from querying chunks in a vector database. VectorStoreFileCounts: - description: File processing status counts for a vector store. properties: completed: - title: Completed type: integer + title: Completed cancelled: - title: Cancelled type: integer + title: Cancelled failed: - title: Failed type: integer + title: Failed in_progress: - title: In Progress type: integer + title: In Progress total: - title: Total type: integer + title: Total + type: object required: - completed - cancelled @@ -7419,91 +8055,85 @@ components: - in_progress - total title: VectorStoreFileCounts - type: object + description: File processing status counts for a vector store. VectorStoreListResponse: - description: Response from listing vector stores. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreListResponse - type: object + description: Response from listing vector stores. VectorStoreObject: - description: OpenAI Vector Store object. properties: id: - title: Id type: string + title: Id object: - default: vector_store - title: Object type: string - created_at: - title: Created At + title: Object + default: vector_store + created_at: type: integer + title: Created At name: anyOf: - type: string - type: 'null' - nullable: true usage_bytes: - default: 0 - title: Usage Bytes type: integer + title: Usage Bytes + default: 0 file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' status: - default: completed - title: Status type: string + title: Status + default: completed expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true expires_at: anyOf: - type: integer - type: 'null' - nullable: true last_active_at: anyOf: - type: integer - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - id - created_at - file_counts title: VectorStoreObject - type: object + description: OpenAI Vector Store object. VectorStoreChunkingStrategy: discriminator: mapping: @@ -7517,159 +8147,151 @@ components: title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreChunkingStrategyAuto: - description: Automatic chunking strategy for vector store files. properties: type: + type: string const: auto - default: auto title: Type - type: string - title: VectorStoreChunkingStrategyAuto + default: auto type: object + title: VectorStoreChunkingStrategyAuto + description: Automatic chunking strategy for vector store files. VectorStoreChunkingStrategyStatic: - description: Static chunking strategy with configurable parameters. properties: type: + type: string const: static - default: static title: Type - type: string + default: static static: $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + type: object required: - static title: VectorStoreChunkingStrategyStatic - type: object + description: Static chunking strategy with configurable parameters. VectorStoreChunkingStrategyStaticConfig: - description: Configuration for static chunking strategy. properties: chunk_overlap_tokens: - default: 400 - title: Chunk Overlap Tokens type: integer + title: Chunk Overlap Tokens + default: 400 max_chunk_size_tokens: - default: 800 - maximum: 4096 - minimum: 100 - title: Max Chunk Size Tokens type: integer - title: VectorStoreChunkingStrategyStaticConfig + maximum: 4096.0 + minimum: 100.0 + title: Max Chunk Size Tokens + default: 800 type: object + title: VectorStoreChunkingStrategyStaticConfig + description: Configuration for static chunking strategy. OpenAICreateVectorStoreRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store with extra_body support. properties: name: anyOf: - type: string - type: 'null' - nullable: true file_ids: anyOf: - items: type: string type: array - type: 'null' - nullable: true expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true chunking_strategy: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true - title: OpenAICreateVectorStoreRequestWithExtraBody + additionalProperties: true type: object + title: OpenAICreateVectorStoreRequestWithExtraBody + description: Request to create a vector store with extra_body support. VectorStoreDeleteResponse: - description: Response from deleting a vector store. properties: id: - title: Id type: string + title: Id object: - default: vector_store.deleted - title: Object type: string + title: Object + default: vector_store.deleted deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: VectorStoreDeleteResponse - type: object + description: Response from deleting a vector store. OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store file batch with extra_body support. properties: file_ids: items: type: string - title: File Ids type: array + title: File Ids attributes: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true chunking_strategy: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy - nullable: true + additionalProperties: true + type: object required: - file_ids title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - type: object + description: Request to create a vector store file batch with extra_body support. VectorStoreFileBatchObject: - description: OpenAI Vector Store File Batch object. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file_batch - title: Object type: string + title: Object + default: vector_store.file_batch created_at: - title: Created At type: integer + title: Created At vector_store_id: - title: Vector Store Id type: string + title: Vector Store Id status: title: Status type: string @@ -7681,6 +8303,7 @@ components: default: completed file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' + type: object required: - id - created_at @@ -7688,7 +8311,7 @@ components: - status - file_counts title: VectorStoreFileBatchObject - type: object + description: OpenAI Vector Store File Batch object. VectorStoreFileStatus: type: string enum: @@ -7698,7 +8321,6 @@ components: - failed default: completed VectorStoreFileLastError: - description: Error information for failed vector store file processing. properties: code: title: Code @@ -7708,48 +8330,47 @@ components: - rate_limit_exceeded default: server_error message: - title: Message type: string + title: Message + type: object required: - code - message title: VectorStoreFileLastError - type: object + description: Error information for failed vector store file processing. VectorStoreFileObject: - description: OpenAI Vector Store File object. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file - title: Object type: string + title: Object + default: vector_store.file attributes: additionalProperties: true - title: Attributes type: object + title: Attributes chunking_strategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' created_at: - title: Created At type: integer + title: Created At last_error: anyOf: - $ref: '#/components/schemas/VectorStoreFileLastError' title: VectorStoreFileLastError - type: 'null' - nullable: true title: VectorStoreFileLastError status: title: Status @@ -7761,12 +8382,13 @@ components: - failed default: completed usage_bytes: - default: 0 - title: Usage Bytes type: integer + title: Usage Bytes + default: 0 vector_store_id: - title: Vector Store Id type: string + title: Vector Store Id + type: object required: - id - chunking_strategy @@ -7774,158 +8396,149 @@ components: - status - vector_store_id title: VectorStoreFileObject - type: object + description: OpenAI Vector Store File object. VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreFileObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreFilesListInBatchResponse - type: object + description: Response from listing files in a vector store file batch. VectorStoreListFilesResponse: - description: Response from listing files in a vector store. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreFileObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreListFilesResponse - type: object + description: Response from listing files in a vector store. VectorStoreFileDeleteResponse: - description: Response from deleting a vector store file. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file.deleted - title: Object type: string + title: Object + default: vector_store.file.deleted deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: VectorStoreFileDeleteResponse - type: object + description: Response from deleting a vector store file. VectorStoreContent: - description: Content item from a vector store file or search result. properties: type: + type: string const: text title: Type - type: string text: - title: Text type: string + title: Text embedding: anyOf: - items: type: number type: array - type: 'null' - nullable: true chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' title: ChunkMetadata - type: 'null' - nullable: true title: ChunkMetadata metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - type - text title: VectorStoreContent - type: object + description: Content item from a vector store file or search result. VectorStoreFileContentResponse: - description: Represents the parsed content of a vector store file. properties: object: + type: string const: vector_store.file_content.page - default: vector_store.file_content.page title: Object - type: string + default: vector_store.file_content.page data: items: $ref: '#/components/schemas/VectorStoreContent' - title: Data type: array + title: Data has_more: - default: false - title: Has More type: boolean + title: Has More + default: false next_page: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - data title: VectorStoreFileContentResponse - type: object + description: Represents the parsed content of a vector store file. VectorStoreSearchResponse: - description: Response from searching a vector store. properties: file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename score: - title: Score type: number + title: Score attributes: anyOf: - additionalProperties: @@ -7936,241 +8549,230 @@ components: title: string | number | boolean type: object - type: 'null' - nullable: true content: items: $ref: '#/components/schemas/VectorStoreContent' - title: Content type: array + title: Content + type: object required: - file_id - filename - score - content title: VectorStoreSearchResponse - type: object + description: Response from searching a vector store. VectorStoreSearchResponsePage: - description: Paginated response from searching a vector store. properties: object: - default: vector_store.search_results.page - title: Object type: string + title: Object + default: vector_store.search_results.page search_query: items: type: string - title: Search Query type: array + title: Search Query data: items: $ref: '#/components/schemas/VectorStoreSearchResponse' - title: Data type: array + title: Data has_more: - default: false - title: Has More type: boolean + title: Has More + default: false next_page: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - search_query - data title: VectorStoreSearchResponsePage - type: object + description: Paginated response from searching a vector store. VersionInfo: - description: Version information for the service. properties: version: - title: Version type: string + title: Version + type: object required: - version title: VersionInfo - type: object + description: Version information for the service. PaginatedResponse: - description: A generic paginated response that follows a simple format. properties: data: items: additionalProperties: true type: object - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More url: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - data - has_more title: PaginatedResponse - type: object + description: A generic paginated response that follows a simple format. Dataset: - description: Dataset resource for storing and accessing training or evaluation data. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: dataset - default: dataset title: Type - type: string + default: dataset purpose: $ref: '#/components/schemas/DatasetPurpose' source: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type oneOf: - $ref: '#/components/schemas/URIDataSource' title: URIDataSource - $ref: '#/components/schemas/RowsDataSource' title: RowsDataSource title: URIDataSource | RowsDataSource + discriminator: + propertyName: type + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' metadata: additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata type: object + title: Metadata + description: Any additional metadata for this dataset + type: object required: - identifier - provider_id - purpose - source title: Dataset - type: object + description: Dataset resource for storing and accessing training or evaluation data. RowsDataSource: - description: A dataset stored in rows. properties: type: + type: string const: rows - default: rows title: Type - type: string + default: rows rows: items: additionalProperties: true type: object - title: Rows type: array + title: Rows + type: object required: - rows title: RowsDataSource - type: object + description: A dataset stored in rows. URIDataSource: - description: A dataset that can be obtained from a URI. properties: type: + type: string const: uri - default: uri title: Type - type: string + default: uri uri: - title: Uri type: string + title: Uri + type: object required: - uri title: URIDataSource - type: object + description: A dataset that can be obtained from a URI. ListDatasetsResponse: - description: Response from listing datasets. properties: data: items: $ref: '#/components/schemas/Dataset' - title: Data type: array + title: Data + type: object required: - data title: ListDatasetsResponse - type: object + description: Response from listing datasets. Benchmark: - description: A benchmark resource for evaluating model performance. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: benchmark - default: benchmark title: Type - type: string + default: benchmark dataset_id: - title: Dataset Id type: string + title: Dataset Id scoring_functions: items: type: string - title: Scoring Functions type: array + title: Scoring Functions metadata: additionalProperties: true - description: Metadata for this evaluation task - title: Metadata type: object + title: Metadata + description: Metadata for this evaluation task + type: object required: - identifier - provider_id - dataset_id - scoring_functions title: Benchmark - type: object + description: A benchmark resource for evaluating model performance. ListBenchmarksResponse: properties: data: items: $ref: '#/components/schemas/Benchmark' - title: Data type: array + title: Data + type: object required: - data title: ListBenchmarksResponse - type: object BenchmarkConfig: - description: A benchmark configuration for evaluation. properties: eval_candidate: $ref: '#/components/schemas/ModelCandidate' scoring_params: additionalProperties: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' title: LLMAsJudgeScoringFnParams @@ -8178,41 +8780,46 @@ components: title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - description: Map between scoring function id and parameters for each scoring function you want to run - title: Scoring Params type: object + title: Scoring Params + description: Map between scoring function id and parameters for each scoring function you want to run num_examples: anyOf: - type: integer - type: 'null' description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - nullable: true + type: object required: - eval_candidate title: BenchmarkConfig - type: object + description: A benchmark configuration for evaluation. GreedySamplingStrategy: - description: Greedy sampling strategy that selects the highest probability token at each step. properties: type: + type: string const: greedy - default: greedy title: Type - type: string - title: GreedySamplingStrategy + default: greedy type: object + title: GreedySamplingStrategy + description: Greedy sampling strategy that selects the highest probability token at each step. ModelCandidate: - description: A model candidate for evaluation. properties: type: + type: string const: model - default: model title: Type - type: string + default: model model: - title: Model type: string + title: Model sampling_params: $ref: '#/components/schemas/SamplingParams' system_message: @@ -8220,23 +8827,16 @@ components: - $ref: '#/components/schemas/SystemMessage' title: SystemMessage - type: 'null' - nullable: true title: SystemMessage + type: object required: - model - sampling_params title: ModelCandidate - type: object + description: A model candidate for evaluation. SamplingParams: - description: Sampling parameters. properties: strategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' title: GreedySamplingStrategy @@ -8245,11 +8845,16 @@ components: - $ref: '#/components/schemas/TopKSamplingStrategy' title: TopKSamplingStrategy title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' max_tokens: anyOf: - type: integer - type: 'null' - nullable: true repetition_penalty: anyOf: - type: number @@ -8261,74 +8866,73 @@ components: type: string type: array - type: 'null' - nullable: true - title: SamplingParams type: object + title: SamplingParams + description: Sampling parameters. SystemMessage: - description: A system message providing instructions or context to the model. properties: role: + type: string const: system - default: system title: Role - type: string + default: system content: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + type: object required: - content title: SystemMessage - type: object + description: A system message providing instructions or context to the model. TopKSamplingStrategy: - description: Top-k sampling strategy that restricts sampling to the k most likely tokens. properties: type: + type: string const: top_k - default: top_k title: Type - type: string + default: top_k top_k: - minimum: 1 - title: Top K type: integer + minimum: 1.0 + title: Top K + type: object required: - top_k title: TopKSamplingStrategy - type: object + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. TopPSamplingStrategy: - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. properties: type: + type: string const: top_p - default: top_p title: Type - type: string + default: top_p temperature: anyOf: - type: number @@ -8339,94 +8943,94 @@ components: - type: number - type: 'null' default: 0.95 + type: object required: - temperature title: TopPSamplingStrategy - type: object + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. EvaluateResponse: - description: The response from an evaluation. properties: generations: items: additionalProperties: true type: object - title: Generations type: array + title: Generations scores: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Scores type: object + title: Scores + type: object required: - generations - scores title: EvaluateResponse - type: object + description: The response from an evaluation. Job: - description: A job execution instance with status tracking. properties: job_id: - title: Job Id type: string + title: Job Id status: $ref: '#/components/schemas/JobStatus' + type: object required: - job_id - status title: Job - type: object + description: A job execution instance with status tracking. RerankData: - description: A single rerank result from a reranking response. properties: index: - title: Index type: integer + title: Index relevance_score: - title: Relevance Score type: number + title: Relevance Score + type: object required: - index - relevance_score title: RerankData - type: object + description: A single rerank result from a reranking response. RerankResponse: - description: Response from a reranking request. properties: data: items: $ref: '#/components/schemas/RerankData' - title: Data type: array + title: Data + type: object required: - data title: RerankResponse - type: object + description: Response from a reranking request. Checkpoint: - description: Checkpoint created during training runs. properties: identifier: - title: Identifier type: string + title: Identifier created_at: + type: string format: date-time title: Created At - type: string epoch: - title: Epoch type: integer + title: Epoch post_training_job_id: - title: Post Training Job Id type: string + title: Post Training Job Id path: - title: Path type: string + title: Path training_metrics: anyOf: - $ref: '#/components/schemas/PostTrainingMetric' title: PostTrainingMetric - type: 'null' - nullable: true title: PostTrainingMetric + type: object required: - identifier - created_at @@ -8434,137 +9038,131 @@ components: - post_training_job_id - path title: Checkpoint - type: object + description: Checkpoint created during training runs. PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid checkpoints: items: $ref: '#/components/schemas/Checkpoint' - title: Checkpoints type: array + title: Checkpoints + type: object required: - job_uuid title: PostTrainingJobArtifactsResponse - type: object + description: Artifacts of a finetuning job. PostTrainingMetric: - description: Training metrics captured during post-training jobs. properties: epoch: - title: Epoch type: integer + title: Epoch train_loss: - title: Train Loss type: number + title: Train Loss validation_loss: - title: Validation Loss type: number + title: Validation Loss perplexity: - title: Perplexity type: number + title: Perplexity + type: object required: - epoch - train_loss - validation_loss - perplexity title: PostTrainingMetric - type: object + description: Training metrics captured during post-training jobs. PostTrainingJobStatusResponse: - description: Status of a finetuning job. properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid status: $ref: '#/components/schemas/JobStatus' scheduled_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true started_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true completed_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true checkpoints: items: $ref: '#/components/schemas/Checkpoint' - title: Checkpoints type: array + title: Checkpoints + type: object required: - job_uuid - status title: PostTrainingJobStatusResponse - type: object + description: Status of a finetuning job. ListPostTrainingJobsResponse: properties: data: items: $ref: '#/components/schemas/PostTrainingJob' - title: Data type: array + title: Data + type: object required: - data title: ListPostTrainingJobsResponse - type: object DPOAlignmentConfig: - description: Configuration for Direct Preference Optimization (DPO) alignment. properties: beta: - title: Beta type: number + title: Beta loss_type: $ref: '#/components/schemas/DPOLossType' default: sigmoid + type: object required: - beta title: DPOAlignmentConfig - type: object + description: Configuration for Direct Preference Optimization (DPO) alignment. DPOLossType: + type: string enum: - sigmoid - hinge - ipo - kto_pair title: DPOLossType - type: string DataConfig: - description: Configuration for training data and data loading. properties: dataset_id: - title: Dataset Id type: string + title: Dataset Id batch_size: - title: Batch Size type: integer + title: Batch Size shuffle: - title: Shuffle type: boolean + title: Shuffle data_format: $ref: '#/components/schemas/DatasetFormat' validation_dataset_id: anyOf: - type: string - type: 'null' - nullable: true packed: anyOf: - type: boolean @@ -8575,22 +9173,22 @@ components: - type: boolean - type: 'null' default: false + type: object required: - dataset_id - batch_size - shuffle - data_format title: DataConfig - type: object + description: Configuration for training data and data loading. DatasetFormat: - description: Format of the training dataset. + type: string enum: - instruct - dialog title: DatasetFormat - type: string + description: Format of the training dataset. EfficiencyConfig: - description: Configuration for memory and compute efficiency optimizations. properties: enable_activation_checkpointing: anyOf: @@ -8612,51 +9210,51 @@ components: - type: boolean - type: 'null' default: false - title: EfficiencyConfig type: object + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. OptimizerConfig: - description: Configuration parameters for the optimization algorithm. properties: optimizer_type: $ref: '#/components/schemas/OptimizerType' lr: - title: Lr type: number + title: Lr weight_decay: - title: Weight Decay type: number + title: Weight Decay num_warmup_steps: - title: Num Warmup Steps type: integer + title: Num Warmup Steps + type: object required: - optimizer_type - lr - weight_decay - num_warmup_steps title: OptimizerConfig - type: object + description: Configuration parameters for the optimization algorithm. OptimizerType: - description: Available optimizer algorithms for training. + type: string enum: - adam - adamw - sgd title: OptimizerType - type: string + description: Available optimizer algorithms for training. TrainingConfig: - description: Comprehensive configuration for the training process. properties: n_epochs: - title: N Epochs type: integer + title: N Epochs max_steps_per_epoch: - default: 1 - title: Max Steps Per Epoch type: integer - gradient_accumulation_steps: + title: Max Steps Per Epoch default: 1 - title: Gradient Accumulation Steps + gradient_accumulation_steps: type: integer + title: Gradient Accumulation Steps + default: 1 max_validation_steps: anyOf: - type: integer @@ -8667,40 +9265,38 @@ components: - $ref: '#/components/schemas/DataConfig' title: DataConfig - type: 'null' - nullable: true title: DataConfig optimizer_config: anyOf: - $ref: '#/components/schemas/OptimizerConfig' title: OptimizerConfig - type: 'null' - nullable: true title: OptimizerConfig efficiency_config: anyOf: - $ref: '#/components/schemas/EfficiencyConfig' title: EfficiencyConfig - type: 'null' - nullable: true title: EfficiencyConfig dtype: anyOf: - type: string - type: 'null' default: bf16 + type: object required: - n_epochs title: TrainingConfig - type: object + description: Comprehensive configuration for the training process. PostTrainingJob: properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid + type: object required: - job_uuid title: PostTrainingJob - type: object AlgorithmConfig: discriminator: mapping: @@ -8714,30 +9310,29 @@ components: title: QATFinetuningConfig title: LoraFinetuningConfig | QATFinetuningConfig LoraFinetuningConfig: - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. properties: type: + type: string const: LoRA - default: LoRA title: Type - type: string + default: LoRA lora_attn_modules: items: type: string - title: Lora Attn Modules type: array + title: Lora Attn Modules apply_lora_to_mlp: - title: Apply Lora To Mlp type: boolean + title: Apply Lora To Mlp apply_lora_to_output: - title: Apply Lora To Output type: boolean + title: Apply Lora To Output rank: - title: Rank type: integer + title: Rank alpha: - title: Alpha type: integer + title: Alpha use_dora: anyOf: - type: boolean @@ -8748,6 +9343,7 @@ components: - type: boolean - type: 'null' default: false + type: object required: - lora_attn_modules - apply_lora_to_mlp @@ -8755,26 +9351,26 @@ components: - rank - alpha title: LoraFinetuningConfig - type: object + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. QATFinetuningConfig: - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: type: + type: string const: QAT - default: QAT title: Type - type: string + default: QAT quantizer_name: - title: Quantizer Name type: string + title: Quantizer Name group_size: - title: Group Size type: integer + title: Group Size + type: object required: - quantizer_name - group_size title: QATFinetuningConfig - type: object + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. ParamType: discriminator: mapping: @@ -8820,176 +9416,1388 @@ components: - $ref: '#/components/schemas/RowsDataSource' title: RowsDataSource title: URIDataSource | RowsDataSource - _URLOrData: - description: A URL or a base64 encoded string + AllowedToolsFilter: properties: - url: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - nullable: true - title: URL - data: + tool_names: anyOf: - - type: string + - items: + type: string + type: array - type: 'null' - contentEncoding: base64 - nullable: true - title: _URLOrData - type: object - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: 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 + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + never: + anyOf: + - items: + type: string + type: array + - type: 'null' type: object - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - MCPListToolsTool: - description: Tool definition returned by MCP list tools operation. + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. + BatchError: properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name - type: string - description: + code: anyOf: - type: string - type: 'null' - nullable: true - required: - - input_schema - - name - title: MCPListToolsTool - type: object - OpenAIResponseOutputMessageFileSearchToolCallResults: - description: Search results returned by the file search operation. - properties: - attributes: - additionalProperties: true - title: Attributes - type: object - file_id: + line: + anyOf: + - type: integer + - type: 'null' + message: + anyOf: + - type: string + - type: 'null' + param: + anyOf: + - type: string + - type: 'null' + 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 + BatchesPostRequest: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + const: 24h + title: Completion Window + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + idempotency_key: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_file_id + - endpoint + - completion_window + title: BatchesPostRequest + Body_openai_upload_file_v1_files_post: + properties: + file: + type: string + format: binary + title: File + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + expires_after: + anyOf: + - $ref: '#/components/schemas/ExpiresAfter' + title: ExpiresAfter + - type: 'null' + title: ExpiresAfter + type: object + required: + - file + - purpose + title: Body_openai_upload_file_v1_files_post + Chunk-Input: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + Chunk-Output: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + type: array + title: list[ImageContentItem-Output | TextContentItem] + title: string | list[ImageContentItem-Output | TextContentItem] + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + 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. + ConversationsByConversationIdItemsPostRequest: + properties: + items: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + title: Items + type: object + required: + - items + title: ConversationsByConversationIdItemsPostRequest + ConversationsByConversationIdPostRequest: + properties: + metadata: + additionalProperties: + type: string + type: object + title: Metadata + type: object + required: + - metadata + title: ConversationsByConversationIdPostRequest + ConversationsPostRequest: + properties: + items: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + - type: 'null' + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + type: object + title: ConversationsPostRequest + 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. + Errors: + properties: + data: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + object: + anyOf: + - type: string + - type: 'null' + additionalProperties: true + type: object + title: Errors + 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 + 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 + InputTokensDetails: + properties: + cached_tokens: + type: integer + title: Cached Tokens + additionalProperties: true + type: object + required: + - cached_tokens + title: InputTokensDetails + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + ModerationsPostRequest: + properties: + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + model: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input + title: ModerationsPostRequest + OpenAIAssistantMessageParam-Input: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + OpenAIResponseMessage-Input: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + type: string + const: message + title: Type + default: message + id: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + 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. + OpenAIResponseMessage-Output: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + type: string + const: message + title: Type + default: message + id: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + 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. + 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. + OpenAIResponseTextFormat: + properties: + type: + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text + name: + anyOf: + - type: string + - type: 'null' + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + description: + anyOf: + - type: string + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + OpenAIUserMessageParam-Input: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OpenAIUserMessageParam-Output: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OutputTokensDetails: + properties: + reasoning_tokens: + type: integer + title: Reasoning Tokens + additionalProperties: true + type: object + required: + - reasoning_tokens + title: OutputTokensDetails + PromptsByPromptIdPostRequest: + properties: + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt + - version + title: PromptsByPromptIdPostRequest + PromptsByPromptIdSetDefaultVersionPostRequest: + properties: + version: + type: integer + title: Version + type: object + required: + - version + title: PromptsByPromptIdSetDefaultVersionPostRequest + PromptsPostRequest: + properties: + prompt: + type: string + title: Prompt + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + required: + - prompt + title: PromptsPostRequest + ResponsesPostRequest: + properties: + input: + anyOf: + - type: string + - items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input + type: array + title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + model: + type: string + title: Model + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + title: OpenAIResponsePrompt + instructions: + anyOf: + - type: string + - type: 'null' + previous_response_id: + anyOf: + - type: string + - type: 'null' + conversation: + anyOf: + - type: string + - type: 'null' + store: + anyOf: + - type: boolean + - type: 'null' + default: true + stream: + anyOf: + - type: boolean + - type: 'null' + default: false + temperature: + anyOf: + - type: number + - type: 'null' + text: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseText' + title: OpenAIResponseText + - type: 'null' + title: OpenAIResponseText + tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + include: + anyOf: + - items: + type: string + type: array + - type: 'null' + max_infer_iters: + anyOf: + - type: integer + - type: 'null' + default: 10 + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - input + - model + title: ResponsesPostRequest + SafetyRunShieldPostRequest: + properties: + shield_id: + type: string + title: Shield Id + messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) + type: array + title: Messages + params: + additionalProperties: true + type: object + title: Params + type: object + required: + - shield_id + - messages + - params + title: SafetyRunShieldPostRequest + ScoringScoreBatchPostRequest: + properties: + dataset_id: type: string - filename: - title: Filename + title: Dataset Id + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + save_results_dataset: + type: boolean + title: Save Results Dataset + default: false + type: object + required: + - dataset_id + - scoring_functions + title: ScoringScoreBatchPostRequest + ScoringScorePostRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + type: object + required: + - input_rows + - scoring_functions + title: ScoringScorePostRequest + SearchRankingOptions: + properties: + ranker: + anyOf: + - type: string + - type: 'null' + score_threshold: + anyOf: + - type: number + - type: 'null' + default: 0.0 + type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + ToolRuntimeInvokePostRequest: + properties: + tool_name: type: string - score: - title: Score - type: number - text: - title: Text + title: Tool Name + kwargs: + additionalProperties: true + type: object + title: Kwargs + authorization: + anyOf: + - type: string + - type: 'null' + type: object + required: + - tool_name + - kwargs + title: ToolRuntimeInvokePostRequest + VectorIoQueryPostRequest: + properties: + vector_store_id: type: string + title: Vector Store Id + query: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - vector_store_id + - query + title: VectorIoQueryPostRequest + VectorStoresByVectorStoreIdFilesByFileIdPostRequest: + properties: + attributes: + additionalProperties: true + type: object + title: Attributes + type: object required: - attributes - - file_id - - filename - - score - - text - title: OpenAIResponseOutputMessageFileSearchToolCallResults + title: VectorStoresByVectorStoreIdFilesByFileIdPostRequest + VectorStoresByVectorStoreIdFilesPostRequest: + properties: + file_id: + type: string + title: File Id + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + chunking_strategy: + anyOf: + - oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy type: object - AllowedToolsFilter: - description: Filter configuration for restricting which MCP tools can be used. + required: + - file_id + title: VectorStoresByVectorStoreIdFilesPostRequest + VectorStoresByVectorStoreIdPostRequest: properties: - tool_names: + name: anyOf: - - items: - type: string - type: array + - type: string + - type: 'null' + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object - type: 'null' - nullable: true - title: AllowedToolsFilter type: object - ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. + title: VectorStoresByVectorStoreIdPostRequest + VectorStoresByVectorStoreIdSearchPostRequest: properties: - always: + query: anyOf: + - type: string - items: type: string type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object - type: 'null' - nullable: true - never: + max_num_results: anyOf: - - items: - type: string - type: array + - type: integer - type: 'null' - nullable: true - title: ApprovalFilter + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + title: SearchRankingOptions + rewrite_query: + anyOf: + - type: boolean + - type: 'null' + default: false + search_mode: + anyOf: + - type: string + - type: 'null' + default: vector type: object - SearchRankingOptions: - description: Options for ranking and filtering search results. + required: + - query + title: VectorStoresByVectorStoreIdSearchPostRequest + _URLOrData: properties: - ranker: + url: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - nullable: true - score_threshold: + title: URL + data: anyOf: - - type: number + - type: string - type: 'null' - default: 0.0 - title: SearchRankingOptions + contentEncoding: base64 + type: object + title: _URLOrData + description: A URL or a base64 encoded string + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat OpenAIResponseContentPart: discriminator: mapping: @@ -9005,56 +10813,6 @@ components: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' title: OpenAIResponseContentPartReasoningText title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseTextFormat: - description: Configuration for Responses API text format. - properties: - type: - title: Type - type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - title: OpenAIResponseTextFormat - type: object - OpenAIResponseUsageInputTokensDetails: - description: Token details for input tokens in OpenAI response usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageInputTokensDetails - type: object - OpenAIResponseUsageOutputTokensDetails: - description: Token details for output tokens in OpenAI response usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageOutputTokensDetails - type: object SpanEndPayload: description: Payload for a span end event. properties: @@ -9276,110 +11034,6 @@ components: - $ref: '#/components/schemas/StructuredLogEvent' title: StructuredLogEvent title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - BatchError: - additionalProperties: true - properties: - code: - anyOf: - - type: string - - type: 'null' - nullable: true - line: - anyOf: - - type: integer - - type: 'null' - nullable: true - message: - anyOf: - - type: string - - type: 'null' - nullable: true - param: - anyOf: - - type: string - - type: 'null' - nullable: true - title: BatchError - type: object - BatchRequestCounts: - additionalProperties: true - properties: - completed: - title: Completed - type: integer - failed: - title: Failed - type: integer - total: - title: Total - type: integer - required: - - completed - - failed - - total - title: BatchRequestCounts - type: object - BatchUsage: - additionalProperties: true - properties: - input_tokens: - title: Input Tokens - type: integer - input_tokens_details: - $ref: '#/components/schemas/InputTokensDetails' - output_tokens: - title: Output Tokens - type: integer - output_tokens_details: - $ref: '#/components/schemas/OutputTokensDetails' - total_tokens: - title: Total Tokens - type: integer - required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage - type: object - Errors: - additionalProperties: true - properties: - data: - anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array - - type: 'null' - nullable: true - object: - anyOf: - - type: string - - type: 'null' - nullable: true - title: Errors - type: object - InputTokensDetails: - additionalProperties: true - properties: - cached_tokens: - title: Cached Tokens - type: integer - required: - - cached_tokens - title: InputTokensDetails - type: object - OutputTokensDetails: - additionalProperties: true - properties: - reasoning_tokens: - title: Reasoning Tokens - type: integer - required: - - reasoning_tokens - title: OutputTokensDetails - type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -9411,16 +11065,6 @@ components: - text title: TextDelta type: object - JobStatus: - description: Status of a job execution. - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string MetricInResponse: description: A metric value included in API responses. properties: @@ -9536,14 +11180,6 @@ components: - status title: ConversationMessage type: object - DatasetPurpose: - description: Purpose of the dataset. Each purpose has a required input data schema. - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string Api: description: Enumeration of all available APIs in the Llama Stack system. enum: @@ -9616,7 +11252,6 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - nullable: true pip_packages: description: The pip dependencies needed for this implementation @@ -9707,7 +11342,6 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - nullable: true pip_packages: description: The pip dependencies needed for this implementation @@ -9781,7 +11415,6 @@ components: - `get_adapter_impl(config, deps)`: returns the adapter implementation Example: `module: ramalama_stack` - nullable: true pip_packages: description: The pip dependencies needed for this implementation @@ -9872,26 +11505,6 @@ components: default: int4_weight_int8_dynamic_activation title: Int4QuantizationConfig type: object - OpenAIChatCompletionUsageCompletionTokensDetails: - description: Token details for output tokens in OpenAI chat completion usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object - OpenAIChatCompletionUsagePromptTokensDetails: - description: Token details for prompt tokens in OpenAI chat completion usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - type: object OpenAICompletionLogprobs: description: |- The log probabilities for the tokens in the message from an OpenAI-compatible completion response. @@ -10062,13 +11675,6 @@ components: - content title: UserMessage type: object - HealthStatus: - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - type: string PostTrainingJobLogStream: description: Stream of logs from a finetuning job. properties: @@ -10249,3 +11855,131 @@ components: - query title: VectorStoreSearchRequest type: object + responses: + BadRequest400: + description: The request was invalid or malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 400 + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 429 + title: Too Many Requests + detail: You have exceeded the rate limit. Please try again later. + InternalServerError500: + description: The server encountered an unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 500 + title: Internal Server Error + detail: An unexpected error occurred + DefaultError: + description: An error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/Error' +tags: +- description: APIs for creating and interacting with agentic systems. + name: Agents + x-displayName: Agents +- description: |- + The API is designed to allow use of openai client libraries for seamless integration. + + This API provides the following extensions: + - idempotent batch creation + + Note: This API is currently under active development and may undergo changes. + name: Batches + x-displayName: The Batches API enables efficient processing of multiple requests in a single operation, particularly useful for processing large datasets, batch evaluation workflows, and cost-effective inference at scale. +- description: '' + name: Benchmarks +- description: Protocol for conversation management operations. + name: Conversations + x-displayName: Conversations +- description: '' + name: DatasetIO +- description: '' + name: Datasets +- description: Llama Stack Evaluation API for running evaluations on model and agent candidates. + name: Eval + x-displayName: Evaluations +- description: This API is used to upload documents that can be used with other Llama Stack APIs. + name: Files + x-displayName: Files +- description: |- + Llama Stack Inference API for generating completions, chat completions, and embeddings. + + This API provides the raw interface to the underlying models. Three kinds of models are supported: + - LLM models: these models generate "raw" and "chat" (conversational) completions. + - Embedding models: these models generate embeddings to be used for semantic search. + - Rerank models: these models reorder the documents based on their relevance to a query. + name: Inference + x-displayName: Inference +- description: APIs for inspecting the Llama Stack service, including health status, available API routes with methods and implementing providers. + name: Inspect + x-displayName: Inspect +- description: '' + name: Models +- description: '' + name: PostTraining (Coming Soon) +- description: Protocol for prompt management operations. + name: Prompts + x-displayName: Prompts +- description: Providers API for inspecting, listing, and modifying providers and their configurations. + name: Providers + x-displayName: Providers +- description: OpenAI-compatible Moderations API. + name: Safety + x-displayName: Safety +- description: '' + name: Scoring +- description: '' + name: ScoringFunctions +- description: '' + name: Shields +- description: '' + name: ToolGroups +- description: '' + name: ToolRuntime +- description: '' + name: VectorIO +x-tagGroups: +- name: Operations + tags: + - Agents + - Batches + - Benchmarks + - Conversations + - DatasetIO + - Datasets + - Eval + - Files + - Inference + - Inspect + - Models + - PostTraining (Coming Soon) + - Prompts + - Providers + - Safety + - Scoring + - ScoringFunctions + - Shields + - ToolGroups + - ToolRuntime + - VectorIO +security: +- Default: [] diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index d5324828a2..1a55e80b60 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -16,63 +16,86 @@ servers: paths: /v1/batches: get: - tags: - - Batches - summary: List Batches - operationId: list_batches_v1_batches_get responses: '200': - description: Successful Response + description: A list of batch objects. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListBatchesResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Batches - summary: Create Batch - operationId: create_batch_v1_batches_post + summary: List Batches + description: List all batches for the current user. + operationId: list_batches_v1_batches_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + post: responses: '200': - description: Successful Response + description: The created batch object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Batch' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/batches/{batch_id}: - get: + description: Default Response tags: - Batches - summary: Retrieve Batch - operationId: retrieve_batch_v1_batches__batch_id__get + summary: Create Batch + description: Create a new batch for processing multiple API requests. + operationId: create_batch_v1_batches_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BatchesPostRequest' + /v1/batches/{batch_id}: + get: responses: '200': - description: Successful Response + description: The batch object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Batch' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -85,6 +108,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Batches + summary: Retrieve Batch + description: Retrieve information about a specific batch. + operationId: retrieve_batch_v1_batches__batch_id__get parameters: - name: batch_id in: path @@ -94,16 +122,13 @@ paths: description: 'Path parameter: batch_id' /v1/batches/{batch_id}/cancel: post: - tags: - - Batches - summary: Cancel Batch - operationId: cancel_batch_v1_batches__batch_id__cancel_post responses: '200': - description: Successful Response + description: The updated batch object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Batch' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -116,6 +141,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Batches + summary: Cancel Batch + description: Cancel a batch that is in progress. + operationId: cancel_batch_v1_batches__batch_id__cancel_post parameters: - name: batch_id in: path @@ -125,63 +155,111 @@ paths: description: 'Path parameter: batch_id' /v1/chat/completions: get: - tags: - - Inference - summary: List Chat Completions - operationId: list_chat_completions_v1_chat_completions_get responses: '200': - description: Successful Response + description: A ListOpenAIChatCompletionResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Inference - summary: Openai Chat Completion - operationId: openai_chat_completion_v1_chat_completions_post + summary: List Chat Completions + description: List chat completions. + operationId: list_chat_completions_v1_chat_completions_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + post: responses: '200': - description: Successful Response + description: An OpenAIChatCompletion. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIChatCompletion' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionChunk' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/chat/completions/{completion_id}: - get: + description: Default Response tags: - Inference - summary: Get Chat Completion - operationId: get_chat_completion_v1_chat_completions__completion_id__get + summary: Openai Chat Completion + description: |- + Create chat completions. + + Generate an OpenAI-compatible chat completion for the given messages using the specified model. + operationId: openai_chat_completion_v1_chat_completions_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody' + /v1/chat/completions/{completion_id}: + get: responses: '200': - description: Successful Response + description: A OpenAICompletionWithInputMessages. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -194,6 +272,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: Get Chat Completion + description: |- + Get chat completion. + + Describe a chat completion by its ID. + operationId: get_chat_completion_v1_chat_completions__completion_id__get parameters: - name: completion_id in: path @@ -203,16 +289,13 @@ paths: description: 'Path parameter: completion_id' /v1/completions: post: - tags: - - Inference - summary: Openai Completion - operationId: openai_completion_v1_completions_post responses: '200': - description: Successful Response + description: An OpenAICompletion. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAICompletion' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -225,18 +308,29 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: Openai Completion + description: |- + Create completion. + + Generate an OpenAI-compatible completion for the given prompt using the specified model. + operationId: openai_completion_v1_completions_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' + required: true /v1/conversations: post: - tags: - - Conversations - summary: Create Conversation - operationId: create_conversation_v1_conversations_post responses: '200': - description: Successful Response + description: The created conversation object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Conversation' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -249,18 +343,29 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/conversations/{conversation_id}: - get: tags: - Conversations - summary: Get Conversation - operationId: get_conversation_v1_conversations__conversation_id__get + summary: Create Conversation + description: |- + Create a conversation. + + Create a conversation. + operationId: create_conversation_v1_conversations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationsPostRequest' + required: true + /v1/conversations/{conversation_id}: + get: responses: '200': - description: Successful Response + description: The conversation object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Conversation' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -273,6 +378,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Get Conversation + description: |- + Retrieve a conversation. + + Get a conversation with the given ID. + operationId: get_conversation_v1_conversations__conversation_id__get parameters: - name: conversation_id in: path @@ -281,16 +394,13 @@ paths: type: string description: 'Path parameter: conversation_id' post: - tags: - - Conversations - summary: Update Conversation - operationId: update_conversation_v1_conversations__conversation_id__post responses: '200': - description: Successful Response + description: The updated conversation object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Conversation' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -303,6 +413,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Update Conversation + description: |- + Update a conversation. + + Update a conversation's metadata with the given ID. + operationId: update_conversation_v1_conversations__conversation_id__post parameters: - name: conversation_id in: path @@ -310,17 +428,20 @@ paths: schema: type: string description: 'Path parameter: conversation_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationsByConversationIdPostRequest' + required: true delete: - tags: - - Conversations - summary: Openai Delete Conversation - operationId: openai_delete_conversation_v1_conversations__conversation_id__delete responses: '200': - description: Successful Response + description: The deleted conversation resource. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ConversationDeletedResource' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -333,6 +454,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Openai Delete Conversation + description: |- + Delete a conversation. + + Delete a conversation with the given ID. + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete parameters: - name: conversation_id in: path @@ -342,58 +471,105 @@ paths: description: 'Path parameter: conversation_id' /v1/conversations/{conversation_id}/items: get: - tags: - - Conversations - summary: List Items - operationId: list_items_v1_conversations__conversation_id__items_get responses: '200': - description: Successful Response + description: List of conversation items. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ConversationItemList' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Conversations + summary: List Items + description: |- + List items. + + List items in the conversation. + operationId: list_items_v1_conversations__conversation_id__items_get parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - enum: + - asc + - desc + type: string + - type: 'null' + title: Order - name: conversation_id in: path required: true schema: type: string description: 'Path parameter: conversation_id' + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + $ref: '#/components/schemas/ConversationItemInclude' + - type: 'null' + title: Include post: - tags: - - Conversations - summary: Add Items - operationId: add_items_v1_conversations__conversation_id__items_post responses: '200': - description: Successful Response + description: List of created items. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ConversationItemList' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Conversations + summary: Add Items + description: |- + Create items. + + Create items in the conversation. + operationId: add_items_v1_conversations__conversation_id__items_post parameters: - name: conversation_id in: path @@ -401,18 +577,21 @@ paths: schema: type: string description: 'Path parameter: conversation_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationsByConversationIdItemsPostRequest' /v1/conversations/{conversation_id}/items/{item_id}: get: - tags: - - Conversations - summary: Retrieve - operationId: retrieve_v1_conversations__conversation_id__items__item_id__get responses: '200': - description: Successful Response + description: The conversation item. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIResponseMessage' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -425,6 +604,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Retrieve + description: |- + Retrieve an item. + + Retrieve a conversation item. + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get parameters: - name: conversation_id in: path @@ -439,16 +626,13 @@ paths: type: string description: 'Path parameter: item_id' delete: - tags: - - Conversations - summary: Openai Delete Conversation Item - operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete responses: '200': - description: Successful Response + description: The deleted item resource. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ConversationItemDeletedResource' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -461,6 +645,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Conversations + summary: Openai Delete Conversation Item + description: |- + Delete an item. + + Delete a conversation item. + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete parameters: - name: conversation_id in: path @@ -476,16 +668,13 @@ paths: description: 'Path parameter: item_id' /v1/embeddings: post: - tags: - - Inference - summary: Openai Embeddings - operationId: openai_embeddings_v1_embeddings_post responses: '200': - description: Successful Response + description: An OpenAIEmbeddingsResponse containing the embeddings. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIEmbeddingsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -498,65 +687,132 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: Openai Embeddings + description: |- + Create embeddings. + + Generate OpenAI-compatible embeddings for the given input using the specified model. + operationId: openai_embeddings_v1_embeddings_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' + required: true /v1/files: get: - tags: - - Files - summary: Openai List Files - operationId: openai_list_files_v1_files_get responses: '200': - description: Successful Response + description: An ListOpenAIFileResponse containing the list of files. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListOpenAIFileResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Files - summary: Openai Upload File - operationId: openai_upload_file_v1_files_post + summary: Openai List Files + description: |- + List files. + + Returns a list of files that belong to the user's organization. + operationId: openai_list_files_v1_files_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 10000 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + - name: purpose + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/OpenAIFilePurpose' + - type: 'null' + title: Purpose + post: responses: '200': - description: Successful Response + description: An OpenAIFileObject representing the uploaded file. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIFileObject' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/files/{file_id}: - get: + description: Default Response tags: - Files - summary: Openai Retrieve File - operationId: openai_retrieve_file_v1_files__file_id__get + summary: Openai Upload File + description: |- + Upload file. + + Upload a file that can be used across various endpoints. + + The file upload should be a multipart form request with: + - file: The File object (not file name) to be uploaded. + - purpose: The intended purpose of the uploaded file. + - expires_after: Optional form values describing expiration for the file. + operationId: openai_upload_file_v1_files_post + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_openai_upload_file_v1_files_post' + /v1/files/{file_id}: + get: responses: '200': - description: Successful Response + description: An OpenAIFileObject containing file information. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIFileObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -569,6 +825,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: Openai Retrieve File + description: |- + Retrieve file. + + Returns information about a specific file. + operationId: openai_retrieve_file_v1_files__file_id__get parameters: - name: file_id in: path @@ -577,16 +841,13 @@ paths: type: string description: 'Path parameter: file_id' delete: - tags: - - Files - summary: Openai Delete File - operationId: openai_delete_file_v1_files__file_id__delete responses: '200': - description: Successful Response + description: An OpenAIFileDeleteResponse indicating successful deletion. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIFileDeleteResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -599,6 +860,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: Openai Delete File + description: Delete file. + operationId: openai_delete_file_v1_files__file_id__delete parameters: - name: file_id in: path @@ -608,16 +874,13 @@ paths: description: 'Path parameter: file_id' /v1/files/{file_id}/content: get: - tags: - - Files - summary: Openai Retrieve File Content - operationId: openai_retrieve_file_content_v1_files__file_id__content_get responses: '200': - description: Successful Response + description: The raw file content as a binary response. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Response' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -630,6 +893,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: Openai Retrieve File Content + description: |- + Retrieve file content. + + Returns the contents of the specified file. + operationId: openai_retrieve_file_content_v1_files__file_id__content_get parameters: - name: file_id in: path @@ -639,16 +910,13 @@ paths: description: 'Path parameter: file_id' /v1/health: get: - tags: - - Inspect - summary: Health - operationId: health_v1_health_get responses: '200': - description: Successful Response + description: Health information indicating if the service is operational. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/HealthInfo' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -661,42 +929,66 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/inspect/routes: - get: tags: - Inspect - summary: List Routes - operationId: list_routes_v1_inspect_routes_get + summary: Health + description: |- + Get health status. + + Get the current health status of the service. + operationId: health_v1_health_get + /v1/inspect/routes: + get: responses: '200': - description: Successful Response + description: Response containing information about all available routes. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListRoutesResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Inspect + summary: List Routes + description: |- + List routes. + + List all available API routes with their methods and implementing providers. + operationId: list_routes_v1_inspect_routes_get + parameters: + - name: api_filter + in: query + required: false + schema: + anyOf: + - enum: + - v1 + - v1alpha + - v1beta + - deprecated + type: string + - type: 'null' + title: Api Filter /v1/models: get: - tags: - - Models - summary: Openai List Models - operationId: openai_list_models_v1_models_get responses: '200': - description: Successful Response + description: A OpenAIListModelsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIListModelsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -709,17 +1001,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: tags: - Models - summary: Register Model - operationId: register_model_v1_models_post + summary: Openai List Models + description: List models using the OpenAI API. + operationId: openai_list_models_v1_models_get + post: responses: '200': - description: Successful Response + description: A Model. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Model' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -732,19 +1026,30 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Models + summary: Register Model + description: |- + Register model. + + Register a model. + operationId: register_model_v1_models_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ModelsPostRequest' + required: true deprecated: true /v1/models/{model_id}: get: - tags: - - Models - summary: Get Model - operationId: get_model_v1_models__model_id__get responses: '200': - description: Successful Response + description: A Model. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Model' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -757,6 +1062,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Models + summary: Get Model + description: |- + Get model. + + Get a model by its identifier. + operationId: get_model_v1_models__model_id__get parameters: - name: model_id in: path @@ -765,10 +1078,6 @@ paths: type: string description: 'Path parameter: model_id' delete: - tags: - - Models - summary: Unregister Model - operationId: unregister_model_v1_models__model_id__delete responses: '200': description: Successful Response @@ -787,7 +1096,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Models + summary: Unregister Model + description: |- + Unregister model. + + Unregister a model. + operationId: unregister_model_v1_models__model_id__delete parameters: - name: model_id in: path @@ -795,18 +1111,16 @@ paths: schema: type: string description: 'Path parameter: model_id' + deprecated: true /v1/moderations: post: - tags: - - Safety - summary: Run Moderation - operationId: run_moderation_v1_moderations_post responses: '200': - description: Successful Response + description: A moderation object. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ModerationObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -819,18 +1133,29 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Safety + summary: Run Moderation + description: |- + Create moderation. + + Classifies if text and/or image inputs are potentially harmful. + operationId: run_moderation_v1_moderations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ModerationsPostRequest' + required: true /v1/prompts: get: - tags: - - Prompts - summary: List Prompts - operationId: list_prompts_v1_prompts_get responses: '200': - description: Successful Response + description: A ListPromptsResponse containing all prompts. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListPromptsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -843,17 +1168,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: tags: - Prompts - summary: Create Prompt - operationId: create_prompt_v1_prompts_post + summary: List Prompts + description: List all prompts. + operationId: list_prompts_v1_prompts_get + post: responses: '200': - description: Successful Response + description: The created Prompt resource. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Prompt' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -866,31 +1193,58 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/prompts/{prompt_id}: - get: tags: - Prompts - summary: Get Prompt - operationId: get_prompt_v1_prompts__prompt_id__get + summary: Create Prompt + description: |- + Create prompt. + + Create a new prompt. + operationId: create_prompt_v1_prompts_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromptsPostRequest' + required: true + /v1/prompts/{prompt_id}: + get: responses: '200': - description: Successful Response + description: A Prompt resource. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Prompt' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Prompts + summary: Get Prompt + description: |- + Get prompt. + + Get a prompt by its identifier and optional version. + operationId: get_prompt_v1_prompts__prompt_id__get parameters: + - name: version + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Version - name: prompt_id in: path required: true @@ -898,28 +1252,33 @@ paths: type: string description: 'Path parameter: prompt_id' post: - tags: - - Prompts - summary: Update Prompt - operationId: update_prompt_v1_prompts__prompt_id__post responses: '200': - description: Successful Response + description: The updated Prompt resource with incremented version. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Prompt' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Prompts + summary: Update Prompt + description: |- + Update prompt. + + Update an existing prompt (increments version). + operationId: update_prompt_v1_prompts__prompt_id__post parameters: - name: prompt_id in: path @@ -927,11 +1286,13 @@ paths: schema: type: string description: 'Path parameter: prompt_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PromptsByPromptIdPostRequest' delete: - tags: - - Prompts - summary: Delete Prompt - operationId: delete_prompt_v1_prompts__prompt_id__delete responses: '200': description: Successful Response @@ -939,17 +1300,25 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Prompts + summary: Delete Prompt + description: |- + Delete prompt. + + Delete a prompt. + operationId: delete_prompt_v1_prompts__prompt_id__delete parameters: - name: prompt_id in: path @@ -959,16 +1328,13 @@ paths: description: 'Path parameter: prompt_id' /v1/prompts/{prompt_id}/set-default-version: post: - tags: - - Prompts - summary: Set Default Version - operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post responses: '200': - description: Successful Response + description: The prompt with the specified version now set as default. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Prompt' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -981,6 +1347,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Prompts + summary: Set Default Version + description: |- + Set prompt version. + + Set which version of a prompt should be the default in get_prompt (latest). + operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post parameters: - name: prompt_id in: path @@ -988,18 +1362,21 @@ paths: schema: type: string description: 'Path parameter: prompt_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromptsByPromptIdSetDefaultVersionPostRequest' + required: true /v1/prompts/{prompt_id}/versions: get: - tags: - - Prompts - summary: List Prompt Versions - operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get responses: '200': - description: Successful Response + description: A ListPromptsResponse containing all versions of the prompt. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListPromptsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1012,6 +1389,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Prompts + summary: List Prompt Versions + description: |- + List prompt versions. + + List all versions of a specific prompt. + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get parameters: - name: prompt_id in: path @@ -1021,16 +1406,13 @@ paths: description: 'Path parameter: prompt_id' /v1/providers: get: - tags: - - Providers - summary: List Providers - operationId: list_providers_v1_providers_get responses: '200': - description: Successful Response + description: A ListProvidersResponse containing information about all providers. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListProvidersResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1043,18 +1425,23 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/providers/{provider_id}: - get: tags: - Providers - summary: Inspect Provider - operationId: inspect_provider_v1_providers__provider_id__get + summary: List Providers + description: |- + List providers. + + List all available providers. + operationId: list_providers_v1_providers_get + /v1/providers/{provider_id}: + get: responses: '200': - description: Successful Response + description: A ProviderInfo object containing the provider's details. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ProviderInfo' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1067,6 +1454,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Providers + summary: Inspect Provider + description: |- + Get provider. + + Get detailed information about a specific provider. + operationId: inspect_provider_v1_providers__provider_id__get parameters: - name: provider_id in: path @@ -1076,63 +1471,132 @@ paths: description: 'Path parameter: provider_id' /v1/responses: get: - tags: - - Agents - summary: List Openai Responses - operationId: list_openai_responses_v1_responses_get responses: '200': - description: Successful Response + description: A ListOpenAIResponseObject. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListOpenAIResponseObject' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Agents - summary: Create Openai Response - operationId: create_openai_response_v1_responses_post + summary: List Openai Responses + description: List all responses. + operationId: list_openai_responses_v1_responses_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 50 + title: Limit + - name: model + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Model + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order + post: responses: '200': - description: Successful Response + description: An OpenAIResponseObject. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIResponseObject' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIResponseObjectStream' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/responses/{response_id}: - get: + description: Default Response tags: - Agents - summary: Get Openai Response - operationId: get_openai_response_v1_responses__response_id__get + summary: Create Openai Response + description: Create a model response. + operationId: create_openai_response_v1_responses_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ResponsesPostRequest' + x-llama-stack-extra-body-params: + guardrails: + $defs: + ResponseGuardrailSpec: + description: |- + Specification for a guardrail to apply during response generation. + + :param type: The type/identifier of the guardrail. + properties: + type: + title: Type + type: string + required: + - type + title: ResponseGuardrailSpec + type: object + anyOf: + - items: + anyOf: + - type: string + - $ref: '#/components/schemas/ResponseGuardrailSpec' + type: array + - type: 'null' + description: List of guardrails to apply during response generation. Guardrails provide safety and content moderation. + /v1/responses/{response_id}: + get: responses: '200': - description: Successful Response + description: An OpenAIResponseObject. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIResponseObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1145,6 +1609,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Get Openai Response + description: Get a model response. + operationId: get_openai_response_v1_responses__response_id__get parameters: - name: response_id in: path @@ -1153,16 +1622,13 @@ paths: type: string description: 'Path parameter: response_id' delete: - tags: - - Agents - summary: Delete Openai Response - operationId: delete_openai_response_v1_responses__response_id__delete responses: '200': - description: Successful Response + description: An OpenAIDeleteResponseObject content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIDeleteResponseObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1175,6 +1641,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Delete Openai Response + description: Delete a response. + operationId: delete_openai_response_v1_responses__response_id__delete parameters: - name: response_id in: path @@ -1184,47 +1655,90 @@ paths: description: 'Path parameter: response_id' /v1/responses/{response_id}/input_items: get: - tags: - - Agents - summary: List Openai Response Input Items - operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get responses: '200': - description: Successful Response + description: An ListOpenAIResponseInputItem. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListOpenAIResponseInputItem' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Agents + summary: List Openai Response Input Items + description: List input items. + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/Order' + - type: 'null' + default: desc + title: Order - name: response_id in: path required: true schema: type: string description: 'Path parameter: response_id' + - name: include + in: query + required: false + schema: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Include /v1/safety/run-shield: post: - tags: - - Safety - summary: Run Shield - operationId: run_shield_v1_safety_run_shield_post responses: '200': - description: Successful Response + description: A RunShieldResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/RunShieldResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1237,35 +1751,47 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Safety + summary: Run Shield + description: |- + Run shield. + + Run a shield. + operationId: run_shield_v1_safety_run_shield_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SafetyRunShieldPostRequest' + required: true /v1/scoring-functions: get: - tags: - - Scoring Functions - summary: List Scoring Functions - operationId: list_scoring_functions_v1_scoring_functions_get responses: '200': - description: Successful Response + description: A ListScoringFunctionsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListScoringFunctionsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Scoring Functions - summary: Register Scoring Function - operationId: register_scoring_function_v1_scoring_functions_post + summary: List Scoring Functions + description: List all scoring functions. + operationId: list_scoring_functions_v1_scoring_functions_get + post: responses: '200': description: Successful Response @@ -1273,30 +1799,38 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Scoring Functions + summary: Register Scoring Function + description: Register a scoring function. + operationId: register_scoring_function_v1_scoring_functions_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' deprecated: true /v1/scoring-functions/{scoring_fn_id}: get: - tags: - - Scoring Functions - summary: Get Scoring Function - operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get responses: '200': - description: Successful Response + description: A ScoringFn. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ScoringFn' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1309,6 +1843,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Scoring Functions + summary: Get Scoring Function + description: Get a scoring function by its ID. + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get parameters: - name: scoring_fn_id in: path @@ -1317,10 +1856,6 @@ paths: type: string description: 'Path parameter: scoring_fn_id' delete: - tags: - - Scoring Functions - summary: Unregister Scoring Function - operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete responses: '200': description: Successful Response @@ -1339,7 +1874,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Scoring Functions + summary: Unregister Scoring Function + description: Unregister a scoring function. + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete parameters: - name: scoring_fn_id in: path @@ -1347,18 +1886,16 @@ paths: schema: type: string description: 'Path parameter: scoring_fn_id' + deprecated: true /v1/scoring/score: post: - tags: - - Scoring - summary: Score - operationId: score_v1_scoring_score_post responses: '200': - description: Successful Response + description: A ScoreResponse object containing rows and aggregated results. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ScoreResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1371,18 +1908,26 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/scoring/score-batch: - post: tags: - Scoring - summary: Score Batch - operationId: score_batch_v1_scoring_score_batch_post + summary: Score + description: Score a list of rows. + operationId: score_v1_scoring_score_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScoringScorePostRequest' + required: true + /v1/scoring/score-batch: + post: responses: '200': - description: Successful Response + description: A ScoreBatchResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ScoreBatchResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1395,18 +1940,26 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Scoring + summary: Score Batch + description: Score a batch of rows. + operationId: score_batch_v1_scoring_score_batch_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScoringScoreBatchPostRequest' + required: true /v1/shields: get: - tags: - - Shields - summary: List Shields - operationId: list_shields_v1_shields_get responses: '200': - description: Successful Response + description: A ListShieldsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListShieldsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1419,17 +1972,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: tags: - Shields - summary: Register Shield - operationId: register_shield_v1_shields_post + summary: List Shields + description: List all shields. + operationId: list_shields_v1_shields_get + post: responses: '200': - description: Successful Response + description: A Shield. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Shield' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1442,19 +1997,27 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Shields + summary: Register Shield + description: Register a shield. + operationId: register_shield_v1_shields_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShieldsPostRequest' + required: true deprecated: true /v1/shields/{identifier}: get: - tags: - - Shields - summary: Get Shield - operationId: get_shield_v1_shields__identifier__get responses: '200': - description: Successful Response + description: A Shield. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Shield' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1467,6 +2030,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Shields + summary: Get Shield + description: Get a shield by its identifier. + operationId: get_shield_v1_shields__identifier__get parameters: - name: identifier in: path @@ -1475,10 +2043,6 @@ paths: type: string description: 'Path parameter: identifier' delete: - tags: - - Shields - summary: Unregister Shield - operationId: unregister_shield_v1_shields__identifier__delete responses: '200': description: Successful Response @@ -1497,7 +2061,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Shields + summary: Unregister Shield + description: Unregister a shield. + operationId: unregister_shield_v1_shields__identifier__delete parameters: - name: identifier in: path @@ -1505,18 +2073,16 @@ paths: schema: type: string description: 'Path parameter: identifier' + deprecated: true /v1/tool-runtime/invoke: post: - tags: - - Tool Runtime - summary: Invoke Tool - operationId: invoke_tool_v1_tool_runtime_invoke_post responses: '200': - description: Successful Response + description: A ToolInvocationResult. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ToolInvocationResult' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1529,59 +2095,95 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tool-runtime/list-tools: - get: tags: - Tool Runtime - summary: List Runtime Tools - operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + summary: Invoke Tool + description: Run a tool with the given arguments. + operationId: invoke_tool_v1_tool_runtime_invoke_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ToolRuntimeInvokePostRequest' + required: true + /v1/tool-runtime/list-tools: + get: responses: '200': - description: Successful Response + description: A ListToolDefsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListToolDefsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Tool Runtime + summary: List Runtime Tools + description: List all tools in the runtime. + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + parameters: + - name: authorization + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Authorization + - name: tool_group_id + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Tool Group Id + - name: mcp_endpoint + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/URL' + - type: 'null' + title: Mcp Endpoint /v1/toolgroups: get: - tags: - - Tool Groups - summary: List Tool Groups - operationId: list_tool_groups_v1_toolgroups_get responses: '200': - description: Successful Response + description: A ListToolGroupsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListToolGroupsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Tool Groups - summary: Register Tool Group - operationId: register_tool_group_v1_toolgroups_post + summary: List Tool Groups + description: List tool groups with optional provider. + operationId: list_tool_groups_v1_toolgroups_get + post: responses: '200': description: Successful Response @@ -1589,30 +2191,37 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Tool Groups + summary: Register Tool Group + description: Register a tool group. + operationId: register_tool_group_v1_toolgroups_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' deprecated: true /v1/toolgroups/{toolgroup_id}: get: - tags: - - Tool Groups - summary: Get Tool Group - operationId: get_tool_group_v1_toolgroups__toolgroup_id__get responses: '200': - description: Successful Response + description: A ToolGroup. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ToolGroup' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1625,6 +2234,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Tool Groups + summary: Get Tool Group + description: Get a tool group by its ID. + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get parameters: - name: toolgroup_id in: path @@ -1633,10 +2247,6 @@ paths: type: string description: 'Path parameter: toolgroup_id' delete: - tags: - - Tool Groups - summary: Unregister Toolgroup - operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete responses: '200': description: Successful Response @@ -1655,7 +2265,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Tool Groups + summary: Unregister Toolgroup + description: Unregister a tool group. + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete parameters: - name: toolgroup_id in: path @@ -1663,42 +2277,51 @@ paths: schema: type: string description: 'Path parameter: toolgroup_id' + deprecated: true /v1/tools: get: - tags: - - Tool Groups - summary: List Tools - operationId: list_tools_v1_tools_get responses: '200': - description: Successful Response + description: A ListToolDefsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListToolDefsResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/tools/{tool_name}: - get: + description: Default Response tags: - Tool Groups - summary: Get Tool - operationId: get_tool_v1_tools__tool_name__get + summary: List Tools + description: List tools with optional tool group. + operationId: list_tools_v1_tools_get + parameters: + - name: toolgroup_id + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Toolgroup Id + /v1/tools/{tool_name}: + get: responses: '200': - description: Successful Response + description: A ToolDef. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ToolDef' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1711,6 +2334,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Tool Groups + summary: Get Tool + description: Get a tool by its name. + operationId: get_tool_v1_tools__tool_name__get parameters: - name: tool_name in: path @@ -1720,10 +2348,6 @@ paths: description: 'Path parameter: tool_name' /v1/vector-io/insert: post: - tags: - - Vector Io - summary: Insert Chunks - operationId: insert_chunks_v1_vector_io_insert_post responses: '200': description: Successful Response @@ -1731,29 +2355,40 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector-io/query: - post: + description: Default Response tags: - Vector Io - summary: Query Chunks - operationId: query_chunks_v1_vector_io_query_post + summary: Insert Chunks + description: Insert chunks into a vector database. + operationId: insert_chunks_v1_vector_io_insert_post + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Chunk-Input' + title: Chunks + /v1/vector-io/query: + post: responses: '200': - description: Successful Response + description: A QueryChunksResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/QueryChunksResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1766,65 +2401,121 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector_stores: - get: tags: - Vector Io - summary: Openai List Vector Stores - operationId: openai_list_vector_stores_v1_vector_stores_get - responses: + summary: Query Chunks + description: Query chunks from a vector database. + operationId: query_chunks_v1_vector_io_query_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorIoQueryPostRequest' + required: true + /v1/vector_stores: + get: + responses: '200': - description: Successful Response + description: A VectorStoreListResponse containing the list of vector stores. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreListResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Vector Io - summary: Openai Create Vector Store - operationId: openai_create_vector_store_v1_vector_stores_post + summary: Openai List Vector Stores + description: Returns a list of vector stores. + operationId: openai_list_vector_stores_v1_vector_stores_get + parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order + post: responses: '200': - description: Successful Response + description: A VectorStoreObject representing the created vector store. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreObject' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1/vector_stores/{vector_store_id}: - get: + description: Default Response tags: - Vector Io - summary: Openai Retrieve Vector Store - operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get + summary: Openai Create Vector Store + description: |- + Creates a vector store. + + Generate an OpenAI-compatible vector store with the given parameters. + operationId: openai_create_vector_store_v1_vector_stores_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICreateVectorStoreRequestWithExtraBody' + /v1/vector_stores/{vector_store_id}: + get: responses: '200': - description: Successful Response + description: A VectorStoreObject representing the vector store. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1837,6 +2528,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Retrieve Vector Store + description: Retrieves a vector store. + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get parameters: - name: vector_store_id in: path @@ -1845,16 +2541,13 @@ paths: type: string description: 'Path parameter: vector_store_id' post: - tags: - - Vector Io - summary: Openai Update Vector Store - operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post responses: '200': - description: Successful Response + description: A VectorStoreObject representing the updated vector store. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1867,6 +2560,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Update Vector Store + description: Updates a vector store. + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post parameters: - name: vector_store_id in: path @@ -1874,17 +2572,20 @@ paths: schema: type: string description: 'Path parameter: vector_store_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoresByVectorStoreIdPostRequest' + required: true delete: - tags: - - Vector Io - summary: Openai Delete Vector Store - operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete responses: '200': - description: Successful Response + description: A VectorStoreDeleteResponse indicating the deletion status. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreDeleteResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1897,6 +2598,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Delete Vector Store + description: Delete a vector store. + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete parameters: - name: vector_store_id in: path @@ -1906,16 +2612,13 @@ paths: description: 'Path parameter: vector_store_id' /v1/vector_stores/{vector_store_id}/file_batches: post: - tags: - - Vector Io - summary: Openai Create Vector Store File Batch - operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post responses: '200': - description: Successful Response + description: A VectorStoreFileBatchObject representing the created file batch. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1928,6 +2631,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Create Vector Store File Batch + description: |- + Create a vector store file batch. + + Generate an OpenAI-compatible vector store file batch for the given vector store. + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post parameters: - name: vector_store_id in: path @@ -1935,18 +2646,21 @@ paths: schema: type: string description: 'Path parameter: vector_store_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICreateVectorStoreFileBatchRequestWithExtraBody' + required: true /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: get: - tags: - - Vector Io - summary: Openai Retrieve Vector Store File Batch - operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get responses: '200': - description: Successful Response + description: A VectorStoreFileBatchObject representing the file batch. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1959,6 +2673,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Retrieve Vector Store File Batch + description: Retrieve a vector store file batch. + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get parameters: - name: vector_store_id in: path @@ -1974,16 +2693,13 @@ paths: description: 'Path parameter: batch_id' /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: post: - tags: - - Vector Io - summary: Openai Cancel Vector Store File Batch - operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post responses: '200': - description: Successful Response + description: A VectorStoreFileBatchObject representing the cancelled file batch. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1996,6 +2712,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Cancel Vector Store File Batch + description: Cancels a vector store file batch. + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post parameters: - name: vector_store_id in: path @@ -2011,29 +2732,73 @@ paths: description: 'Path parameter: batch_id' /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: get: - tags: - - Vector Io - summary: Openai List Files In Vector Store File Batch - operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get responses: '200': - description: Successful Response + description: A VectorStoreFilesListInBatchResponse containing the list of files in the batch. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Vector Io + summary: Openai List Files In Vector Store File Batch + description: Returns a list of vector store files in a batch. + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: filter + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Filter + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order - name: vector_store_id in: path required: true @@ -2048,29 +2813,78 @@ paths: description: 'Path parameter: batch_id' /v1/vector_stores/{vector_store_id}/files: get: - tags: - - Vector Io - summary: Openai List Files In Vector Store - operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get responses: '200': - description: Successful Response + description: A VectorStoreListFilesResponse containing the list of files. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreListFilesResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Vector Io + summary: Openai List Files In Vector Store + description: List files in a vector store. + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get parameters: + - name: after + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: After + - name: before + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Before + - name: filter + in: query + required: false + schema: + title: Filter + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + nullable: true + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + default: desc + title: Order - name: vector_store_id in: path required: true @@ -2078,28 +2892,30 @@ paths: type: string description: 'Path parameter: vector_store_id' post: - tags: - - Vector Io - summary: Openai Attach File To Vector Store - operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post responses: '200': - description: Successful Response + description: A VectorStoreFileObject representing the attached file. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileObject' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Vector Io + summary: Openai Attach File To Vector Store + description: Attach a file to a vector store. + operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post parameters: - name: vector_store_id in: path @@ -2107,18 +2923,21 @@ paths: schema: type: string description: 'Path parameter: vector_store_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoresByVectorStoreIdFilesPostRequest' /v1/vector_stores/{vector_store_id}/files/{file_id}: get: - tags: - - Vector Io - summary: Openai Retrieve Vector Store File - operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get responses: '200': - description: Successful Response + description: A VectorStoreFileObject representing the file. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2131,6 +2950,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Retrieve Vector Store File + description: Retrieves a vector store file. + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get parameters: - name: vector_store_id in: path @@ -2145,16 +2969,13 @@ paths: type: string description: 'Path parameter: file_id' post: - tags: - - Vector Io - summary: Openai Update Vector Store File - operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post responses: '200': - description: Successful Response + description: A VectorStoreFileObject representing the updated file. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileObject' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2167,6 +2988,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Update Vector Store File + description: Updates a vector store file. + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post parameters: - name: vector_store_id in: path @@ -2180,17 +3006,20 @@ paths: schema: type: string description: 'Path parameter: file_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoresByVectorStoreIdFilesByFileIdPostRequest' + required: true delete: - tags: - - Vector Io - summary: Openai Delete Vector Store File - operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete responses: '200': - description: Successful Response + description: A VectorStoreFileDeleteResponse indicating the deletion status. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileDeleteResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2203,9 +3032,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - parameters: - - name: vector_store_id - in: path + tags: + - Vector Io + summary: Openai Delete Vector Store File + description: Delete a vector store file. + 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 @@ -2218,29 +3052,49 @@ paths: description: 'Path parameter: file_id' /v1/vector_stores/{vector_store_id}/files/{file_id}/content: get: - tags: - - Vector Io - summary: Openai Retrieve Vector Store File Contents - operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get responses: '200': - description: Successful Response + description: File contents, optionally with embeddings and metadata based on query parameters. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreFileContentResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Vector Io + summary: Openai Retrieve Vector Store File Contents + description: Retrieves the contents of a vector store file. + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get parameters: + - name: include_embeddings + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Include Embeddings + - name: include_metadata + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Include Metadata - name: vector_store_id in: path required: true @@ -2255,16 +3109,13 @@ paths: description: 'Path parameter: file_id' /v1/vector_stores/{vector_store_id}/search: post: - tags: - - Vector Io - summary: Openai Search Vector Store - operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post responses: '200': - description: Successful Response + description: A VectorStoreSearchResponse containing the search results. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VectorStoreSearchResponsePage' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2277,6 +3128,14 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Vector Io + summary: Openai Search Vector Store + description: |- + Search for chunks in a vector store. + + Searches a vector store for relevant chunks based on a query and optional file attribute filters. + operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post parameters: - name: vector_store_id in: path @@ -2284,18 +3143,21 @@ paths: schema: type: string description: 'Path parameter: vector_store_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoresByVectorStoreIdSearchPostRequest' + required: true /v1/version: get: - tags: - - Inspect - summary: Version - operationId: version_v1_version_get responses: '200': - description: Successful Response + description: Version information containing the service version number. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/VersionInfo' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2308,12 +3170,16 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Inspect + summary: Version + description: |- + Get version. + + Get the version of the service. + operationId: version_v1_version_get /v1beta/datasetio/append-rows/{dataset_id}: post: - tags: - - Datasetio - summary: Append Rows - operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post responses: '200': description: Successful Response @@ -2332,6 +3198,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Datasetio + summary: Append Rows + description: Append rows to a dataset. + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post parameters: - name: dataset_id in: path @@ -2339,31 +3210,68 @@ paths: schema: type: string description: 'Path parameter: dataset_id' + requestBody: + content: + application/json: + schema: + items: + additionalProperties: true + type: object + type: array + title: Rows + required: true /v1beta/datasetio/iterrows/{dataset_id}: get: - tags: - - Datasetio - summary: Iterrows - operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get responses: '200': - description: Successful Response + description: A PaginatedResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/PaginatedResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Datasetio + summary: Iterrows + 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. + operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get parameters: + - name: limit + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Limit + - name: start_index + in: query + required: false + schema: + anyOf: + - type: integer + - type: 'null' + title: Start Index - name: dataset_id in: path required: true @@ -2372,16 +3280,13 @@ paths: description: 'Path parameter: dataset_id' /v1beta/datasets: get: - tags: - - Datasets - summary: List Datasets - operationId: list_datasets_v1beta_datasets_get responses: '200': - description: Successful Response + description: A ListDatasetsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListDatasetsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2394,17 +3299,19 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - post: tags: - Datasets - summary: Register Dataset - operationId: register_dataset_v1beta_datasets_post + summary: List Datasets + description: List all datasets. + operationId: list_datasets_v1beta_datasets_get + post: responses: '200': - description: Successful Response + description: A Dataset. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Dataset' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2417,19 +3324,27 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Datasets + summary: Register Dataset + description: Register a new dataset. + operationId: register_dataset_v1beta_datasets_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1BetaDatasetsPostRequestLoose' + required: true deprecated: true /v1beta/datasets/{dataset_id}: get: - tags: - - Datasets - summary: Get Dataset - operationId: get_dataset_v1beta_datasets__dataset_id__get responses: '200': - description: Successful Response + description: A Dataset. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Dataset' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2442,6 +3357,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Datasets + summary: Get Dataset + description: Get a dataset by its ID. + operationId: get_dataset_v1beta_datasets__dataset_id__get parameters: - name: dataset_id in: path @@ -2450,10 +3370,6 @@ paths: type: string description: 'Path parameter: dataset_id' delete: - tags: - - Datasets - summary: Unregister Dataset - operationId: unregister_dataset_v1beta_datasets__dataset_id__delete responses: '200': description: Successful Response @@ -2472,7 +3388,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Datasets + summary: Unregister Dataset + description: Unregister a dataset by its ID. + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete parameters: - name: dataset_id in: path @@ -2480,35 +3400,34 @@ paths: schema: type: string description: 'Path parameter: dataset_id' + deprecated: true /v1alpha/eval/benchmarks: get: - tags: - - Benchmarks - summary: List Benchmarks - operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': - description: Successful Response + description: A ListBenchmarksResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListBenchmarksResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - post: + description: Default Response tags: - Benchmarks - summary: Register Benchmark - operationId: register_benchmark_v1alpha_eval_benchmarks_post + summary: List Benchmarks + description: List all benchmarks. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get + post: responses: '200': description: Successful Response @@ -2516,30 +3435,38 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' + description: Default Response + tags: + - Benchmarks + summary: Register Benchmark + description: Register a benchmark. + operationId: register_benchmark_v1alpha_eval_benchmarks_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Body_register_benchmark_v1alpha_eval_benchmarks_post' deprecated: true /v1alpha/eval/benchmarks/{benchmark_id}: get: - tags: - - Benchmarks - summary: Get Benchmark - operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get responses: '200': - description: Successful Response + description: A Benchmark. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Benchmark' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2552,6 +3479,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Benchmarks + summary: Get Benchmark + description: Get a benchmark by its ID. + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get parameters: - name: benchmark_id in: path @@ -2560,10 +3492,6 @@ paths: type: string description: 'Path parameter: benchmark_id' delete: - tags: - - Benchmarks - summary: Unregister Benchmark - operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete responses: '200': description: Successful Response @@ -2582,7 +3510,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - deprecated: true + tags: + - Benchmarks + summary: Unregister Benchmark + description: Unregister a benchmark. + operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete parameters: - name: benchmark_id in: path @@ -2590,18 +3522,16 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' + deprecated: true /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: - tags: - - Eval - summary: Evaluate Rows - operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post responses: '200': - description: Successful Response + description: EvaluateResponse object containing generations and scores. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/EvaluateResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2614,6 +3544,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Evaluate Rows + description: Evaluate a list of rows on a benchmark. + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post parameters: - name: benchmark_id in: path @@ -2621,18 +3556,21 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest' + required: true /v1alpha/eval/benchmarks/{benchmark_id}/jobs: post: - tags: - - Eval - summary: Run Eval - operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post responses: '200': - description: Successful Response + description: The job that was created to run the evaluation. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Job' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2645,6 +3583,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Run Eval + description: Run an evaluation on a benchmark. + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post parameters: - name: benchmark_id in: path @@ -2652,18 +3595,21 @@ paths: schema: type: string description: 'Path parameter: benchmark_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BenchmarkConfig' + required: true /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: get: - tags: - - Eval - summary: Job Status - operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get responses: '200': - description: Successful Response + description: The status of the evaluation job. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/Job' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2676,6 +3622,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Job Status + description: Get the status of a job. + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get parameters: - name: benchmark_id in: path @@ -2690,10 +3641,6 @@ paths: type: string description: 'Path parameter: job_id' delete: - tags: - - Eval - summary: Job Cancel - operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete responses: '200': description: Successful Response @@ -2712,6 +3659,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Job Cancel + description: Cancel a job. + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete parameters: - name: benchmark_id in: path @@ -2727,16 +3679,13 @@ paths: description: 'Path parameter: job_id' /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: get: - tags: - - Eval - summary: Job Result - operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get responses: '200': - description: Successful Response + description: The result of the job. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/EvaluateResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2749,6 +3698,11 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Job Result + description: Get the result of a job. + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get parameters: - name: benchmark_id in: path @@ -2764,16 +3718,13 @@ paths: description: 'Path parameter: job_id' /v1alpha/inference/rerank: post: - tags: - - Inference - summary: Rerank - operationId: rerank_v1alpha_inference_rerank_post responses: '200': - description: Successful Response + description: RerankResponse with indices sorted by relevance score (descending). content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/RerankResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2786,12 +3737,52 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/artifacts: + tags: + - Inference + summary: Rerank + description: Rerank a list of documents based on their relevance to a query. + operationId: rerank_v1alpha_inference_rerank_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1AlphaInferenceRerankPostRequest' + required: true + /v1alpha/post-training/job/artifacts: get: + responses: + '200': + description: A PostTrainingJobArtifactsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + '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 tags: - Post Training summary: Get Training Job Artifacts + description: Get the artifacts of a training job. 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 + /v1alpha/post-training/job/cancel: + post: responses: '200': description: Successful Response @@ -2799,53 +3790,71 @@ paths: application/json: schema: {} '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/cancel: - post: + description: Default Response tags: - Post Training summary: Cancel Training Job + description: Cancel a training job. operationId: cancel_training_job_v1alpha_post_training_job_cancel_post + parameters: + - name: job_uuid + in: query + required: true + schema: + type: string + title: Job Uuid + /v1alpha/post-training/job/status: + get: responses: '200': - description: Successful Response + description: A PostTrainingJobStatusResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/PostTrainingJobStatusResponse' '400': - description: Bad Request $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - description: Too Many Requests $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - description: Internal Server Error $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: - description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/job/status: - get: + description: Default Response tags: - Post Training summary: Get Training Job Status + description: Get the status of a training job. 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 + /v1alpha/post-training/jobs: + get: responses: '200': - description: Successful Response + description: A ListPostTrainingJobsResponse. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/ListPostTrainingJobsResponse' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2858,18 +3867,20 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/jobs: - get: tags: - Post Training summary: Get Training Jobs + description: Get all training jobs. operationId: get_training_jobs_v1alpha_post_training_jobs_get + /v1alpha/post-training/preference-optimize: + post: responses: '200': - description: Successful Response + description: A PostTrainingJob. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/PostTrainingJob' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2882,18 +3893,26 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/preference-optimize: - post: tags: - Post Training summary: Preference Optimize + description: Run preference optimization of a model. operationId: preference_optimize_v1alpha_post_training_preference_optimize_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1AlphaPostTrainingPreferenceOptimizePostRequest' + required: true + /v1alpha/post-training/supervised-fine-tune: + post: responses: '200': - description: Successful Response + description: A PostTrainingJob. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/PostTrainingJob' '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2906,68 +3925,18 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' - /v1alpha/post-training/supervised-fine-tune: - post: tags: - Post Training summary: Supervised Fine Tune + description: Run supervised fine-tuning of a model. operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post - responses: - '200': - description: Successful Response - content: - application/json: - schema: {} - '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' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/V1AlphaPostTrainingSupervisedFineTunePostRequest' + required: true components: - responses: - BadRequest400: - description: The request was invalid or malformed - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 400 - 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 - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 429 - title: Too Many Requests - detail: You have exceeded the rate limit. Please try again later. - InternalServerError500: - description: The server encountered an unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: - status: 500 - title: Internal Server Error - detail: An unexpected error occurred - DefaultError: - description: An error occurred - content: - application/json: - schema: - $ref: '#/components/schemas/Error' schemas: Error: description: Error response from the API. Roughly follows RFC 7807. @@ -2993,63 +3962,61 @@ components: title: Error type: object ListBatchesResponse: - description: Response containing a list of batch objects. properties: object: + type: string const: list - default: list title: Object - type: string + default: list data: - description: List of batch objects items: $ref: '#/components/schemas/Batch' - title: Data type: array + title: Data + description: List of batch objects first_id: anyOf: - type: string - type: 'null' description: ID of the first batch in the list - nullable: true last_id: anyOf: - type: string - type: 'null' description: ID of the last batch in the list - nullable: true has_more: - default: false - description: Whether there are more batches available - title: Has More type: boolean + title: Has More + description: Whether there are more batches available + default: false + type: object required: - data title: ListBatchesResponse - type: object + description: Response containing a list of batch objects. Batch: - additionalProperties: true properties: id: - title: Id type: string + title: Id completion_window: - title: Completion Window type: string + title: Completion Window created_at: - title: Created At type: integer + title: Created At endpoint: - title: Endpoint type: string + title: Endpoint input_file_id: - title: Input File Id type: string + title: Input File Id object: + type: string const: batch title: Object - type: string status: + type: string enum: - validating - failed @@ -3060,90 +4027,76 @@ components: - cancelling - cancelled title: Status - type: string cancelled_at: anyOf: - type: integer - type: 'null' - nullable: true cancelling_at: anyOf: - type: integer - type: 'null' - nullable: true completed_at: anyOf: - type: integer - type: 'null' - nullable: true error_file_id: anyOf: - type: string - type: 'null' - nullable: true errors: anyOf: - $ref: '#/components/schemas/Errors' title: Errors - type: 'null' - nullable: true title: Errors expired_at: anyOf: - type: integer - type: 'null' - nullable: true expires_at: anyOf: - type: integer - type: 'null' - nullable: true failed_at: anyOf: - type: integer - type: 'null' - nullable: true finalizing_at: anyOf: - type: integer - type: 'null' - nullable: true in_progress_at: anyOf: - type: integer - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' - nullable: true model: anyOf: - type: string - type: 'null' - nullable: true output_file_id: anyOf: - type: string - type: 'null' - nullable: true request_counts: anyOf: - $ref: '#/components/schemas/BatchRequestCounts' title: BatchRequestCounts - type: 'null' - nullable: true title: BatchRequestCounts usage: anyOf: - $ref: '#/components/schemas/BatchUsage' title: BatchUsage - type: 'null' - nullable: true title: BatchUsage + additionalProperties: true + type: object required: - id - completion_window @@ -3153,36 +4106,42 @@ components: - object - status title: Batch - type: object + Order: + type: string + enum: + - asc + - desc + title: Order + description: Sort order for paginated responses. ListOpenAIChatCompletionResponse: - description: Response from listing OpenAI-compatible chat completions. properties: data: items: $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIChatCompletionResponse - type: object + description: Response from listing OpenAI-compatible chat completions. OpenAIAssistantMessageParam: description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. properties: @@ -3216,19 +4175,19 @@ components: title: OpenAIAssistantMessageParam type: object OpenAIChatCompletionContentPartImageParam: - description: Image content part for OpenAI-compatible chat completion messages. properties: type: + type: string const: image_url - default: image_url title: Type - type: string + default: image_url image_url: $ref: '#/components/schemas/OpenAIImageURL' + type: object required: - image_url title: OpenAIChatCompletionContentPartImageParam - type: object + description: Image content part for OpenAI-compatible chat completion messages. OpenAIChatCompletionContentPartParam: discriminator: mapping: @@ -3245,139 +4204,130 @@ components: title: OpenAIFile title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: - description: Text content part for OpenAI-compatible chat completion messages. properties: type: + type: string const: text - default: text title: Type - type: string + default: text text: - title: Text type: string + title: Text + type: object required: - text title: OpenAIChatCompletionContentPartTextParam - type: object + description: Text content part for OpenAI-compatible chat completion messages. OpenAIChatCompletionToolCall: - description: Tool call specification for OpenAI-compatible chat completion responses. properties: index: anyOf: - type: integer - type: 'null' - nullable: true id: anyOf: - type: string - type: 'null' - nullable: true type: + type: string const: function - default: function title: Type - type: string + default: function function: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' title: OpenAIChatCompletionToolCallFunction - type: 'null' - nullable: true title: OpenAIChatCompletionToolCallFunction - title: OpenAIChatCompletionToolCall type: object + title: OpenAIChatCompletionToolCall + description: Tool call specification for OpenAI-compatible chat completion responses. OpenAIChatCompletionToolCallFunction: - description: Function call details for OpenAI-compatible tool calls. properties: name: anyOf: - type: string - type: 'null' - nullable: true arguments: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIChatCompletionToolCallFunction type: object + title: OpenAIChatCompletionToolCallFunction + description: Function call details for OpenAI-compatible tool calls. OpenAIChatCompletionUsage: - description: Usage information for OpenAI chat completion. properties: prompt_tokens: - title: Prompt Tokens type: integer + title: Prompt Tokens completion_tokens: - title: Completion Tokens type: integer + title: Completion Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens prompt_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' title: OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' - nullable: true title: OpenAIChatCompletionUsagePromptTokensDetails completion_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' title: OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' - nullable: true title: OpenAIChatCompletionUsageCompletionTokensDetails + type: object required: - prompt_tokens - completion_tokens - total_tokens title: OpenAIChatCompletionUsage - type: object + description: Usage information for OpenAI chat completion. OpenAIChoice: - description: A choice from an OpenAI-compatible chat completion response. 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) + title: OpenAIUserMessageParam-Output | ... (5 variants) + 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: - title: Finish Reason type: string + title: Finish Reason index: - title: Index type: integer + title: Index logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' title: OpenAIChoiceLogprobs - type: 'null' - nullable: true title: OpenAIChoiceLogprobs + type: object required: - message - finish_reason - index title: OpenAIChoice - type: object + description: A choice from an OpenAI-compatible chat completion response. OpenAIChoiceLogprobs: - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. properties: content: anyOf: @@ -3385,24 +4335,22 @@ components: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - nullable: true refusal: anyOf: - items: $ref: '#/components/schemas/OpenAITokenLogProb' type: array - type: 'null' - nullable: true - title: OpenAIChoiceLogprobs type: object + title: OpenAIChoiceLogprobs + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. OpenAIDeveloperMessageParam: - description: A message from the developer in an OpenAI-compatible chat completion request. properties: role: + type: string const: developer - default: developer title: Role - type: string + default: developer content: anyOf: - type: string @@ -3415,58 +4363,54 @@ components: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - content title: OpenAIDeveloperMessageParam - type: object + description: A message from the developer in an OpenAI-compatible chat completion request. OpenAIFile: properties: type: + type: string const: file - default: file title: Type - type: string + default: file file: $ref: '#/components/schemas/OpenAIFileFile' + type: object required: - file title: OpenAIFile - type: object OpenAIFileFile: properties: file_data: anyOf: - type: string - type: 'null' - nullable: true file_id: anyOf: - type: string - type: 'null' - nullable: true filename: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIFileFile type: object + title: OpenAIFileFile OpenAIImageURL: - description: Image URL specification for OpenAI-compatible chat completion messages. properties: url: - title: Url type: string + title: Url detail: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - url title: OpenAIImageURL - type: object + description: Image URL specification for OpenAI-compatible chat completion messages. OpenAIMessageParam: discriminator: mapping: @@ -3489,13 +4433,12 @@ components: title: OpenAIDeveloperMessageParam title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: - description: A system message providing instructions or context to the model. properties: role: + type: string const: system - default: system title: Role - type: string + default: system content: anyOf: - type: string @@ -3508,55 +4451,53 @@ components: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - content title: OpenAISystemMessageParam - type: object + description: A system message providing instructions or context to the model. 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 + title: Token bytes: anyOf: - items: type: integer type: array - type: 'null' - nullable: true logprob: - title: Logprob type: number + title: Logprob top_logprobs: items: $ref: '#/components/schemas/OpenAITopLogProb' - title: Top Logprobs type: array + title: Top Logprobs + type: object required: - token - logprob - top_logprobs title: OpenAITokenLogProb - type: object + 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 OpenAIToolMessageParam: - description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. properties: role: + type: string const: tool - default: tool title: Role - type: string + default: tool tool_call_id: - title: Tool Call Id type: string + title: Tool Call Id content: anyOf: - type: string @@ -3565,37 +4506,37 @@ components: type: array title: list[OpenAIChatCompletionContentPartTextParam] title: string | list[OpenAIChatCompletionContentPartTextParam] + type: object required: - tool_call_id - content title: OpenAIToolMessageParam - type: object + description: A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. 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 + title: Token bytes: anyOf: - items: type: integer type: array - type: 'null' - nullable: true logprob: - title: Logprob type: number + title: Logprob + type: object required: - token - logprob title: OpenAITopLogProb - type: object + 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 OpenAIUserMessageParam: description: A message from the user in an OpenAI-compatible chat completion request. properties: @@ -3635,11 +4576,10 @@ components: title: OpenAIUserMessageParam type: object OpenAIJSONSchema: - description: JSON schema specification for OpenAI-compatible structured response format. properties: name: - title: Name type: string + title: Name description: anyOf: - type: string @@ -3653,32 +4593,33 @@ components: - additionalProperties: true type: object - type: 'null' - title: OpenAIJSONSchema type: object + title: OpenAIJSONSchema + description: JSON schema specification for OpenAI-compatible structured response format. OpenAIResponseFormatJSONObject: - description: JSON object response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: json_object - default: json_object title: Type - type: string - title: OpenAIResponseFormatJSONObject + default: json_object type: object + title: OpenAIResponseFormatJSONObject + description: JSON object response format for OpenAI-compatible chat completion requests. OpenAIResponseFormatJSONSchema: - description: JSON schema response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: json_schema - default: json_schema title: Type - type: string + default: json_schema json_schema: $ref: '#/components/schemas/OpenAIJSONSchema' + type: object required: - json_schema title: OpenAIResponseFormatJSONSchema - type: object + description: JSON schema response format for OpenAI-compatible chat completion requests. OpenAIResponseFormatParam: discriminator: mapping: @@ -3695,52 +4636,49 @@ components: title: OpenAIResponseFormatJSONObject title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject OpenAIResponseFormatText: - description: Text response format for OpenAI-compatible chat completion requests. properties: type: + type: string const: text - default: text title: Type - type: string - title: OpenAIResponseFormatText + default: text type: object + title: OpenAIResponseFormatText + description: Text response format for OpenAI-compatible chat completion requests. OpenAIChatCompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible chat completion endpoint. properties: model: - title: Model type: string + title: Model 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) + 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) + type: array minItems: 1 title: Messages - type: array frequency_penalty: anyOf: - type: number - type: 'null' - nullable: true function_call: anyOf: - type: string @@ -3748,7 +4686,6 @@ components: type: object - type: 'null' title: string | object - nullable: true functions: anyOf: - items: @@ -3756,68 +4693,58 @@ components: type: object type: array - type: 'null' - nullable: true logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true logprobs: anyOf: - type: boolean - type: 'null' - nullable: true max_completion_tokens: anyOf: - type: integer - type: 'null' - nullable: true max_tokens: anyOf: - type: integer - type: 'null' - nullable: true n: anyOf: - type: integer - type: 'null' - nullable: true parallel_tool_calls: anyOf: - type: boolean - type: 'null' - nullable: true presence_penalty: anyOf: - type: number - type: 'null' - nullable: true response_format: anyOf: - - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/OpenAIResponseFormatText' title: OpenAIResponseFormatText - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' title: OpenAIResponseFormatJSONSchema - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' title: OpenAIResponseFormatJSONObject + discriminator: + propertyName: type + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - type: 'null' title: Response Format - nullable: true seed: anyOf: - type: integer - type: 'null' - nullable: true stop: anyOf: - type: string @@ -3827,23 +4754,19 @@ components: title: list[string] - type: 'null' title: string | list[string] - nullable: true stream: anyOf: - type: boolean - type: 'null' - nullable: true stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true temperature: anyOf: - type: number - type: 'null' - nullable: true tool_choice: anyOf: - type: string @@ -3851,7 +4774,6 @@ components: type: object - type: 'null' title: string | object - nullable: true tools: anyOf: - items: @@ -3859,63 +4781,60 @@ components: type: object type: array - type: 'null' - nullable: true top_logprobs: anyOf: - type: integer - type: 'null' - nullable: true top_p: anyOf: - type: number - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - messages title: OpenAIChatCompletionRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible chat completion endpoint. OpenAIChatCompletion: - description: Response from an OpenAI-compatible chat completion request. properties: id: - title: Id type: string + title: Id choices: items: $ref: '#/components/schemas/OpenAIChoice' - title: Choices type: array + title: Choices object: + type: string const: chat.completion - default: chat.completion title: Object - type: string + default: chat.completion created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' title: OpenAIChatCompletionUsage - type: 'null' - nullable: true title: OpenAIChatCompletionUsage + type: object required: - id - choices - created - model title: OpenAIChatCompletion - type: object + description: Response from an OpenAI-compatible chat completion request. OpenAIChatCompletionChunk: description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: @@ -4011,55 +4930,55 @@ components: OpenAICompletionWithInputMessages: properties: id: - title: Id type: string + title: Id choices: items: $ref: '#/components/schemas/OpenAIChoice' - title: Choices type: array + title: Choices object: + type: string const: chat.completion - default: chat.completion title: Object - type: string + default: chat.completion created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model usage: anyOf: - $ref: '#/components/schemas/OpenAIChatCompletionUsage' title: OpenAIChatCompletionUsage - type: 'null' - nullable: true title: OpenAIChatCompletionUsage 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' - title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output - $ref: '#/components/schemas/OpenAISystemMessageParam' title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output - $ref: '#/components/schemas/OpenAIToolMessageParam' title: OpenAIToolMessageParam - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - title: Input Messages + 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' + title: OpenAIUserMessageParam-Output | ... (5 variants) type: array + title: Input Messages + type: object required: - id - choices @@ -4067,14 +4986,11 @@ components: - model - input_messages title: OpenAICompletionWithInputMessages - type: object OpenAICompletionRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible completion endpoint. properties: model: - title: Model type: string + title: Model prompt: anyOf: - type: string @@ -4097,49 +5013,40 @@ components: anyOf: - type: integer - type: 'null' - nullable: true echo: anyOf: - type: boolean - type: 'null' - nullable: true frequency_penalty: anyOf: - type: number - type: 'null' - nullable: true logit_bias: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true logprobs: anyOf: - type: boolean - type: 'null' - nullable: true max_tokens: anyOf: - type: integer - type: 'null' - nullable: true n: anyOf: - type: integer - type: 'null' - nullable: true presence_penalty: anyOf: - type: number - type: 'null' - nullable: true seed: anyOf: - type: integer - type: 'null' - nullable: true stop: anyOf: - type: string @@ -4149,110 +5056,104 @@ components: title: list[string] - type: 'null' title: string | list[string] - nullable: true stream: anyOf: - type: boolean - type: 'null' - nullable: true stream_options: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true temperature: anyOf: - type: number - type: 'null' - nullable: true top_p: anyOf: - type: number - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true suffix: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - prompt title: OpenAICompletionRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible completion endpoint. OpenAICompletion: - 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 + title: Id choices: items: $ref: '#/components/schemas/OpenAICompletionChoice' - title: Choices type: array + title: Choices created: - title: Created type: integer + title: Created model: - title: Model type: string + title: Model object: + type: string const: text_completion - default: text_completion title: Object - type: string + default: text_completion + type: object required: - id - choices - created - model title: OpenAICompletion - type: object - OpenAICompletionChoice: description: |- - A choice from an OpenAI-compatible completion response. + Response from an OpenAI-compatible completion request. - :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 + :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" + OpenAICompletionChoice: properties: finish_reason: - title: Finish Reason type: string + title: Finish Reason text: - title: Text type: string + title: Text index: - title: Index type: integer + title: Index logprobs: anyOf: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' title: OpenAIChoiceLogprobs - type: 'null' - nullable: true title: OpenAIChoiceLogprobs + type: object required: - finish_reason - text - index title: OpenAICompletionChoice - type: object + 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 ConversationItem: discriminator: mapping: @@ -4287,54 +5188,55 @@ components: title: OpenAIResponseOutputMessageMCPListTools title: OpenAIResponseMessage | ... (9 variants) OpenAIResponseAnnotationCitation: - description: URL citation annotation for referencing external web resources. properties: type: + type: string const: url_citation - default: url_citation title: Type - type: string + default: url_citation end_index: - title: End Index type: integer + title: End Index start_index: - title: Start Index type: integer + title: Start Index title: - title: Title type: string + title: Title url: - title: Url type: string + title: Url + type: object required: - end_index - start_index - title - url title: OpenAIResponseAnnotationCitation - type: object + description: URL citation annotation for referencing external web resources. OpenAIResponseAnnotationContainerFileCitation: properties: type: + type: string const: container_file_citation - default: container_file_citation title: Type - type: string + default: container_file_citation container_id: - title: Container Id type: string + title: Container Id end_index: - title: End Index type: integer + title: End Index file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename start_index: - title: Start Index type: integer + title: Start Index + type: object required: - container_id - end_index @@ -4342,48 +5244,47 @@ components: - filename - start_index title: OpenAIResponseAnnotationContainerFileCitation - type: object OpenAIResponseAnnotationFileCitation: - description: File citation annotation for referencing specific files in response content. properties: type: + type: string const: file_citation - default: file_citation title: Type - type: string + default: file_citation file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename index: - title: Index type: integer + title: Index + type: object required: - file_id - filename - index title: OpenAIResponseAnnotationFileCitation - type: object + description: File citation annotation for referencing specific files in response content. OpenAIResponseAnnotationFilePath: properties: type: + type: string const: file_path - default: file_path title: Type - type: string + default: file_path file_id: - title: File Id type: string + title: File Id index: - title: Index type: integer + title: Index + type: object required: - file_id - index title: OpenAIResponseAnnotationFilePath - type: object OpenAIResponseAnnotations: discriminator: mapping: @@ -4403,49 +5304,47 @@ components: title: OpenAIResponseAnnotationFilePath title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseContentPartRefusal: - description: Refusal content within a streamed response part. properties: type: + type: string const: refusal - default: refusal title: Type - type: string + default: refusal refusal: - title: Refusal type: string + title: Refusal + type: object required: - refusal title: OpenAIResponseContentPartRefusal - type: object + description: Refusal content within a streamed response part. 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 + title: Call Id output: - title: Output type: string + title: Output type: + type: string const: function_call_output - default: function_call_output title: Type - type: string + default: function_call_output id: anyOf: - type: string - type: 'null' - nullable: true status: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - call_id - output title: OpenAIResponseInputFunctionToolCallOutput - type: object + description: This represents the output of a function call that gets passed back to the model. OpenAIResponseInputMessageContent: discriminator: mapping: @@ -4462,134 +5361,126 @@ components: title: OpenAIResponseInputMessageContentFile title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseInputMessageContentFile: - description: File content for input messages in OpenAI response format. properties: type: + type: string const: input_file - default: input_file title: Type - type: string + default: input_file file_data: anyOf: - type: string - type: 'null' - nullable: true file_id: anyOf: - type: string - type: 'null' - nullable: true file_url: anyOf: - type: string - type: 'null' - nullable: true filename: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIResponseInputMessageContentFile type: object + title: OpenAIResponseInputMessageContentFile + description: File content for input messages in OpenAI response format. OpenAIResponseInputMessageContentImage: - description: Image content for input messages in OpenAI response format. properties: detail: - default: auto title: Detail + default: auto type: string enum: - low - high - auto type: + type: string const: input_image - default: input_image title: Type - type: string + default: input_image file_id: anyOf: - type: string - type: 'null' - nullable: true image_url: anyOf: - type: string - type: 'null' - nullable: true - title: OpenAIResponseInputMessageContentImage type: object + title: OpenAIResponseInputMessageContentImage + description: Image content for input messages in OpenAI response format. OpenAIResponseInputMessageContentText: - description: Text content for input messages in OpenAI response format. properties: text: - title: Text type: string + title: Text type: + type: string const: input_text - default: input_text title: Type - type: string + default: input_text + type: object required: - text title: OpenAIResponseInputMessageContentText - type: object + description: Text content for input messages in OpenAI response format. OpenAIResponseMCPApprovalRequest: - description: A request for human approval of a tool invocation. properties: arguments: - title: Arguments type: string + title: Arguments id: - title: Id type: string + title: Id name: - title: Name type: string + title: Name server_label: - title: Server Label type: string + title: Server Label type: + type: string const: mcp_approval_request - default: mcp_approval_request title: Type - type: string + default: mcp_approval_request + type: object required: - arguments - id - name - server_label title: OpenAIResponseMCPApprovalRequest - type: object + description: A request for human approval of a tool invocation. OpenAIResponseMCPApprovalResponse: - description: A response to an MCP approval request. properties: approval_request_id: - title: Approval Request Id type: string + title: Approval Request Id approve: - title: Approve type: boolean + title: Approve type: + type: string const: mcp_approval_response - default: mcp_approval_response title: Type - type: string + default: mcp_approval_response id: anyOf: - type: string - type: 'null' - nullable: true reason: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - approval_request_id - approve title: OpenAIResponseMCPApprovalResponse - type: object + description: A response to an MCP approval request. OpenAIResponseMessage: description: |- Corresponds to the various Message types in the Responses API. @@ -4676,22 +5567,15 @@ components: OpenAIResponseOutputMessageContentOutputText: properties: text: - title: Text type: string + title: Text type: + type: string const: output_text - default: output_text title: Type - type: string + default: output_text annotations: items: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' title: OpenAIResponseAnnotationFileCitation @@ -4701,176 +5585,177 @@ components: title: OpenAIResponseAnnotationContainerFileCitation - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' title: 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' title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations type: array + title: Annotations + type: object required: - text title: OpenAIResponseOutputMessageContentOutputText - type: object OpenAIResponseOutputMessageFileSearchToolCall: - description: File search tool call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id queries: items: type: string - title: Queries type: array + title: Queries status: - title: Status type: string + title: Status type: + type: string const: file_search_call - default: file_search_call title: Type - type: string + default: file_search_call results: anyOf: - items: $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' type: array - type: 'null' - nullable: true + type: object required: - id - queries - status title: OpenAIResponseOutputMessageFileSearchToolCall - type: object + description: File search tool call output message for OpenAI responses. OpenAIResponseOutputMessageFunctionToolCall: - description: Function tool call output message for OpenAI responses. properties: call_id: - title: Call Id type: string + title: Call Id name: - title: Name type: string + title: Name arguments: - title: Arguments type: string + title: Arguments type: + type: string const: function_call - default: function_call title: Type - type: string + default: function_call id: anyOf: - type: string - type: 'null' - nullable: true status: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - call_id - name - arguments title: OpenAIResponseOutputMessageFunctionToolCall - type: object + description: Function tool call output message for OpenAI responses. OpenAIResponseOutputMessageMCPCall: - description: Model Context Protocol (MCP) call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id type: + type: string const: mcp_call - default: mcp_call title: Type - type: string + default: mcp_call arguments: - title: Arguments type: string + title: Arguments name: - title: Name type: string + title: Name server_label: - title: Server Label type: string + title: Server Label error: anyOf: - type: string - type: 'null' - nullable: true output: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - id - arguments - name - server_label title: OpenAIResponseOutputMessageMCPCall - type: object + description: Model Context Protocol (MCP) call output message for OpenAI responses. OpenAIResponseOutputMessageMCPListTools: - description: MCP list tools output message containing available tools from an MCP server. properties: id: - title: Id type: string + title: Id type: + type: string const: mcp_list_tools - default: mcp_list_tools title: Type - type: string + default: mcp_list_tools server_label: - title: Server Label type: string + title: Server Label tools: items: $ref: '#/components/schemas/MCPListToolsTool' - title: Tools type: array + title: Tools + type: object required: - id - server_label - tools title: OpenAIResponseOutputMessageMCPListTools - type: object + description: MCP list tools output message containing available tools from an MCP server. OpenAIResponseOutputMessageWebSearchToolCall: - description: Web search tool call output message for OpenAI responses. properties: id: - title: Id type: string + title: Id status: - title: Status type: string + title: Status type: + type: string const: web_search_call - default: web_search_call title: Type - type: string + default: web_search_call + type: object required: - id - status title: OpenAIResponseOutputMessageWebSearchToolCall - type: object + description: Web search tool call output message for OpenAI responses. Conversation: - description: OpenAI-compatible conversation object. properties: id: - description: The unique ID of the conversation. - title: Id type: string + title: Id + description: The unique ID of the conversation. object: + type: string const: conversation - default: conversation - description: The object type, which is always conversation. title: Object - type: string + description: The object type, which is always conversation. + default: conversation created_at: - description: The time at which the conversation was created, measured in seconds since the Unix epoch. - title: Created At type: integer + title: Created At + description: The time at which the conversation was created, measured in seconds since the Unix epoch. metadata: anyOf: - additionalProperties: @@ -4878,7 +5763,6 @@ components: 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. - nullable: true items: anyOf: - items: @@ -4887,59 +5771,45 @@ components: type: array - type: 'null' description: Initial items to include in the conversation context. You may add up to 20 items at a time. - nullable: true + type: object required: - id - created_at title: Conversation - type: object + description: OpenAI-compatible conversation object. ConversationDeletedResource: - description: Response for deleted conversation. properties: id: - description: The deleted conversation identifier - title: Id type: string + title: Id + description: The deleted conversation identifier object: - default: conversation.deleted - description: Object type - title: Object type: string + title: Object + description: Object type + default: conversation.deleted deleted: - default: true - description: Whether the object was deleted - title: Deleted type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object required: - id title: ConversationDeletedResource - type: object + description: Response for deleted conversation. ConversationItemList: - description: List of conversation items with pagination. properties: object: - default: list - description: Object type - title: Object type: string + title: Object + description: Object type + default: list data: - description: List of conversation items items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -4956,58 +5826,68 @@ components: title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - title: Data + 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' + title: OpenAIResponseMessage-Output | ... (9 variants) type: array + title: Data + description: List of conversation items first_id: anyOf: - type: string - type: 'null' description: The ID of the first item in the list - nullable: true last_id: anyOf: - type: string - type: 'null' description: The ID of the last item in the list - nullable: true has_more: - default: false - description: Whether there are more items available - title: Has More type: boolean + title: Has More + description: Whether there are more items available + default: false + type: object required: - data title: ConversationItemList - type: object + description: List of conversation items with pagination. ConversationItemDeletedResource: - description: Response for deleted conversation item. properties: id: - description: The deleted item identifier - title: Id type: string + title: Id + description: The deleted item identifier object: - default: conversation.item.deleted - description: Object type - title: Object type: string + title: Object + description: Object type + default: conversation.item.deleted deleted: - default: true - description: Whether the object was deleted - title: Deleted type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object required: - id title: ConversationItemDeletedResource - type: object + description: Response for deleted conversation item. OpenAIEmbeddingsRequestWithExtraBody: - additionalProperties: true - description: Request parameters for OpenAI-compatible embeddings endpoint. properties: model: - title: Model type: string + title: Model input: anyOf: - type: string @@ -5025,25 +5905,24 @@ components: anyOf: - type: integer - type: 'null' - nullable: true user: anyOf: - type: string - type: 'null' - nullable: true + additionalProperties: true + type: object required: - model - input title: OpenAIEmbeddingsRequestWithExtraBody - type: object + description: Request parameters for OpenAI-compatible embeddings endpoint. OpenAIEmbeddingData: - description: A single embedding data object from an OpenAI-compatible embeddings response. properties: object: + type: string const: embedding - default: embedding title: Object - type: string + default: embedding embedding: anyOf: - items: @@ -5053,112 +5932,113 @@ components: - type: string title: list[number] | string index: - title: Index type: integer + title: Index + type: object required: - embedding - index title: OpenAIEmbeddingData - type: object + description: A single embedding data object from an OpenAI-compatible embeddings response. OpenAIEmbeddingUsage: - description: Usage information for an OpenAI-compatible embeddings response. properties: prompt_tokens: - title: Prompt Tokens type: integer + title: Prompt Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens + type: object required: - prompt_tokens - total_tokens title: OpenAIEmbeddingUsage - type: object + description: Usage information for an OpenAI-compatible embeddings response. OpenAIEmbeddingsResponse: - description: Response from an OpenAI-compatible embeddings request. properties: object: + type: string const: list - default: list title: Object - type: string + default: list data: items: $ref: '#/components/schemas/OpenAIEmbeddingData' - title: Data type: array + title: Data model: - title: Model type: string + title: Model usage: $ref: '#/components/schemas/OpenAIEmbeddingUsage' + type: object required: - data - model - usage title: OpenAIEmbeddingsResponse - type: object + description: Response from an OpenAI-compatible embeddings request. OpenAIFilePurpose: - description: Valid purpose values for OpenAI Files API. + type: string enum: - assistants - batch title: OpenAIFilePurpose - type: string + description: Valid purpose values for OpenAI Files API. ListOpenAIFileResponse: - description: Response for listing files in OpenAI Files API. properties: data: items: $ref: '#/components/schemas/OpenAIFileObject' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIFileResponse - type: object + description: Response for listing files in OpenAI Files API. OpenAIFileObject: - description: OpenAI File object as defined in the OpenAI Files API. properties: object: + type: string const: file - default: file title: Object - type: string + default: file id: - title: Id type: string + title: Id bytes: - title: Bytes type: integer + title: Bytes created_at: - title: Created At type: integer + title: Created At expires_at: - title: Expires At type: integer + title: Expires At filename: - title: Filename type: string + title: Filename purpose: $ref: '#/components/schemas/OpenAIFilePurpose' + type: object required: - id - bytes @@ -5167,212 +6047,211 @@ components: - filename - purpose title: OpenAIFileObject - type: object + description: OpenAI File object as defined in the OpenAI Files API. 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: + type: string const: created_at title: Anchor - type: string seconds: - maximum: 2592000 - minimum: 3600 - title: Seconds type: integer + maximum: 2592000.0 + minimum: 3600.0 + title: Seconds + type: object required: - anchor - seconds title: ExpiresAfter - type: object - OpenAIFileDeleteResponse: - description: Response for deleting a file in OpenAI Files API. + 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) + OpenAIFileDeleteResponse: properties: id: - title: Id type: string + title: Id object: + type: string const: file - default: file title: Object - type: string + default: file deleted: - title: Deleted type: boolean + title: Deleted + type: object required: - id - deleted title: OpenAIFileDeleteResponse + description: Response for deleting a file in OpenAI Files API. + Response: + title: Response type: object HealthInfo: - description: Health status information for the service. properties: status: $ref: '#/components/schemas/HealthStatus' + type: object required: - status title: HealthInfo - type: object + description: Health status information for the service. RouteInfo: - description: Information about an API route including its path, method, and implementing providers. properties: route: - title: Route type: string + title: Route method: - title: Method type: string + title: Method provider_types: items: type: string - title: Provider Types type: array + title: Provider Types + type: object required: - route - method - provider_types title: RouteInfo - type: object + description: Information about an API route including its path, method, and implementing providers. ListRoutesResponse: - description: Response containing a list of all available API routes. properties: data: items: $ref: '#/components/schemas/RouteInfo' - title: Data type: array + title: Data + type: object required: - data title: ListRoutesResponse - type: object + description: Response containing a list of all available API routes. OpenAIModel: - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata properties: id: - title: Id type: string + title: Id object: + type: string const: model - default: model title: Object - type: string + default: model created: - title: Created type: integer + title: Created owned_by: - title: Owned By type: string + title: Owned By custom_metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - id - created - owned_by title: OpenAIModel - type: object + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata OpenAIListModelsResponse: properties: data: items: $ref: '#/components/schemas/OpenAIModel' - title: Data type: array + title: Data + type: object required: - data title: OpenAIListModelsResponse - type: object Model: - description: A model resource representing an AI model registered in Llama Stack. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: model - default: model title: Type - type: string + default: model metadata: additionalProperties: true - description: Any additional metadata for this model - title: Metadata 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 - type: object + description: A model resource representing an AI model registered in Llama Stack. ModelType: - description: Enumeration of supported model types in Llama Stack. + type: string enum: - llm - embedding - rerank title: ModelType - type: string + description: Enumeration of supported model types in Llama Stack. ModerationObject: - description: A moderation object. properties: id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model results: items: $ref: '#/components/schemas/ModerationObjectResults' - title: Results type: array + title: Results + type: object required: - id - model - results title: ModerationObject - type: object - ModerationObjectResults: description: A moderation object. + ModerationObjectResults: properties: flagged: - title: Flagged type: boolean + title: Flagged categories: anyOf: - additionalProperties: type: boolean type: object - type: 'null' - nullable: true category_applied_input_types: anyOf: - additionalProperties: @@ -5381,93 +6260,90 @@ components: type: array type: object - type: 'null' - nullable: true category_scores: anyOf: - additionalProperties: type: number type: object - type: 'null' - nullable: true user_message: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - flagged title: ModerationObjectResults - type: object + description: A moderation object. Prompt: - description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. properties: prompt: anyOf: - type: string - type: 'null' description: The system prompt with variable placeholders - nullable: true version: - description: Version (integer starting at 1, incremented on save) - minimum: 1 - title: Version type: integer + minimum: 1.0 + title: Version + description: Version (integer starting at 1, incremented on save) prompt_id: - description: Unique identifier in format 'pmpt_<48-digit-hash>' - title: Prompt Id type: string + title: Prompt Id + description: Unique identifier in format 'pmpt_<48-digit-hash>' variables: - description: List of variable names that can be used in the prompt template items: type: string - title: Variables type: array + title: Variables + description: List of variable names that can be used in the prompt template is_default: - default: false - description: Boolean indicating whether this version is the default version - title: 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 - type: object + description: A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. ListPromptsResponse: - description: Response model to list prompts. properties: data: items: $ref: '#/components/schemas/Prompt' - title: Data type: array + title: Data + type: object required: - data title: ListPromptsResponse - type: object + description: Response model to list prompts. ProviderInfo: - description: Information about a registered provider including its configuration and health status. properties: api: - title: Api type: string + title: Api provider_id: - title: Provider Id type: string + title: Provider Id provider_type: - title: Provider Type type: string + title: Provider Type config: additionalProperties: true - title: Config type: object + title: Config health: additionalProperties: true - title: Health type: object + title: Health + type: object required: - api - provider_id @@ -5475,62 +6351,62 @@ components: - config - health title: ProviderInfo - type: object + description: Information about a registered provider including its configuration and health status. ListProvidersResponse: - description: Response containing a list of all available providers. properties: data: items: $ref: '#/components/schemas/ProviderInfo' - title: Data type: array + title: Data + type: object required: - data title: ListProvidersResponse - type: object + description: Response containing a list of all available providers. ListOpenAIResponseObject: - description: Paginated list of OpenAI response objects with navigation metadata. properties: data: items: $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More first_id: - title: First Id type: string + title: First Id last_id: - title: Last Id type: string + title: Last Id object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data - has_more - first_id - last_id title: ListOpenAIResponseObject - type: object + description: Paginated list of OpenAI response objects with navigation metadata. OpenAIResponseError: - description: Error details for failed OpenAI response requests. properties: code: - title: Code type: string + title: Code message: - title: Message type: string + title: Message + type: object required: - code - message title: OpenAIResponseError - type: object + description: Error details for failed OpenAI response requests. OpenAIResponseInput: anyOf: - discriminator: @@ -5567,29 +6443,27 @@ components: title: OpenAIResponseMessage title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage OpenAIResponseInputToolFileSearch: - description: File search tool configuration for OpenAI response inputs. properties: type: + type: string const: file_search - default: file_search title: Type - type: string + default: file_search vector_store_ids: items: type: string - title: Vector Store Ids type: array + title: Vector Store Ids filters: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true max_num_results: anyOf: - - maximum: 50 - minimum: 1 - type: integer + - type: integer + maximum: 50.0 + minimum: 1.0 - type: 'null' default: 10 ranking_options: @@ -5597,28 +6471,26 @@ components: - $ref: '#/components/schemas/SearchRankingOptions' title: SearchRankingOptions - type: 'null' - nullable: true title: SearchRankingOptions + type: object required: - vector_store_ids title: OpenAIResponseInputToolFileSearch - type: object + description: File search tool configuration for OpenAI response inputs. OpenAIResponseInputToolFunction: - description: Function tool configuration for OpenAI response inputs. properties: type: + type: string const: function - default: function title: Type - type: string + default: function name: - title: Name type: string + title: Name description: anyOf: - type: string - type: 'null' - nullable: true parameters: anyOf: - additionalProperties: true @@ -5628,18 +6500,17 @@ components: anyOf: - type: boolean - type: 'null' - nullable: true + type: object required: - name - parameters title: OpenAIResponseInputToolFunction - type: object + description: Function tool configuration for OpenAI response inputs. OpenAIResponseInputToolWebSearch: - description: Web search tool configuration for OpenAI response inputs. properties: type: - default: web_search title: Type + default: web_search type: string enum: - web_search @@ -5648,51 +6519,40 @@ components: - web_search_2025_08_26 search_context_size: anyOf: - - pattern: ^low|medium|high$ - type: string + - type: string + pattern: ^low|medium|high$ - type: 'null' default: medium - title: OpenAIResponseInputToolWebSearch type: object + title: OpenAIResponseInputToolWebSearch + description: Web search tool configuration for OpenAI response inputs. OpenAIResponseObjectWithInput: - description: OpenAI response object extended with input context information. properties: created_at: - title: Created At type: integer + title: Created At error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' title: OpenAIResponseError - type: 'null' - nullable: true title: OpenAIResponseError id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model object: + type: string const: response - default: response title: Object - type: string + default: response 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' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -5705,33 +6565,40 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output - type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: - anyOf: - - type: string + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) + type: array + title: Output + parallel_tool_calls: + type: boolean + title: Parallel Tool Calls + default: false + previous_response_id: + anyOf: + - type: string - type: 'null' - nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' title: OpenAIResponsePrompt - type: 'null' - nullable: true title: OpenAIResponsePrompt status: - title: Status type: string + title: Status temperature: anyOf: - type: number - type: 'null' - nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -5741,20 +6608,9 @@ components: anyOf: - type: number - type: 'null' - nullable: true tools: anyOf: - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' title: OpenAIResponseInputToolWebSearch @@ -5764,48 +6620,43 @@ components: title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - nullable: true truncation: anyOf: - type: string - type: 'null' - nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' title: OpenAIResponseUsage - type: 'null' - nullable: true title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - nullable: true max_tool_calls: anyOf: - type: integer - type: 'null' - 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' - title: OpenAIResponseMessage + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -5818,16 +6669,27 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Input + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array + title: Input + type: object required: - created_at - id @@ -5836,7 +6698,7 @@ components: - status - input title: OpenAIResponseObjectWithInput - type: object + description: OpenAI response object extended with input context information. OpenAIResponseOutput: discriminator: mapping: @@ -5865,20 +6727,13 @@ components: title: OpenAIResponseMCPApprovalRequest title: OpenAIResponseMessage | ... (7 variants) OpenAIResponsePrompt: - description: OpenAI compatible Prompt object that is used in OpenAI responses. properties: id: - title: Id type: string + title: Id variables: anyOf: - additionalProperties: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText @@ -5886,31 +6741,35 @@ components: title: OpenAIResponseInputMessageContentImage - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile type: object - type: 'null' - nullable: true version: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - id title: OpenAIResponsePrompt - type: object + description: OpenAI compatible Prompt object that is used in OpenAI responses. OpenAIResponseText: - description: Text response configuration for OpenAI responses. properties: format: anyOf: - $ref: '#/components/schemas/OpenAIResponseTextFormat' title: OpenAIResponseTextFormat - type: 'null' - nullable: true title: OpenAIResponseTextFormat - title: OpenAIResponseText type: object + title: OpenAIResponseText + description: Text response configuration for OpenAI responses. OpenAIResponseTool: discriminator: mapping: @@ -5933,16 +6792,15 @@ components: title: OpenAIResponseToolMCP title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. properties: type: + type: string const: mcp - default: mcp title: Type - type: string + default: mcp server_label: - title: Server Label type: string + title: Server Label allowed_tools: anyOf: - items: @@ -5953,43 +6811,41 @@ components: title: AllowedToolsFilter - type: 'null' title: list[string] | AllowedToolsFilter - nullable: true + type: object required: - server_label title: OpenAIResponseToolMCP - type: object + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. OpenAIResponseUsage: - description: Usage information for OpenAI response. properties: input_tokens: - title: Input Tokens type: integer + title: Input Tokens output_tokens: - title: Output Tokens type: integer + title: Output Tokens total_tokens: - title: Total Tokens type: integer + title: Total Tokens input_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' title: OpenAIResponseUsageInputTokensDetails - type: 'null' - nullable: true title: OpenAIResponseUsageInputTokensDetails output_tokens_details: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' title: OpenAIResponseUsageOutputTokensDetails - type: 'null' - nullable: true title: OpenAIResponseUsageOutputTokensDetails + type: object required: - input_tokens - output_tokens - total_tokens title: OpenAIResponseUsage - type: object + description: Usage information for OpenAI response. ResponseGuardrailSpec: description: Specification for a guardrail to apply during response generation. properties: @@ -6022,40 +6878,37 @@ components: title: OpenAIResponseInputToolMCP title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseInputToolMCP: - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. properties: type: + type: string const: mcp - default: mcp title: Type - type: string + default: mcp server_label: - title: Server Label type: string + title: Server Label server_url: - title: Server Url type: string + title: Server Url headers: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true authorization: anyOf: - type: string - type: 'null' - nullable: true require_approval: anyOf: - - const: always - type: string - - const: never - type: string + - type: string + const: always + - type: string + const: never - $ref: '#/components/schemas/ApprovalFilter' title: ApprovalFilter - default: never title: string | ApprovalFilter + default: never allowed_tools: anyOf: - items: @@ -6066,51 +6919,39 @@ components: title: AllowedToolsFilter - type: 'null' title: list[string] | AllowedToolsFilter - nullable: true + type: object required: - server_label - server_url title: OpenAIResponseInputToolMCP - type: object + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. OpenAIResponseObject: - description: Complete OpenAI response object containing generation results and metadata. properties: created_at: - title: Created At type: integer + title: Created At error: anyOf: - $ref: '#/components/schemas/OpenAIResponseError' title: OpenAIResponseError - type: 'null' - nullable: true title: OpenAIResponseError id: - title: Id type: string + title: Id model: - title: Model type: string + title: Model object: + type: string const: response - default: response title: Object - type: string + default: response 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' - title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -6123,33 +6964,40 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - title: Output + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) type: array + title: Output parallel_tool_calls: - default: false - title: Parallel Tool Calls type: boolean + title: Parallel Tool Calls + default: false previous_response_id: anyOf: - type: string - type: 'null' - nullable: true prompt: anyOf: - $ref: '#/components/schemas/OpenAIResponsePrompt' title: OpenAIResponsePrompt - type: 'null' - nullable: true title: OpenAIResponsePrompt status: - title: Status type: string + title: Status temperature: anyOf: - type: number - type: 'null' - nullable: true text: $ref: '#/components/schemas/OpenAIResponseText' default: @@ -6159,20 +7007,9 @@ components: anyOf: - type: number - type: 'null' - nullable: true tools: anyOf: - items: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' title: OpenAIResponseInputToolWebSearch @@ -6182,32 +7019,38 @@ components: title: OpenAIResponseInputToolFunction - $ref: '#/components/schemas/OpenAIResponseToolMCP' title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' title: OpenAIResponseInputToolWebSearch | ... (4 variants) type: array - type: 'null' - nullable: true truncation: anyOf: - type: string - type: 'null' - nullable: true usage: anyOf: - $ref: '#/components/schemas/OpenAIResponseUsage' title: OpenAIResponseUsage - type: 'null' - nullable: true title: OpenAIResponseUsage instructions: anyOf: - type: string - type: 'null' - nullable: true max_tool_calls: anyOf: - type: integer - type: 'null' - nullable: true + type: object required: - created_at - id @@ -6215,7 +7058,7 @@ components: - output - status title: OpenAIResponseObject - type: object + description: Complete OpenAI response object containing generation results and metadata. OpenAIResponseContentPartOutputText: description: Text content within a streamed response part. properties: @@ -7379,43 +8222,32 @@ components: title: OpenAIResponseObjectStreamResponseWebSearchCallSearching type: object OpenAIDeleteResponseObject: - description: Response object confirming deletion of an OpenAI response. properties: id: - title: Id type: string + title: Id object: + type: string const: response - default: response title: Object - type: string + default: response deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: OpenAIDeleteResponseObject - type: object + description: Response object confirming deletion of an OpenAI response. ListOpenAIResponseInputItem: - description: List container for OpenAI response input items. 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' - title: OpenAIResponseMessage + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -7428,39 +8260,48 @@ components: title: OpenAIResponseOutputMessageMCPListTools - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) + 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' + title: OpenAIResponseMessage-Output | ... (7 variants) - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' title: OpenAIResponseInputFunctionToolCallOutput - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - title: Data + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output type: array + title: Data object: + type: string const: list - default: list title: Object - type: string + default: list + type: object required: - data title: ListOpenAIResponseInputItem - type: object + description: List container for OpenAI response input items. RunShieldResponse: - description: Response from running a safety shield. properties: violation: anyOf: - $ref: '#/components/schemas/SafetyViolation' title: SafetyViolation - type: 'null' - nullable: true title: SafetyViolation - title: RunShieldResponse type: object + title: RunShieldResponse + description: Response from running a safety shield. SafetyViolation: - description: Details of a safety violation detected by content moderation. properties: violation_level: $ref: '#/components/schemas/ViolationLevel' @@ -7468,25 +8309,25 @@ components: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - violation_level title: SafetyViolation - type: object + description: Details of a safety violation detected by content moderation. ViolationLevel: - description: Severity level of a safety violation. + type: string enum: - info - warn - error title: ViolationLevel - type: string + description: Severity level of a safety violation. AggregationFunctionType: - description: Types of aggregation functions for scoring results. + type: string enum: - average - weighted_average @@ -7494,193 +8335,176 @@ components: - categorical_count - accuracy title: AggregationFunctionType - type: string + description: Types of aggregation functions for scoring results. ArrayType: - description: Parameter type for array values. properties: type: + type: string const: array - default: array title: Type - type: string - title: ArrayType + default: array type: object + title: ArrayType + description: Parameter type for array values. BasicScoringFnParams: - description: Parameters for basic scoring function configuration. properties: type: + type: string const: basic - default: basic title: Type - type: string + default: basic aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array - title: BasicScoringFnParams + 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. BooleanType: - description: Parameter type for boolean values. properties: type: + type: string const: boolean - default: boolean title: Type - type: string - title: BooleanType + default: boolean type: object + title: BooleanType + description: Parameter type for boolean values. ChatCompletionInputType: - description: Parameter type for chat completion input. properties: type: + type: string const: chat_completion_input - default: chat_completion_input title: Type - type: string - title: ChatCompletionInputType + default: chat_completion_input type: object + title: ChatCompletionInputType + description: Parameter type for chat completion input. CompletionInputType: - description: Parameter type for completion input. properties: type: + type: string const: completion_input - default: completion_input title: Type - type: string - title: CompletionInputType + default: completion_input type: object + title: CompletionInputType + description: Parameter type for completion input. JsonType: - description: Parameter type for JSON values. properties: type: + type: string const: json - default: json title: Type - type: string - title: JsonType + default: json type: object + title: JsonType + description: Parameter type for JSON values. LLMAsJudgeScoringFnParams: - description: Parameters for LLM-as-judge scoring function configuration. properties: type: + type: string const: llm_as_judge - default: llm_as_judge title: Type - type: string + default: llm_as_judge judge_model: - title: Judge Model type: string + title: Judge Model prompt_template: anyOf: - type: string - type: 'null' - nullable: true judge_score_regexes: - description: Regexes to extract the answer from generated response items: type: string - title: Judge Score Regexes type: array + title: Judge Score Regexes + description: Regexes to extract the answer from generated response aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array + title: Aggregation Functions + description: Aggregation functions to apply to the scores of each row + type: object required: - judge_model title: LLMAsJudgeScoringFnParams - type: object + description: Parameters for LLM-as-judge scoring function configuration. NumberType: - description: Parameter type for numeric values. properties: type: + type: string const: number - default: number title: Type - type: string - title: NumberType + default: number type: object + title: NumberType + description: Parameter type for numeric values. ObjectType: - description: Parameter type for object values. properties: type: + type: string const: object - default: object title: Type - type: string - title: ObjectType + default: object type: object + title: ObjectType + description: Parameter type for object values. RegexParserScoringFnParams: - description: Parameters for regex parser scoring function configuration. properties: type: + type: string const: regex_parser - default: regex_parser title: Type - type: string + default: regex_parser parsing_regexes: - description: Regex to extract the answer from generated response items: type: string - title: Parsing Regexes type: array + title: Parsing Regexes + description: Regex to extract the answer from generated response aggregation_functions: - description: Aggregation functions to apply to the scores of each row items: $ref: '#/components/schemas/AggregationFunctionType' - title: Aggregation Functions type: array - title: RegexParserScoringFnParams + 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. ScoringFn: - description: A scoring function resource for evaluating model outputs. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: scoring_function - default: scoring_function title: Type - type: string + default: scoring_function description: anyOf: - type: string - type: 'null' - nullable: true metadata: additionalProperties: true - description: Any additional metadata for this definition - title: Metadata type: object + title: Metadata + description: Any additional metadata for this definition return_type: - description: The return type of the deterministic function - discriminator: - mapping: - 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' title: StringType @@ -7701,32 +8525,45 @@ components: - $ref: '#/components/schemas/CompletionInputType' title: CompletionInputType title: StringType | ... (9 variants) + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + 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: anyOf: - - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' title: LLMAsJudgeScoringFnParams - $ref: '#/components/schemas/RegexParserScoringFnParams' title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: 'null' - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval title: Params - nullable: true + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + type: object required: - identifier - provider_id - return_type title: ScoringFn - type: object + description: A scoring function resource for evaluating model outputs. ScoringFnParams: discriminator: mapping: @@ -7743,127 +8580,124 @@ components: title: BasicScoringFnParams title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams StringType: - description: Parameter type for string values. properties: type: + type: string const: string - default: string title: Type - type: string - title: StringType + default: string type: object + title: StringType + description: Parameter type for string values. UnionType: - description: Parameter type for union values. properties: type: + type: string const: union - default: union title: Type - type: string - title: UnionType + default: union type: object + title: UnionType + description: Parameter type for union values. ListScoringFunctionsResponse: properties: data: items: $ref: '#/components/schemas/ScoringFn' - title: Data type: array + title: Data + type: object required: - data title: ListScoringFunctionsResponse - type: object ScoreResponse: - description: The response from scoring. properties: results: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Results type: object + title: Results + type: object required: - results title: ScoreResponse - type: object + description: The response from scoring. ScoringResult: - description: A scoring result for a single row. properties: score_rows: items: additionalProperties: true type: object - title: Score Rows type: array + title: Score Rows aggregated_results: additionalProperties: true - title: Aggregated Results type: object + title: Aggregated Results + type: object required: - score_rows - aggregated_results title: ScoringResult - type: object + description: A scoring result for a single row. ScoreBatchResponse: - description: Response from batch scoring operations on datasets. properties: dataset_id: anyOf: - type: string - type: 'null' - nullable: true results: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Results type: object + title: Results + type: object required: - results title: ScoreBatchResponse - type: object + description: Response from batch scoring operations on datasets. Shield: - description: A safety shield resource that can be used to check content. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: shield - default: shield title: Type - type: string + default: shield params: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - identifier - provider_id title: Shield - type: object + description: A safety shield resource that can be used to check content. ListShieldsResponse: properties: data: items: $ref: '#/components/schemas/Shield' - title: Data type: array + title: Data + type: object required: - data title: ListShieldsResponse - type: object ImageContentItem: description: A image content item properties: @@ -7920,184 +8754,172 @@ components: title: TextContentItem title: ImageContentItem | TextContentItem TextContentItem: - description: A text content item properties: type: + type: string const: text - default: text title: Type - type: string + default: text text: - title: Text type: string + title: Text + type: object required: - text title: TextContentItem - type: object + description: A text content item ToolInvocationResult: - description: Result of a tool invocation. properties: content: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem type: array - title: list[ImageContentItem | TextContentItem] + title: list[ImageContentItem-Output | TextContentItem] - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true + title: string | list[ImageContentItem-Output | TextContentItem] error_message: anyOf: - type: string - type: 'null' - nullable: true error_code: anyOf: - type: integer - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true - title: ToolInvocationResult type: object + title: ToolInvocationResult + description: Result of a tool invocation. URL: - description: A URL reference to external content. properties: uri: - title: Uri type: string + title: Uri + type: object required: - uri title: URL - type: object + description: A URL reference to external content. ToolDef: - description: Tool definition used in runtime contexts. properties: toolgroup_id: anyOf: - type: string - type: 'null' - nullable: true name: - title: Name type: string + title: Name description: anyOf: - type: string - type: 'null' - nullable: true input_schema: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true output_schema: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - name title: ToolDef - type: object + description: Tool definition used in runtime contexts. ListToolDefsResponse: - description: Response containing a list of tool definitions. properties: data: items: $ref: '#/components/schemas/ToolDef' - title: Data type: array + title: Data + type: object required: - data title: ListToolDefsResponse - type: object + description: Response containing a list of tool definitions. ToolGroup: - description: A group of related tools managed together. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: tool_group - default: tool_group title: Type - type: string + default: tool_group mcp_endpoint: anyOf: - $ref: '#/components/schemas/URL' title: URL - type: 'null' - nullable: true title: URL args: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - identifier - provider_id title: ToolGroup - type: object + description: A group of related tools managed together. ListToolGroupsResponse: - description: Response containing a list of tool groups. properties: data: items: $ref: '#/components/schemas/ToolGroup' - title: Data type: array + title: Data + type: object required: - data title: ListToolGroupsResponse - type: object + description: Response containing a list of tool groups. Chunk: description: A chunk of content that can be inserted into a vector database. properties: @@ -8157,105 +8979,94 @@ components: 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. properties: chunk_id: anyOf: - type: string - type: 'null' - nullable: true document_id: anyOf: - type: string - type: 'null' - nullable: true source: anyOf: - type: string - type: 'null' - nullable: true created_timestamp: anyOf: - type: integer - type: 'null' - nullable: true updated_timestamp: anyOf: - type: integer - type: 'null' - nullable: true chunk_window: anyOf: - type: string - type: 'null' - nullable: true chunk_tokenizer: anyOf: - type: string - type: 'null' - nullable: true chunk_embedding_model: anyOf: - type: string - type: 'null' - nullable: true chunk_embedding_dimension: anyOf: - type: integer - type: 'null' - nullable: true content_token_count: anyOf: - type: integer - type: 'null' - nullable: true metadata_token_count: anyOf: - type: integer - type: 'null' - nullable: true - title: ChunkMetadata type: object + title: 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. QueryChunksResponse: - description: Response from querying chunks in a vector database. properties: chunks: items: - $ref: '#/components/schemas/Chunk' - title: Chunks + $ref: '#/components/schemas/Chunk-Output' type: array + title: Chunks scores: items: type: number - title: Scores type: array + title: Scores + type: object required: - chunks - scores title: QueryChunksResponse - type: object + description: Response from querying chunks in a vector database. VectorStoreFileCounts: - description: File processing status counts for a vector store. properties: completed: - title: Completed type: integer + title: Completed cancelled: - title: Cancelled type: integer + title: Cancelled failed: - title: Failed type: integer + title: Failed in_progress: - title: In Progress type: integer + title: In Progress total: - title: Total type: integer + title: Total + type: object required: - completed - cancelled @@ -8263,91 +9074,85 @@ components: - in_progress - total title: VectorStoreFileCounts - type: object + description: File processing status counts for a vector store. VectorStoreListResponse: - description: Response from listing vector stores. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreListResponse - type: object + description: Response from listing vector stores. VectorStoreObject: - description: OpenAI Vector Store object. properties: id: - title: Id type: string + title: Id object: - default: vector_store - title: Object type: string + title: Object + default: vector_store created_at: - title: Created At type: integer + title: Created At name: anyOf: - type: string - type: 'null' - nullable: true usage_bytes: - default: 0 - title: Usage Bytes type: integer + title: Usage Bytes + default: 0 file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' status: - default: completed - title: Status type: string + title: Status + default: completed expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true expires_at: anyOf: - type: integer - type: 'null' - nullable: true last_active_at: anyOf: - type: integer - type: 'null' - nullable: true metadata: additionalProperties: true - title: Metadata type: object + title: Metadata + type: object required: - id - created_at - file_counts title: VectorStoreObject - type: object + description: OpenAI Vector Store object. VectorStoreChunkingStrategy: discriminator: mapping: @@ -8361,159 +9166,151 @@ components: title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreChunkingStrategyAuto: - description: Automatic chunking strategy for vector store files. properties: type: + type: string const: auto - default: auto title: Type - type: string - title: VectorStoreChunkingStrategyAuto + default: auto type: object + title: VectorStoreChunkingStrategyAuto + description: Automatic chunking strategy for vector store files. VectorStoreChunkingStrategyStatic: - description: Static chunking strategy with configurable parameters. properties: type: + type: string const: static - default: static title: Type - type: string + default: static static: $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + type: object required: - static title: VectorStoreChunkingStrategyStatic - type: object + description: Static chunking strategy with configurable parameters. VectorStoreChunkingStrategyStaticConfig: - description: Configuration for static chunking strategy. properties: chunk_overlap_tokens: - default: 400 - title: Chunk Overlap Tokens type: integer + title: Chunk Overlap Tokens + default: 400 max_chunk_size_tokens: - default: 800 - maximum: 4096 - minimum: 100 - title: Max Chunk Size Tokens type: integer - title: VectorStoreChunkingStrategyStaticConfig + maximum: 4096.0 + minimum: 100.0 + title: Max Chunk Size Tokens + default: 800 type: object + title: VectorStoreChunkingStrategyStaticConfig + description: Configuration for static chunking strategy. OpenAICreateVectorStoreRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store with extra_body support. properties: name: anyOf: - type: string - type: 'null' - nullable: true file_ids: anyOf: - items: type: string type: array - type: 'null' - nullable: true expires_after: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true chunking_strategy: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - type: 'null' title: Chunking Strategy - nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true - title: OpenAICreateVectorStoreRequestWithExtraBody + additionalProperties: true type: object + title: OpenAICreateVectorStoreRequestWithExtraBody + description: Request to create a vector store with extra_body support. VectorStoreDeleteResponse: - description: Response from deleting a vector store. properties: id: - title: Id type: string + title: Id object: - default: vector_store.deleted - title: Object type: string + title: Object + default: vector_store.deleted deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: VectorStoreDeleteResponse - type: object + description: Response from deleting a vector store. OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - additionalProperties: true - description: Request to create a vector store file batch with extra_body support. properties: file_ids: items: type: string - title: File Ids type: array + title: File Ids attributes: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true chunking_strategy: anyOf: - - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: + - oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - nullable: true + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + additionalProperties: true + type: object required: - file_ids title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - type: object + description: Request to create a vector store file batch with extra_body support. VectorStoreFileBatchObject: - description: OpenAI Vector Store File Batch object. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file_batch - title: Object type: string + title: Object + default: vector_store.file_batch created_at: - title: Created At type: integer + title: Created At vector_store_id: - title: Vector Store Id type: string + title: Vector Store Id status: title: Status type: string @@ -8525,6 +9322,7 @@ components: default: completed file_counts: $ref: '#/components/schemas/VectorStoreFileCounts' + type: object required: - id - created_at @@ -8532,7 +9330,7 @@ components: - status - file_counts title: VectorStoreFileBatchObject - type: object + description: OpenAI Vector Store File Batch object. VectorStoreFileStatus: type: string enum: @@ -8542,7 +9340,6 @@ components: - failed default: completed VectorStoreFileLastError: - description: Error information for failed vector store file processing. properties: code: title: Code @@ -8552,48 +9349,47 @@ components: - rate_limit_exceeded default: server_error message: - title: Message type: string + title: Message + type: object required: - code - message title: VectorStoreFileLastError - type: object + description: Error information for failed vector store file processing. VectorStoreFileObject: - description: OpenAI Vector Store File object. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file - title: Object type: string + title: Object + default: vector_store.file attributes: additionalProperties: true - title: Attributes type: object + title: Attributes chunking_strategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type oneOf: - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' title: VectorStoreChunkingStrategyAuto - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' title: VectorStoreChunkingStrategyStatic title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' created_at: - title: Created At type: integer + title: Created At last_error: anyOf: - $ref: '#/components/schemas/VectorStoreFileLastError' title: VectorStoreFileLastError - type: 'null' - nullable: true title: VectorStoreFileLastError status: title: Status @@ -8605,12 +9401,13 @@ components: - failed default: completed usage_bytes: - default: 0 - title: Usage Bytes type: integer + title: Usage Bytes + default: 0 vector_store_id: - title: Vector Store Id type: string + title: Vector Store Id + type: object required: - id - chunking_strategy @@ -8618,158 +9415,149 @@ components: - status - vector_store_id title: VectorStoreFileObject - type: object + description: OpenAI Vector Store File object. VectorStoreFilesListInBatchResponse: - description: Response from listing files in a vector store file batch. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreFileObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreFilesListInBatchResponse - type: object + description: Response from listing files in a vector store file batch. VectorStoreListFilesResponse: - description: Response from listing files in a vector store. properties: object: - default: list - title: Object type: string + title: Object + default: list data: items: $ref: '#/components/schemas/VectorStoreFileObject' - title: Data type: array + title: Data first_id: anyOf: - type: string - type: 'null' - nullable: true last_id: anyOf: - type: string - type: 'null' - nullable: true has_more: - default: false - title: Has More type: boolean + title: Has More + default: false + type: object required: - data title: VectorStoreListFilesResponse - type: object + description: Response from listing files in a vector store. VectorStoreFileDeleteResponse: - description: Response from deleting a vector store file. properties: id: - title: Id type: string + title: Id object: - default: vector_store.file.deleted - title: Object type: string + title: Object + default: vector_store.file.deleted deleted: - default: true - title: Deleted type: boolean + title: Deleted + default: true + type: object required: - id title: VectorStoreFileDeleteResponse - type: object + description: Response from deleting a vector store file. VectorStoreContent: - description: Content item from a vector store file or search result. properties: type: + type: string const: text title: Type - type: string text: - title: Text type: string + title: Text embedding: anyOf: - items: type: number type: array - type: 'null' - nullable: true chunk_metadata: anyOf: - $ref: '#/components/schemas/ChunkMetadata' title: ChunkMetadata - type: 'null' - nullable: true title: ChunkMetadata metadata: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true + type: object required: - type - text title: VectorStoreContent - type: object + description: Content item from a vector store file or search result. VectorStoreFileContentResponse: - description: Represents the parsed content of a vector store file. properties: object: + type: string const: vector_store.file_content.page - default: vector_store.file_content.page title: Object - type: string + default: vector_store.file_content.page data: items: $ref: '#/components/schemas/VectorStoreContent' - title: Data type: array + title: Data has_more: - default: false - title: Has More type: boolean + title: Has More + default: false next_page: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - data title: VectorStoreFileContentResponse - type: object + description: Represents the parsed content of a vector store file. VectorStoreSearchResponse: - description: Response from searching a vector store. properties: file_id: - title: File Id type: string + title: File Id filename: - title: Filename type: string + title: Filename score: - title: Score type: number + title: Score attributes: anyOf: - additionalProperties: @@ -8780,241 +9568,230 @@ components: title: string | number | boolean type: object - type: 'null' - nullable: true content: items: $ref: '#/components/schemas/VectorStoreContent' - title: Content type: array + title: Content + type: object required: - file_id - filename - score - content title: VectorStoreSearchResponse - type: object + description: Response from searching a vector store. VectorStoreSearchResponsePage: - description: Paginated response from searching a vector store. properties: object: - default: vector_store.search_results.page - title: Object type: string + title: Object + default: vector_store.search_results.page search_query: items: type: string - title: Search Query type: array + title: Search Query data: items: $ref: '#/components/schemas/VectorStoreSearchResponse' - title: Data type: array + title: Data has_more: - default: false - title: Has More type: boolean + title: Has More + default: false next_page: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - search_query - data title: VectorStoreSearchResponsePage - type: object + description: Paginated response from searching a vector store. VersionInfo: - description: Version information for the service. properties: version: - title: Version type: string + title: Version + type: object required: - version title: VersionInfo - type: object + description: Version information for the service. PaginatedResponse: - description: A generic paginated response that follows a simple format. properties: data: items: additionalProperties: true type: object - title: Data type: array + title: Data has_more: - title: Has More type: boolean + title: Has More url: anyOf: - type: string - type: 'null' - nullable: true + type: object required: - data - has_more title: PaginatedResponse - type: object + description: A generic paginated response that follows a simple format. Dataset: - description: Dataset resource for storing and accessing training or evaluation data. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: dataset - default: dataset title: Type - type: string + default: dataset purpose: $ref: '#/components/schemas/DatasetPurpose' source: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type oneOf: - $ref: '#/components/schemas/URIDataSource' title: URIDataSource - $ref: '#/components/schemas/RowsDataSource' title: RowsDataSource title: URIDataSource | RowsDataSource + discriminator: + propertyName: type + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' metadata: additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata type: object + title: Metadata + description: Any additional metadata for this dataset + type: object required: - identifier - provider_id - purpose - source title: Dataset - type: object + description: Dataset resource for storing and accessing training or evaluation data. RowsDataSource: - description: A dataset stored in rows. properties: type: + type: string const: rows - default: rows title: Type - type: string + default: rows rows: items: additionalProperties: true type: object - title: Rows type: array + title: Rows + type: object required: - rows title: RowsDataSource - type: object + description: A dataset stored in rows. URIDataSource: - description: A dataset that can be obtained from a URI. properties: type: + type: string const: uri - default: uri title: Type - type: string + default: uri uri: - title: Uri type: string + title: Uri + type: object required: - uri title: URIDataSource - type: object + description: A dataset that can be obtained from a URI. ListDatasetsResponse: - description: Response from listing datasets. properties: data: items: $ref: '#/components/schemas/Dataset' - title: Data type: array + title: Data + type: object required: - data title: ListDatasetsResponse - type: object + description: Response from listing datasets. Benchmark: - description: A benchmark resource for evaluating model performance. properties: identifier: - description: Unique identifier for this resource in llama stack - title: Identifier type: string + title: Identifier + description: Unique identifier for this resource in llama stack provider_resource_id: anyOf: - type: string - type: 'null' description: Unique identifier for this resource in the provider - nullable: true provider_id: - description: ID of the provider that owns this resource - title: Provider Id type: string + title: Provider Id + description: ID of the provider that owns this resource type: + type: string const: benchmark - default: benchmark title: Type - type: string + default: benchmark dataset_id: - title: Dataset Id type: string + title: Dataset Id scoring_functions: items: type: string - title: Scoring Functions type: array + title: Scoring Functions metadata: additionalProperties: true - description: Metadata for this evaluation task - title: Metadata type: object + title: Metadata + description: Metadata for this evaluation task + type: object required: - identifier - provider_id - dataset_id - scoring_functions title: Benchmark - type: object + description: A benchmark resource for evaluating model performance. ListBenchmarksResponse: properties: data: items: $ref: '#/components/schemas/Benchmark' - title: Data type: array + title: Data + type: object required: - data title: ListBenchmarksResponse - type: object BenchmarkConfig: - description: A benchmark configuration for evaluation. properties: eval_candidate: $ref: '#/components/schemas/ModelCandidate' scoring_params: additionalProperties: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' title: LLMAsJudgeScoringFnParams @@ -9022,41 +9799,46 @@ components: title: RegexParserScoringFnParams - $ref: '#/components/schemas/BasicScoringFnParams' title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - description: Map between scoring function id and parameters for each scoring function you want to run - title: Scoring Params type: object + title: Scoring Params + description: Map between scoring function id and parameters for each scoring function you want to run num_examples: anyOf: - type: integer - type: 'null' description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - nullable: true + type: object required: - eval_candidate title: BenchmarkConfig - type: object + description: A benchmark configuration for evaluation. GreedySamplingStrategy: - description: Greedy sampling strategy that selects the highest probability token at each step. properties: type: + type: string const: greedy - default: greedy title: Type - type: string - title: GreedySamplingStrategy + default: greedy type: object + title: GreedySamplingStrategy + description: Greedy sampling strategy that selects the highest probability token at each step. ModelCandidate: - description: A model candidate for evaluation. properties: type: + type: string const: model - default: model title: Type - type: string + default: model model: - title: Model type: string + title: Model sampling_params: $ref: '#/components/schemas/SamplingParams' system_message: @@ -9064,23 +9846,16 @@ components: - $ref: '#/components/schemas/SystemMessage' title: SystemMessage - type: 'null' - nullable: true title: SystemMessage + type: object required: - model - sampling_params title: ModelCandidate - type: object + description: A model candidate for evaluation. SamplingParams: - description: Sampling parameters. properties: strategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' title: GreedySamplingStrategy @@ -9089,11 +9864,16 @@ components: - $ref: '#/components/schemas/TopKSamplingStrategy' title: TopKSamplingStrategy title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' max_tokens: anyOf: - type: integer - type: 'null' - nullable: true repetition_penalty: anyOf: - type: number @@ -9105,74 +9885,73 @@ components: type: string type: array - type: 'null' - nullable: true - title: SamplingParams type: object + title: SamplingParams + description: Sampling parameters. SystemMessage: - description: A system message providing instructions or context to the model. properties: role: + type: string const: system - default: system title: Role - type: string + default: system content: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input - $ref: '#/components/schemas/TextContentItem' title: TextContentItem - title: ImageContentItem | TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + type: object required: - content title: SystemMessage - type: object + description: A system message providing instructions or context to the model. TopKSamplingStrategy: - description: Top-k sampling strategy that restricts sampling to the k most likely tokens. properties: type: + type: string const: top_k - default: top_k title: Type - type: string + default: top_k top_k: - minimum: 1 - title: Top K type: integer + minimum: 1.0 + title: Top K + type: object required: - top_k title: TopKSamplingStrategy - type: object + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. TopPSamplingStrategy: - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. properties: type: + type: string const: top_p - default: top_p title: Type - type: string + default: top_p temperature: anyOf: - type: number @@ -9183,94 +9962,94 @@ components: - type: number - type: 'null' default: 0.95 + type: object required: - temperature title: TopPSamplingStrategy - type: object + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. EvaluateResponse: - description: The response from an evaluation. properties: generations: items: additionalProperties: true type: object - title: Generations type: array + title: Generations scores: additionalProperties: $ref: '#/components/schemas/ScoringResult' - title: Scores type: object + title: Scores + type: object required: - generations - scores title: EvaluateResponse - type: object + description: The response from an evaluation. Job: - description: A job execution instance with status tracking. properties: job_id: - title: Job Id type: string + title: Job Id status: $ref: '#/components/schemas/JobStatus' + type: object required: - job_id - status title: Job - type: object + description: A job execution instance with status tracking. RerankData: - description: A single rerank result from a reranking response. properties: index: - title: Index type: integer + title: Index relevance_score: - title: Relevance Score type: number + title: Relevance Score + type: object required: - index - relevance_score title: RerankData - type: object + description: A single rerank result from a reranking response. RerankResponse: - description: Response from a reranking request. properties: data: items: $ref: '#/components/schemas/RerankData' - title: Data type: array + title: Data + type: object required: - data title: RerankResponse - type: object + description: Response from a reranking request. Checkpoint: - description: Checkpoint created during training runs. properties: identifier: - title: Identifier type: string + title: Identifier created_at: + type: string format: date-time title: Created At - type: string epoch: - title: Epoch type: integer + title: Epoch post_training_job_id: - title: Post Training Job Id type: string + title: Post Training Job Id path: - title: Path type: string + title: Path training_metrics: anyOf: - $ref: '#/components/schemas/PostTrainingMetric' title: PostTrainingMetric - type: 'null' - nullable: true title: PostTrainingMetric + type: object required: - identifier - created_at @@ -9278,137 +10057,131 @@ components: - post_training_job_id - path title: Checkpoint - type: object + description: Checkpoint created during training runs. PostTrainingJobArtifactsResponse: - description: Artifacts of a finetuning job. properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid checkpoints: items: $ref: '#/components/schemas/Checkpoint' - title: Checkpoints type: array + title: Checkpoints + type: object required: - job_uuid title: PostTrainingJobArtifactsResponse - type: object + description: Artifacts of a finetuning job. PostTrainingMetric: - description: Training metrics captured during post-training jobs. properties: epoch: - title: Epoch type: integer + title: Epoch train_loss: - title: Train Loss type: number + title: Train Loss validation_loss: - title: Validation Loss type: number + title: Validation Loss perplexity: - title: Perplexity type: number + title: Perplexity + type: object required: - epoch - train_loss - validation_loss - perplexity title: PostTrainingMetric - type: object + description: Training metrics captured during post-training jobs. PostTrainingJobStatusResponse: - description: Status of a finetuning job. properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid status: $ref: '#/components/schemas/JobStatus' scheduled_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true started_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true completed_at: anyOf: - - format: date-time - type: string + - type: string + format: date-time - type: 'null' - nullable: true resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true checkpoints: items: $ref: '#/components/schemas/Checkpoint' - title: Checkpoints type: array + title: Checkpoints + type: object required: - job_uuid - status title: PostTrainingJobStatusResponse - type: object + description: Status of a finetuning job. ListPostTrainingJobsResponse: properties: data: items: $ref: '#/components/schemas/PostTrainingJob' - title: Data type: array + title: Data + type: object required: - data title: ListPostTrainingJobsResponse - type: object DPOAlignmentConfig: - description: Configuration for Direct Preference Optimization (DPO) alignment. properties: beta: - title: Beta type: number + title: Beta loss_type: $ref: '#/components/schemas/DPOLossType' default: sigmoid + type: object required: - beta title: DPOAlignmentConfig - type: object + description: Configuration for Direct Preference Optimization (DPO) alignment. DPOLossType: + type: string enum: - sigmoid - hinge - ipo - kto_pair title: DPOLossType - type: string DataConfig: - description: Configuration for training data and data loading. properties: dataset_id: - title: Dataset Id type: string + title: Dataset Id batch_size: - title: Batch Size type: integer + title: Batch Size shuffle: - title: Shuffle type: boolean + title: Shuffle data_format: $ref: '#/components/schemas/DatasetFormat' validation_dataset_id: anyOf: - type: string - type: 'null' - nullable: true packed: anyOf: - type: boolean @@ -9419,22 +10192,22 @@ components: - type: boolean - type: 'null' default: false + type: object required: - dataset_id - batch_size - shuffle - data_format title: DataConfig - type: object + description: Configuration for training data and data loading. DatasetFormat: - description: Format of the training dataset. + type: string enum: - instruct - dialog title: DatasetFormat - type: string + description: Format of the training dataset. EfficiencyConfig: - description: Configuration for memory and compute efficiency optimizations. properties: enable_activation_checkpointing: anyOf: @@ -9456,51 +10229,51 @@ components: - type: boolean - type: 'null' default: false - title: EfficiencyConfig type: object + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. OptimizerConfig: - description: Configuration parameters for the optimization algorithm. properties: optimizer_type: $ref: '#/components/schemas/OptimizerType' lr: - title: Lr type: number + title: Lr weight_decay: - title: Weight Decay type: number + title: Weight Decay num_warmup_steps: - title: Num Warmup Steps type: integer + title: Num Warmup Steps + type: object required: - optimizer_type - lr - weight_decay - num_warmup_steps title: OptimizerConfig - type: object + description: Configuration parameters for the optimization algorithm. OptimizerType: - description: Available optimizer algorithms for training. + type: string enum: - adam - adamw - sgd title: OptimizerType - type: string + description: Available optimizer algorithms for training. TrainingConfig: - description: Comprehensive configuration for the training process. properties: n_epochs: - title: N Epochs type: integer + title: N Epochs max_steps_per_epoch: - default: 1 - title: Max Steps Per Epoch type: integer - gradient_accumulation_steps: + title: Max Steps Per Epoch default: 1 - title: Gradient Accumulation Steps + gradient_accumulation_steps: type: integer + title: Gradient Accumulation Steps + default: 1 max_validation_steps: anyOf: - type: integer @@ -9511,40 +10284,38 @@ components: - $ref: '#/components/schemas/DataConfig' title: DataConfig - type: 'null' - nullable: true title: DataConfig optimizer_config: anyOf: - $ref: '#/components/schemas/OptimizerConfig' title: OptimizerConfig - type: 'null' - nullable: true title: OptimizerConfig efficiency_config: anyOf: - $ref: '#/components/schemas/EfficiencyConfig' title: EfficiencyConfig - type: 'null' - nullable: true title: EfficiencyConfig dtype: anyOf: - type: string - type: 'null' default: bf16 + type: object required: - n_epochs title: TrainingConfig - type: object + description: Comprehensive configuration for the training process. PostTrainingJob: properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid + type: object required: - job_uuid title: PostTrainingJob - type: object AlgorithmConfig: discriminator: mapping: @@ -9558,30 +10329,29 @@ components: title: QATFinetuningConfig title: LoraFinetuningConfig | QATFinetuningConfig LoraFinetuningConfig: - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. properties: type: + type: string const: LoRA - default: LoRA title: Type - type: string + default: LoRA lora_attn_modules: items: type: string - title: Lora Attn Modules type: array + title: Lora Attn Modules apply_lora_to_mlp: - title: Apply Lora To Mlp type: boolean + title: Apply Lora To Mlp apply_lora_to_output: - title: Apply Lora To Output type: boolean + title: Apply Lora To Output rank: - title: Rank type: integer + title: Rank alpha: - title: Alpha type: integer + title: Alpha use_dora: anyOf: - type: boolean @@ -9592,6 +10362,7 @@ components: - type: boolean - type: 'null' default: false + type: object required: - lora_attn_modules - apply_lora_to_mlp @@ -9599,26 +10370,26 @@ components: - rank - alpha title: LoraFinetuningConfig - type: object + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. QATFinetuningConfig: - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. properties: type: + type: string const: QAT - default: QAT title: Type - type: string + default: QAT quantizer_name: - title: Quantizer Name type: string + title: Quantizer Name group_size: - title: Group Size type: integer + title: Group Size + type: object required: - quantizer_name - group_size title: QATFinetuningConfig - type: object + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. ParamType: discriminator: mapping: @@ -9664,132 +10435,7 @@ components: - $ref: '#/components/schemas/RowsDataSource' title: RowsDataSource title: URIDataSource | RowsDataSource - _URLOrData: - description: A URL or a base64 encoded string - properties: - url: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - nullable: true - title: URL - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - nullable: true - title: _URLOrData - type: object - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat - type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. - 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 - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - MCPListToolsTool: - description: Tool definition returned by MCP list tools operation. - properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - input_schema - - name - title: MCPListToolsTool - type: object - OpenAIResponseOutputMessageFileSearchToolCallResults: - description: Search results returned by the file search operation. - 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 AllowedToolsFilter: - description: Filter configuration for restricting which MCP tools can be used. properties: tool_names: anyOf: @@ -9797,11 +10443,10 @@ components: type: string type: array - type: 'null' - nullable: true - title: AllowedToolsFilter type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. ApprovalFilter: - description: Filter configuration for MCP tool approval requirements. properties: always: anyOf: @@ -9809,31 +10454,1640 @@ components: type: string type: array - type: 'null' - nullable: true never: anyOf: - items: type: string type: array - type: 'null' - nullable: true - title: ApprovalFilter type: object - SearchRankingOptions: - description: Options for ranking and filtering search results. + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. + BatchError: properties: - ranker: + code: anyOf: - type: string - type: 'null' - nullable: true - score_threshold: + line: anyOf: - - type: number + - type: integer - type: 'null' - default: 0.0 - title: SearchRankingOptions + message: + anyOf: + - type: string + - type: 'null' + param: + anyOf: + - type: string + - type: 'null' + 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 + BatchesPostRequest: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + const: 24h + title: Completion Window + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + idempotency_key: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_file_id + - endpoint + - completion_window + title: BatchesPostRequest + Body_openai_upload_file_v1_files_post: + properties: + file: + type: string + format: binary + title: File + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + expires_after: + anyOf: + - $ref: '#/components/schemas/ExpiresAfter' + title: ExpiresAfter + - type: 'null' + title: ExpiresAfter + type: object + required: + - file + - purpose + title: Body_openai_upload_file_v1_files_post + Body_register_benchmark_v1alpha_eval_benchmarks_post: + properties: + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - scoring_functions + title: Body_register_benchmark_v1alpha_eval_benchmarks_post + Body_register_scoring_function_v1_scoring_functions_post: + properties: + return_type: + anyOf: + - $ref: '#/components/schemas/StringType' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + params: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: Params + type: object + required: + - return_type + title: Body_register_scoring_function_v1_scoring_functions_post + Body_register_tool_group_v1_toolgroups_post: + properties: + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + title: URL + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + title: Body_register_tool_group_v1_toolgroups_post + Chunk-Input: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + Chunk-Output: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + type: array + title: list[ImageContentItem-Output | TextContentItem] + title: string | list[ImageContentItem-Output | TextContentItem] + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + 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. + ConversationsByConversationIdItemsPostRequest: + properties: + items: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + title: Items + type: object + required: + - items + title: ConversationsByConversationIdItemsPostRequest + ConversationsByConversationIdPostRequest: + properties: + metadata: + additionalProperties: + type: string + type: object + title: Metadata + type: object + required: + - metadata + title: ConversationsByConversationIdPostRequest + ConversationsPostRequest: + properties: + items: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + - type: 'null' + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + type: object + title: ConversationsPostRequest + 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. + Errors: + properties: + data: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + object: + anyOf: + - type: string + - type: 'null' + additionalProperties: true + type: object + title: Errors + 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 + 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 + InputTokensDetails: + properties: + cached_tokens: + type: integer + title: Cached Tokens + additionalProperties: true + type: object + required: + - cached_tokens + title: InputTokensDetails + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + ModelsPostRequest: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + model_type: + anyOf: + - $ref: '#/components/schemas/ModelType' + title: ModelType + - type: 'null' + title: ModelType + type: object + required: + - model_id + title: ModelsPostRequest + ModerationsPostRequest: + properties: + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + model: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input + title: ModerationsPostRequest + OpenAIAssistantMessageParam-Input: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + OpenAIResponseMessage-Input: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + type: string + const: message + title: Type + default: message + id: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + 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. + OpenAIResponseMessage-Output: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + type: string + const: message + title: Type + default: message + id: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + 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. + 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. + OpenAIResponseTextFormat: + properties: + type: + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text + name: + anyOf: + - type: string + - type: 'null' + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + description: + anyOf: + - type: string + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + OpenAIUserMessageParam-Input: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OpenAIUserMessageParam-Output: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OutputTokensDetails: + properties: + reasoning_tokens: + type: integer + title: Reasoning Tokens + additionalProperties: true + type: object + required: + - reasoning_tokens + title: OutputTokensDetails + PromptsByPromptIdPostRequest: + properties: + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt + - version + title: PromptsByPromptIdPostRequest + PromptsByPromptIdSetDefaultVersionPostRequest: + properties: + version: + type: integer + title: Version + type: object + required: + - version + title: PromptsByPromptIdSetDefaultVersionPostRequest + PromptsPostRequest: + properties: + prompt: + type: string + title: Prompt + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + required: + - prompt + title: PromptsPostRequest + ResponsesPostRequest: + properties: + input: + anyOf: + - type: string + - items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input + type: array + title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + model: + type: string + title: Model + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + title: OpenAIResponsePrompt + instructions: + anyOf: + - type: string + - type: 'null' + previous_response_id: + anyOf: + - type: string + - type: 'null' + conversation: + anyOf: + - type: string + - type: 'null' + store: + anyOf: + - type: boolean + - type: 'null' + default: true + stream: + anyOf: + - type: boolean + - type: 'null' + default: false + temperature: + anyOf: + - type: number + - type: 'null' + text: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseText' + title: OpenAIResponseText + - type: 'null' + title: OpenAIResponseText + tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + include: + anyOf: + - items: + type: string + type: array + - type: 'null' + max_infer_iters: + anyOf: + - type: integer + - type: 'null' + default: 10 + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - input + - model + title: ResponsesPostRequest + SafetyRunShieldPostRequest: + properties: + shield_id: + type: string + title: Shield Id + messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) + type: array + title: Messages + params: + additionalProperties: true + type: object + title: Params + type: object + required: + - shield_id + - messages + - params + title: SafetyRunShieldPostRequest + ScoringScoreBatchPostRequest: + properties: + dataset_id: + type: string + title: Dataset Id + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + save_results_dataset: + type: boolean + title: Save Results Dataset + default: false + type: object + required: + - dataset_id + - scoring_functions + title: ScoringScoreBatchPostRequest + ScoringScorePostRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + type: object + required: + - input_rows + - scoring_functions + title: ScoringScorePostRequest + SearchRankingOptions: + properties: + ranker: + anyOf: + - type: string + - type: 'null' + score_threshold: + anyOf: + - type: number + - type: 'null' + default: 0.0 + type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + ShieldsPostRequest: + properties: + shield_id: + type: string + title: Shield Id + provider_shield_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - shield_id + title: ShieldsPostRequest + ToolRuntimeInvokePostRequest: + properties: + tool_name: + type: string + title: Tool Name + kwargs: + additionalProperties: true + type: object + title: Kwargs + authorization: + anyOf: + - type: string + - type: 'null' + type: object + required: + - tool_name + - kwargs + title: ToolRuntimeInvokePostRequest + V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + type: object + required: + - input_rows + - scoring_functions + - benchmark_config + title: V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest + V1AlphaInferenceRerankPostRequest: + properties: + model: + type: string + title: Model + query: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + items: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + type: array + title: Items + max_num_results: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - model + - query + - items + title: V1AlphaInferenceRerankPostRequest + V1AlphaPostTrainingPreferenceOptimizePostRequest: + properties: + job_uuid: + type: string + title: Job Uuid + finetuned_model: + type: string + title: Finetuned Model + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: V1AlphaPostTrainingPreferenceOptimizePostRequest + V1AlphaPostTrainingSupervisedFineTunePostRequest: + properties: + job_uuid: + type: string + title: Job Uuid + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + model: + anyOf: + - type: string + - type: 'null' + description: Model descriptor for training if not in provider config` + checkpoint_dir: + anyOf: + - type: string + - type: 'null' + algorithm_config: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + title: LoraFinetuningConfig | QATFinetuningConfig + - type: 'null' + title: Algorithm Config + type: object + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: V1AlphaPostTrainingSupervisedFineTunePostRequest + V1BetaDatasetsPostRequestLoose: + properties: + purpose: + title: Purpose + source: + title: Source + metadata: + title: Metadata + dataset_id: + title: Dataset Id + type: object + required: + - purpose + - source + title: V1BetaDatasetsPostRequestLoose + VectorIoQueryPostRequest: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - vector_store_id + - query + title: VectorIoQueryPostRequest + VectorStoresByVectorStoreIdFilesByFileIdPostRequest: + properties: + attributes: + additionalProperties: true + type: object + title: Attributes + type: object + required: + - attributes + title: VectorStoresByVectorStoreIdFilesByFileIdPostRequest + VectorStoresByVectorStoreIdFilesPostRequest: + properties: + file_id: + type: string + title: File Id + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + chunking_strategy: + anyOf: + - oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + type: object + required: + - file_id + title: VectorStoresByVectorStoreIdFilesPostRequest + VectorStoresByVectorStoreIdPostRequest: + properties: + name: + anyOf: + - type: string + - type: 'null' + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + title: VectorStoresByVectorStoreIdPostRequest + VectorStoresByVectorStoreIdSearchPostRequest: + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + max_num_results: + anyOf: + - type: integer + - type: 'null' + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + title: SearchRankingOptions + rewrite_query: + anyOf: + - type: boolean + - type: 'null' + default: false + search_mode: + anyOf: + - type: string + - type: 'null' + default: vector + type: object + required: + - query + title: VectorStoresByVectorStoreIdSearchPostRequest + _URLOrData: + properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + title: URL + data: + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + type: object + title: _URLOrData + description: A URL or a base64 encoded string + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat OpenAIResponseContentPart: discriminator: mapping: @@ -9849,56 +12103,6 @@ components: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' title: OpenAIResponseContentPartReasoningText title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - OpenAIResponseTextFormat: - description: Configuration for Responses API text format. - properties: - type: - title: Type - type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - title: OpenAIResponseTextFormat - type: object - OpenAIResponseUsageInputTokensDetails: - description: Token details for input tokens in OpenAI response usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageInputTokensDetails - type: object - OpenAIResponseUsageOutputTokensDetails: - description: Token details for output tokens in OpenAI response usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIResponseUsageOutputTokensDetails - type: object SpanEndPayload: description: Payload for a span end event. properties: @@ -10120,110 +12324,6 @@ components: - $ref: '#/components/schemas/StructuredLogEvent' title: StructuredLogEvent title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - BatchError: - additionalProperties: true - properties: - code: - anyOf: - - type: string - - type: 'null' - nullable: true - line: - anyOf: - - type: integer - - type: 'null' - nullable: true - message: - anyOf: - - type: string - - type: 'null' - nullable: true - param: - anyOf: - - type: string - - type: 'null' - nullable: true - title: BatchError - type: object - BatchRequestCounts: - additionalProperties: true - properties: - completed: - title: Completed - type: integer - failed: - title: Failed - type: integer - total: - title: Total - type: integer - required: - - completed - - failed - - total - title: BatchRequestCounts - type: object - BatchUsage: - additionalProperties: true - properties: - input_tokens: - title: Input Tokens - type: integer - input_tokens_details: - $ref: '#/components/schemas/InputTokensDetails' - output_tokens: - title: Output Tokens - type: integer - output_tokens_details: - $ref: '#/components/schemas/OutputTokensDetails' - total_tokens: - title: Total Tokens - type: integer - required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage - type: object - Errors: - additionalProperties: true - properties: - data: - anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array - - type: 'null' - nullable: true - object: - anyOf: - - type: string - - type: 'null' - nullable: true - title: Errors - type: object - InputTokensDetails: - additionalProperties: true - properties: - cached_tokens: - title: Cached Tokens - type: integer - required: - - cached_tokens - title: InputTokensDetails - type: object - OutputTokensDetails: - additionalProperties: true - properties: - reasoning_tokens: - title: Reasoning Tokens - type: integer - required: - - reasoning_tokens - title: OutputTokensDetails - type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -10255,16 +12355,6 @@ components: - text title: TextDelta type: object - JobStatus: - description: Status of a job execution. - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string MetricInResponse: description: A metric value included in API responses. properties: @@ -10380,14 +12470,6 @@ components: - status title: ConversationMessage type: object - DatasetPurpose: - description: Purpose of the dataset. Each purpose has a required input data schema. - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string Api: description: Enumeration of all available APIs in the Llama Stack system. enum: @@ -10716,26 +12798,6 @@ components: default: int4_weight_int8_dynamic_activation title: Int4QuantizationConfig type: object - OpenAIChatCompletionUsageCompletionTokensDetails: - description: Token details for output tokens in OpenAI chat completion usage. - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object - OpenAIChatCompletionUsagePromptTokensDetails: - description: Token details for prompt tokens in OpenAI chat completion usage. - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsagePromptTokensDetails - type: object OpenAICompletionLogprobs: description: |- The log probabilities for the tokens in the message from an OpenAI-compatible completion response. @@ -10906,13 +12968,6 @@ components: - content title: UserMessage type: object - HealthStatus: - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - type: string PostTrainingJobLogStream: description: Stream of logs from a finetuning job. properties: @@ -11093,3 +13148,131 @@ components: - query title: VectorStoreSearchRequest type: object + responses: + BadRequest400: + description: The request was invalid or malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 400 + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 429 + title: Too Many Requests + detail: You have exceeded the rate limit. Please try again later. + InternalServerError500: + description: The server encountered an unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 500 + title: Internal Server Error + detail: An unexpected error occurred + DefaultError: + description: An error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/Error' +tags: +- description: APIs for creating and interacting with agentic systems. + name: Agents + x-displayName: Agents +- description: |- + The API is designed to allow use of openai client libraries for seamless integration. + + This API provides the following extensions: + - idempotent batch creation + + Note: This API is currently under active development and may undergo changes. + name: Batches + x-displayName: The Batches API enables efficient processing of multiple requests in a single operation, particularly useful for processing large datasets, batch evaluation workflows, and cost-effective inference at scale. +- description: '' + name: Benchmarks +- description: Protocol for conversation management operations. + name: Conversations + x-displayName: Conversations +- description: '' + name: DatasetIO +- description: '' + name: Datasets +- description: Llama Stack Evaluation API for running evaluations on model and agent candidates. + name: Eval + x-displayName: Evaluations +- description: This API is used to upload documents that can be used with other Llama Stack APIs. + name: Files + x-displayName: Files +- description: |- + Llama Stack Inference API for generating completions, chat completions, and embeddings. + + This API provides the raw interface to the underlying models. Three kinds of models are supported: + - LLM models: these models generate "raw" and "chat" (conversational) completions. + - Embedding models: these models generate embeddings to be used for semantic search. + - Rerank models: these models reorder the documents based on their relevance to a query. + name: Inference + x-displayName: Inference +- description: APIs for inspecting the Llama Stack service, including health status, available API routes with methods and implementing providers. + name: Inspect + x-displayName: Inspect +- description: '' + name: Models +- description: '' + name: PostTraining (Coming Soon) +- description: Protocol for prompt management operations. + name: Prompts + x-displayName: Prompts +- description: Providers API for inspecting, listing, and modifying providers and their configurations. + name: Providers + x-displayName: Providers +- description: OpenAI-compatible Moderations API. + name: Safety + x-displayName: Safety +- description: '' + name: Scoring +- description: '' + name: ScoringFunctions +- description: '' + name: Shields +- description: '' + name: ToolGroups +- description: '' + name: ToolRuntime +- description: '' + name: VectorIO +x-tagGroups: +- name: Operations + tags: + - Agents + - Batches + - Benchmarks + - Conversations + - DatasetIO + - Datasets + - Eval + - Files + - Inference + - Inspect + - Models + - PostTraining (Coming Soon) + - Prompts + - Providers + - Safety + - Scoring + - ScoringFunctions + - Shields + - ToolGroups + - ToolRuntime + - VectorIO +security: +- Default: [] diff --git a/scripts/openapi_generator/_legacy_order.py b/scripts/openapi_generator/_legacy_order.py index 254243d81c..be0c379fd2 100644 --- a/scripts/openapi_generator/_legacy_order.py +++ b/scripts/openapi_generator/_legacy_order.py @@ -12,7 +12,6 @@ remain readable while we debug schema content regressions. Remove once stable. """ -# TODO: remove once generator output stabilizes LEGACY_PATH_ORDER = ['/v1/batches', '/v1/batches/{batch_id}', '/v1/batches/{batch_id}/cancel', @@ -364,6 +363,57 @@ LEGACY_RESPONSE_ORDER = ['BadRequest400', 'TooManyRequests429', 'InternalServerError500', 'DefaultError'] +LEGACY_TAGS = [{'description': 'APIs for creating and interacting with agentic systems.', + 'name': 'Agents', + 'x-displayName': 'Agents'}, + {'description': 'The API is designed to allow use of openai client libraries for seamless integration.\n' + '\n' + 'This API provides the following extensions:\n' + ' - idempotent batch creation\n' + '\n' + 'Note: This API is currently under active development and may undergo changes.', + 'name': 'Batches', + 'x-displayName': 'The Batches API enables efficient processing of multiple requests in a single operation, ' + 'particularly useful for processing large datasets, batch evaluation workflows, and cost-effective ' + 'inference at scale.'}, + {'description': '', 'name': 'Benchmarks'}, + {'description': 'Protocol for conversation management operations.', + 'name': 'Conversations', + 'x-displayName': 'Conversations'}, + {'description': '', 'name': 'DatasetIO'}, + {'description': '', 'name': 'Datasets'}, + {'description': 'Llama Stack Evaluation API for running evaluations on model and agent candidates.', + 'name': 'Eval', + 'x-displayName': 'Evaluations'}, + {'description': 'This API is used to upload documents that can be used with other Llama Stack APIs.', + 'name': 'Files', + 'x-displayName': 'Files'}, + {'description': 'Llama Stack Inference API for generating completions, chat completions, and embeddings.\n' + '\n' + 'This API provides the raw interface to the underlying models. Three kinds of models are supported:\n' + '- LLM models: these models generate "raw" and "chat" (conversational) completions.\n' + '- Embedding models: these models generate embeddings to be used for semantic search.\n' + '- Rerank models: these models reorder the documents based on their relevance to a query.', + 'name': 'Inference', + 'x-displayName': 'Inference'}, + {'description': 'APIs for inspecting the Llama Stack service, including health status, available API routes with ' + 'methods and implementing providers.', + 'name': 'Inspect', + 'x-displayName': 'Inspect'}, + {'description': '', 'name': 'Models'}, + {'description': '', 'name': 'PostTraining (Coming Soon)'}, + {'description': 'Protocol for prompt management operations.', 'name': 'Prompts', 'x-displayName': 'Prompts'}, + {'description': 'Providers API for inspecting, listing, and modifying providers and their configurations.', + 'name': 'Providers', + 'x-displayName': 'Providers'}, + {'description': 'OpenAI-compatible Moderations API.', 'name': 'Safety', 'x-displayName': 'Safety'}, + {'description': '', 'name': 'Scoring'}, + {'description': '', 'name': 'ScoringFunctions'}, + {'description': '', 'name': 'Shields'}, + {'description': '', 'name': 'ToolGroups'}, + {'description': '', 'name': 'ToolRuntime'}, + {'description': '', 'name': 'VectorIO'}] + LEGACY_TAG_ORDER = ['Agents', 'Batches', 'Benchmarks', @@ -408,3 +458,16 @@ 'ToolGroups', 'ToolRuntime', 'VectorIO']}] + +LEGACY_SECURITY = [{'Default': []}] + +LEGACY_OPERATION_KEYS = [ + 'responses', + 'tags', + 'summary', + 'description', + 'operationId', + 'parameters', + 'requestBody', + 'deprecated', +] diff --git a/scripts/openapi_generator/app.py b/scripts/openapi_generator/app.py index bf7f4d70f9..d972889cdc 100644 --- a/scripts/openapi_generator/app.py +++ b/scripts/openapi_generator/app.py @@ -36,7 +36,7 @@ def _get_protocol_method(api: Api, method_name: str) -> Any | None: if _protocol_methods_cache is None: _protocol_methods_cache = {} protocols = api_protocol_map() - from llama_stack.apis.tools import SpecialToolGroup, ToolRuntime + from llama_stack_api.tools import SpecialToolGroup, ToolRuntime toolgroup_protocols = { SpecialToolGroup.rag_tool: ToolRuntime, diff --git a/scripts/openapi_generator/endpoints.py b/scripts/openapi_generator/endpoints.py index f3bf1382e0..5e51520495 100644 --- a/scripts/openapi_generator/endpoints.py +++ b/scripts/openapi_generator/endpoints.py @@ -12,16 +12,45 @@ import re import types import typing -import uuid from typing import Annotated, Any, get_args, get_origin from fastapi import FastAPI from pydantic import Field, create_model +from llama_stack.log import get_logger from llama_stack_api import Api from . import app as app_module -from .state import _dynamic_models, _extra_body_fields +from .state import _extra_body_fields, register_dynamic_model + +logger = get_logger(name=__name__, category="core") + + +def _to_pascal_case(segment: str) -> str: + tokens = re.findall(r"[A-Za-z]+|\d+", segment) + return "".join(token.capitalize() for token in tokens if token) + + +def _compose_request_model_name(webmethod, http_method: str, variant: str | None = None) -> str: + segments = [] + level = (webmethod.level or "").lower() + if level and level != "v1": + segments.append(_to_pascal_case(str(webmethod.level))) + for part in filter(None, webmethod.route.split("/")): + lower_part = part.lower() + if lower_part in {"v1", "v1alpha", "v1beta"}: + continue + if part.startswith("{"): + param = part[1:].split(":", 1)[0] + segments.append(f"By{_to_pascal_case(param)}") + else: + segments.append(_to_pascal_case(part)) + if not segments: + segments.append("Root") + base_name = "".join(segments) + http_method.title() + "Request" + if variant: + base_name = f"{base_name}{variant}" + return base_name def _extract_path_parameters(path: str) -> list[dict[str, Any]]: @@ -99,21 +128,21 @@ def _build_field_definitions(query_parameters: list[tuple[str, type, Any]], use_ def _create_dynamic_request_model( - webmethod, query_parameters: list[tuple[str, type, Any]], use_any: bool = False, add_uuid: bool = False + api: Api, + webmethod, + http_method: str, + query_parameters: list[tuple[str, type, Any]], + use_any: bool = False, + variant_suffix: str | None = None, ) -> type | None: """Create a dynamic Pydantic model for request body.""" try: field_definitions = _build_field_definitions(query_parameters, use_any) if not field_definitions: return None - clean_route = webmethod.route.replace("/", "_").replace("{", "").replace("}", "").replace("-", "_") - model_name = f"{clean_route}_Request" - if add_uuid: - model_name = f"{model_name}_{uuid.uuid4().hex[:8]}" - + model_name = _compose_request_model_name(webmethod, http_method, variant_suffix) request_model = create_model(model_name, **field_definitions) - _dynamic_models.append(request_model) - return request_model + return register_dynamic_model(model_name, request_model) except Exception: return None @@ -190,7 +219,7 @@ def _is_file_or_form_param(param_type: Any) -> bool: def _is_extra_body_field(metadata_item: Any) -> bool: """Check if a metadata item is an ExtraBodyField instance.""" - from llama_stack.schema_utils import ExtraBodyField + from llama_stack_api.schema_utils import ExtraBodyField return isinstance(metadata_item, ExtraBodyField) @@ -232,7 +261,7 @@ def _extract_response_models_from_union(union_type: Any) -> tuple[type | None, t streaming_model = inner_type else: # Might be a registered schema - check if it's registered - from llama_stack.schema_utils import _registered_schemas + from llama_stack_api.schema_utils import _registered_schemas if inner_type in _registered_schemas: # We'll need to look this up later, but for now store the type @@ -247,7 +276,7 @@ def _extract_response_models_from_union(union_type: Any) -> tuple[type | None, t def _find_models_for_endpoint( webmethod, api: Api, method_name: str, is_post_put: bool = False -) -> tuple[type | None, type | None, list[tuple[str, type, Any]], list[inspect.Parameter], type | None]: +) -> tuple[type | None, type | None, list[tuple[str, type, Any]], list[inspect.Parameter], type | None, str | None]: """ Find appropriate request and response models for an endpoint by analyzing the actual function signature. This uses the protocol function to determine the correct models dynamically. @@ -259,16 +288,18 @@ def _find_models_for_endpoint( is_post_put: Whether this is a POST, PUT, or PATCH request (GET requests should never have request bodies) Returns: - tuple: (request_model, response_model, query_parameters, file_form_params, streaming_response_model) + tuple: (request_model, response_model, query_parameters, file_form_params, streaming_response_model, response_schema_name) where query_parameters is a list of (name, type, default_value) tuples and file_form_params is a list of inspect.Parameter objects for File()/Form() params and streaming_response_model is the model for streaming responses (AsyncIterator content) """ + route_descriptor = f"{webmethod.method or 'UNKNOWN'} {webmethod.route}" try: # Get the function from the protocol func = app_module._get_protocol_method(api, method_name) if not func: - return None, None, [], [], None + logger.warning("No protocol method for %s.%s (%s)", api, method_name, route_descriptor) + return None, None, [], [], None, None # Analyze the function signature sig = inspect.signature(func) @@ -279,6 +310,7 @@ def _find_models_for_endpoint( file_form_params = [] path_params = set() extra_body_params = [] + response_schema_name = None # Extract path parameters from the route if webmethod and hasattr(webmethod, "route"): @@ -391,23 +423,49 @@ def _find_models_for_endpoint( elif origin is not None and (origin is types.UnionType or origin is typing.Union): # Handle union types - extract both non-streaming and streaming models response_model, streaming_response_model = _extract_response_models_from_union(return_annotation) + else: + try: + from fastapi import Response as FastAPIResponse + except ImportError: + FastAPIResponse = None + try: + from starlette.responses import Response as StarletteResponse + except ImportError: + StarletteResponse = None - return request_model, response_model, query_parameters, file_form_params, streaming_response_model + response_types = tuple(t for t in (FastAPIResponse, StarletteResponse) if t is not None) + if response_types and any(return_annotation is t for t in response_types): + response_schema_name = "Response" - except Exception: - # If we can't analyze the function signature, return None - return None, None, [], [], None + return request_model, response_model, query_parameters, file_form_params, streaming_response_model, response_schema_name + + except Exception as exc: + logger.warning( + "Failed to analyze endpoint %s.%s (%s): %s", api, method_name, route_descriptor, exc, exc_info=True + ) + return None, None, [], [], None, None def _create_fastapi_endpoint(app: FastAPI, route, webmethod, api: Api): """Create a FastAPI endpoint from a discovered route and webmethod.""" path = route.path - methods = route.methods + raw_methods = route.methods or set() + method_list = sorted({method.upper() for method in raw_methods if method and method.upper() != "HEAD"}) + if not method_list: + method_list = ["GET"] + primary_method = method_list[0] name = route.name fastapi_path = path.replace("{", "{").replace("}", "}") - is_post_put = any(method.upper() in ["POST", "PUT", "PATCH"] for method in methods) - - request_model, response_model, query_parameters, file_form_params, streaming_response_model = ( + is_post_put = any(method in ["POST", "PUT", "PATCH"] for method in method_list) + + ( + request_model, + response_model, + query_parameters, + file_form_params, + streaming_response_model, + response_schema_name, + ) = ( _find_models_for_endpoint(webmethod, api, name, is_post_put) ) operation_description = _extract_operation_description_from_docstring(api, name) @@ -417,7 +475,7 @@ def _create_fastapi_endpoint(app: FastAPI, route, webmethod, api: Api): func = app_module._get_protocol_method(api, name) extra_body_params = getattr(func, "_extra_body_params", []) if func else [] if extra_body_params: - for method in methods: + for method in method_list: key = (fastapi_path, method.upper()) _extra_body_fields[key] = extra_body_params @@ -447,12 +505,11 @@ async def file_form_endpoint(): endpoint_func = _create_endpoint_with_request_model(request_model, response_model, operation_description) elif response_model and query_parameters: if is_post_put: - # Try creating request model with type preservation, fallback to Any, then minimal - request_model = _create_dynamic_request_model(webmethod, query_parameters, use_any=False) - if not request_model: - request_model = _create_dynamic_request_model(webmethod, query_parameters, use_any=True) + request_model = _create_dynamic_request_model(api, webmethod, primary_method, query_parameters, use_any=False) if not request_model: - request_model = _create_dynamic_request_model(webmethod, query_parameters, use_any=True, add_uuid=True) + request_model = _create_dynamic_request_model( + api, webmethod, primary_method, query_parameters, use_any=True, variant_suffix="Loose" + ) if request_model: endpoint_func = _create_endpoint_with_request_model( @@ -532,16 +589,18 @@ async def no_params_endpoint(): endpoint_func = no_params_endpoint # Build response content with both application/json and text/event-stream if streaming - response_content = {} + response_content: dict[str, Any] = {} if response_model: response_content["application/json"] = {"schema": {"$ref": f"#/components/schemas/{response_model.__name__}"}} + elif response_schema_name: + response_content["application/json"] = {"schema": {"$ref": f"#/components/schemas/{response_schema_name}"}} if streaming_response_model: # Get the schema name for the streaming model # It might be a registered schema or a Pydantic model streaming_schema_name = None # Check if it's a registered schema first (before checking __name__) # because registered schemas might be Annotated types - from llama_stack.schema_utils import _registered_schemas + from llama_stack_api.schema_utils import _registered_schemas if streaming_response_model in _registered_schemas: streaming_schema_name = _registered_schemas[streaming_response_model]["name"] @@ -554,9 +613,6 @@ async def no_params_endpoint(): } # If no content types, use empty schema - if not response_content: - response_content["application/json"] = {"schema": {}} - # Add the endpoint to the FastAPI app is_deprecated = webmethod.deprecated or False route_kwargs = { @@ -564,16 +620,16 @@ async def no_params_endpoint(): "tags": [_get_tag_from_api(api)], "deprecated": is_deprecated, "responses": { - 200: { - "description": response_description, - "content": response_content, - }, 400: {"$ref": "#/components/responses/BadRequest400"}, 429: {"$ref": "#/components/responses/TooManyRequests429"}, 500: {"$ref": "#/components/responses/InternalServerError500"}, "default": {"$ref": "#/components/responses/DefaultError"}, }, } + success_response: dict[str, Any] = {"description": response_description} + if response_content: + success_response["content"] = response_content + route_kwargs["responses"][200] = success_response # FastAPI needs response_model parameter to properly generate OpenAPI spec # Use the non-streaming response model if available @@ -581,6 +637,6 @@ async def no_params_endpoint(): route_kwargs["response_model"] = response_model method_map = {"GET": app.get, "POST": app.post, "PUT": app.put, "DELETE": app.delete, "PATCH": app.patch} - for method in methods: - if handler := method_map.get(method.upper()): + for method in method_list: + if handler := method_map.get(method): handler(fastapi_path, **route_kwargs)(endpoint_func) diff --git a/scripts/openapi_generator/main.py b/scripts/openapi_generator/main.py index 6231557847..e402d4d738 100755 --- a/scripts/openapi_generator/main.py +++ b/scripts/openapi_generator/main.py @@ -16,7 +16,7 @@ import yaml from fastapi.openapi.utils import get_openapi -from . import app, schema_collection, schema_filtering, schema_transforms +from . import app, schema_collection, schema_filtering, schema_transforms, state def generate_openapi_spec(output_dir: str) -> dict[str, Any]: @@ -29,6 +29,7 @@ def generate_openapi_spec(output_dir: str) -> dict[str, Any]: Returns: The generated OpenAPI specification as a dictionary """ + state.reset_generator_state() # Create the FastAPI app fastapi_app = app.create_llama_stack_app() @@ -143,7 +144,7 @@ def generate_openapi_spec(output_dir: str) -> dict[str, Any]: schema_transforms._fix_schema_issues(schema) schema_transforms._apply_legacy_sorting(schema) - print("\n🔍 Validating generated schemas...") + print("\nValidating generated schemas...") failed_schemas = [ name for schema, name in schemas_to_validate if not schema_transforms.validate_openapi_schema(schema, name) ] @@ -186,20 +187,20 @@ def generate_openapi_spec(output_dir: str) -> dict[str, Any]: # Write the modified YAML back schema_transforms._write_yaml_file(yaml_path, yaml_data) - print(f"✅ Generated YAML (stable): {yaml_path}") + print(f"Generated YAML (stable): {yaml_path}") experimental_yaml_path = output_path / "experimental-llama-stack-spec.yaml" schema_transforms._write_yaml_file(experimental_yaml_path, experimental_schema) - print(f"✅ Generated YAML (experimental): {experimental_yaml_path}") + print(f"Generated YAML (experimental): {experimental_yaml_path}") deprecated_yaml_path = output_path / "deprecated-llama-stack-spec.yaml" schema_transforms._write_yaml_file(deprecated_yaml_path, deprecated_schema) - print(f"✅ Generated YAML (deprecated): {deprecated_yaml_path}") + print(f"Generated YAML (deprecated): {deprecated_yaml_path}") # Generate combined (stainless) spec stainless_yaml_path = output_path / "stainless-llama-stack-spec.yaml" schema_transforms._write_yaml_file(stainless_yaml_path, combined_schema) - print(f"✅ Generated YAML (stainless/combined): {stainless_yaml_path}") + print(f"Generated YAML (stainless/combined): {stainless_yaml_path}") return stable_schema @@ -213,25 +214,25 @@ def main(): args = parser.parse_args() - print("🚀 Generating OpenAPI specification using FastAPI...") - print(f"📁 Output directory: {args.output_dir}") + print("Generating OpenAPI specification using FastAPI...") + print(f"Output directory: {args.output_dir}") try: openapi_schema = generate_openapi_spec(output_dir=args.output_dir) - print("\n✅ OpenAPI specification generated successfully!") - print(f"📊 Schemas: {len(openapi_schema.get('components', {}).get('schemas', {}))}") - print(f"🛣️ Paths: {len(openapi_schema.get('paths', {}))}") + print("\nOpenAPI specification generated successfully!") + print(f"Schemas: {len(openapi_schema.get('components', {}).get('schemas', {}))}") + print(f"Paths: {len(openapi_schema.get('paths', {}))}") operation_count = sum( 1 for path_info in openapi_schema.get("paths", {}).values() for method in ["get", "post", "put", "delete", "patch"] if method in path_info ) - print(f"🔧 Operations: {operation_count}") + print(f"Operations: {operation_count}") except Exception as e: - print(f"❌ Error generating OpenAPI specification: {e}") + print(f"Error generating OpenAPI specification: {e}") raise diff --git a/scripts/openapi_generator/schema_transforms.py b/scripts/openapi_generator/schema_transforms.py index bd8cad64a6..420a3dcc9f 100644 --- a/scripts/openapi_generator/schema_transforms.py +++ b/scripts/openapi_generator/schema_transforms.py @@ -22,6 +22,9 @@ LEGACY_PATH_ORDER, LEGACY_RESPONSE_ORDER, LEGACY_SCHEMA_ORDER, + LEGACY_OPERATION_KEYS, + LEGACY_SECURITY, + LEGACY_TAGS, LEGACY_TAG_GROUPS, LEGACY_TAG_ORDER, ) @@ -121,7 +124,7 @@ def _add_error_responses(openapi_schema: dict[str, Any]) -> dict[str, Any]: openapi_schema["components"]["responses"] = {} try: - from llama_stack.apis.datatypes import Error + from llama_stack_api.datatypes import Error schema_collection._ensure_components_schemas(openapi_schema) if "Error" not in openapi_schema["components"]["schemas"]: @@ -129,6 +132,10 @@ def _add_error_responses(openapi_schema: dict[str, Any]) -> dict[str, Any]: except ImportError: pass + schema_collection._ensure_components_schemas(openapi_schema) + if "Response" not in openapi_schema["components"]["schemas"]: + openapi_schema["components"]["schemas"]["Response"] = {"title": "Response", "type": "object"} + # Define standard HTTP error responses error_responses = { 400: { @@ -848,6 +855,20 @@ def order_mapping(data: dict[str, Any], priority: list[str]) -> OrderedDict[str, paths = openapi_schema.get("paths") if isinstance(paths, dict): openapi_schema["paths"] = order_mapping(paths, LEGACY_PATH_ORDER) + for path, path_item in openapi_schema["paths"].items(): + if not isinstance(path_item, dict): + continue + ordered_path_item = OrderedDict() + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + if method in path_item: + ordered_path_item[method] = order_mapping(path_item[method], LEGACY_OPERATION_KEYS) + for key, value in path_item.items(): + if key not in ordered_path_item: + if isinstance(value, dict) and key.lower() in {"get", "post", "put", "delete", "patch", "head", "options"}: + ordered_path_item[key] = order_mapping(value, LEGACY_OPERATION_KEYS) + else: + ordered_path_item[key] = value + openapi_schema["paths"][path] = ordered_path_item components = openapi_schema.setdefault("components", {}) schemas = components.get("schemas") @@ -857,30 +878,14 @@ def order_mapping(data: dict[str, Any], priority: list[str]) -> OrderedDict[str, if isinstance(responses, dict): components["responses"] = order_mapping(responses, LEGACY_RESPONSE_ORDER) - tags = openapi_schema.get("tags") - if isinstance(tags, list): - tag_priority = {name: idx for idx, name in enumerate(LEGACY_TAG_ORDER)} - - def tag_sort(tag_obj: dict[str, Any]) -> tuple[int, int | str]: - name = tag_obj.get("name", "") - if name in tag_priority: - return (0, tag_priority[name]) - return (1, name) - - openapi_schema["tags"] = sorted(tags, key=tag_sort) - - tag_groups = openapi_schema.get("x-tagGroups") - if isinstance(tag_groups, list) and LEGACY_TAG_GROUPS: - legacy_tags = LEGACY_TAG_GROUPS[0].get("tags", []) - tag_priority = {name: idx for idx, name in enumerate(legacy_tags)} - for group in tag_groups: - group_tags = group.get("tags") - if isinstance(group_tags, list): - group["tags"] = sorted( - group_tags, - key=lambda name: (0, tag_priority[name]) if name in tag_priority else (1, name), - ) - openapi_schema["x-tagGroups"] = tag_groups + if LEGACY_TAGS: + openapi_schema["tags"] = LEGACY_TAGS + + if LEGACY_TAG_GROUPS: + openapi_schema["x-tagGroups"] = LEGACY_TAG_GROUPS + + if LEGACY_SECURITY: + openapi_schema["security"] = LEGACY_SECURITY return openapi_schema @@ -914,12 +919,11 @@ def validate_openapi_schema(schema: dict[str, Any], schema_name: str = "OpenAPI """ try: validate_spec(schema) - print(f"✅ {schema_name} is valid") + print(f"{schema_name} is valid") return True except OpenAPISpecValidatorError as e: - print(f"❌ {schema_name} validation failed:") - print(f" {e}") + print(f"{schema_name} validation failed: {e}") return False except Exception as e: - print(f"❌ {schema_name} validation error: {e}") + print(f"{schema_name} validation error: {e}") return False diff --git a/scripts/openapi_generator/state.py b/scripts/openapi_generator/state.py index b1c8f8edd1..84bba1b456 100644 --- a/scripts/openapi_generator/state.py +++ b/scripts/openapi_generator/state.py @@ -14,6 +14,7 @@ # Global list to store dynamic models created during endpoint generation _dynamic_models: list[Any] = [] +_dynamic_model_registry: dict[str, type] = {} # Cache for protocol methods to avoid repeated lookups _protocol_methods_cache: dict[Api, dict[str, Any]] | None = None @@ -21,3 +22,20 @@ # Global dict to store extra body field information by endpoint # Key: (path, method) tuple, Value: list of (param_name, param_type, description) tuples _extra_body_fields: dict[tuple[str, str], list[tuple[str, type, str | None]]] = {} + + +def register_dynamic_model(name: str, model: type) -> type: + """Register and deduplicate dynamically generated request models.""" + existing = _dynamic_model_registry.get(name) + if existing is not None: + return existing + _dynamic_model_registry[name] = model + _dynamic_models.append(model) + return model + + +def reset_generator_state() -> None: + """Clear per-run caches so repeated generations stay deterministic.""" + _dynamic_models.clear() + _dynamic_model_registry.clear() + _extra_body_fields.clear() From 9deb0beb860f7880bdd883e4d27a07932cb3dad8 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Fri, 14 Nov 2025 14:18:15 -0800 Subject: [PATCH 43/46] even more cleanup, the deltas should be much smaller now --- client-sdks/stainless/openapi.yml | 3640 ++----- docs/static/deprecated-llama-stack-spec.yaml | 3397 ++++--- .../static/experimental-llama-stack-spec.yaml | 8907 ++--------------- docs/static/llama-stack-spec.yaml | 4749 +++------ docs/static/stainless-llama-stack-spec.yaml | 3640 ++----- scripts/openapi_generator/_legacy_order.py | 930 +- scripts/openapi_generator/endpoints.py | 83 +- .../openapi_generator/schema_collection.py | 136 +- scripts/openapi_generator/schema_filtering.py | 55 +- .../openapi_generator/schema_transforms.py | 15 +- scripts/openapi_generator/state.py | 8 +- src/llama_stack_api/__init__.py | 14 + src/llama_stack_api/schema_utils.py | 61 +- tests/unit/server/test_schema_registry.py | 48 + 14 files changed, 6643 insertions(+), 19040 deletions(-) create mode 100644 tests/unit/server/test_schema_registry.py diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index 1a55e80b60..580decb3da 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -86,7 +86,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BatchesPostRequest' + $ref: '#/components/schemas/CreateBatchRequest' /v1/batches/{batch_id}: get: responses: @@ -355,7 +355,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ConversationsPostRequest' + $ref: '#/components/schemas/CreateConversationRequest' required: true /v1/conversations/{conversation_id}: get: @@ -432,7 +432,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ConversationsByConversationIdPostRequest' + $ref: '#/components/schemas/UpdateConversationRequest' required: true delete: responses: @@ -582,7 +582,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ConversationsByConversationIdItemsPostRequest' + $ref: '#/components/schemas/AddItemsRequest' /v1/conversations/{conversation_id}/items/{item_id}: get: responses: @@ -1038,7 +1038,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ModelsPostRequest' + $ref: '#/components/schemas/RegisterModelRequest' required: true deprecated: true /v1/models/{model_id}: @@ -1145,7 +1145,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ModerationsPostRequest' + $ref: '#/components/schemas/RunModerationRequest' required: true /v1/prompts: get: @@ -1205,7 +1205,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PromptsPostRequest' + $ref: '#/components/schemas/CreatePromptRequest' required: true /v1/prompts/{prompt_id}: get: @@ -1291,7 +1291,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PromptsByPromptIdPostRequest' + $ref: '#/components/schemas/UpdatePromptRequest' delete: responses: '200': @@ -1366,7 +1366,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PromptsByPromptIdSetDefaultVersionPostRequest' + $ref: '#/components/schemas/SetDefaultVersionRequest' required: true /v1/prompts/{prompt_id}/versions: get: @@ -1563,7 +1563,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ResponsesPostRequest' + $ref: '#/components/schemas/CreateOpenaiResponseRequest' x-llama-stack-extra-body-params: guardrails: $defs: @@ -1763,7 +1763,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SafetyRunShieldPostRequest' + $ref: '#/components/schemas/RunShieldRequest' required: true /v1/scoring-functions: get: @@ -1775,17 +1775,17 @@ paths: schema: $ref: '#/components/schemas/ListScoringFunctionsResponse' '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' tags: - Scoring Functions summary: List Scoring Functions @@ -1799,28 +1799,28 @@ paths: application/json: schema: {} '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' tags: - Scoring Functions summary: Register Scoring Function description: Register a scoring function. operationId: register_scoring_function_v1_scoring_functions_post requestBody: - required: true content: application/json: schema: - $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' + $ref: '#/components/schemas/RegisterScoringFunctionRequestLoose' + required: true deprecated: true /v1/scoring-functions/{scoring_fn_id}: get: @@ -1917,7 +1917,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ScoringScorePostRequest' + $ref: '#/components/schemas/ScoreRequest' required: true /v1/scoring/score-batch: post: @@ -1949,7 +1949,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ScoringScoreBatchPostRequest' + $ref: '#/components/schemas/ScoreBatchRequest' required: true /v1/shields: get: @@ -2006,7 +2006,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ShieldsPostRequest' + $ref: '#/components/schemas/RegisterShieldRequest' required: true deprecated: true /v1/shields/{identifier}: @@ -2104,7 +2104,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ToolRuntimeInvokePostRequest' + $ref: '#/components/schemas/InvokeToolRequest' required: true /v1/tool-runtime/list-tools: get: @@ -2167,17 +2167,17 @@ paths: schema: $ref: '#/components/schemas/ListToolGroupsResponse' '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' tags: - Tool Groups summary: List Tool Groups @@ -2191,17 +2191,17 @@ paths: application/json: schema: {} '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' tags: - Tool Groups summary: Register Tool Group @@ -2211,7 +2211,8 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' + $ref: '#/components/schemas/RegisterToolGroupRequest' + required: true deprecated: true /v1/toolgroups/{toolgroup_id}: get: @@ -2355,31 +2356,28 @@ paths: application/json: schema: {} '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' tags: - Vector Io summary: Insert Chunks description: Insert chunks into a vector database. operationId: insert_chunks_v1_vector_io_insert_post requestBody: - required: true content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Chunk-Input' - title: Chunks + $ref: '#/components/schemas/InsertChunksRequest' + required: true /v1/vector-io/query: post: responses: @@ -2410,7 +2408,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorIoQueryPostRequest' + $ref: '#/components/schemas/QueryChunksRequest' required: true /v1/vector_stores: get: @@ -2576,7 +2574,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorStoresByVectorStoreIdPostRequest' + $ref: '#/components/schemas/OpenaiUpdateVectorStoreRequest' required: true delete: responses: @@ -2928,7 +2926,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorStoresByVectorStoreIdFilesPostRequest' + $ref: '#/components/schemas/OpenaiAttachFileToVectorStoreRequest' /v1/vector_stores/{vector_store_id}/files/{file_id}: get: responses: @@ -3010,7 +3008,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorStoresByVectorStoreIdFilesByFileIdPostRequest' + $ref: '#/components/schemas/OpenaiUpdateVectorStoreFileRequest' required: true delete: responses: @@ -3147,7 +3145,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorStoresByVectorStoreIdSearchPostRequest' + $ref: '#/components/schemas/OpenaiSearchVectorStoreRequest' required: true /v1/version: get: @@ -3214,11 +3212,7 @@ paths: content: application/json: schema: - items: - additionalProperties: true - type: object - type: array - title: Rows + $ref: '#/components/schemas/AppendRowsRequest' required: true /v1beta/datasetio/iterrows/{dataset_id}: get: @@ -3333,7 +3327,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1BetaDatasetsPostRequestLoose' + $ref: '#/components/schemas/RegisterDatasetRequestLoose' required: true deprecated: true /v1beta/datasets/{dataset_id}: @@ -3411,17 +3405,17 @@ paths: schema: $ref: '#/components/schemas/ListBenchmarksResponse' '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' tags: - Benchmarks summary: List Benchmarks @@ -3435,28 +3429,28 @@ paths: application/json: schema: {} '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' tags: - Benchmarks summary: Register Benchmark description: Register a benchmark. operationId: register_benchmark_v1alpha_eval_benchmarks_post requestBody: - required: true content: application/json: schema: - $ref: '#/components/schemas/Body_register_benchmark_v1alpha_eval_benchmarks_post' + $ref: '#/components/schemas/RegisterBenchmarkRequest' + required: true deprecated: true /v1alpha/eval/benchmarks/{benchmark_id}: get: @@ -3560,7 +3554,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest' + $ref: '#/components/schemas/EvaluateRowsRequest' required: true /v1alpha/eval/benchmarks/{benchmark_id}/jobs: post: @@ -3746,7 +3740,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1AlphaInferenceRerankPostRequest' + $ref: '#/components/schemas/RerankRequest' required: true /v1alpha/post-training/job/artifacts: get: @@ -3790,29 +3784,28 @@ paths: application/json: schema: {} '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' tags: - Post Training summary: Cancel Training Job description: Cancel a training job. operationId: cancel_training_job_v1alpha_post_training_job_cancel_post - parameters: - - name: job_uuid - in: query + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CancelTrainingJobRequest' required: true - schema: - type: string - title: Job Uuid /v1alpha/post-training/job/status: get: responses: @@ -3902,7 +3895,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1AlphaPostTrainingPreferenceOptimizePostRequest' + $ref: '#/components/schemas/PreferenceOptimizeRequest' required: true /v1alpha/post-training/supervised-fine-tune: post: @@ -3934,7 +3927,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1AlphaPostTrainingSupervisedFineTunePostRequest' + $ref: '#/components/schemas/SupervisedFineTuneRequest' required: true components: schemas: @@ -3994,6 +3987,34 @@ components: - data title: ListBatchesResponse description: Response containing a list of batch objects. + CreateBatchRequest: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + const: 24h + title: Completion Window + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + idempotency_key: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_file_id + - endpoint + - completion_window + title: CreateBatchRequest Batch: properties: id: @@ -4142,38 +4163,6 @@ components: - last_id title: ListOpenAIChatCompletionResponse description: Response from listing OpenAI-compatible chat completions. - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - nullable: true - name: - anyOf: - - type: string - - type: 'null' - nullable: true - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - nullable: true - title: OpenAIAssistantMessageParam - type: object OpenAIChatCompletionContentPartImageParam: properties: type: @@ -4188,21 +4177,6 @@ components: - image_url title: OpenAIChatCompletionContentPartImageParam description: Image content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: properties: type: @@ -4411,27 +4385,6 @@ components: - url title: OpenAIImageURL description: Image URL specification for OpenAI-compatible chat completion messages. - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: properties: role: @@ -4537,44 +4490,6 @@ components: :token: The token :bytes: (Optional) The bytes for the token :logprob: The log probability of the token - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. - 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' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - content - title: OpenAIUserMessageParam - type: object OpenAIJSONSchema: properties: name: @@ -4620,21 +4535,6 @@ components: - json_schema title: OpenAIResponseFormatJSONSchema description: JSON schema response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatParam: - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject OpenAIResponseFormatText: properties: type: @@ -5154,39 +5054,6 @@ components: :text: The text of the choice :index: The index of the choice :logprobs: (Optional) The log probabilities for the tokens in the choice - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) OpenAIResponseAnnotationCitation: properties: type: @@ -5285,24 +5152,6 @@ components: - file_id - index title: OpenAIResponseAnnotationFilePath - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseContentPartRefusal: properties: type: @@ -5345,21 +5194,6 @@ components: - output title: OpenAIResponseInputFunctionToolCallOutput description: This represents the output of a function call that gets passed back to the model. - OpenAIResponseInputMessageContent: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseInputMessageContentFile: properties: type: @@ -5552,18 +5386,6 @@ components: - role title: OpenAIResponseMessage type: object - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal OpenAIResponseOutputMessageContentOutputText: properties: text: @@ -5740,6 +5562,53 @@ components: - status title: OpenAIResponseOutputMessageWebSearchToolCall description: Web search tool call output message for OpenAI responses. + CreateConversationRequest: + properties: + items: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + - type: 'null' + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + type: object + title: CreateConversationRequest Conversation: properties: id: @@ -5777,11 +5646,22 @@ components: - created_at title: Conversation description: OpenAI-compatible conversation object. - ConversationDeletedResource: + UpdateConversationRequest: properties: - id: - type: string - title: Id + metadata: + additionalProperties: + type: string + type: object + title: Metadata + type: object + required: + - metadata + title: UpdateConversationRequest + ConversationDeletedResource: + properties: + id: + type: string + title: Id description: The deleted conversation identifier object: type: string @@ -5862,6 +5742,48 @@ components: - data title: ConversationItemList description: List of conversation items with pagination. + AddItemsRequest: + properties: + items: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + title: Items + type: object + required: + - items + title: AddItemsRequest ConversationItemDeletedResource: properties: id: @@ -6221,6 +6143,24 @@ components: - rerank title: ModelType description: Enumeration of supported model types in Llama Stack. + RunModerationRequest: + properties: + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + model: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input + title: RunModerationRequest ModerationObject: properties: id: @@ -6324,6 +6264,53 @@ components: - data title: ListPromptsResponse description: Response model to list prompts. + CreatePromptRequest: + properties: + prompt: + type: string + title: Prompt + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + required: + - prompt + title: CreatePromptRequest + UpdatePromptRequest: + properties: + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt + - version + title: UpdatePromptRequest + SetDefaultVersionRequest: + properties: + version: + type: integer + title: Version + type: object + required: + - version + title: SetDefaultVersionRequest ProviderInfo: properties: api: @@ -6407,41 +6394,6 @@ components: - message title: OpenAIResponseError description: Error details for failed OpenAI response requests. - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage OpenAIResponseInputToolFileSearch: properties: type: @@ -6699,33 +6651,6 @@ components: - input title: OpenAIResponseObjectWithInput description: OpenAI response object extended with input context information. - OpenAIResponseOutput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) OpenAIResponsePrompt: properties: id: @@ -6770,27 +6695,6 @@ components: type: object title: OpenAIResponseText description: Text response configuration for OpenAI responses. - OpenAIResponseTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseToolMCP: properties: type: @@ -6856,27 +6760,6 @@ components: - type title: ResponseGuardrailSpec type: object - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseInputToolMCP: properties: type: @@ -6925,6 +6808,135 @@ components: - server_url title: OpenAIResponseInputToolMCP description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + CreateOpenaiResponseRequest: + properties: + input: + anyOf: + - type: string + - items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input + type: array + title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + model: + type: string + title: Model + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + title: OpenAIResponsePrompt + instructions: + anyOf: + - type: string + - type: 'null' + previous_response_id: + anyOf: + - type: string + - type: 'null' + conversation: + anyOf: + - type: string + - type: 'null' + store: + anyOf: + - type: boolean + - type: 'null' + default: true + stream: + anyOf: + - type: boolean + - type: 'null' + default: false + temperature: + anyOf: + - type: number + - type: 'null' + text: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseText' + title: OpenAIResponseText + - type: 'null' + title: OpenAIResponseText + tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + include: + anyOf: + - items: + type: string + type: array + - type: 'null' + max_infer_iters: + anyOf: + - type: integer + - type: 'null' + default: 10 + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - input + - model + title: CreateOpenaiResponseRequest OpenAIResponseObject: properties: created_at: @@ -8290,14 +8302,53 @@ components: - data title: ListOpenAIResponseInputItem description: List container for OpenAI response input items. - RunShieldResponse: + RunShieldRequest: properties: - violation: - anyOf: - - $ref: '#/components/schemas/SafetyViolation' - title: SafetyViolation - - type: 'null' - title: SafetyViolation + shield_id: + type: string + title: Shield Id + messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) + type: array + title: Messages + params: + additionalProperties: true + type: object + title: Params + type: object + required: + - shield_id + - messages + - params + title: RunShieldRequest + RunShieldResponse: + properties: + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation + - type: 'null' + title: SafetyViolation type: object title: RunShieldResponse description: Response from running a safety shield. @@ -8564,21 +8615,6 @@ components: - return_type title: ScoringFn description: A scoring function resource for evaluating model outputs. - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams StringType: properties: type: @@ -8610,6 +8646,40 @@ components: required: - data title: ListScoringFunctionsResponse + ScoreRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + type: object + required: + - input_rows + - scoring_functions + title: ScoreRequest ScoreResponse: properties: results: @@ -8640,6 +8710,41 @@ components: - aggregated_results title: ScoringResult description: A scoring result for a single row. + ScoreBatchRequest: + properties: + dataset_id: + type: string + title: Dataset Id + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + save_results_dataset: + type: boolean + title: Save Results Dataset + default: false + type: object + required: + - dataset_id + - scoring_functions + title: ScoreBatchRequest ScoreBatchResponse: properties: dataset_id: @@ -8698,61 +8803,24 @@ components: required: - data title: ListShieldsResponse - ImageContentItem: - description: A image content item + InvokeToolRequest: properties: - type: - const: image - default: image - title: Type + tool_name: type: string - image: - $ref: '#/components/schemas/_URLOrData' - required: - - image - title: ImageContentItem + title: Tool Name + kwargs: + additionalProperties: true + type: object + title: Kwargs + authorization: + anyOf: + - type: string + - type: 'null' type: object - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem + required: + - tool_name + - kwargs + title: InvokeToolRequest TextContentItem: properties: type: @@ -8920,64 +8988,6 @@ components: - data title: ListToolGroupsResponse description: Response containing a list of tool groups. - Chunk: - description: A chunk of content that can be inserted into a vector database. - properties: - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id - type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - nullable: true - title: ChunkMetadata - required: - - content - - chunk_id - title: Chunk - type: object ChunkMetadata: properties: chunk_id: @@ -9031,6 +9041,69 @@ components: 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. + InsertChunksRequest: + properties: + vector_store_id: + type: string + title: Vector Store Id + chunks: + items: + $ref: '#/components/schemas/Chunk-Input' + type: array + title: Chunks + ttl_seconds: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - vector_store_id + - chunks + title: InsertChunksRequest + QueryChunksRequest: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - vector_store_id + - query + title: QueryChunksRequest QueryChunksResponse: properties: chunks: @@ -9153,18 +9226,6 @@ components: - file_counts title: VectorStoreObject description: OpenAI Vector Store object. - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreChunkingStrategyAuto: properties: type: @@ -9245,12 +9306,30 @@ components: type: object title: OpenAICreateVectorStoreRequestWithExtraBody description: Request to create a vector store with extra_body support. - VectorStoreDeleteResponse: + OpenaiUpdateVectorStoreRequest: properties: - id: - type: string - title: Id - object: + name: + anyOf: + - type: string + - type: 'null' + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + title: OpenaiUpdateVectorStoreRequest + VectorStoreDeleteResponse: + properties: + id: + type: string + title: Id + object: type: string title: Object default: vector_store.deleted @@ -9331,14 +9410,6 @@ components: - file_counts title: VectorStoreFileBatchObject description: OpenAI Vector Store File Batch object. - VectorStoreFileStatus: - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed VectorStoreFileLastError: properties: code: @@ -9472,6 +9543,45 @@ components: - data title: VectorStoreListFilesResponse description: Response from listing files in a vector store. + OpenaiAttachFileToVectorStoreRequest: + properties: + file_id: + type: string + title: File Id + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + chunking_strategy: + anyOf: + - oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + type: object + required: + - file_id + title: OpenaiAttachFileToVectorStoreRequest + OpenaiUpdateVectorStoreFileRequest: + properties: + attributes: + additionalProperties: true + type: object + title: Attributes + type: object + required: + - attributes + title: OpenaiUpdateVectorStoreFileRequest VectorStoreFileDeleteResponse: properties: id: @@ -9547,6 +9657,46 @@ components: - data title: VectorStoreFileContentResponse description: Represents the parsed content of a vector store file. + OpenaiSearchVectorStoreRequest: + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + max_num_results: + anyOf: + - type: integer + - type: 'null' + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + title: SearchRankingOptions + rewrite_query: + anyOf: + - type: boolean + - type: 'null' + default: false + search_mode: + anyOf: + - type: string + - type: 'null' + default: vector + type: object + required: + - query + title: OpenaiSearchVectorStoreRequest VectorStoreSearchResponse: properties: file_id: @@ -9621,6 +9771,18 @@ components: - version title: VersionInfo description: Version information for the service. + AppendRowsRequest: + properties: + rows: + items: + additionalProperties: true + type: object + type: array + title: Rows + type: object + required: + - rows + title: AppendRowsRequest PaginatedResponse: properties: data: @@ -9967,6 +10129,27 @@ components: - temperature title: TopPSamplingStrategy description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. + EvaluateRowsRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + type: object + required: + - input_rows + - scoring_functions + - benchmark_config + title: EvaluateRowsRequest EvaluateResponse: properties: generations: @@ -9999,6 +10182,40 @@ components: - status title: Job description: A job execution instance with status tracking. + RerankRequest: + properties: + model: + type: string + title: Model + query: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + items: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + type: array + title: Items + max_num_results: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - model + - query + - items + title: RerankRequest RerankData: properties: index: @@ -10095,6 +10312,15 @@ components: - perplexity title: PostTrainingMetric description: Training metrics captured during post-training jobs. + CancelTrainingJobRequest: + properties: + job_uuid: + type: string + title: Job Uuid + type: object + required: + - job_uuid + title: CancelTrainingJobRequest PostTrainingJobStatusResponse: properties: job_uuid: @@ -10307,6 +10533,35 @@ components: - n_epochs title: TrainingConfig description: Comprehensive configuration for the training process. + PreferenceOptimizeRequest: + properties: + job_uuid: + type: string + title: Job Uuid + finetuned_model: + type: string + title: Finetuned Model + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: PreferenceOptimizeRequest PostTrainingJob: properties: job_uuid: @@ -10316,18 +10571,6 @@ components: required: - job_uuid title: PostTrainingJob - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig LoraFinetuningConfig: properties: type: @@ -10390,75 +10633,182 @@ components: - group_size title: QATFinetuningConfig description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - AllowedToolsFilter: + SupervisedFineTuneRequest: properties: - tool_names: + job_uuid: + type: string + title: Job Uuid + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + model: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' - type: object - title: AllowedToolsFilter - description: Filter configuration for restricting which MCP tools can be used. - ApprovalFilter: - properties: - always: + description: Model descriptor for training if not in provider config` + checkpoint_dir: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' - never: + algorithm_config: anyOf: - - items: - type: string - type: array + - oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + title: LoraFinetuningConfig | QATFinetuningConfig + - type: 'null' + title: Algorithm Config + type: object + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: SupervisedFineTuneRequest + RegisterModelRequest: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + model_type: + anyOf: + - $ref: '#/components/schemas/ModelType' + title: ModelType + - type: 'null' + title: ModelType + type: object + required: + - model_id + title: RegisterModelRequest + RegisterShieldRequest: + properties: + shield_id: + type: string + title: Shield Id + provider_shield_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - shield_id + title: RegisterShieldRequest + RegisterToolGroupRequest: + properties: + toolgroup_id: + type: string + title: Toolgroup Id + provider_id: + type: string + title: Provider Id + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + title: URL + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - toolgroup_id + - provider_id + title: RegisterToolGroupRequest + RegisterBenchmarkRequest: + properties: + benchmark_id: + type: string + title: Benchmark Id + dataset_id: + type: string + title: Dataset Id + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + provider_benchmark_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - benchmark_id + - dataset_id + - scoring_functions + title: RegisterBenchmarkRequest + AllowedToolsFilter: + properties: + tool_names: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + never: + anyOf: + - items: + type: string + type: array - type: 'null' type: object title: ApprovalFilter @@ -10526,34 +10876,6 @@ components: - output_tokens_details - total_tokens title: BatchUsage - BatchesPostRequest: - properties: - input_file_id: - type: string - title: Input File Id - endpoint: - type: string - title: Endpoint - completion_window: - type: string - const: 24h - title: Completion Window - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - idempotency_key: - anyOf: - - type: string - - type: 'null' - type: object - required: - - input_file_id - - endpoint - - completion_window - title: BatchesPostRequest Body_openai_upload_file_v1_files_post: properties: file: @@ -10573,82 +10895,6 @@ components: - file - purpose title: Body_openai_upload_file_v1_files_post - Body_register_benchmark_v1alpha_eval_benchmarks_post: - properties: - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - scoring_functions - title: Body_register_benchmark_v1alpha_eval_benchmarks_post - Body_register_scoring_function_v1_scoring_functions_post: - properties: - return_type: - anyOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - params: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: Params - type: object - required: - - return_type - title: Body_register_scoring_function_v1_scoring_functions_post - Body_register_tool_group_v1_toolgroups_post: - properties: - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - title: Body_register_tool_group_v1_toolgroups_post Chunk-Input: properties: content: @@ -10773,115 +11019,15 @@ components: - reasoning.encrypted_content title: ConversationItemInclude description: Specify additional output data to include in the model response. - ConversationsByConversationIdItemsPostRequest: - properties: - items: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) - type: array - title: Items - type: object - required: - - items - title: ConversationsByConversationIdItemsPostRequest - ConversationsByConversationIdPostRequest: - properties: - metadata: - additionalProperties: - type: string - type: object - title: Metadata - type: object - required: - - metadata - title: ConversationsByConversationIdPostRequest - ConversationsPostRequest: - properties: - items: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) - type: array - - type: 'null' - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - type: object - title: ConversationsPostRequest - 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. - Errors: + 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. + Errors: properties: data: anyOf: @@ -10970,52 +11116,6 @@ components: - name title: MCPListToolsTool description: Tool definition returned by MCP list tools operation. - ModelsPostRequest: - properties: - model_id: - type: string - title: Model Id - provider_model_id: - anyOf: - - type: string - - type: 'null' - provider_id: - anyOf: - - type: string - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - model_type: - anyOf: - - $ref: '#/components/schemas/ModelType' - title: ModelType - - type: 'null' - title: ModelType - type: object - required: - - model_id - title: ModelsPostRequest - ModerationsPostRequest: - properties: - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - model: - anyOf: - - type: string - - type: 'null' - type: object - required: - - input - title: ModerationsPostRequest OpenAIAssistantMessageParam-Input: properties: role: @@ -11389,1765 +11489,71 @@ components: required: - reasoning_tokens title: OutputTokensDetails - PromptsByPromptIdPostRequest: - properties: - prompt: - type: string - title: Prompt - version: - type: integer - title: Version - variables: - anyOf: - - items: - type: string - type: array - - type: 'null' - set_as_default: - type: boolean - title: Set As Default - default: true - type: object - required: - - prompt - - version - title: PromptsByPromptIdPostRequest - PromptsByPromptIdSetDefaultVersionPostRequest: + RegisterDatasetRequestLoose: properties: - version: - type: integer - title: Version + purpose: + title: Purpose + source: + title: Source + metadata: + title: Metadata + dataset_id: + title: Dataset Id type: object required: - - version - title: PromptsByPromptIdSetDefaultVersionPostRequest - PromptsPostRequest: + - purpose + - source + title: RegisterDatasetRequestLoose + RegisterScoringFunctionRequestLoose: properties: - prompt: - type: string - title: Prompt - variables: - anyOf: - - items: - type: string - type: array - - type: 'null' + scoring_fn_id: + title: Scoring Fn Id + description: + title: Description + return_type: + title: Return Type + provider_scoring_fn_id: + title: Provider Scoring Fn Id + provider_id: + title: Provider Id + params: + title: Params type: object required: - - prompt - title: PromptsPostRequest - ResponsesPostRequest: + - scoring_fn_id + - description + - return_type + title: RegisterScoringFunctionRequestLoose + SearchRankingOptions: properties: - input: + ranker: anyOf: - type: string - - items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input - type: array - title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] - title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] - model: - type: string - title: Model - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - type: 'null' - title: OpenAIResponsePrompt - instructions: + score_threshold: anyOf: - - type: string + - type: number - type: 'null' - previous_response_id: + default: 0.0 + type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + _URLOrData: + properties: + url: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - conversation: + title: URL + data: anyOf: - type: string - type: 'null' - store: - anyOf: - - type: boolean - - type: 'null' - default: true - stream: - anyOf: - - type: boolean - - type: 'null' - default: false - temperature: - anyOf: - - type: number - - type: 'null' - text: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseText' - title: OpenAIResponseText - - type: 'null' - title: OpenAIResponseText - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - discriminator: - propertyName: type - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - include: - anyOf: - - items: - type: string - type: array - - type: 'null' - max_infer_iters: - anyOf: - - type: integer - - type: 'null' - default: 10 - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - type: object - required: - - input - - model - title: ResponsesPostRequest - SafetyRunShieldPostRequest: - properties: - shield_id: - type: string - title: Shield Id - messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' - title: OpenAIUserMessageParam-Input - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' - title: OpenAIAssistantMessageParam-Input - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: 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' - title: OpenAIUserMessageParam-Input | ... (5 variants) - type: array - title: Messages - params: - additionalProperties: true - type: object - title: Params - type: object - required: - - shield_id - - messages - - params - title: SafetyRunShieldPostRequest - ScoringScoreBatchPostRequest: - properties: - dataset_id: - type: string - title: Dataset Id - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - title: Scoring Functions - save_results_dataset: - type: boolean - title: Save Results Dataset - default: false - type: object - required: - - dataset_id - - scoring_functions - title: ScoringScoreBatchPostRequest - ScoringScorePostRequest: - properties: - input_rows: - items: - additionalProperties: true - type: object - type: array - title: Input Rows - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - title: Scoring Functions - type: object - required: - - input_rows - - scoring_functions - title: ScoringScorePostRequest - SearchRankingOptions: - properties: - ranker: - anyOf: - - type: string - - type: 'null' - score_threshold: - anyOf: - - type: number - - type: 'null' - default: 0.0 - type: object - title: SearchRankingOptions - description: Options for ranking and filtering search results. - ShieldsPostRequest: - properties: - shield_id: - type: string - title: Shield Id - provider_shield_id: - anyOf: - - type: string - - type: 'null' - provider_id: - anyOf: - - type: string - - type: 'null' - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - shield_id - title: ShieldsPostRequest - ToolRuntimeInvokePostRequest: - properties: - tool_name: - type: string - title: Tool Name - kwargs: - additionalProperties: true - type: object - title: Kwargs - authorization: - anyOf: - - type: string - - type: 'null' - type: object - required: - - tool_name - - kwargs - title: ToolRuntimeInvokePostRequest - V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest: - properties: - input_rows: - items: - additionalProperties: true - type: object - type: array - title: Input Rows - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - type: object - required: - - input_rows - - scoring_functions - - benchmark_config - title: V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest - V1AlphaInferenceRerankPostRequest: - properties: - model: - type: string - title: Model - query: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - items: - items: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - type: array - title: Items - max_num_results: - anyOf: - - type: integer - - type: 'null' - type: object - required: - - model - - query - - items - title: V1AlphaInferenceRerankPostRequest - V1AlphaPostTrainingPreferenceOptimizePostRequest: - properties: - job_uuid: - type: string - title: Job Uuid - finetuned_model: - type: string - title: Finetuned Model - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - type: object - required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: V1AlphaPostTrainingPreferenceOptimizePostRequest - V1AlphaPostTrainingSupervisedFineTunePostRequest: - properties: - job_uuid: - type: string - title: Job Uuid - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - model: - anyOf: - - type: string - - type: 'null' - description: Model descriptor for training if not in provider config` - checkpoint_dir: - anyOf: - - type: string - - type: 'null' - algorithm_config: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - discriminator: - propertyName: type - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - title: LoraFinetuningConfig | QATFinetuningConfig - - type: 'null' - title: Algorithm Config - type: object - required: - - job_uuid - - training_config - - hyperparam_search_config - - logger_config - title: V1AlphaPostTrainingSupervisedFineTunePostRequest - V1BetaDatasetsPostRequestLoose: - properties: - purpose: - title: Purpose - source: - title: Source - metadata: - title: Metadata - dataset_id: - title: Dataset Id - type: object - required: - - purpose - - source - title: V1BetaDatasetsPostRequestLoose - VectorIoQueryPostRequest: - properties: - vector_store_id: - type: string - title: Vector Store Id - query: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - vector_store_id - - query - title: VectorIoQueryPostRequest - VectorStoresByVectorStoreIdFilesByFileIdPostRequest: - properties: - attributes: - additionalProperties: true - type: object - title: Attributes - type: object - required: - - attributes - title: VectorStoresByVectorStoreIdFilesByFileIdPostRequest - VectorStoresByVectorStoreIdFilesPostRequest: - properties: - file_id: - type: string - title: File Id - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - type: object - required: - - file_id - title: VectorStoresByVectorStoreIdFilesPostRequest - VectorStoresByVectorStoreIdPostRequest: - properties: - name: - anyOf: - - type: string - - type: 'null' - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - title: VectorStoresByVectorStoreIdPostRequest - VectorStoresByVectorStoreIdSearchPostRequest: - properties: - query: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - max_num_results: - anyOf: - - type: integer - - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - title: SearchRankingOptions - rewrite_query: - anyOf: - - type: boolean - - type: 'null' - default: false - search_mode: - anyOf: - - type: string - - type: 'null' - default: vector - type: object - required: - - query - title: VectorStoresByVectorStoreIdSearchPostRequest - _URLOrData: - properties: - url: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - type: object - title: _URLOrData - description: A URL or a base64 encoded string - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat - type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. - 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 - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - SpanEndPayload: - description: Payload for a span end event. - properties: - type: - const: span_end - default: span_end - title: Type - type: string - status: - $ref: '#/components/schemas/SpanStatus' - required: - - status - title: SpanEndPayload - type: object - SpanStartPayload: - description: Payload for a span start event. - properties: - type: - const: span_start - default: span_start - title: Type - type: string - name: - title: Name - type: string - parent_span_id: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - name - title: SpanStartPayload - type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string - required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent - type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent - type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message - type: string - severity: - $ref: '#/components/schemas/LogSeverity' - required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent - type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ImageDelta: - description: An image content delta for streaming responses. - properties: - type: - const: image - default: image - title: Type - type: string - image: - format: binary - title: Image - type: string - required: - - image - title: ImageDelta - type: object - TextDelta: - description: A text content delta for streaming responses. - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: TextDelta - type: object - MetricInResponse: - description: A metric value included in API responses. - properties: - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - metric - - value - title: MetricInResponse - type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. - properties: - type: - const: dialog - default: dialog - title: Type - type: string - title: DialogType - type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. - properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array - required: - - items - title: ConversationItemCreateRequest - type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. - properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status - type: string - type: - const: message - default: message - title: Type - type: string - object: - const: message - default: message - title: Object - type: string - required: - - id - - content - - role - - status - title: ConversationMessage - type: object - Api: - description: Enumeration of all available APIs in the Llama Stack system. - enum: - - providers - - inference - - safety - - agents - - batches - - vector_io - - datasetio - - scoring - - eval - - post_training - - tool_runtime - - models - - shields - - vector_stores - - datasets - - scoring_functions - - benchmarks - - tool_groups - - files - - prompts - - conversations - - inspect - title: Api - type: string - InlineProviderSpec: - properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class - type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - container_image: - anyOf: - - type: string - - type: 'null' - description: |2 - - The container image to use for this implementation. If one is provided, pip_packages will be ignored. - If a provider depends on other providers, the dependencies MUST NOT specify a container image. - nullable: true - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true - required: - - api - - provider_type - - config_class - title: InlineProviderSpec - type: object - ProviderSpec: - properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class - type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - required: - - api - - provider_type - - config_class - title: ProviderSpec - type: object - RemoteProviderSpec: - properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class - type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - adapter_type: - description: Unique identifier for this adapter - title: Adapter Type - type: string - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true - required: - - api - - provider_type - - config_class - - adapter_type - title: RemoteProviderSpec - type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). - properties: - type: - const: bf16 - default: bf16 - title: Type - type: string - title: Bf16QuantizationConfig - type: object - EmbeddingsResponse: - description: Response containing generated embeddings. - properties: - embeddings: - items: - items: - type: number - type: array - title: Embeddings - type: array - required: - - embeddings - title: EmbeddingsResponse - type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. - properties: - type: - const: fp8_mixed - default: fp8_mixed - title: Type - type: string - title: Fp8QuantizationConfig - type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. - properties: - type: - const: int4_mixed - default: int4_mixed - title: Type - type: string - scheme: - anyOf: - - type: string - - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig - type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens - properties: - text_offset: - anyOf: - - items: - type: integer - type: array - - type: 'null' - nullable: true - token_logprobs: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - tokens: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - top_logprobs: - anyOf: - - items: - additionalProperties: - type: number - type: object - type: array - - type: 'null' - nullable: true - title: OpenAICompletionLogprobs - type: object - TokenLogProbs: - description: Log probabilities for generated tokens. - properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs - type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. - properties: - role: - const: tool - default: tool - title: Role - type: string - call_id: - title: Call Id - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - required: - - call_id - - content - title: ToolResponseMessage - type: object - UserMessage: - description: A message from the user in a chat conversation. - properties: - role: - const: user - default: user - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true - required: - - content - title: UserMessage - type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. - properties: - job_uuid: - title: Job Uuid - type: string - log_lines: - items: - type: string - title: Log Lines - type: array - required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream - type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. - properties: - job_uuid: - title: Job Uuid - type: string - finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id - type: string - validation_dataset_id: - title: Validation Dataset Id - type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - title: Hyperparam Search Config - type: object - logger_config: - additionalProperties: true - title: Logger Config - type: object - required: - - job_uuid - - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - - algorithm_config - - optimizer_config - - training_config - - hyperparam_search_config - - logger_config - title: PostTrainingRLHFRequest - type: object - ToolGroupInput: - description: Input data for registering a tool group. - properties: - toolgroup_id: - title: Toolgroup Id - type: string - provider_id: - title: Provider Id - type: string - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - nullable: true - title: URL - required: - - toolgroup_id - - provider_id - title: ToolGroupInput - type: object - VectorStoreCreateRequest: - description: Request to create a vector store. - properties: - name: - anyOf: - - type: string - - type: 'null' - nullable: true - file_ids: - items: - type: string - title: File Ids - type: array - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - chunking_strategy: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - title: VectorStoreCreateRequest - type: object - VectorStoreModifyRequest: - description: Request to modify a vector store. - properties: - name: - anyOf: - - type: string - - type: 'null' - nullable: true - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - title: VectorStoreModifyRequest - type: object - VectorStoreSearchRequest: - description: Request to search a vector store. - properties: - query: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - max_num_results: - default: 10 - title: Max Num Results - type: integer - ranking_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - rewrite_query: - default: false - title: Rewrite Query - type: boolean - required: - - query - title: VectorStoreSearchRequest + contentEncoding: base64 type: object + title: _URLOrData + description: A URL or a base64 encoded string responses: BadRequest400: description: The request was invalid or malformed diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index 06112396f3..5454874db7 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -71,7 +71,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ModelsPostRequest' + $ref: '#/components/schemas/RegisterModelRequest' required: true deprecated: true /v1/models/{model_id}: @@ -155,17 +155,17 @@ paths: schema: $ref: '#/components/schemas/ListScoringFunctionsResponse' '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' tags: - Scoring Functions summary: List Scoring Functions @@ -179,28 +179,28 @@ paths: application/json: schema: {} '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' tags: - Scoring Functions summary: Register Scoring Function description: Register a scoring function. operationId: register_scoring_function_v1_scoring_functions_post requestBody: - required: true content: application/json: schema: - $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' + $ref: '#/components/schemas/RegisterScoringFunctionRequestLoose' + required: true deprecated: true /v1/scoring-functions/{scoring_fn_id}: get: @@ -322,7 +322,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ShieldsPostRequest' + $ref: '#/components/schemas/RegisterShieldRequest' required: true deprecated: true /v1/shields/{identifier}: @@ -400,17 +400,17 @@ paths: schema: $ref: '#/components/schemas/ListToolGroupsResponse' '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' tags: - Tool Groups summary: List Tool Groups @@ -424,17 +424,17 @@ paths: application/json: schema: {} '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' tags: - Tool Groups summary: Register Tool Group @@ -444,7 +444,8 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' + $ref: '#/components/schemas/RegisterToolGroupRequest' + required: true deprecated: true /v1/toolgroups/{toolgroup_id}: get: @@ -566,7 +567,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1BetaDatasetsPostRequestLoose' + $ref: '#/components/schemas/RegisterDatasetRequestLoose' required: true deprecated: true /v1beta/datasets/{dataset_id}: @@ -644,17 +645,17 @@ paths: schema: $ref: '#/components/schemas/ListBenchmarksResponse' '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' tags: - Benchmarks summary: List Benchmarks @@ -668,28 +669,28 @@ paths: application/json: schema: {} '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' tags: - Benchmarks summary: Register Benchmark description: Register a benchmark. operationId: register_benchmark_v1alpha_eval_benchmarks_post requestBody: - required: true content: application/json: schema: - $ref: '#/components/schemas/Body_register_benchmark_v1alpha_eval_benchmarks_post' + $ref: '#/components/schemas/RegisterBenchmarkRequest' + required: true deprecated: true /v1alpha/eval/benchmarks/{benchmark_id}: get: @@ -814,6 +815,34 @@ components: - data title: ListBatchesResponse description: Response containing a list of batch objects. + CreateBatchRequest: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + const: 24h + title: Completion Window + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + idempotency_key: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_file_id + - endpoint + - completion_window + title: CreateBatchRequest Batch: properties: id: @@ -2560,6 +2589,53 @@ components: - status title: OpenAIResponseOutputMessageWebSearchToolCall description: Web search tool call output message for OpenAI responses. + CreateConversationRequest: + properties: + items: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + - type: 'null' + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + type: object + title: CreateConversationRequest Conversation: properties: id: @@ -2597,6 +2673,17 @@ components: - created_at title: Conversation description: OpenAI-compatible conversation object. + UpdateConversationRequest: + properties: + metadata: + additionalProperties: + type: string + type: object + title: Metadata + type: object + required: + - metadata + title: UpdateConversationRequest ConversationDeletedResource: properties: id: @@ -2682,6 +2769,48 @@ components: - data title: ConversationItemList description: List of conversation items with pagination. + AddItemsRequest: + properties: + items: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + title: Items + type: object + required: + - items + title: AddItemsRequest ConversationItemDeletedResource: properties: id: @@ -3041,6 +3170,24 @@ components: - rerank title: ModelType description: Enumeration of supported model types in Llama Stack. + RunModerationRequest: + properties: + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + model: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input + title: RunModerationRequest ModerationObject: properties: id: @@ -3144,6 +3291,53 @@ components: - data title: ListPromptsResponse description: Response model to list prompts. + CreatePromptRequest: + properties: + prompt: + type: string + title: Prompt + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + required: + - prompt + title: CreatePromptRequest + UpdatePromptRequest: + properties: + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt + - version + title: UpdatePromptRequest + SetDefaultVersionRequest: + properties: + version: + type: integer + title: Version + type: object + required: + - version + title: SetDefaultVersionRequest ProviderInfo: properties: api: @@ -3745,33 +3939,162 @@ components: - server_url title: OpenAIResponseInputToolMCP description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - OpenAIResponseObject: + CreateOpenaiResponseRequest: properties: - created_at: - type: integer - title: Created At - error: + input: anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - title: 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' - title: OpenAIResponseMessage-Output + - type: string + - items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input + type: array + title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + model: + type: string + title: Model + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + title: OpenAIResponsePrompt + instructions: + anyOf: + - type: string + - type: 'null' + previous_response_id: + anyOf: + - type: string + - type: 'null' + conversation: + anyOf: + - type: string + - type: 'null' + store: + anyOf: + - type: boolean + - type: 'null' + default: true + stream: + anyOf: + - type: boolean + - type: 'null' + default: false + temperature: + anyOf: + - type: number + - type: 'null' + text: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseText' + title: OpenAIResponseText + - type: 'null' + title: OpenAIResponseText + tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + include: + anyOf: + - items: + type: string + type: array + - type: 'null' + max_infer_iters: + anyOf: + - type: integer + - type: 'null' + default: 10 + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - input + - model + title: CreateOpenaiResponseRequest + OpenAIResponseObject: + properties: + created_at: + type: integer + title: Created At + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + title: 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' + title: OpenAIResponseMessage-Output - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' title: OpenAIResponseOutputMessageWebSearchToolCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' @@ -5110,6 +5433,45 @@ components: - data title: ListOpenAIResponseInputItem description: List container for OpenAI response input items. + RunShieldRequest: + properties: + shield_id: + type: string + title: Shield Id + messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) + type: array + title: Messages + params: + additionalProperties: true + type: object + title: Params + type: object + required: + - shield_id + - messages + - params + title: RunShieldRequest RunShieldResponse: properties: violation: @@ -5399,6 +5761,14 @@ components: - $ref: '#/components/schemas/BasicScoringFnParams' title: BasicScoringFnParams title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + ScoringFnParamsType: + description: Types of scoring function parameter configurations. + enum: + - llm_as_judge + - regex_parser + - basic + title: ScoringFnParamsType + type: string StringType: properties: type: @@ -5430,6 +5800,40 @@ components: required: - data title: ListScoringFunctionsResponse + ScoreRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + type: object + required: + - input_rows + - scoring_functions + title: ScoreRequest ScoreResponse: properties: results: @@ -5460,6 +5864,41 @@ components: - aggregated_results title: ScoringResult description: A scoring result for a single row. + ScoreBatchRequest: + properties: + dataset_id: + type: string + title: Dataset Id + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + save_results_dataset: + type: boolean + title: Save Results Dataset + default: false + type: object + required: + - dataset_id + - scoring_functions + title: ScoreBatchRequest ScoreBatchResponse: properties: dataset_id: @@ -5518,7 +5957,25 @@ components: required: - data title: ListShieldsResponse - ImageContentItem: + InvokeToolRequest: + properties: + tool_name: + type: string + title: Tool Name + kwargs: + additionalProperties: true + type: object + title: Kwargs + authorization: + anyOf: + - type: string + - type: 'null' + type: object + required: + - tool_name + - kwargs + title: InvokeToolRequest + ImageContentItem: description: A image content item properties: type: @@ -5851,6 +6308,69 @@ components: 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. + InsertChunksRequest: + properties: + vector_store_id: + type: string + title: Vector Store Id + chunks: + items: + $ref: '#/components/schemas/Chunk-Input' + type: array + title: Chunks + ttl_seconds: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - vector_store_id + - chunks + title: InsertChunksRequest + QueryChunksRequest: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - vector_store_id + - query + title: QueryChunksRequest QueryChunksResponse: properties: chunks: @@ -6065,6 +6585,24 @@ components: type: object title: OpenAICreateVectorStoreRequestWithExtraBody description: Request to create a vector store with extra_body support. + OpenaiUpdateVectorStoreRequest: + properties: + name: + anyOf: + - type: string + - type: 'null' + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + title: OpenaiUpdateVectorStoreRequest VectorStoreDeleteResponse: properties: id: @@ -6292,6 +6830,45 @@ components: - data title: VectorStoreListFilesResponse description: Response from listing files in a vector store. + OpenaiAttachFileToVectorStoreRequest: + properties: + file_id: + type: string + title: File Id + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + chunking_strategy: + anyOf: + - oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + type: object + required: + - file_id + title: OpenaiAttachFileToVectorStoreRequest + OpenaiUpdateVectorStoreFileRequest: + properties: + attributes: + additionalProperties: true + type: object + title: Attributes + type: object + required: + - attributes + title: OpenaiUpdateVectorStoreFileRequest VectorStoreFileDeleteResponse: properties: id: @@ -6367,6 +6944,46 @@ components: - data title: VectorStoreFileContentResponse description: Represents the parsed content of a vector store file. + OpenaiSearchVectorStoreRequest: + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + max_num_results: + anyOf: + - type: integer + - type: 'null' + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + title: SearchRankingOptions + rewrite_query: + anyOf: + - type: boolean + - type: 'null' + default: false + search_mode: + anyOf: + - type: string + - type: 'null' + default: vector + type: object + required: + - query + title: OpenaiSearchVectorStoreRequest VectorStoreSearchResponse: properties: file_id: @@ -6441,6 +7058,18 @@ components: - version title: VersionInfo description: Version information for the service. + AppendRowsRequest: + properties: + rows: + items: + additionalProperties: true + type: object + type: array + title: Rows + type: object + required: + - rows + title: AppendRowsRequest PaginatedResponse: properties: data: @@ -6787,6 +7416,27 @@ components: - temperature title: TopPSamplingStrategy description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. + EvaluateRowsRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + type: object + required: + - input_rows + - scoring_functions + - benchmark_config + title: EvaluateRowsRequest EvaluateResponse: properties: generations: @@ -6819,6 +7469,40 @@ components: - status title: Job description: A job execution instance with status tracking. + RerankRequest: + properties: + model: + type: string + title: Model + query: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + items: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + type: array + title: Items + max_num_results: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - model + - query + - items + title: RerankRequest RerankData: properties: index: @@ -6915,6 +7599,15 @@ components: - perplexity title: PostTrainingMetric description: Training metrics captured during post-training jobs. + CancelTrainingJobRequest: + properties: + job_uuid: + type: string + title: Job Uuid + type: object + required: + - job_uuid + title: CancelTrainingJobRequest PostTrainingJobStatusResponse: properties: job_uuid: @@ -7127,23 +7820,52 @@ components: - n_epochs title: TrainingConfig description: Comprehensive configuration for the training process. - PostTrainingJob: + PreferenceOptimizeRequest: properties: job_uuid: type: string title: Job Uuid + finetuned_model: + type: string + title: Finetuned Model + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config type: object required: - job_uuid - title: PostTrainingJob - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: PreferenceOptimizeRequest + PostTrainingJob: + properties: + job_uuid: + type: string + title: Job Uuid + type: object + required: + - job_uuid + title: PostTrainingJob + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' title: LoraFinetuningConfig - $ref: '#/components/schemas/QATFinetuningConfig' title: QATFinetuningConfig @@ -7210,6 +7932,80 @@ components: - group_size title: QATFinetuningConfig description: Configuration for Quantization-Aware Training (QAT) fine-tuning. + SupervisedFineTuneRequest: + properties: + job_uuid: + type: string + title: Job Uuid + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + model: + anyOf: + - type: string + - type: 'null' + description: Model descriptor for training if not in provider config` + checkpoint_dir: + anyOf: + - type: string + - type: 'null' + algorithm_config: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + title: LoraFinetuningConfig | QATFinetuningConfig + - type: 'null' + title: Algorithm Config + type: object + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: SupervisedFineTuneRequest + RegisterModelRequest: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + model_type: + anyOf: + - $ref: '#/components/schemas/ModelType' + title: ModelType + - type: 'null' + title: ModelType + type: object + required: + - model_id + title: RegisterModelRequest ParamType: discriminator: mapping: @@ -7243,6 +8039,52 @@ components: - $ref: '#/components/schemas/CompletionInputType' title: CompletionInputType title: StringType | ... (9 variants) + RegisterShieldRequest: + properties: + shield_id: + type: string + title: Shield Id + provider_shield_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - shield_id + title: RegisterShieldRequest + RegisterToolGroupRequest: + properties: + toolgroup_id: + type: string + title: Toolgroup Id + provider_id: + type: string + title: Provider Id + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + title: URL + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - toolgroup_id + - provider_id + title: RegisterToolGroupRequest DataSource: discriminator: mapping: @@ -7255,6 +8097,38 @@ components: - $ref: '#/components/schemas/RowsDataSource' title: RowsDataSource title: URIDataSource | RowsDataSource + RegisterBenchmarkRequest: + properties: + benchmark_id: + type: string + title: Benchmark Id + dataset_id: + type: string + title: Dataset Id + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + provider_benchmark_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - benchmark_id + - dataset_id + - scoring_functions + title: RegisterBenchmarkRequest AllowedToolsFilter: properties: tool_names: @@ -7346,34 +8220,6 @@ components: - output_tokens_details - total_tokens title: BatchUsage - BatchesPostRequest: - properties: - input_file_id: - type: string - title: Input File Id - endpoint: - type: string - title: Endpoint - completion_window: - type: string - const: 24h - title: Completion Window - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - idempotency_key: - anyOf: - - type: string - - type: 'null' - type: object - required: - - input_file_id - - endpoint - - completion_window - title: BatchesPostRequest Body_openai_upload_file_v1_files_post: properties: file: @@ -7393,82 +8239,6 @@ components: - file - purpose title: Body_openai_upload_file_v1_files_post - Body_register_benchmark_v1alpha_eval_benchmarks_post: - properties: - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - scoring_functions - title: Body_register_benchmark_v1alpha_eval_benchmarks_post - Body_register_scoring_function_v1_scoring_functions_post: - properties: - return_type: - anyOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - params: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: Params - type: object - required: - - return_type - title: Body_register_scoring_function_v1_scoring_functions_post - Body_register_tool_group_v1_toolgroups_post: - properties: - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - title: Body_register_tool_group_v1_toolgroups_post Chunk-Input: properties: content: @@ -7593,106 +8363,6 @@ components: - reasoning.encrypted_content title: ConversationItemInclude description: Specify additional output data to include in the model response. - ConversationsByConversationIdItemsPostRequest: - properties: - items: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) - type: array - title: Items - type: object - required: - - items - title: ConversationsByConversationIdItemsPostRequest - ConversationsByConversationIdPostRequest: - properties: - metadata: - additionalProperties: - type: string - type: object - title: Metadata - type: object - required: - - metadata - title: ConversationsByConversationIdPostRequest - ConversationsPostRequest: - properties: - items: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) - type: array - - type: 'null' - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - type: object - title: ConversationsPostRequest DatasetPurpose: type: string enum: @@ -7790,52 +8460,6 @@ components: - name title: MCPListToolsTool description: Tool definition returned by MCP list tools operation. - ModelsPostRequest: - properties: - model_id: - type: string - title: Model Id - provider_model_id: - anyOf: - - type: string - - type: 'null' - provider_id: - anyOf: - - type: string - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - model_type: - anyOf: - - $ref: '#/components/schemas/ModelType' - title: ModelType - - type: 'null' - title: ModelType - type: object - required: - - model_id - title: ModelsPostRequest - ModerationsPostRequest: - properties: - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - model: - anyOf: - - type: string - - type: 'null' - type: object - required: - - input - title: ModerationsPostRequest OpenAIAssistantMessageParam-Input: properties: role: @@ -8209,992 +8833,724 @@ components: required: - reasoning_tokens title: OutputTokensDetails - PromptsByPromptIdPostRequest: - properties: - prompt: - type: string - title: Prompt - version: - type: integer - title: Version - variables: - anyOf: - - items: - type: string - type: array - - type: 'null' - set_as_default: - type: boolean - title: Set As Default - default: true - type: object - required: - - prompt - - version - title: PromptsByPromptIdPostRequest - PromptsByPromptIdSetDefaultVersionPostRequest: + RegisterDatasetRequestLoose: properties: - version: - type: integer - title: Version + purpose: + title: Purpose + source: + title: Source + metadata: + title: Metadata + dataset_id: + title: Dataset Id type: object required: - - version - title: PromptsByPromptIdSetDefaultVersionPostRequest - PromptsPostRequest: + - purpose + - source + title: RegisterDatasetRequestLoose + RegisterScoringFunctionRequestLoose: properties: - prompt: - type: string - title: Prompt - variables: - anyOf: - - items: - type: string - type: array - - type: 'null' + scoring_fn_id: + title: Scoring Fn Id + description: + title: Description + return_type: + title: Return Type + provider_scoring_fn_id: + title: Provider Scoring Fn Id + provider_id: + title: Provider Id + params: + title: Params type: object required: - - prompt - title: PromptsPostRequest - ResponsesPostRequest: + - scoring_fn_id + - description + - return_type + title: RegisterScoringFunctionRequestLoose + SearchRankingOptions: properties: - input: + ranker: anyOf: - type: string - - items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input - type: array - title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] - title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] - model: - type: string - title: Model - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - type: 'null' - title: OpenAIResponsePrompt - instructions: + score_threshold: anyOf: - - type: string + - type: number - type: 'null' - previous_response_id: + default: 0.0 + type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + _URLOrData: + properties: + url: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - conversation: + title: URL + data: anyOf: - type: string - type: 'null' - store: - anyOf: - - type: boolean - - type: 'null' - default: true - stream: - anyOf: - - type: boolean - - type: 'null' - default: false - temperature: - anyOf: - - type: number - - type: 'null' - text: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseText' - title: OpenAIResponseText - - type: 'null' - title: OpenAIResponseText - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - discriminator: - propertyName: type - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - include: - anyOf: - - items: - type: string - type: array - - type: 'null' - max_infer_iters: - anyOf: - - type: integer - - type: 'null' - default: 10 - max_tool_calls: - anyOf: - - type: integer - - type: 'null' + contentEncoding: base64 type: object - required: - - input - - model - title: ResponsesPostRequest - SafetyRunShieldPostRequest: + title: _URLOrData + description: A URL or a base64 encoded string + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. properties: - shield_id: + type: + const: grammar + default: grammar + title: Type type: string - title: Shield Id - messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' - title: OpenAIUserMessageParam-Input - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' - title: OpenAIAssistantMessageParam-Input - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: 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' - title: OpenAIUserMessageParam-Input | ... (5 variants) - type: array - title: Messages - params: + bnf: additionalProperties: true + title: Bnf type: object - title: Params - type: object required: - - shield_id - - messages - - params - title: SafetyRunShieldPostRequest - ScoringScoreBatchPostRequest: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. properties: - dataset_id: + type: + const: json_schema + default: json_schema + title: Type type: string - title: Dataset Id - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion + json_schema: + additionalProperties: true + title: Json Schema type: object - title: Scoring Functions - save_results_dataset: - type: boolean - title: Save Results Dataset - default: false - type: object required: - - dataset_id - - scoring_functions - title: ScoringScoreBatchPostRequest - ScoringScorePostRequest: - properties: - input_rows: - items: - additionalProperties: true - type: object - type: array - title: Input Rows - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - title: Scoring Functions + - json_schema + title: JsonSchemaResponseFormat type: object + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + SpanEndPayload: + description: Payload for a span end event. + properties: + type: + const: span_end + default: span_end + title: Type + type: string + status: + $ref: '#/components/schemas/SpanStatus' required: - - input_rows - - scoring_functions - title: ScoringScorePostRequest - SearchRankingOptions: + - status + title: SpanEndPayload + type: object + SpanStartPayload: + description: Payload for a span start event. properties: - ranker: + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: anyOf: - type: string - type: 'null' - score_threshold: + nullable: true + required: + - name + title: SpanStartPayload + type: object + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - - type: number + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object - type: 'null' - default: 0.0 + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent type: object - title: SearchRankingOptions - description: Options for ranking and filtering search results. - ShieldsPostRequest: + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. properties: - shield_id: + trace_id: + title: Trace Id type: string - title: Shield Id - provider_shield_id: - anyOf: - - type: string - - type: 'null' - provider_id: - anyOf: - - type: string - - type: 'null' - params: + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: anyOf: - - additionalProperties: true + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) type: object - type: 'null' - type: object + type: + const: unstructured_log + default: unstructured_log + title: Type + type: string + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' required: - - shield_id - title: ShieldsPostRequest - ToolRuntimeInvokePostRequest: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent + type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + MetricInResponse: + description: A metric value included in API responses. properties: - tool_name: + metric: + title: Metric type: string - title: Tool Name - kwargs: - additionalProperties: true - type: object - title: Kwargs - authorization: + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: anyOf: - type: string - type: 'null' - type: object + nullable: true required: - - tool_name - - kwargs - title: ToolRuntimeInvokePostRequest - V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest: - properties: - input_rows: - items: - additionalProperties: true - type: object - type: array - title: Input Rows - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' + - metric + - value + title: MetricInResponse type: object - required: - - input_rows - - scoring_functions - - benchmark_config - title: V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest - V1AlphaInferenceRerankPostRequest: + TextDelta: + description: A text content delta for streaming responses. properties: - model: + type: + const: text + default: text + title: Type + type: string + text: + title: Text type: string - title: Model - query: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - items: - items: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - type: array - title: Items - max_num_results: - anyOf: - - type: integer - - type: 'null' - type: object required: - - model - - query - - items - title: V1AlphaInferenceRerankPostRequest - V1AlphaPostTrainingPreferenceOptimizePostRequest: + - text + title: TextDelta + type: object + ImageDelta: + description: An image content delta for streaming responses. properties: - job_uuid: + type: + const: image + default: image + title: Type type: string - title: Job Uuid - finetuned_model: + image: + format: binary + title: Image type: string - title: Finetuned Model - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - type: object required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: V1AlphaPostTrainingPreferenceOptimizePostRequest - V1AlphaPostTrainingSupervisedFineTunePostRequest: + - image + title: ImageDelta + type: object + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. properties: - job_uuid: + type: + const: fp8_mixed + default: fp8_mixed + title: Type type: string - title: Job Uuid - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - model: - anyOf: - - type: string - - type: 'null' - description: Model descriptor for training if not in provider config` - checkpoint_dir: + title: Fp8QuantizationConfig + type: object + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). + properties: + type: + const: bf16 + default: bf16 + title: Type + type: string + title: Bf16QuantizationConfig + type: object + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. + properties: + type: + const: int4_mixed + default: int4_mixed + title: Type + type: string + scheme: anyOf: - type: string - type: 'null' - algorithm_config: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - discriminator: - propertyName: type - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - title: LoraFinetuningConfig | QATFinetuningConfig - - type: 'null' - title: Algorithm Config - type: object - required: - - job_uuid - - training_config - - hyperparam_search_config - - logger_config - title: V1AlphaPostTrainingSupervisedFineTunePostRequest - V1BetaDatasetsPostRequestLoose: - properties: - purpose: - title: Purpose - source: - title: Source - metadata: - title: Metadata - dataset_id: - title: Dataset Id + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig type: object - required: - - purpose - - source - title: V1BetaDatasetsPostRequestLoose - VectorIoQueryPostRequest: + UserMessage: + description: A message from the user in a chat conversation. properties: - vector_store_id: + role: + const: user + default: user + title: Role type: string - title: Vector Store Id - query: + content: anyOf: - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type + - discriminator: mapping: - image: '#/components/schemas/ImageContentItem-Input' + image: '#/components/schemas/ImageContentItem' text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem - $ref: '#/components/schemas/TextContentItem' title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: discriminator: - propertyName: type mapping: - image: '#/components/schemas/ImageContentItem-Input' + image: '#/components/schemas/ImageContentItem' text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - params: - anyOf: - - additionalProperties: true - type: object + title: list[ImageContentItem | TextContentItem] - type: 'null' - type: object + title: string | list[ImageContentItem | TextContentItem] + nullable: true required: - - vector_store_id - - query - title: VectorIoQueryPostRequest - VectorStoresByVectorStoreIdFilesByFileIdPostRequest: - properties: - attributes: - additionalProperties: true - type: object - title: Attributes + - content + title: UserMessage type: object - required: - - attributes - title: VectorStoresByVectorStoreIdFilesByFileIdPostRequest - VectorStoresByVectorStoreIdFilesPostRequest: + ToolResponseMessage: + description: A message representing the result of a tool invocation. properties: - file_id: + role: + const: tool + default: tool + title: Role type: string - title: File Id - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - type: object - required: - - file_id - title: VectorStoresByVectorStoreIdFilesPostRequest - VectorStoresByVectorStoreIdPostRequest: - properties: - name: - anyOf: - - type: string - - type: 'null' - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - title: VectorStoresByVectorStoreIdPostRequest - VectorStoresByVectorStoreIdSearchPostRequest: - properties: - query: + call_id: + title: Call Id + type: string + content: anyOf: - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem - items: - type: string + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem type: array - title: list[string] - title: string | list[string] - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - max_num_results: - anyOf: - - type: integer - - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - title: SearchRankingOptions - rewrite_query: - anyOf: - - type: boolean - - type: 'null' - default: false - search_mode: - anyOf: - - type: string - - type: 'null' - default: vector - type: object + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] required: - - query - title: VectorStoresByVectorStoreIdSearchPostRequest - _URLOrData: - properties: - url: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 + - call_id + - content + title: ToolResponseMessage type: object - title: _URLOrData - description: A URL or a base64 encoded string - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. + TokenLogProbs: + description: Log probabilities for generated tokens. properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token type: object required: - - bnf - title: GrammarResponseFormat + - logprobs_by_token + title: TokenLogProbs type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. + EmbeddingsResponse: + description: Response containing generated embeddings. properties: - type: - const: json_schema - default: json_schema - title: Type - type: string - json_schema: - additionalProperties: true - title: Json Schema - type: object + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array required: - - json_schema - title: JsonSchemaResponseFormat + - embeddings + title: EmbeddingsResponse type: object - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - SpanEndPayload: - description: Payload for a span end event. + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens properties: - type: - const: span_end - default: span_end - title: Type - type: string - status: - $ref: '#/components/schemas/SpanStatus' - required: - - status - title: SpanEndPayload + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs type: object - SpanStartPayload: - description: Payload for a span start event. + VectorStoreCreateRequest: + description: Request to create a vector store. properties: - type: - const: span_start - default: span_start - title: Type - type: string name: - title: Name - type: string - parent_span_id: anyOf: - type: string - type: 'null' nullable: true - required: - - name - title: SpanStartPayload - type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) + - additionalProperties: true type: object - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string - required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent - type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: + nullable: true + chunking_strategy: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) + - additionalProperties: true type: object - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object + title: VectorStoreCreateRequest type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. + VectorStoreModifyRequest: + description: Request to modify a vector store. properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: + name: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) + - type: string + - type: 'null' + nullable: true + expires_after: + anyOf: + - additionalProperties: true type: object - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message - type: string - severity: - $ref: '#/components/schemas/LogSeverity' - required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent - type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ImageDelta: - description: An image content delta for streaming responses. - properties: - type: - const: image - default: image - title: Type - type: string - image: - format: binary - title: Image - type: string - required: - - image - title: ImageDelta - type: object - TextDelta: - description: A text content delta for streaming responses. - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: TextDelta + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: VectorStoreModifyRequest type: object - MetricInResponse: - description: A metric value included in API responses. + VectorStoreSearchRequest: + description: Request to search a vector store. properties: - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: + query: anyOf: - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + max_num_results: + default: 10 + title: Max Num Results + type: integer + ranking_options: + anyOf: + - additionalProperties: true + type: object - type: 'null' nullable: true + rewrite_query: + default: false + title: Rewrite Query + type: boolean required: - - metric - - value - title: MetricInResponse + - query + title: VectorStoreSearchRequest type: object DialogType: description: Parameter type for dialog data with semantic output labels. @@ -9206,6 +9562,45 @@ components: type: string title: DialogType type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true + type: object + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage + type: object ConversationItemCreateRequest: description: Request body for creating conversation items. properties: @@ -9243,52 +9638,40 @@ components: title: OpenAIResponseOutputMessageMCPCall - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array - required: - - items - title: ConversationItemCreateRequest - type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. - properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status - type: string - type: - const: message - default: message - title: Type + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array + required: + - items + title: ConversationItemCreateRequest + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id type: string - object: - const: message - default: message - title: Object + provider_id: + title: Provider Id type: string + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL required: - - id - - content - - role - - status - title: ConversationMessage + - toolgroup_id + - provider_id + title: ToolGroupInput type: object Api: description: Enumeration of all available APIs in the Llama Stack system. @@ -9317,7 +9700,7 @@ components: - inspect title: Api type: string - InlineProviderSpec: + ProviderSpec: properties: api: $ref: '#/components/schemas/Api' @@ -9385,30 +9768,13 @@ components: type: string title: Deps type: array - container_image: - anyOf: - - type: string - - type: 'null' - description: |2 - - The container image to use for this implementation. If one is provided, pip_packages will be ignored. - If a provider depends on other providers, the dependencies MUST NOT specify a container image. - nullable: true - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true required: - api - provider_type - config_class - title: InlineProviderSpec + title: ProviderSpec type: object - ProviderSpec: + InlineProviderSpec: properties: api: $ref: '#/components/schemas/Api' @@ -9476,11 +9842,28 @@ components: type: string title: Deps type: array + container_image: + anyOf: + - type: string + - type: 'null' + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. + nullable: true + description: + anyOf: + - type: string + - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true required: - api - provider_type - config_class - title: ProviderSpec + title: InlineProviderSpec type: object RemoteProviderSpec: properties: @@ -9549,244 +9932,25 @@ components: items: type: string title: Deps - type: array - adapter_type: - description: Unique identifier for this adapter - title: Adapter Type - type: string - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true - required: - - api - - provider_type - - config_class - - adapter_type - title: RemoteProviderSpec - type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). - properties: - type: - const: bf16 - default: bf16 - title: Type - type: string - title: Bf16QuantizationConfig - type: object - EmbeddingsResponse: - description: Response containing generated embeddings. - properties: - embeddings: - items: - items: - type: number - type: array - title: Embeddings - type: array - required: - - embeddings - title: EmbeddingsResponse - type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. - properties: - type: - const: fp8_mixed - default: fp8_mixed - title: Type - type: string - title: Fp8QuantizationConfig - type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. - properties: - type: - const: int4_mixed - default: int4_mixed - title: Type - type: string - scheme: - anyOf: - - type: string - - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig - type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens - properties: - text_offset: - anyOf: - - items: - type: integer - type: array - - type: 'null' - nullable: true - token_logprobs: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - tokens: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - top_logprobs: - anyOf: - - items: - additionalProperties: - type: number - type: object - type: array - - type: 'null' - nullable: true - title: OpenAICompletionLogprobs - type: object - TokenLogProbs: - description: Log probabilities for generated tokens. - properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs - type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. - properties: - role: - const: tool - default: tool - title: Role - type: string - call_id: - title: Call Id - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - required: - - call_id - - content - title: ToolResponseMessage - type: object - UserMessage: - description: A message from the user in a chat conversation. - properties: - role: - const: user - default: user - title: Role + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: + description: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - type: 'null' - title: string | list[ImageContentItem | TextContentItem] + description: |2 + + A description of the provider. This is used to display in the documentation. nullable: true required: - - content - title: UserMessage + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec type: object PostTrainingJobLogStream: description: Stream of logs from a finetuning job. @@ -9853,120 +10017,235 @@ components: - logger_config title: PostTrainingRLHFRequest type: object - ToolGroupInput: - description: Input data for registering a tool group. + Span: + description: A span representing a single operation within a trace. properties: - toolgroup_id: - title: Toolgroup Id + span_id: + title: Span Id type: string - provider_id: - title: Provider Id + trace_id: + title: Trace Id type: string - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: + parent_span_id: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - type: string - type: 'null' nullable: true - title: URL - required: - - toolgroup_id - - provider_id - title: ToolGroupInput - type: object - VectorStoreCreateRequest: - description: Request to create a vector store. - properties: name: + title: Name + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: anyOf: - - type: string + - format: date-time + type: string - type: 'null' nullable: true - file_ids: - items: - type: string - title: File Ids - type: array - expires_after: + attributes: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true - chunking_strategy: + required: + - span_id + - trace_id + - name + - start_time + title: Span + type: object + Trace: + description: A trace representing the complete execution path of a request across multiple operations. + properties: + trace_id: + title: Trace Id + type: string + root_span_id: + title: Root Span Id + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: anyOf: - - additionalProperties: true - type: object + - format: date-time + type: string - type: 'null' nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - title: VectorStoreCreateRequest + required: + - trace_id + - root_span_id + - start_time + title: Trace type: object - VectorStoreModifyRequest: - description: Request to modify a vector store. + EventType: + description: The type of telemetry event being logged. + enum: + - unstructured_log + - structured_log + - metric + title: EventType + type: string + StructuredLogType: + description: The type of structured log event payload. + enum: + - span_start + - span_end + title: StructuredLogType + type: string + EvalTrace: + description: A trace record for evaluation purposes. properties: - name: + session_id: + title: Session Id + type: string + step: + title: Step + type: string + input: + title: Input + type: string + output: + title: Output + type: string + expected_output: + title: Expected Output + type: string + required: + - session_id + - step + - input + - output + - expected_output + title: EvalTrace + type: object + SpanWithStatus: + description: A span that includes status information. + properties: + span_id: + title: Span Id + type: string + trace_id: + title: Trace Id + type: string + parent_span_id: anyOf: - type: string - type: 'null' nullable: true - expires_after: + name: + title: Name + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: anyOf: - - additionalProperties: true - type: object + - format: date-time + type: string - type: 'null' nullable: true - metadata: + attributes: anyOf: - additionalProperties: true type: object - type: 'null' - nullable: true - title: VectorStoreModifyRequest - type: object - VectorStoreSearchRequest: - description: Request to search a vector store. - properties: - query: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - filters: + status: anyOf: - - additionalProperties: true - type: object + - $ref: '#/components/schemas/SpanStatus' + title: SpanStatus - type: 'null' nullable: true - max_num_results: - default: 10 - title: Max Num Results + title: SpanStatus + required: + - span_id + - trace_id + - name + - start_time + title: SpanWithStatus + type: object + QueryConditionOp: + description: Comparison operators for query conditions. + enum: + - eq + - ne + - gt + - lt + title: QueryConditionOp + type: string + QueryCondition: + description: A condition for filtering query results. + properties: + key: + title: Key + type: string + op: + $ref: '#/components/schemas/QueryConditionOp' + value: + title: Value + required: + - key + - op + - value + title: QueryCondition + type: object + MetricLabel: + description: A label associated with a metric. + properties: + name: + title: Name + type: string + value: + title: Value + type: string + required: + - name + - value + title: MetricLabel + type: object + MetricDataPoint: + description: A single data point in a metric time series. + properties: + timestamp: + title: Timestamp type: integer - ranking_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - rewrite_query: - default: false - title: Rewrite Query - type: boolean + value: + title: Value + type: number + unit: + title: Unit + type: string required: - - query - title: VectorStoreSearchRequest + - timestamp + - value + - unit + title: MetricDataPoint + type: object + MetricSeries: + description: A time series of metric data points. + properties: + metric: + title: Metric + type: string + labels: + items: + $ref: '#/components/schemas/MetricLabel' + title: Labels + type: array + values: + items: + $ref: '#/components/schemas/MetricDataPoint' + title: Values + type: array + required: + - metric + - labels + - values + title: MetricSeries type: object responses: BadRequest400: diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index e3ae3f6118..6174e4c36f 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -49,11 +49,7 @@ paths: content: application/json: schema: - items: - additionalProperties: true - type: object - type: array - title: Rows + $ref: '#/components/schemas/AppendRowsRequest' required: true /v1beta/datasetio/iterrows/{dataset_id}: get: @@ -182,17 +178,17 @@ paths: schema: $ref: '#/components/schemas/ListBenchmarksResponse' '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' tags: - Benchmarks summary: List Benchmarks @@ -268,7 +264,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest' + $ref: '#/components/schemas/EvaluateRowsRequest' required: true /v1alpha/eval/benchmarks/{benchmark_id}/jobs: post: @@ -454,7 +450,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1AlphaInferenceRerankPostRequest' + $ref: '#/components/schemas/RerankRequest' required: true /v1alpha/post-training/job/artifacts: get: @@ -498,29 +494,28 @@ paths: application/json: schema: {} '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' tags: - Post Training summary: Cancel Training Job description: Cancel a training job. operationId: cancel_training_job_v1alpha_post_training_job_cancel_post - parameters: - - name: job_uuid - in: query + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CancelTrainingJobRequest' required: true - schema: - type: string - title: Job Uuid /v1alpha/post-training/job/status: get: responses: @@ -610,7 +605,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1AlphaPostTrainingPreferenceOptimizePostRequest' + $ref: '#/components/schemas/PreferenceOptimizeRequest' required: true /v1alpha/post-training/supervised-fine-tune: post: @@ -642,7 +637,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1AlphaPostTrainingSupervisedFineTunePostRequest' + $ref: '#/components/schemas/SupervisedFineTuneRequest' required: true components: schemas: @@ -669,212 +664,6 @@ components: - detail title: Error type: object - ListBatchesResponse: - properties: - object: - type: string - const: list - title: Object - default: list - data: - items: - $ref: '#/components/schemas/Batch' - type: array - title: Data - description: List of batch objects - first_id: - anyOf: - - type: string - - type: 'null' - description: ID of the first batch in the list - last_id: - anyOf: - - type: string - - type: 'null' - description: ID of the last batch in the list - has_more: - type: boolean - title: Has More - description: Whether there are more batches available - default: false - type: object - required: - - data - title: ListBatchesResponse - description: Response containing a list of batch objects. - 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: - anyOf: - - type: integer - - type: 'null' - cancelling_at: - anyOf: - - type: integer - - type: 'null' - completed_at: - anyOf: - - type: integer - - type: 'null' - error_file_id: - anyOf: - - type: string - - type: 'null' - errors: - anyOf: - - $ref: '#/components/schemas/Errors' - title: Errors - - type: 'null' - title: Errors - expired_at: - anyOf: - - type: integer - - type: 'null' - expires_at: - anyOf: - - type: integer - - type: 'null' - failed_at: - anyOf: - - type: integer - - type: 'null' - finalizing_at: - anyOf: - - type: integer - - type: 'null' - in_progress_at: - anyOf: - - type: integer - - type: 'null' - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - model: - anyOf: - - type: string - - type: 'null' - output_file_id: - anyOf: - - type: string - - type: 'null' - request_counts: - anyOf: - - $ref: '#/components/schemas/BatchRequestCounts' - title: BatchRequestCounts - - type: 'null' - title: BatchRequestCounts - usage: - anyOf: - - $ref: '#/components/schemas/BatchUsage' - title: BatchUsage - - type: 'null' - title: BatchUsage - additionalProperties: true - type: object - required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - ListOpenAIChatCompletionResponse: - properties: - data: - items: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: - type: string - title: First Id - last_id: - type: string - title: Last Id - object: - type: string - const: list - title: Object - default: list - type: object - required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIChatCompletionResponse - description: Response from listing OpenAI-compatible chat completions. - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - nullable: true - name: - anyOf: - - type: string - - type: 'null' - nullable: true - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - nullable: true - title: OpenAIAssistantMessageParam - type: object OpenAIChatCompletionContentPartImageParam: properties: type: @@ -889,21 +678,6 @@ components: - image_url title: OpenAIChatCompletionContentPartImageParam description: Image content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: properties: type: @@ -919,8047 +693,1098 @@ components: - text title: OpenAIChatCompletionContentPartTextParam description: Text content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionToolCall: + OpenAIImageURL: properties: - index: - anyOf: - - type: integer - - type: 'null' - id: - anyOf: - - type: string - - type: 'null' - type: + url: type: string - const: function - title: Type - default: function - function: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - title: OpenAIChatCompletionToolCallFunction - - type: 'null' - title: OpenAIChatCompletionToolCallFunction - type: object - title: OpenAIChatCompletionToolCall - description: Tool call specification for OpenAI-compatible chat completion responses. - OpenAIChatCompletionToolCallFunction: - properties: - name: - anyOf: - - type: string - - type: 'null' - arguments: + title: Url + detail: anyOf: - type: string - type: 'null' type: object - title: OpenAIChatCompletionToolCallFunction - description: Function call details for OpenAI-compatible tool calls. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' - title: OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - title: OpenAIChatCompletionUsagePromptTokensDetails - completion_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' - title: OpenAIChatCompletionUsageCompletionTokensDetails - - type: 'null' - title: OpenAIChatCompletionUsageCompletionTokensDetails - type: object required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - description: Usage information for OpenAI chat completion. - OpenAIChoice: + - url + title: OpenAIImageURL + description: Image URL specification for OpenAI-compatible chat completion messages. + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: Types of aggregation functions for scoring results. + BasicScoringFnParams: properties: - message: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' - title: OpenAIUserMessageParam-Output - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' - title: OpenAIAssistantMessageParam-Output - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam-Output | ... (5 variants) - 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: type: string - title: Finish Reason - index: - type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs - - type: 'null' - title: OpenAIChoiceLogprobs - type: object - required: - - message - - finish_reason - - index - title: OpenAIChoice - description: A choice from an OpenAI-compatible chat completion response. - OpenAIChoiceLogprobs: - properties: - content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' - refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' + 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: OpenAIChoiceLogprobs - description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. - OpenAIDeveloperMessageParam: + title: BasicScoringFnParams + description: Parameters for basic scoring function configuration. + LLMAsJudgeScoringFnParams: properties: - role: + type: type: string - const: developer - title: Role - default: developer - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: + const: llm_as_judge + title: Type + default: llm_as_judge + judge_model: + type: string + title: Judge Model + prompt_template: anyOf: - type: string - type: 'null' + 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: - - content - title: OpenAIDeveloperMessageParam - description: A message from the developer in an OpenAI-compatible chat completion request. - OpenAIFile: + - judge_model + title: LLMAsJudgeScoringFnParams + description: Parameters for LLM-as-judge scoring function configuration. + RegexParserScoringFnParams: properties: type: type: string - const: file + const: regex_parser title: Type - default: file - file: - $ref: '#/components/schemas/OpenAIFileFile' - type: object - required: - - file - title: OpenAIFile - OpenAIFileFile: - properties: - file_data: - anyOf: - - type: string - - type: 'null' - file_id: - anyOf: - - type: string - - type: 'null' - filename: - anyOf: - - type: string - - type: 'null' + 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: OpenAIFileFile - OpenAIImageURL: + title: RegexParserScoringFnParams + description: Parameters for regex parser scoring function configuration. + ScoringResult: properties: - url: - type: string - title: Url - detail: - anyOf: - - type: string - - type: 'null' + score_rows: + items: + additionalProperties: true + type: object + type: array + title: Score Rows + aggregated_results: + additionalProperties: true + type: object + title: Aggregated Results type: object required: - - url - title: OpenAIImageURL - description: Image URL specification for OpenAI-compatible chat completion messages. - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) - OpenAISystemMessageParam: + - score_rows + - aggregated_results + title: ScoringResult + description: A scoring result for a single row. + TextContentItem: properties: - role: + type: type: string - const: system - title: Role - default: system - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - type: object - required: - - content - title: OpenAISystemMessageParam - description: A system message providing instructions or context to the model. - OpenAITokenLogProb: - properties: - token: + const: text + title: Type + default: text + text: type: string - title: Token - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - logprob: - type: number - title: Logprob - top_logprobs: - items: - $ref: '#/components/schemas/OpenAITopLogProb' - type: array - title: Top Logprobs + title: Text type: object required: - - token - - logprob - - top_logprobs - title: 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 - OpenAIToolMessageParam: + - text + title: TextContentItem + description: A text content item + URL: properties: - role: - type: string - const: tool - title: Role - default: tool - tool_call_id: + uri: type: string - title: Tool Call Id - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - title: string | list[OpenAIChatCompletionContentPartTextParam] + title: Uri 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. - OpenAITopLogProb: + - uri + title: URL + description: A URL reference to external content. + AppendRowsRequest: properties: - token: - type: string - title: Token - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - logprob: - type: number - title: Logprob + rows: + items: + additionalProperties: true + type: object + type: array + title: Rows type: object required: - - token - - logprob - title: 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 - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. + - rows + title: AppendRowsRequest + PaginatedResponse: 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' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: + data: + items: + additionalProperties: true + type: object + type: array + title: Data + has_more: + type: boolean + title: Has More + url: anyOf: - type: string - type: 'null' - nullable: true - required: - - content - title: OpenAIUserMessageParam type: object - OpenAIJSONSchema: + required: + - data + - has_more + title: PaginatedResponse + description: A generic paginated response that follows a simple format. + Dataset: properties: - name: + identifier: type: string - title: Name - description: + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: anyOf: - type: string - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - title: OpenAIJSONSchema - description: JSON schema specification for OpenAI-compatible structured response format. - OpenAIResponseFormatJSONObject: - properties: + description: Unique identifier for this resource in the provider + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource type: type: string - const: json_object + const: dataset title: Type - default: json_object + default: dataset + purpose: + $ref: '#/components/schemas/DatasetPurpose' + source: + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + 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 - title: OpenAIResponseFormatJSONObject - description: JSON object response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatJSONSchema: + required: + - identifier + - provider_id + - purpose + - source + title: Dataset + description: Dataset resource for storing and accessing training or evaluation data. + RowsDataSource: properties: type: type: string - const: json_schema + const: rows title: Type - default: json_schema - json_schema: - $ref: '#/components/schemas/OpenAIJSONSchema' + default: rows + rows: + items: + additionalProperties: true + type: object + type: array + title: Rows type: object required: - - json_schema - title: OpenAIResponseFormatJSONSchema - description: JSON schema response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatParam: - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - OpenAIResponseFormatText: + - rows + title: RowsDataSource + description: A dataset stored in rows. + URIDataSource: properties: type: type: string - const: text + const: uri title: Type - default: text + default: uri + uri: + type: string + title: Uri type: object - title: OpenAIResponseFormatText - description: Text response format for OpenAI-compatible chat completion requests. - OpenAIChatCompletionRequestWithExtraBody: + required: + - uri + title: URIDataSource + description: A dataset that can be obtained from a URI. + ListDatasetsResponse: properties: - model: - type: string - title: Model - messages: + data: items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' - title: OpenAIUserMessageParam-Input - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' - title: OpenAIAssistantMessageParam-Input - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: 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' - title: OpenAIUserMessageParam-Input | ... (5 variants) + $ref: '#/components/schemas/Dataset' type: array - minItems: 1 - title: Messages - frequency_penalty: - anyOf: - - type: number - - type: 'null' - function_call: + title: Data + type: object + required: + - data + title: ListDatasetsResponse + description: Response from listing datasets. + Benchmark: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: anyOf: - type: string - - additionalProperties: true - type: object - - type: 'null' - title: string | object - functions: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - logit_bias: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - logprobs: - anyOf: - - type: boolean - type: 'null' - max_completion_tokens: - anyOf: - - type: integer - - type: 'null' - max_tokens: - anyOf: - - type: integer - - type: 'null' - n: - anyOf: - - type: integer - - type: 'null' - parallel_tool_calls: - anyOf: - - type: boolean - - type: 'null' - presence_penalty: - anyOf: - - type: number - - type: 'null' - response_format: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - discriminator: - propertyName: type - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject - - type: 'null' - title: Response Format - seed: - anyOf: - - type: integer - - type: 'null' - stop: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - type: 'null' - title: string | list[string] - stream: - anyOf: - - type: boolean - - type: 'null' - stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - temperature: - anyOf: - - type: number - - type: 'null' - tool_choice: - anyOf: - - type: string - - additionalProperties: true - type: object - - type: 'null' - title: string | object - tools: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - top_logprobs: - anyOf: - - type: integer - - type: 'null' - top_p: - anyOf: - - type: number - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object - required: - - model - - messages - title: OpenAIChatCompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible chat completion endpoint. - OpenAIChatCompletion: - properties: - id: - type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAIChoice' - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - title: OpenAIChatCompletionUsage - type: object - required: - - id - - choices - - created - - model - title: OpenAIChatCompletion - description: Response from an OpenAI-compatible chat completion request. - OpenAIChatCompletionChunk: - description: Chunk from a streaming response to an OpenAI-compatible chat completion request. - properties: - id: - title: Id - type: string - choices: - items: - $ref: '#/components/schemas/OpenAIChunkChoice' - title: Choices - type: array - object: - const: chat.completion.chunk - default: chat.completion.chunk - title: Object - type: string - created: - title: Created - type: integer - model: - title: Model - type: string - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - nullable: true - title: OpenAIChatCompletionUsage - required: - - id - - choices - - created - - model - title: OpenAIChatCompletionChunk - type: object - OpenAIChoiceDelta: - description: A delta from an OpenAI-compatible chat completion streaming response. - properties: - content: - anyOf: - - type: string - - type: 'null' - nullable: true - refusal: - anyOf: - - type: string - - type: 'null' - nullable: true - role: - anyOf: - - type: string - - type: 'null' - nullable: true - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - nullable: true - reasoning_content: - anyOf: - - type: string - - type: 'null' - nullable: true - title: OpenAIChoiceDelta - type: object - OpenAIChunkChoice: - description: A chunk choice from an OpenAI-compatible chat completion streaming response. - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs - - type: 'null' - nullable: true - title: OpenAIChoiceLogprobs - required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice - type: object - OpenAICompletionWithInputMessages: - properties: - id: - type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAIChoice' - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - title: OpenAIChatCompletionUsage - - type: 'null' - title: OpenAIChatCompletionUsage - input_messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' - title: OpenAIUserMessageParam-Output - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' - title: OpenAIAssistantMessageParam-Output - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - 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' - title: OpenAIUserMessageParam-Output | ... (5 variants) - type: array - title: Input Messages - type: object - required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - OpenAICompletionRequestWithExtraBody: - properties: - model: - type: string - title: Model - prompt: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - items: - type: integer - type: array - title: list[integer] - - items: - items: - type: integer - type: array - type: array - title: list[array] - title: string | ... (4 variants) - best_of: - anyOf: - - type: integer - - type: 'null' - echo: - anyOf: - - type: boolean - - type: 'null' - frequency_penalty: - anyOf: - - type: number - - type: 'null' - logit_bias: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - logprobs: - anyOf: - - type: boolean - - type: 'null' - max_tokens: - anyOf: - - type: integer - - type: 'null' - n: - anyOf: - - type: integer - - type: 'null' - presence_penalty: - anyOf: - - type: number - - type: 'null' - seed: - anyOf: - - type: integer - - type: 'null' - stop: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - - type: 'null' - title: string | list[string] - stream: - anyOf: - - type: boolean - - type: 'null' - stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - temperature: - anyOf: - - type: number - - type: 'null' - top_p: - anyOf: - - type: number - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - suffix: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object - required: - - model - - prompt - title: OpenAICompletionRequestWithExtraBody - description: Request parameters for OpenAI-compatible completion endpoint. - OpenAICompletion: - properties: - id: - type: string - title: Id - choices: - items: - $ref: '#/components/schemas/OpenAICompletionChoice' - 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. - - :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" - OpenAICompletionChoice: - properties: - finish_reason: - type: string - title: Finish Reason - text: - type: string - title: Text - index: - type: integer - title: Index - logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - title: OpenAIChoiceLogprobs - - type: 'null' - title: OpenAIChoiceLogprobs - type: object - required: - - finish_reason - - text - - index - title: 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 - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - 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. - 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. - 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 - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - 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. - 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: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' - type: object - required: - - call_id - - output - title: OpenAIResponseInputFunctionToolCallOutput - description: This represents the output of a function call that gets passed back to the model. - OpenAIResponseInputMessageContent: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - OpenAIResponseInputMessageContentFile: - properties: - type: - type: string - const: input_file - title: Type - default: input_file - file_data: - anyOf: - - type: string - - type: 'null' - file_id: - anyOf: - - type: string - - type: 'null' - file_url: - anyOf: - - type: string - - type: 'null' - filename: - anyOf: - - type: string - - type: 'null' - type: object - title: OpenAIResponseInputMessageContentFile - description: File content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentImage: - properties: - detail: - title: Detail - default: auto - type: string - enum: - - low - - high - - auto - type: - type: string - const: input_image - title: Type - default: input_image - file_id: - anyOf: - - type: string - - type: 'null' - image_url: - anyOf: - - type: string - - type: 'null' - type: object - title: OpenAIResponseInputMessageContentImage - description: Image content for input messages in OpenAI response format. - 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. - 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: - anyOf: - - type: string - - type: 'null' - reason: - anyOf: - - type: string - - type: 'null' - type: object - required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse - description: A response to an MCP approval request. - 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' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - const: message - default: message - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - nullable: true - status: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - content - - role - title: OpenAIResponseMessage - type: object - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - 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' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: 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' - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - 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: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' - type: array - - type: 'null' - type: object - required: - - id - - queries - - status - title: OpenAIResponseOutputMessageFileSearchToolCall - description: File search tool call output message for OpenAI responses. - 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: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' - type: object - required: - - call_id - - name - - arguments - title: OpenAIResponseOutputMessageFunctionToolCall - description: Function tool call output message for OpenAI responses. - 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: - anyOf: - - type: string - - type: 'null' - output: - anyOf: - - type: string - - type: 'null' - type: object - required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - description: Model Context Protocol (MCP) call output message for OpenAI responses. - 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. - 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. - 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: - 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. - 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. - type: object - required: - - id - - created_at - title: Conversation - description: OpenAI-compatible conversation object. - ConversationDeletedResource: - properties: - id: - type: string - title: Id - description: The deleted conversation identifier - object: - type: string - title: Object - description: Object type - default: conversation.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true - type: object - required: - - id - title: ConversationDeletedResource - description: Response for deleted conversation. - ConversationItemList: - properties: - object: - type: string - title: Object - description: Object type - default: list - data: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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' - title: OpenAIResponseMessage-Output | ... (9 variants) - type: array - title: Data - description: List of conversation items - first_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the first item in the list - last_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the last item in the list - 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. - ConversationItemDeletedResource: - properties: - id: - type: string - title: Id - description: The deleted item identifier - object: - type: string - title: Object - description: Object type - default: conversation.item.deleted - deleted: - type: boolean - title: Deleted - description: Whether the object was deleted - default: true - type: object - required: - - id - title: ConversationItemDeletedResource - description: Response for deleted conversation item. - OpenAIEmbeddingsRequestWithExtraBody: - properties: - model: - type: string - title: Model - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - encoding_format: - anyOf: - - type: string - - type: 'null' - default: float - dimensions: - anyOf: - - type: integer - - type: 'null' - user: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object - required: - - model - - input - title: OpenAIEmbeddingsRequestWithExtraBody - description: Request parameters for OpenAI-compatible embeddings endpoint. - OpenAIEmbeddingData: - properties: - object: - type: string - const: embedding - title: Object - default: embedding - embedding: - anyOf: - - items: - type: number - type: array - title: list[number] - - type: string - title: list[number] | string - index: - type: integer - title: Index - type: object - required: - - embedding - - index - title: OpenAIEmbeddingData - description: A single embedding data object from an OpenAI-compatible embeddings response. - 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. - 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. - OpenAIFilePurpose: - type: string - enum: - - assistants - - batch - title: OpenAIFilePurpose - description: Valid purpose values for OpenAI Files API. - ListOpenAIFileResponse: - properties: - data: - items: - $ref: '#/components/schemas/OpenAIFileObject' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: - type: string - title: First Id - last_id: - type: string - title: Last Id - object: - type: string - const: list - title: Object - default: list - type: object - required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIFileResponse - description: Response for listing files in OpenAI Files API. - 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. - ExpiresAfter: - properties: - anchor: - type: string - const: created_at - title: Anchor - seconds: - type: integer - maximum: 2592000.0 - minimum: 3600.0 - title: Seconds - type: object - required: - - anchor - - seconds - title: 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) - OpenAIFileDeleteResponse: - properties: - id: - type: string - title: Id - object: - type: string - const: file - title: Object - default: file - deleted: - type: boolean - title: Deleted - type: object - required: - - id - - deleted - title: OpenAIFileDeleteResponse - description: Response for deleting a file in OpenAI Files API. - HealthInfo: - properties: - status: - $ref: '#/components/schemas/HealthStatus' - type: object - required: - - status - title: HealthInfo - description: Health status information for the service. - 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. - 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. - OpenAIModel: - properties: - id: - type: string - title: Id - object: - type: string - const: model - title: Object - default: model - created: - type: integer - title: Created - owned_by: - type: string - title: Owned By - custom_metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - id - - created - - owned_by - title: OpenAIModel - description: |- - A model from OpenAI. - - :id: The ID of the model - :object: The object type, which will be "model" - :created: The Unix timestamp in seconds when the model was created - :owned_by: The owner of the model - :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata - OpenAIListModelsResponse: - properties: - data: - items: - $ref: '#/components/schemas/OpenAIModel' - type: array - title: Data - type: object - required: - - data - title: OpenAIListModelsResponse - Model: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - 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. - ModelType: - type: string - enum: - - llm - - embedding - - rerank - title: ModelType - description: Enumeration of supported model types in Llama Stack. - 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. - ModerationObjectResults: - properties: - flagged: - type: boolean - title: Flagged - categories: - anyOf: - - additionalProperties: - type: boolean - type: object - - type: 'null' - category_applied_input_types: - anyOf: - - additionalProperties: - items: - type: string - type: array - type: object - - type: 'null' - category_scores: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' - user_message: - anyOf: - - type: string - - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - type: object - required: - - flagged - title: ModerationObjectResults - description: A moderation object. - Prompt: - properties: - prompt: - anyOf: - - type: string - - type: 'null' - description: The system prompt with variable placeholders - 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. - ListPromptsResponse: - properties: - data: - items: - $ref: '#/components/schemas/Prompt' - type: array - title: Data - type: object - required: - - data - title: ListPromptsResponse - description: Response model to list prompts. - 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. - 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. - ListOpenAIResponseObject: - properties: - data: - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - type: array - title: Data - has_more: - type: boolean - title: Has More - first_id: - type: string - title: First Id - last_id: - type: string - title: Last Id - object: - type: string - const: list - title: Object - default: list - type: object - required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject - description: Paginated list of OpenAI response objects with navigation metadata. - 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. - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage - 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: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - max_num_results: - anyOf: - - type: integer - maximum: 50.0 - minimum: 1.0 - - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - title: SearchRankingOptions - type: object - required: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch - description: File search tool configuration for OpenAI response inputs. - OpenAIResponseInputToolFunction: - properties: - type: - type: string - const: function - title: Type - default: function - name: - type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - parameters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - type: object - required: - - name - - parameters - title: OpenAIResponseInputToolFunction - description: Function tool configuration for OpenAI response inputs. - OpenAIResponseInputToolWebSearch: - properties: - type: - title: Type - default: web_search - type: string - enum: - - web_search - - web_search_preview - - web_search_preview_2025_03_11 - - web_search_2025_08_26 - search_context_size: - anyOf: - - type: string - pattern: ^low|medium|high$ - - type: 'null' - default: medium - type: object - title: OpenAIResponseInputToolWebSearch - description: Web search tool configuration for OpenAI response inputs. - OpenAIResponseObjectWithInput: - properties: - created_at: - type: integer - title: Created At - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - title: 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' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - type: array - title: Output - parallel_tool_calls: - type: boolean - title: Parallel Tool Calls - default: false - previous_response_id: - anyOf: - - type: string - - type: 'null' - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt - status: - type: string - title: Status - temperature: - anyOf: - - type: number - - type: 'null' - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - truncation: - anyOf: - - type: string - - type: 'null' - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - title: OpenAIResponseUsage - instructions: - anyOf: - - type: string - - type: 'null' - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - input: - items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output - type: array - title: Input - type: object - required: - - created_at - - id - - model - - output - - status - - input - title: OpenAIResponseObjectWithInput - description: OpenAI response object extended with input context information. - OpenAIResponseOutput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - OpenAIResponsePrompt: - properties: - id: - type: string - title: Id - variables: - anyOf: - - additionalProperties: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: object - - type: 'null' - version: - anyOf: - - type: string - - type: 'null' - type: object - required: - - id - title: OpenAIResponsePrompt - description: OpenAI compatible Prompt object that is used in OpenAI responses. - OpenAIResponseText: - properties: - format: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseTextFormat' - title: OpenAIResponseTextFormat - - type: 'null' - title: OpenAIResponseTextFormat - type: object - title: OpenAIResponseText - description: Text response configuration for OpenAI responses. - OpenAIResponseTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - 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 - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter - - type: 'null' - title: list[string] | AllowedToolsFilter - type: object - required: - - server_label - title: OpenAIResponseToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response object. - 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: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' - title: OpenAIResponseUsageInputTokensDetails - - type: 'null' - title: OpenAIResponseUsageInputTokensDetails - output_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' - title: OpenAIResponseUsageOutputTokensDetails - - type: 'null' - title: OpenAIResponseUsageOutputTokensDetails - type: object - required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - description: Usage information for OpenAI response. - ResponseGuardrailSpec: - description: Specification for a guardrail to apply during response generation. - properties: - type: - title: Type - type: string - required: - - type - title: ResponseGuardrailSpec - type: object - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - 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: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - authorization: - anyOf: - - type: string - - type: 'null' - require_approval: - anyOf: - - type: string - const: always - - type: string - const: never - - $ref: '#/components/schemas/ApprovalFilter' - title: ApprovalFilter - title: string | ApprovalFilter - default: never - allowed_tools: - anyOf: - - items: - type: string - type: array - title: list[string] - - $ref: '#/components/schemas/AllowedToolsFilter' - title: AllowedToolsFilter - - type: 'null' - title: list[string] | AllowedToolsFilter - type: object - required: - - server_label - - server_url - title: OpenAIResponseInputToolMCP - description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - OpenAIResponseObject: - properties: - created_at: - type: integer - title: Created At - error: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseError' - title: OpenAIResponseError - - type: 'null' - title: 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' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - type: array - title: Output - parallel_tool_calls: - type: boolean - title: Parallel Tool Calls - default: false - previous_response_id: - anyOf: - - type: string - - type: 'null' - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt - status: - type: string - title: Status - temperature: - anyOf: - - type: number - - type: 'null' - text: - $ref: '#/components/schemas/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - truncation: - anyOf: - - type: string - - type: 'null' - usage: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseUsage' - title: OpenAIResponseUsage - - type: 'null' - title: OpenAIResponseUsage - instructions: - anyOf: - - type: string - - type: 'null' - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - type: object - required: - - created_at - - id - - model - - output - - status - title: OpenAIResponseObject - description: Complete OpenAI response object containing generation results and metadata. - OpenAIResponseContentPartOutputText: - description: Text content within a streamed response part. - properties: - type: - const: output_text - default: output_text - title: Type - type: string - text: - title: Text - type: string - annotations: - items: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - title: Annotations - type: array - logprobs: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - nullable: true - required: - - text - title: OpenAIResponseContentPartOutputText - type: object - OpenAIResponseContentPartReasoningSummary: - description: Reasoning summary part in a streamed response. - properties: - type: - const: summary_text - default: summary_text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIResponseContentPartReasoningSummary - type: object - OpenAIResponseContentPartReasoningText: - description: Reasoning text emitted as part of a streamed response. - properties: - type: - const: reasoning_text - default: reasoning_text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIResponseContentPartReasoningText - type: object - OpenAIResponseObjectStream: - discriminator: - mapping: - response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' - title: OpenAIResponseObjectStreamResponseCreated - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' - title: OpenAIResponseObjectStreamResponseInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' - title: OpenAIResponseObjectStreamResponseOutputItemAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' - title: OpenAIResponseObjectStreamResponseOutputItemDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' - title: OpenAIResponseObjectStreamResponseOutputTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' - title: OpenAIResponseObjectStreamResponseOutputTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' - title: OpenAIResponseObjectStreamResponseMcpCallFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' - title: OpenAIResponseObjectStreamResponseContentPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' - title: OpenAIResponseObjectStreamResponseContentPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' - title: OpenAIResponseObjectStreamResponseReasoningTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' - title: OpenAIResponseObjectStreamResponseRefusalDelta - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' - title: OpenAIResponseObjectStreamResponseRefusalDone - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' - title: OpenAIResponseObjectStreamResponseIncomplete - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' - title: OpenAIResponseObjectStreamResponseFailed - - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' - title: OpenAIResponseObjectStreamResponseCompleted - title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) - OpenAIResponseObjectStreamResponseCompleted: - description: Streaming event indicating a response has been completed. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.completed - default: response.completed - title: Type - type: string - required: - - response - title: OpenAIResponseObjectStreamResponseCompleted - type: object - OpenAIResponseObjectStreamResponseContentPartAdded: - description: Streaming event for when a new content part is added to a response item. - properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer - type: - const: response.content_part.added - default: response.content_part.added - title: Type - type: string - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartAdded - type: object - OpenAIResponseObjectStreamResponseContentPartDone: - description: Streaming event for when a content part is completed. - properties: - content_index: - title: Content Index - type: integer - response_id: - title: Response Id - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - sequence_number: - title: Sequence Number - type: integer - type: - const: response.content_part.done - default: response.content_part.done - title: Type - type: string - required: - - content_index - - response_id - - item_id - - output_index - - part - - sequence_number - title: OpenAIResponseObjectStreamResponseContentPartDone - type: object - OpenAIResponseObjectStreamResponseCreated: - description: Streaming event indicating a new response has been created. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - type: - const: response.created - default: response.created - title: Type - type: string - required: - - response - title: OpenAIResponseObjectStreamResponseCreated - type: object - OpenAIResponseObjectStreamResponseFailed: - description: Streaming event emitted when a response fails. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.failed - default: response.failed - title: Type - type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseFailed - type: object - OpenAIResponseObjectStreamResponseFileSearchCallCompleted: - description: Streaming event for completed file search calls. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.completed - default: response.file_search_call.completed - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted - type: object - OpenAIResponseObjectStreamResponseFileSearchCallInProgress: - description: Streaming event for file search calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.in_progress - default: response.file_search_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress - type: object - OpenAIResponseObjectStreamResponseFileSearchCallSearching: - description: Streaming event for file search currently searching. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.file_search_call.searching - default: response.file_search_call.searching - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFileSearchCallSearching - type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: - description: Streaming event for incremental function call argument updates. - properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.delta - default: response.function_call_arguments.delta - title: Type - type: string - required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta - type: object - OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: - description: Streaming event for when function call arguments are completed. - properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.function_call_arguments.done - default: response.function_call_arguments.done - title: Type - type: string - required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone - type: object - OpenAIResponseObjectStreamResponseInProgress: - description: Streaming event indicating the response remains in progress. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.in_progress - default: response.in_progress - title: Type - type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseInProgress - type: object - OpenAIResponseObjectStreamResponseIncomplete: - description: Streaming event emitted when a response ends in an incomplete state. - properties: - response: - $ref: '#/components/schemas/OpenAIResponseObject' - sequence_number: - title: Sequence Number - type: integer - type: - const: response.incomplete - default: response.incomplete - title: Type - type: string - required: - - response - - sequence_number - title: OpenAIResponseObjectStreamResponseIncomplete - type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: - properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.delta - default: response.mcp_call.arguments.delta - title: Type - type: string - required: - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta - type: object - OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: - properties: - arguments: - title: Arguments - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.arguments.done - default: response.mcp_call.arguments.done - title: Type - type: string - required: - - arguments - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone - type: object - OpenAIResponseObjectStreamResponseMcpCallCompleted: - description: Streaming event for completed MCP calls. - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.completed - default: response.mcp_call.completed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallCompleted - type: object - OpenAIResponseObjectStreamResponseMcpCallFailed: - description: Streaming event for failed MCP calls. - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.failed - default: response.mcp_call.failed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallFailed - type: object - OpenAIResponseObjectStreamResponseMcpCallInProgress: - description: Streaming event for MCP calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_call.in_progress - default: response.mcp_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpCallInProgress - type: object - OpenAIResponseObjectStreamResponseMcpListToolsCompleted: - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.completed - default: response.mcp_list_tools.completed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted - type: object - OpenAIResponseObjectStreamResponseMcpListToolsFailed: - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.failed - default: response.mcp_list_tools.failed - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsFailed - type: object - OpenAIResponseObjectStreamResponseMcpListToolsInProgress: - properties: - sequence_number: - title: Sequence Number - type: integer - type: - const: response.mcp_list_tools.in_progress - default: response.mcp_list_tools.in_progress - title: Type - type: string - required: - - sequence_number - title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress - type: object - OpenAIResponseObjectStreamResponseOutputItemAdded: - description: Streaming event for when a new output item is added to the response. - properties: - response_id: - title: Response Id - type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.added - default: response.output_item.added - title: Type - type: string - required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemAdded - type: object - OpenAIResponseObjectStreamResponseOutputItemDone: - description: Streaming event for when an output item is completed. - properties: - response_id: - title: Response Id - type: string - item: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_item.done - default: response.output_item.done - title: Type - type: string - required: - - response_id - - item - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputItemDone - type: object - OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: - description: Streaming event for when an annotation is added to output text. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - content_index: - title: Content Index - type: integer - annotation_index: - title: Annotation Index - type: integer - annotation: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.annotation.added - default: response.output_text.annotation.added - title: Type - type: string - required: - - item_id - - output_index - - content_index - - annotation_index - - annotation - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded - type: object - OpenAIResponseObjectStreamResponseOutputTextDelta: - description: Streaming event for incremental text content updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.delta - default: response.output_text.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDelta - type: object - OpenAIResponseObjectStreamResponseOutputTextDone: - description: Streaming event for when text output is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.output_text.done - default: response.output_text.done - title: Type - type: string - required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseOutputTextDone - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: - description: Streaming event for when a new reasoning summary part is added. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.added - default: response.reasoning_summary_part.added - title: Type - type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: - description: Streaming event for when a reasoning summary part is completed. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - part: - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_part.done - default: response.reasoning_summary_part.done - title: Type - type: string - required: - - item_id - - output_index - - part - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: - description: Streaming event for incremental reasoning summary text updates. - properties: - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.delta - default: response.reasoning_summary_text.delta - title: Type - type: string - required: - - delta - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta - type: object - OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: - description: Streaming event for when reasoning summary text is completed. - properties: - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - summary_index: - title: Summary Index - type: integer - type: - const: response.reasoning_summary_text.done - default: response.reasoning_summary_text.done - title: Type - type: string - required: - - text - - item_id - - output_index - - sequence_number - - summary_index - title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone - type: object - OpenAIResponseObjectStreamResponseReasoningTextDelta: - description: Streaming event for incremental reasoning text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.delta - default: response.reasoning_text.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDelta - type: object - OpenAIResponseObjectStreamResponseReasoningTextDone: - description: Streaming event for when reasoning text is completed. - properties: - content_index: - title: Content Index - type: integer - text: - title: Text - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.reasoning_text.done - default: response.reasoning_text.done - title: Type - type: string - required: - - content_index - - text - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseReasoningTextDone - type: object - OpenAIResponseObjectStreamResponseRefusalDelta: - description: Streaming event for incremental refusal text updates. - properties: - content_index: - title: Content Index - type: integer - delta: - title: Delta - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.delta - default: response.refusal.delta - title: Type - type: string - required: - - content_index - - delta - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDelta - type: object - OpenAIResponseObjectStreamResponseRefusalDone: - description: Streaming event for when refusal text is completed. - properties: - content_index: - title: Content Index - type: integer - refusal: - title: Refusal - type: string - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.refusal.done - default: response.refusal.done - title: Type - type: string - required: - - content_index - - refusal - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseRefusalDone - type: object - OpenAIResponseObjectStreamResponseWebSearchCallCompleted: - description: Streaming event for completed web search calls. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.completed - default: response.web_search_call.completed - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted - type: object - OpenAIResponseObjectStreamResponseWebSearchCallInProgress: - description: Streaming event for web search calls in progress. - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.in_progress - default: response.web_search_call.in_progress - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress - type: object - OpenAIResponseObjectStreamResponseWebSearchCallSearching: - properties: - item_id: - title: Item Id - type: string - output_index: - title: Output Index - type: integer - sequence_number: - title: Sequence Number - type: integer - type: - const: response.web_search_call.searching - default: response.web_search_call.searching - title: Type - type: string - required: - - item_id - - output_index - - sequence_number - title: OpenAIResponseObjectStreamResponseWebSearchCallSearching - type: object - OpenAIDeleteResponseObject: - properties: - id: - type: string - title: Id - object: - type: string - const: response - title: Object - default: response - deleted: - type: boolean - title: Deleted - default: true - type: object - required: - - id - title: OpenAIDeleteResponseObject - description: Response object confirming deletion of an OpenAI response. - ListOpenAIResponseInputItem: - properties: - data: - items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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' - title: OpenAIResponseMessage-Output | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Output' - title: OpenAIResponseMessage-Output - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output - type: array - title: Data - object: - type: string - const: list - title: Object - default: list - type: object - required: - - data - title: ListOpenAIResponseInputItem - description: List container for OpenAI response input items. - RunShieldResponse: - properties: - violation: - anyOf: - - $ref: '#/components/schemas/SafetyViolation' - title: SafetyViolation - - type: 'null' - title: SafetyViolation - type: object - title: RunShieldResponse - description: Response from running a safety shield. - SafetyViolation: - properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - user_message: - anyOf: - - type: string - - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - type: object - required: - - violation_level - title: SafetyViolation - description: Details of a safety violation detected by content moderation. - ViolationLevel: - type: string - enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: Types of aggregation functions for scoring results. - ArrayType: - properties: - type: - type: string - const: array - title: Type - default: array - type: object - title: ArrayType - description: Parameter type for array values. - 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. - BooleanType: - properties: - type: - type: string - const: boolean - title: Type - default: boolean - type: object - title: BooleanType - description: Parameter type for boolean values. - 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. - CompletionInputType: - properties: - type: - type: string - const: completion_input - title: Type - default: completion_input - type: object - title: CompletionInputType - description: Parameter type for completion input. - JsonType: - properties: - type: - type: string - const: json - title: Type - default: json - type: object - title: JsonType - description: Parameter type for JSON values. - LLMAsJudgeScoringFnParams: - properties: - type: - type: string - const: llm_as_judge - title: Type - default: llm_as_judge - judge_model: - type: string - title: Judge Model - prompt_template: - anyOf: - - type: string - - type: 'null' - 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. - NumberType: - properties: - type: - type: string - const: number - title: Type - default: number - type: object - title: NumberType - description: Parameter type for numeric values. - ObjectType: - properties: - type: - type: string - const: object - title: Type - default: object - type: object - title: ObjectType - description: Parameter type for object values. - 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. - ScoringFn: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - 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: - anyOf: - - type: string - - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - description: Any additional metadata for this definition - return_type: - oneOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - description: The return type of the deterministic function - discriminator: - propertyName: type - mapping: - 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: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: Params - description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval - type: object - required: - - identifier - - provider_id - - return_type - title: ScoringFn - description: A scoring function resource for evaluating model outputs. - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - StringType: - properties: - type: - type: string - const: string - title: Type - default: string - type: object - title: StringType - description: Parameter type for string values. - UnionType: - properties: - type: - type: string - const: union - title: Type - default: union - type: object - title: UnionType - description: Parameter type for union values. - ListScoringFunctionsResponse: - properties: - data: - items: - $ref: '#/components/schemas/ScoringFn' - type: array - title: Data - type: object - required: - - data - title: ListScoringFunctionsResponse - ScoreResponse: - properties: - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results - type: object - required: - - results - title: ScoreResponse - description: The response from scoring. - 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. - ScoreBatchResponse: - properties: - dataset_id: - anyOf: - - type: string - - type: 'null' - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results - type: object - required: - - results - title: ScoreBatchResponse - description: Response from batch scoring operations on datasets. - Shield: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - 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: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - identifier - - provider_id - title: Shield - description: A safety shield resource that can be used to check content. - ListShieldsResponse: - properties: - data: - items: - $ref: '#/components/schemas/Shield' - type: array - title: Data - type: object - required: - - data - title: ListShieldsResponse - ImageContentItem: - description: A image content item - properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/components/schemas/_URLOrData' - required: - - image - title: ImageContentItem - type: object - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - 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 - ToolInvocationResult: - properties: - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - type: array - title: list[ImageContentItem-Output | TextContentItem] - - type: 'null' - title: string | list[ImageContentItem-Output | TextContentItem] - error_message: - anyOf: - - type: string - - type: 'null' - error_code: - anyOf: - - type: integer - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - title: ToolInvocationResult - description: Result of a tool invocation. - URL: - properties: - uri: - type: string - title: Uri - type: object - required: - - uri - title: URL - description: A URL reference to external content. - ToolDef: - properties: - toolgroup_id: - anyOf: - - type: string - - type: 'null' - name: - type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - name - title: ToolDef - description: Tool definition used in runtime contexts. - ListToolDefsResponse: - properties: - data: - items: - $ref: '#/components/schemas/ToolDef' - type: array - title: Data - type: object - required: - - data - title: ListToolDefsResponse - description: Response containing a list of tool definitions. - ToolGroup: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - 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: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - identifier - - provider_id - title: ToolGroup - description: A group of related tools managed together. - 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. - Chunk: - description: A chunk of content that can be inserted into a vector database. - properties: - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id - type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - nullable: true - title: ChunkMetadata - required: - - content - - chunk_id - title: Chunk - type: object - ChunkMetadata: - properties: - chunk_id: - anyOf: - - type: string - - type: 'null' - document_id: - anyOf: - - type: string - - type: 'null' - source: - anyOf: - - type: string - - type: 'null' - created_timestamp: - anyOf: - - type: integer - - type: 'null' - updated_timestamp: - anyOf: - - type: integer - - type: 'null' - chunk_window: - anyOf: - - type: string - - type: 'null' - chunk_tokenizer: - anyOf: - - type: string - - type: 'null' - chunk_embedding_model: - anyOf: - - type: string - - type: 'null' - chunk_embedding_dimension: - anyOf: - - type: integer - - type: 'null' - content_token_count: - anyOf: - - type: integer - - type: 'null' - metadata_token_count: - anyOf: - - type: integer - - type: 'null' - type: object - title: 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. - 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. - 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. - VectorStoreListResponse: - properties: - object: - type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreObject' - type: array - title: Data - first_id: - anyOf: - - type: string - - type: 'null' - last_id: - anyOf: - - type: string - - type: 'null' - has_more: - type: boolean - title: Has More - default: false - type: object - required: - - data - title: VectorStoreListResponse - description: Response from listing vector stores. - VectorStoreObject: - properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store - created_at: - type: integer - title: Created At - name: - anyOf: - - type: string - - type: 'null' - usage_bytes: - type: integer - title: Usage Bytes - default: 0 - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - status: - type: string - title: Status - default: completed - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - expires_at: - anyOf: - - type: integer - - type: 'null' - last_active_at: - anyOf: - - type: integer - - type: 'null' - metadata: - additionalProperties: true - type: object - title: Metadata - type: object - required: - - id - - created_at - - file_counts - title: VectorStoreObject - description: OpenAI Vector Store object. - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - VectorStoreChunkingStrategyAuto: - properties: - type: - type: string - const: auto - title: Type - default: auto - type: object - title: VectorStoreChunkingStrategyAuto - description: Automatic chunking strategy for vector store files. - 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. - 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. - OpenAICreateVectorStoreRequestWithExtraBody: - properties: - name: - anyOf: - - type: string - - type: 'null' - file_ids: - anyOf: - - items: - type: string - type: array - - type: 'null' - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - additionalProperties: true - type: object - title: OpenAICreateVectorStoreRequestWithExtraBody - description: Request to create a vector store with extra_body support. - VectorStoreDeleteResponse: - properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store.deleted - deleted: - type: boolean - title: Deleted - default: true - type: object - required: - - id - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - OpenAICreateVectorStoreFileBatchRequestWithExtraBody: - properties: - file_ids: - items: - type: string - type: array - title: File Ids - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - additionalProperties: true - type: object - required: - - file_ids - title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody - description: Request to create a vector store file batch with extra_body support. - 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: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - 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. - VectorStoreFileStatus: - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - VectorStoreFileLastError: - properties: - code: - title: Code - type: string - enum: - - server_error - - rate_limit_exceeded - default: server_error - message: - type: string - title: Message - type: object - required: - - code - - message - title: VectorStoreFileLastError - description: Error information for failed vector store file processing. - 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' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - created_at: - type: integer - title: Created At - last_error: - anyOf: - - $ref: '#/components/schemas/VectorStoreFileLastError' - title: VectorStoreFileLastError - - type: 'null' - title: VectorStoreFileLastError - status: - title: Status - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed - 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. - VectorStoreFilesListInBatchResponse: - properties: - object: - type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - type: array - title: Data - first_id: - anyOf: - - type: string - - type: 'null' - last_id: - anyOf: - - type: string - - type: 'null' - has_more: - type: boolean - title: Has More - default: false - type: object - required: - - data - title: VectorStoreFilesListInBatchResponse - description: Response from listing files in a vector store file batch. - VectorStoreListFilesResponse: - properties: - object: - type: string - title: Object - default: list - data: - items: - $ref: '#/components/schemas/VectorStoreFileObject' - type: array - title: Data - first_id: - anyOf: - - type: string - - type: 'null' - last_id: - anyOf: - - type: string - - type: 'null' - has_more: - type: boolean - title: Has More - default: false - type: object - required: - - data - title: VectorStoreListFilesResponse - description: Response from listing files in a vector store. - VectorStoreFileDeleteResponse: - properties: - id: - type: string - title: Id - object: - type: string - title: Object - default: vector_store.file.deleted - deleted: - type: boolean - title: Deleted - default: true - type: object - required: - - id - title: VectorStoreFileDeleteResponse - description: Response from deleting a vector store file. - VectorStoreContent: - properties: - type: - type: string - const: text - title: Type - text: - type: string - title: Text - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - title: ChunkMetadata - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - type - - text - title: VectorStoreContent - description: Content item from a vector store file or search result. - VectorStoreFileContentResponse: - properties: - object: - type: string - const: vector_store.file_content.page - title: Object - default: vector_store.file_content.page - data: - items: - $ref: '#/components/schemas/VectorStoreContent' - type: array - title: Data - has_more: - type: boolean - title: Has More - default: false - next_page: - anyOf: - - type: string - - type: 'null' - type: object - required: - - data - title: VectorStoreFileContentResponse - description: Represents the parsed content of a vector store file. - VectorStoreSearchResponse: - properties: - file_id: - type: string - title: File Id - filename: - type: string - title: Filename - score: - type: number - title: Score - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - title: string | number | boolean - type: object - - type: 'null' - 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. - VectorStoreSearchResponsePage: - properties: - object: - type: string - title: Object - default: vector_store.search_results.page - search_query: - items: - type: string - type: array - title: Search Query - data: - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - type: array - title: Data - has_more: - type: boolean - title: Has More - default: false - next_page: - anyOf: - - type: string - - type: 'null' - type: object - required: - - search_query - - data - title: VectorStoreSearchResponsePage - description: Paginated response from searching a vector store. - VersionInfo: - properties: - version: - type: string - title: Version - type: object - required: - - version - title: VersionInfo - description: Version information for the service. - PaginatedResponse: - properties: - data: - items: - additionalProperties: true - type: object - type: array - title: Data - has_more: - type: boolean - title: Has More - url: - anyOf: - - type: string - - type: 'null' - type: object - required: - - data - - has_more - title: PaginatedResponse - description: A generic paginated response that follows a simple format. - Dataset: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - 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' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - 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. - 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. - 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. - ListDatasetsResponse: - properties: - data: - items: - $ref: '#/components/schemas/Dataset' - type: array - title: Data - type: object - required: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - Benchmark: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: Unique identifier for this resource in the provider - 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. - ListBenchmarksResponse: - properties: - data: - items: - $ref: '#/components/schemas/Benchmark' - type: array - title: Data - type: object - required: - - data - title: ListBenchmarksResponse - BenchmarkConfig: - properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - scoring_params: - additionalProperties: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: object - title: Scoring Params - description: Map between scoring function id and parameters for each scoring function you want to run - num_examples: - anyOf: - - type: integer - - type: 'null' - description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - type: object - required: - - eval_candidate - title: BenchmarkConfig - description: A benchmark configuration for evaluation. - 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. - ModelCandidate: - properties: - type: - type: string - const: model - title: Type - default: model - model: - type: string - title: Model - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: - anyOf: - - $ref: '#/components/schemas/SystemMessage' - title: SystemMessage - - type: 'null' - title: SystemMessage - type: object - required: - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - SamplingParams: - properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - max_tokens: - anyOf: - - type: integer - - type: 'null' - repetition_penalty: - anyOf: - - type: number - - type: 'null' - default: 1.0 - stop: - anyOf: - - items: - type: string - type: array - - type: 'null' - type: object - title: SamplingParams - description: Sampling parameters. - SystemMessage: - properties: - role: - type: string - const: system - title: Role - default: system - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - type: object - required: - - content - title: SystemMessage - description: A system message providing instructions or context to the model. - 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. - TopPSamplingStrategy: - properties: - type: - type: string - const: top_p - title: Type - default: top_p - temperature: - anyOf: - - type: number - minimum: 0.0 - - type: 'null' - top_p: - anyOf: - - type: number - - type: 'null' - default: 0.95 - type: object - required: - - temperature - title: TopPSamplingStrategy - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. - 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. - 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. - 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. - RerankResponse: - properties: - data: - items: - $ref: '#/components/schemas/RerankData' - type: array - title: Data - type: object - required: - - data - title: RerankResponse - description: Response from a reranking request. - Checkpoint: - properties: - identifier: - type: string - title: Identifier - created_at: - type: string - format: date-time - title: Created At - epoch: - type: integer - title: Epoch - post_training_job_id: - type: string - title: Post Training Job Id - path: - type: string - title: Path - training_metrics: - anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' - title: PostTrainingMetric - - type: 'null' - title: PostTrainingMetric - type: object - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - PostTrainingJobArtifactsResponse: - properties: - job_uuid: - type: string - title: Job Uuid - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints - type: object - required: - - job_uuid - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingMetric: - properties: - epoch: - type: integer - title: Epoch - train_loss: - type: number - title: Train Loss - validation_loss: - type: number - title: Validation Loss - perplexity: - type: number - title: Perplexity - type: object - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: Training metrics captured during post-training jobs. - PostTrainingJobStatusResponse: - properties: - job_uuid: - type: string - title: Job Uuid - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - type: string - format: date-time - - type: 'null' - started_at: - anyOf: - - type: string - format: date-time - - type: 'null' - completed_at: - anyOf: - - type: string - format: date-time - - type: 'null' - resources_allocated: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints - type: object - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - ListPostTrainingJobsResponse: - properties: - data: - items: - $ref: '#/components/schemas/PostTrainingJob' - type: array - title: Data - type: object - required: - - data - title: ListPostTrainingJobsResponse - 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. - 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: - anyOf: - - type: string - - type: 'null' - packed: - anyOf: - - type: boolean - - type: 'null' - default: false - train_on_input: - anyOf: - - type: boolean - - type: 'null' - default: false - type: object - required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: Configuration for training data and data loading. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - EfficiencyConfig: - properties: - enable_activation_checkpointing: - anyOf: - - type: boolean - - type: 'null' - default: false - enable_activation_offloading: - anyOf: - - type: boolean - - type: 'null' - default: false - memory_efficient_fsdp_wrap: - anyOf: - - type: boolean - - type: 'null' - default: false - fsdp_cpu_offload: - anyOf: - - type: boolean - - type: 'null' - default: false - type: object - title: EfficiencyConfig - description: Configuration for memory and compute efficiency optimizations. - 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. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: Available optimizer algorithms for training. - 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: - anyOf: - - type: integer - - type: 'null' - default: 1 - data_config: - anyOf: - - $ref: '#/components/schemas/DataConfig' - title: DataConfig - - type: 'null' - title: DataConfig - optimizer_config: - anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - title: OptimizerConfig - - type: 'null' - title: OptimizerConfig - efficiency_config: - anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - title: EfficiencyConfig - - type: 'null' - title: EfficiencyConfig - dtype: - anyOf: - - type: string - - type: 'null' - default: bf16 - type: object - required: - - n_epochs - title: TrainingConfig - description: Comprehensive configuration for the training process. - PostTrainingJob: - properties: - job_uuid: - type: string - title: Job Uuid - type: object - required: - - job_uuid - title: PostTrainingJob - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - LoraFinetuningConfig: - properties: - type: - type: string - const: LoRA - title: Type - default: LoRA - lora_attn_modules: - items: - type: string - type: array - title: Lora Attn Modules - apply_lora_to_mlp: - type: boolean - title: Apply Lora To Mlp - apply_lora_to_output: - type: boolean - title: Apply Lora To Output - rank: - type: integer - title: Rank - alpha: - type: integer - title: Alpha - use_dora: - anyOf: - - type: boolean - - type: 'null' - default: false - quantize_base: - anyOf: - - type: boolean - - type: 'null' - default: false - type: object - required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - QATFinetuningConfig: - properties: - type: - type: string - const: QAT - title: Type - default: QAT - quantizer_name: - type: string - title: Quantizer Name - group_size: - type: integer - title: Group Size - type: object - required: - - quantizer_name - - group_size - title: QATFinetuningConfig - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - AllowedToolsFilter: - properties: - tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' - type: object - title: AllowedToolsFilter - description: Filter configuration for restricting which MCP tools can be used. - ApprovalFilter: - properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - type: object - title: ApprovalFilter - description: Filter configuration for MCP tool approval requirements. - BatchError: - properties: - code: - anyOf: - - type: string - - type: 'null' - line: - anyOf: - - type: integer - - type: 'null' - message: - anyOf: - - type: string - - type: 'null' - param: - anyOf: - - type: string - - type: 'null' - 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 - Chunk-Output: - properties: - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - type: array - title: list[ImageContentItem-Output | TextContentItem] - title: string | list[ImageContentItem-Output | TextContentItem] - chunk_id: - type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - title: ChunkMetadata - type: object - required: - - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - 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. - Errors: - properties: - data: - anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array - - type: 'null' - object: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object - title: Errors - 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 - 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 - InputTokensDetails: - properties: - cached_tokens: - type: integer - title: Cached Tokens - additionalProperties: true - type: object - required: - - cached_tokens - title: InputTokensDetails - JobStatus: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - description: Status of a job execution. - MCPListToolsTool: - properties: - input_schema: - additionalProperties: true - type: object - title: Input Schema - name: - type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - type: object - required: - - input_schema - - name - title: MCPListToolsTool - description: Tool definition returned by MCP list tools operation. - OpenAIAssistantMessageParam-Input: - properties: - role: - type: string - const: assistant - title: Role - default: assistant - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIAssistantMessageParam-Output: - properties: - role: - type: string - const: assistant - title: Role - default: assistant - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIChatCompletionUsageCompletionTokensDetails: - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - type: object - title: OpenAIChatCompletionUsageCompletionTokensDetails - description: Token details for output tokens in OpenAI chat completion usage. - OpenAIChatCompletionUsagePromptTokensDetails: - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - type: object - title: OpenAIChatCompletionUsagePromptTokensDetails - description: Token details for prompt tokens in OpenAI chat completion usage. - OpenAIResponseMessage-Output: - properties: - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - type: string - const: message - title: Type - default: message - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' - 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. - 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. - OpenAIResponseTextFormat: - properties: - type: - title: Type - type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - type: object - title: OpenAIResponseTextFormat - description: Configuration for Responses API text format. - OpenAIResponseUsageInputTokensDetails: - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - type: object - title: OpenAIResponseUsageInputTokensDetails - description: Token details for input tokens in OpenAI response usage. - OpenAIResponseUsageOutputTokensDetails: - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - type: object - title: OpenAIResponseUsageOutputTokensDetails - description: Token details for output tokens in OpenAI response usage. - OpenAIUserMessageParam-Input: - properties: - role: - type: string - const: user - title: Role - default: user - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: - anyOf: - - type: string - - type: 'null' - type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - OpenAIUserMessageParam-Output: - properties: - role: - type: string - const: user - title: Role - default: user - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: - anyOf: - - type: string - - type: 'null' - type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - OutputTokensDetails: - properties: - reasoning_tokens: - type: integer - title: Reasoning Tokens - additionalProperties: true - type: object - required: - - reasoning_tokens - title: OutputTokensDetails - SearchRankingOptions: - properties: - ranker: - anyOf: - - type: string - - type: 'null' - score_threshold: - anyOf: - - type: number - - type: 'null' - default: 0.0 - type: object - title: SearchRankingOptions - description: Options for ranking and filtering search results. - V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest: - properties: - input_rows: - items: - additionalProperties: true - type: object - type: array - title: Input Rows - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - type: object - required: - - input_rows - - scoring_functions - - benchmark_config - title: V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest - V1AlphaInferenceRerankPostRequest: - properties: - model: - type: string - title: Model - query: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - items: - items: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - type: array - title: Items - max_num_results: - anyOf: - - type: integer - - type: 'null' - type: object - required: - - model - - query - - items - title: V1AlphaInferenceRerankPostRequest - V1AlphaPostTrainingPreferenceOptimizePostRequest: - properties: - job_uuid: - type: string - title: Job Uuid - finetuned_model: - type: string - title: Finetuned Model - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - type: object - required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: V1AlphaPostTrainingPreferenceOptimizePostRequest - V1AlphaPostTrainingSupervisedFineTunePostRequest: - properties: - job_uuid: - type: string - title: Job Uuid - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - model: - anyOf: - - type: string - - type: 'null' - description: Model descriptor for training if not in provider config` - checkpoint_dir: - anyOf: - - type: string - - type: 'null' - algorithm_config: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - discriminator: - propertyName: type - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - title: LoraFinetuningConfig | QATFinetuningConfig - - type: 'null' - title: Algorithm Config - type: object - required: - - job_uuid - - training_config - - hyperparam_search_config - - logger_config - title: V1AlphaPostTrainingSupervisedFineTunePostRequest - _URLOrData: - properties: - url: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - type: object - title: _URLOrData - description: A URL or a base64 encoded string - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: + description: Unique identifier for this resource in the provider + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource type: - const: grammar - default: grammar + type: string + const: benchmark title: Type + default: benchmark + dataset_id: type: string - bnf: + title: Dataset Id + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + metadata: additionalProperties: true - title: Bnf type: object + title: Metadata + description: Metadata for this evaluation task + type: object required: - - bnf - title: GrammarResponseFormat + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark + description: A benchmark resource for evaluating model performance. + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + type: array + title: Data type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. + required: + - data + title: ListBenchmarksResponse + BenchmarkConfig: properties: - type: - const: json_schema - default: json_schema - title: Type - type: string - json_schema: - additionalProperties: true - title: Json Schema + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams type: object - required: - - json_schema - title: JsonSchemaResponseFormat + title: Scoring Params + description: Map between scoring function id and parameters for each scoring function you want to run + num_examples: + anyOf: + - type: integer + - type: 'null' + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated type: object - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - SpanEndPayload: - description: Payload for a span end event. + required: + - eval_candidate + title: BenchmarkConfig + description: A benchmark configuration for evaluation. + GreedySamplingStrategy: properties: type: - const: span_end - default: span_end - title: Type type: string - status: - $ref: '#/components/schemas/SpanStatus' - required: - - status - title: SpanEndPayload + const: greedy + title: Type + default: greedy type: object - SpanStartPayload: - description: Payload for a span start event. + title: GreedySamplingStrategy + description: Greedy sampling strategy that selects the highest probability token at each step. + ModelCandidate: properties: type: - const: span_start - default: span_start - title: Type type: string - name: - title: Name + const: model + title: Type + default: model + model: type: string - parent_span_id: + title: Model + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: anyOf: - - type: string + - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage - type: 'null' - nullable: true - required: - - name - title: SpanStartPayload + title: SystemMessage type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. + required: + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + SamplingParams: properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: + strategy: + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + max_tokens: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object + - type: integer - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: + repetition_penalty: anyOf: - - type: integer - type: number - title: integer | number - unit: - title: Unit - type: string - required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent - type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: + - type: 'null' + default: 1.0 + stop: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object + - items: + type: string + type: array - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. + title: SamplingParams + description: Sampling parameters. + SystemMessage: properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp + role: type: string - attributes: + const: system + title: Role + default: system + content: anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message - type: string - severity: - $ref: '#/components/schemas/LogSeverity' - required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ImageDelta: - description: An image content delta for streaming responses. - properties: - type: - const: image - default: image - title: Type - type: string - image: - format: binary - title: Image - type: string required: - - image - title: ImageDelta - type: object - TextDelta: - description: A text content delta for streaming responses. + - content + title: SystemMessage + description: A system message providing instructions or context to the model. + TopKSamplingStrategy: properties: type: - const: text - default: text - title: Type - type: string - text: - title: Text type: string - required: - - text - title: TextDelta + const: top_k + title: Type + default: top_k + top_k: + type: integer + minimum: 1.0 + title: Top K type: object - MetricInResponse: - description: A metric value included in API responses. + required: + - top_k + title: TopKSamplingStrategy + description: Top-k sampling strategy that restricts sampling to the k most likely tokens. + TopPSamplingStrategy: properties: - metric: - title: Metric + type: type: string - value: + const: top_p + title: Type + default: top_p + temperature: anyOf: - - type: integer - type: number - title: integer | number - unit: + minimum: 0.0 + - type: 'null' + top_p: anyOf: - - type: string + - type: number - type: 'null' - nullable: true - required: - - metric - - value - title: MetricInResponse - type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. - properties: - type: - const: dialog - default: dialog - title: Type - type: string - title: DialogType + default: 0.95 type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. + required: + - temperature + title: TopPSamplingStrategy + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. + EvaluateRowsRequest: properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. + input_rows: items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items + additionalProperties: true + type: object type: array - required: - - items - title: ConversationItemCreateRequest + title: Input Rows + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. + required: + - input_rows + - scoring_functions + - benchmark_config + title: EvaluateRowsRequest + EvaluateResponse: properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content + generations: items: additionalProperties: true type: object - title: Content type: array - role: - description: message role - title: Role + 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. + Job: + properties: + job_id: type: string + title: Job Id status: - description: message status - title: Status - type: string - type: - const: message - default: message - title: Type - type: string - object: - const: message - default: message - title: Object - type: string + $ref: '#/components/schemas/JobStatus' + type: object required: - - id - - content - - role + - job_id - status - title: ConversationMessage - type: object - Api: - description: Enumeration of all available APIs in the Llama Stack system. - enum: - - providers - - inference - - safety - - agents - - batches - - vector_io - - datasetio - - scoring - - eval - - post_training - - tool_runtime - - models - - shields - - vector_stores - - datasets - - scoring_functions - - benchmarks - - tool_groups - - files - - prompts - - conversations - - inspect - title: Api - type: string - InlineProviderSpec: + title: Job + description: A job execution instance with status tracking. + RerankRequest: properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + model: type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: + title: Model + query: anyOf: - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + items: items: - type: string - title: Pip Packages + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam type: array - provider_data_validator: + title: Items + max_num_results: anyOf: - - type: string + - type: integer - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: + type: object + required: + - model + - query + - items + title: RerankRequest + 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. + RerankResponse: + properties: + data: items: - type: string - title: Deps + $ref: '#/components/schemas/RerankData' type: array - container_image: - anyOf: - - type: string - - type: 'null' - description: |2 - - The container image to use for this implementation. If one is provided, pip_packages will be ignored. - If a provider depends on other providers, the dependencies MUST NOT specify a container image. - nullable: true - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true - required: - - api - - provider_type - - config_class - title: InlineProviderSpec + title: Data type: object - ProviderSpec: + required: + - data + title: RerankResponse + description: Response from a reranking request. + Checkpoint: properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type + identifier: type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + title: Identifier + created_at: type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: + format: date-time + title: Created At + epoch: + type: integer + title: Epoch + post_training_job_id: + type: string + title: Post Training Job Id + path: + type: string + title: Path + training_metrics: anyOf: - - type: string + - $ref: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: + title: PostTrainingMetric + type: object + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. + PostTrainingJobArtifactsResponse: + properties: + job_uuid: + type: string + title: Job Uuid + checkpoints: items: - type: string - title: Deps + $ref: '#/components/schemas/Checkpoint' type: array + title: Checkpoints + type: object required: - - api - - provider_type - - config_class - title: ProviderSpec + - job_uuid + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingMetric: + properties: + epoch: + type: integer + title: Epoch + train_loss: + type: number + title: Train Loss + validation_loss: + type: number + title: Validation Loss + perplexity: + type: number + title: Perplexity type: object - RemoteProviderSpec: + required: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: Training metrics captured during post-training jobs. + CancelTrainingJobRequest: properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type + job_uuid: type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + title: Job Uuid + type: object + required: + - job_uuid + title: CancelTrainingJobRequest + PostTrainingJobStatusResponse: + properties: + job_uuid: type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: + title: Job Uuid + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: anyOf: - type: string + format: date-time - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: + started_at: anyOf: - type: string + format: date-time - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: + completed_at: anyOf: - type: string + format: date-time - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: + resources_allocated: anyOf: - - type: string + - additionalProperties: true + type: object - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: + checkpoints: items: - type: string - title: Deps + $ref: '#/components/schemas/Checkpoint' type: array - adapter_type: - description: Unique identifier for this adapter - title: Adapter Type - type: string - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true - required: - - api - - provider_type - - config_class - - adapter_type - title: RemoteProviderSpec - type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). - properties: - type: - const: bf16 - default: bf16 - title: Type - type: string - title: Bf16QuantizationConfig + title: Checkpoints type: object - EmbeddingsResponse: - description: Response containing generated embeddings. + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + ListPostTrainingJobsResponse: properties: - embeddings: + data: items: - items: - type: number - type: array - title: Embeddings + $ref: '#/components/schemas/PostTrainingJob' type: array - required: - - embeddings - title: EmbeddingsResponse + title: Data type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. + required: + - data + title: ListPostTrainingJobsResponse + DPOAlignmentConfig: properties: - type: - const: fp8_mixed - default: fp8_mixed - title: Type - type: string - title: Fp8QuantizationConfig + beta: + type: number + title: Beta + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. + required: + - beta + title: DPOAlignmentConfig + description: Configuration for Direct Preference Optimization (DPO) alignment. + DPOLossType: + type: string + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + DataConfig: properties: - type: - const: int4_mixed - default: int4_mixed - title: Type + dataset_id: type: string - scheme: + title: Dataset Id + batch_size: + type: integer + title: Batch Size + shuffle: + type: boolean + title: Shuffle + data_format: + $ref: '#/components/schemas/DatasetFormat' + validation_dataset_id: anyOf: - type: string - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig + packed: + anyOf: + - type: boolean + - type: 'null' + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + default: false type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: Configuration for training data and data loading. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + EfficiencyConfig: properties: - text_offset: + enable_activation_checkpointing: anyOf: - - items: - type: integer - type: array + - type: boolean - type: 'null' - nullable: true - token_logprobs: + default: false + enable_activation_offloading: anyOf: - - items: - type: number - type: array + - type: boolean - type: 'null' - nullable: true - tokens: + default: false + memory_efficient_fsdp_wrap: anyOf: - - items: - type: string - type: array + - type: boolean - type: 'null' - nullable: true - top_logprobs: + default: false + fsdp_cpu_offload: anyOf: - - items: - additionalProperties: - type: number - type: object - type: array + - type: boolean - type: 'null' - nullable: true - title: OpenAICompletionLogprobs + default: false type: object - TokenLogProbs: - description: Log probabilities for generated tokens. + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. + OptimizerConfig: properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs + 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 - ToolResponseMessage: - description: A message representing the result of a tool invocation. - properties: - role: - const: tool - default: tool - title: Role - type: string - call_id: - title: Call Id - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] required: - - call_id - - content - title: ToolResponseMessage - type: object - UserMessage: - description: A message from the user in a chat conversation. + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + description: Configuration parameters for the optimization algorithm. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: Available optimizer algorithms for training. + TrainingConfig: properties: - role: - const: user - default: user - title: Role - type: string - content: + 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: anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: + - type: integer + - type: 'null' + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + title: DataConfig + - type: 'null' + title: DataConfig + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig + - type: 'null' + title: OptimizerConfig + efficiency_config: + anyOf: + - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig + - type: 'null' + title: EfficiencyConfig + dtype: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true - required: - - content - title: UserMessage + default: bf16 type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. - properties: - job_uuid: - title: Job Uuid - type: string - log_lines: - items: - type: string - title: Log Lines - type: array required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream - type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. + - n_epochs + title: TrainingConfig + description: Comprehensive configuration for the training process. + PreferenceOptimizeRequest: properties: job_uuid: - title: Job Uuid type: string + title: Job Uuid finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id - type: string - validation_dataset_id: - title: Validation Dataset Id type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' + title: Finetuned Model algorithm_config: $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' training_config: $ref: '#/components/schemas/TrainingConfig' hyperparam_search_config: additionalProperties: true - title: Hyperparam Search Config type: object + title: Hyperparam Search Config logger_config: additionalProperties: true - title: Logger Config type: object + title: Logger Config + type: object required: - job_uuid - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - algorithm_config - - optimizer_config - training_config - hyperparam_search_config - logger_config - title: PostTrainingRLHFRequest - type: object - ToolGroupInput: - description: Input data for registering a tool group. + title: PreferenceOptimizeRequest + PostTrainingJob: properties: - toolgroup_id: - title: Toolgroup Id - type: string - provider_id: - title: Provider Id + job_uuid: type: string - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - nullable: true - title: URL - required: - - toolgroup_id - - provider_id - title: ToolGroupInput + title: Job Uuid type: object - VectorStoreCreateRequest: - description: Request to create a vector store. + required: + - job_uuid + title: PostTrainingJob + LoraFinetuningConfig: properties: - name: - anyOf: - - type: string - - type: 'null' - nullable: true - file_ids: + type: + type: string + const: LoRA + title: Type + default: LoRA + lora_attn_modules: items: type: string - title: File Ids type: array - expires_after: + title: Lora Attn Modules + apply_lora_to_mlp: + type: boolean + title: Apply Lora To Mlp + apply_lora_to_output: + type: boolean + title: Apply Lora To Output + rank: + type: integer + title: Rank + alpha: + type: integer + title: Alpha + use_dora: anyOf: - - additionalProperties: true - type: object + - type: boolean - type: 'null' - nullable: true - chunking_strategy: + default: false + quantize_base: anyOf: - - additionalProperties: true - type: object + - type: boolean - type: 'null' - nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - title: VectorStoreCreateRequest + default: false + type: object + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + QATFinetuningConfig: + properties: + type: + type: string + const: QAT + title: Type + default: QAT + quantizer_name: + type: string + title: Quantizer Name + group_size: + type: integer + title: Group Size type: object - VectorStoreModifyRequest: - description: Request to modify a vector store. + required: + - quantizer_name + - group_size + title: QATFinetuningConfig + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. + SupervisedFineTuneRequest: properties: - name: + job_uuid: + type: string + title: Job Uuid + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + model: anyOf: - type: string - type: 'null' - nullable: true - expires_after: + description: Model descriptor for training if not in provider config` + checkpoint_dir: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - nullable: true - metadata: + algorithm_config: anyOf: - - additionalProperties: true - type: object + - oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + title: LoraFinetuningConfig | QATFinetuningConfig - type: 'null' - nullable: true - title: VectorStoreModifyRequest + title: Algorithm Config + type: object + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: SupervisedFineTuneRequest + 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. + ImageContentItem-Input: + properties: + type: + type: string + const: image + title: Type + default: image + image: + $ref: '#/components/schemas/_URLOrData' type: object - VectorStoreSearchRequest: - description: Request to search a vector store. + required: + - image + title: ImageContentItem + description: A image content item + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. + _URLOrData: properties: - query: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - filters: + url: anyOf: - - additionalProperties: true - type: object + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - nullable: true - max_num_results: - default: 10 - title: Max Num Results - type: integer - ranking_options: + title: URL + data: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - nullable: true - rewrite_query: - default: false - title: Rewrite Query - type: boolean - required: - - query - title: VectorStoreSearchRequest + contentEncoding: base64 type: object + title: _URLOrData + description: A URL or a base64 encoded string 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 f9872e42bf..2d7329533e 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -84,7 +84,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BatchesPostRequest' + $ref: '#/components/schemas/CreateBatchRequest' /v1/batches/{batch_id}: get: responses: @@ -353,7 +353,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ConversationsPostRequest' + $ref: '#/components/schemas/CreateConversationRequest' required: true /v1/conversations/{conversation_id}: get: @@ -430,7 +430,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ConversationsByConversationIdPostRequest' + $ref: '#/components/schemas/UpdateConversationRequest' required: true delete: responses: @@ -580,7 +580,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ConversationsByConversationIdItemsPostRequest' + $ref: '#/components/schemas/AddItemsRequest' /v1/conversations/{conversation_id}/items/{item_id}: get: responses: @@ -1073,7 +1073,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ModerationsPostRequest' + $ref: '#/components/schemas/RunModerationRequest' required: true /v1/prompts: get: @@ -1133,7 +1133,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PromptsPostRequest' + $ref: '#/components/schemas/CreatePromptRequest' required: true /v1/prompts/{prompt_id}: get: @@ -1219,7 +1219,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PromptsByPromptIdPostRequest' + $ref: '#/components/schemas/UpdatePromptRequest' delete: responses: '200': @@ -1294,7 +1294,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PromptsByPromptIdSetDefaultVersionPostRequest' + $ref: '#/components/schemas/SetDefaultVersionRequest' required: true /v1/prompts/{prompt_id}/versions: get: @@ -1491,7 +1491,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ResponsesPostRequest' + $ref: '#/components/schemas/CreateOpenaiResponseRequest' x-llama-stack-extra-body-params: guardrails: $defs: @@ -1691,7 +1691,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SafetyRunShieldPostRequest' + $ref: '#/components/schemas/RunShieldRequest' required: true /v1/scoring-functions: get: @@ -1703,17 +1703,17 @@ paths: schema: $ref: '#/components/schemas/ListScoringFunctionsResponse' '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' tags: - Scoring Functions summary: List Scoring Functions @@ -1782,7 +1782,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ScoringScorePostRequest' + $ref: '#/components/schemas/ScoreRequest' required: true /v1/scoring/score-batch: post: @@ -1814,7 +1814,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ScoringScoreBatchPostRequest' + $ref: '#/components/schemas/ScoreBatchRequest' required: true /v1/shields: get: @@ -1905,7 +1905,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ToolRuntimeInvokePostRequest' + $ref: '#/components/schemas/InvokeToolRequest' required: true /v1/tool-runtime/list-tools: get: @@ -1968,17 +1968,17 @@ paths: schema: $ref: '#/components/schemas/ListToolGroupsResponse' '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' tags: - Tool Groups summary: List Tool Groups @@ -2094,31 +2094,28 @@ paths: application/json: schema: {} '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' tags: - Vector Io summary: Insert Chunks description: Insert chunks into a vector database. operationId: insert_chunks_v1_vector_io_insert_post requestBody: - required: true content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Chunk-Input' - title: Chunks + $ref: '#/components/schemas/InsertChunksRequest' + required: true /v1/vector-io/query: post: responses: @@ -2149,7 +2146,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorIoQueryPostRequest' + $ref: '#/components/schemas/QueryChunksRequest' required: true /v1/vector_stores: get: @@ -2315,7 +2312,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorStoresByVectorStoreIdPostRequest' + $ref: '#/components/schemas/OpenaiUpdateVectorStoreRequest' required: true delete: responses: @@ -2667,7 +2664,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorStoresByVectorStoreIdFilesPostRequest' + $ref: '#/components/schemas/OpenaiAttachFileToVectorStoreRequest' /v1/vector_stores/{vector_store_id}/files/{file_id}: get: responses: @@ -2749,7 +2746,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorStoresByVectorStoreIdFilesByFileIdPostRequest' + $ref: '#/components/schemas/OpenaiUpdateVectorStoreFileRequest' required: true delete: responses: @@ -2886,7 +2883,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorStoresByVectorStoreIdSearchPostRequest' + $ref: '#/components/schemas/OpenaiSearchVectorStoreRequest' required: true /v1/version: get: @@ -2975,6 +2972,34 @@ components: - data title: ListBatchesResponse description: Response containing a list of batch objects. + CreateBatchRequest: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + const: 24h + title: Completion Window + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + idempotency_key: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_file_id + - endpoint + - completion_window + title: CreateBatchRequest Batch: properties: id: @@ -3123,38 +3148,6 @@ components: - last_id title: ListOpenAIChatCompletionResponse description: Response from listing OpenAI-compatible chat completions. - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - nullable: true - name: - anyOf: - - type: string - - type: 'null' - nullable: true - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - nullable: true - title: OpenAIAssistantMessageParam - type: object OpenAIChatCompletionContentPartImageParam: properties: type: @@ -3169,21 +3162,6 @@ components: - image_url title: OpenAIChatCompletionContentPartImageParam description: Image content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: properties: type: @@ -3392,27 +3370,6 @@ components: - url title: OpenAIImageURL description: Image URL specification for OpenAI-compatible chat completion messages. - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: properties: role: @@ -3518,44 +3475,6 @@ components: :token: The token :bytes: (Optional) The bytes for the token :logprob: The log probability of the token - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. - 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' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - content - title: OpenAIUserMessageParam - type: object OpenAIJSONSchema: properties: name: @@ -3601,21 +3520,6 @@ components: - json_schema title: OpenAIResponseFormatJSONSchema description: JSON schema response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatParam: - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject OpenAIResponseFormatText: properties: type: @@ -4135,39 +4039,6 @@ components: :text: The text of the choice :index: The index of the choice :logprobs: (Optional) The log probabilities for the tokens in the choice - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) OpenAIResponseAnnotationCitation: properties: type: @@ -4266,24 +4137,6 @@ components: - file_id - index title: OpenAIResponseAnnotationFilePath - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseContentPartRefusal: properties: type: @@ -4326,21 +4179,6 @@ components: - output title: OpenAIResponseInputFunctionToolCallOutput description: This represents the output of a function call that gets passed back to the model. - OpenAIResponseInputMessageContent: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseInputMessageContentFile: properties: type: @@ -4533,18 +4371,6 @@ components: - role title: OpenAIResponseMessage type: object - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal OpenAIResponseOutputMessageContentOutputText: properties: text: @@ -4721,6 +4547,53 @@ components: - status title: OpenAIResponseOutputMessageWebSearchToolCall description: Web search tool call output message for OpenAI responses. + CreateConversationRequest: + properties: + items: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + - type: 'null' + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + type: object + title: CreateConversationRequest Conversation: properties: id: @@ -4758,6 +4631,17 @@ components: - created_at title: Conversation description: OpenAI-compatible conversation object. + UpdateConversationRequest: + properties: + metadata: + additionalProperties: + type: string + type: object + title: Metadata + type: object + required: + - metadata + title: UpdateConversationRequest ConversationDeletedResource: properties: id: @@ -4843,6 +4727,48 @@ components: - data title: ConversationItemList description: List of conversation items with pagination. + AddItemsRequest: + properties: + items: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + title: Items + type: object + required: + - items + title: AddItemsRequest ConversationItemDeletedResource: properties: id: @@ -5202,13 +5128,31 @@ components: - rerank title: ModelType description: Enumeration of supported model types in Llama Stack. - ModerationObject: + RunModerationRequest: properties: - id: - type: string - title: Id + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] model: - type: string + anyOf: + - type: string + - type: 'null' + type: object + required: + - input + title: RunModerationRequest + ModerationObject: + properties: + id: + type: string + title: Id + model: + type: string title: Model results: items: @@ -5305,6 +5249,53 @@ components: - data title: ListPromptsResponse description: Response model to list prompts. + CreatePromptRequest: + properties: + prompt: + type: string + title: Prompt + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + required: + - prompt + title: CreatePromptRequest + UpdatePromptRequest: + properties: + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt + - version + title: UpdatePromptRequest + SetDefaultVersionRequest: + properties: + version: + type: integer + title: Version + type: object + required: + - version + title: SetDefaultVersionRequest ProviderInfo: properties: api: @@ -5388,41 +5379,6 @@ components: - message title: OpenAIResponseError description: Error details for failed OpenAI response requests. - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage OpenAIResponseInputToolFileSearch: properties: type: @@ -5680,33 +5636,6 @@ components: - input title: OpenAIResponseObjectWithInput description: OpenAI response object extended with input context information. - OpenAIResponseOutput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) OpenAIResponsePrompt: properties: id: @@ -5751,27 +5680,6 @@ components: type: object title: OpenAIResponseText description: Text response configuration for OpenAI responses. - OpenAIResponseTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseToolMCP: properties: type: @@ -5837,27 +5745,6 @@ components: - type title: ResponseGuardrailSpec type: object - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseInputToolMCP: properties: type: @@ -5906,6 +5793,135 @@ components: - server_url title: OpenAIResponseInputToolMCP description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + CreateOpenaiResponseRequest: + properties: + input: + anyOf: + - type: string + - items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input + type: array + title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + model: + type: string + title: Model + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + title: OpenAIResponsePrompt + instructions: + anyOf: + - type: string + - type: 'null' + previous_response_id: + anyOf: + - type: string + - type: 'null' + conversation: + anyOf: + - type: string + - type: 'null' + store: + anyOf: + - type: boolean + - type: 'null' + default: true + stream: + anyOf: + - type: boolean + - type: 'null' + default: false + temperature: + anyOf: + - type: number + - type: 'null' + text: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseText' + title: OpenAIResponseText + - type: 'null' + title: OpenAIResponseText + tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + include: + anyOf: + - items: + type: string + type: array + - type: 'null' + max_infer_iters: + anyOf: + - type: integer + - type: 'null' + default: 10 + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - input + - model + title: CreateOpenaiResponseRequest OpenAIResponseObject: properties: created_at: @@ -7271,6 +7287,45 @@ components: - data title: ListOpenAIResponseInputItem description: List container for OpenAI response input items. + RunShieldRequest: + properties: + shield_id: + type: string + title: Shield Id + messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) + type: array + title: Messages + params: + additionalProperties: true + type: object + title: Params + type: object + required: + - shield_id + - messages + - params + title: RunShieldRequest RunShieldResponse: properties: violation: @@ -7545,21 +7600,6 @@ components: - return_type title: ScoringFn description: A scoring function resource for evaluating model outputs. - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams StringType: properties: type: @@ -7591,36 +7631,105 @@ components: required: - data title: ListScoringFunctionsResponse - ScoreResponse: - properties: - results: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Results - type: object - required: - - results - title: ScoreResponse - description: The response from scoring. - ScoringResult: + ScoreRequest: properties: - score_rows: + input_rows: items: additionalProperties: true type: object type: array - title: Score Rows - aggregated_results: - additionalProperties: true - type: object - title: Aggregated Results - type: object - required: + title: Input Rows + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + type: object + required: + - input_rows + - scoring_functions + title: ScoreRequest + ScoreResponse: + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreResponse + description: The response from scoring. + 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. + ScoreBatchRequest: + properties: + dataset_id: + type: string + title: Dataset Id + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + save_results_dataset: + type: boolean + title: Save Results Dataset + default: false + type: object + required: + - dataset_id + - scoring_functions + title: ScoreBatchRequest ScoreBatchResponse: properties: dataset_id: @@ -7679,61 +7788,24 @@ components: required: - data title: ListShieldsResponse - ImageContentItem: - description: A image content item + InvokeToolRequest: properties: - type: - const: image - default: image - title: Type + tool_name: type: string - image: - $ref: '#/components/schemas/_URLOrData' - required: - - image - title: ImageContentItem + title: Tool Name + kwargs: + additionalProperties: true + type: object + title: Kwargs + authorization: + anyOf: + - type: string + - type: 'null' type: object - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem + required: + - tool_name + - kwargs + title: InvokeToolRequest TextContentItem: properties: type: @@ -7901,64 +7973,6 @@ components: - data title: ListToolGroupsResponse description: Response containing a list of tool groups. - Chunk: - description: A chunk of content that can be inserted into a vector database. - properties: - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id - type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - nullable: true - title: ChunkMetadata - required: - - content - - chunk_id - title: Chunk - type: object ChunkMetadata: properties: chunk_id: @@ -8012,6 +8026,69 @@ components: 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. + InsertChunksRequest: + properties: + vector_store_id: + type: string + title: Vector Store Id + chunks: + items: + $ref: '#/components/schemas/Chunk-Input' + type: array + title: Chunks + ttl_seconds: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - vector_store_id + - chunks + title: InsertChunksRequest + QueryChunksRequest: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - vector_store_id + - query + title: QueryChunksRequest QueryChunksResponse: properties: chunks: @@ -8134,18 +8211,6 @@ components: - file_counts title: VectorStoreObject description: OpenAI Vector Store object. - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreChunkingStrategyAuto: properties: type: @@ -8226,6 +8291,24 @@ components: type: object title: OpenAICreateVectorStoreRequestWithExtraBody description: Request to create a vector store with extra_body support. + OpenaiUpdateVectorStoreRequest: + properties: + name: + anyOf: + - type: string + - type: 'null' + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + title: OpenaiUpdateVectorStoreRequest VectorStoreDeleteResponse: properties: id: @@ -8312,14 +8395,6 @@ components: - file_counts title: VectorStoreFileBatchObject description: OpenAI Vector Store File Batch object. - VectorStoreFileStatus: - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed VectorStoreFileLastError: properties: code: @@ -8453,18 +8528,57 @@ components: - data title: VectorStoreListFilesResponse description: Response from listing files in a vector store. - VectorStoreFileDeleteResponse: + OpenaiAttachFileToVectorStoreRequest: properties: - id: - type: string - title: Id - object: + file_id: type: string - title: Object - default: vector_store.file.deleted - deleted: - type: boolean - title: Deleted + title: File Id + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + chunking_strategy: + anyOf: + - oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + type: object + required: + - file_id + title: OpenaiAttachFileToVectorStoreRequest + OpenaiUpdateVectorStoreFileRequest: + properties: + attributes: + additionalProperties: true + type: object + title: Attributes + type: object + required: + - attributes + title: OpenaiUpdateVectorStoreFileRequest + VectorStoreFileDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.file.deleted + deleted: + type: boolean + title: Deleted default: true type: object required: @@ -8528,6 +8642,46 @@ components: - data title: VectorStoreFileContentResponse description: Represents the parsed content of a vector store file. + OpenaiSearchVectorStoreRequest: + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + max_num_results: + anyOf: + - type: integer + - type: 'null' + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + title: SearchRankingOptions + rewrite_query: + anyOf: + - type: boolean + - type: 'null' + default: false + search_mode: + anyOf: + - type: string + - type: 'null' + default: vector + type: object + required: + - query + title: OpenaiSearchVectorStoreRequest VectorStoreSearchResponse: properties: file_id: @@ -8602,280 +8756,118 @@ components: - version title: VersionInfo description: Version information for the service. - PaginatedResponse: + AllowedToolsFilter: properties: - data: - items: - additionalProperties: true - type: object - type: array - title: Data - has_more: - type: boolean - title: Has More - url: + tool_names: anyOf: - - type: string + - items: + type: string + type: array - type: 'null' type: object - required: - - data - - has_more - title: PaginatedResponse - description: A generic paginated response that follows a simple format. - Dataset: + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + always: anyOf: - - type: string + - items: + type: string + type: array + - type: 'null' + never: + anyOf: + - items: + type: string + type: array - type: 'null' - description: Unique identifier for this resource in the provider - 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' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - 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. - RowsDataSource: + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. + BatchError: properties: - type: - type: string - const: rows - title: Type - default: rows - rows: - items: - additionalProperties: true - type: object - type: array - title: Rows + code: + anyOf: + - type: string + - type: 'null' + line: + anyOf: + - type: integer + - type: 'null' + message: + anyOf: + - type: string + - type: 'null' + param: + anyOf: + - type: string + - type: 'null' + additionalProperties: true type: object - required: - - rows - title: RowsDataSource - description: A dataset stored in rows. - URIDataSource: + title: BatchError + BatchRequestCounts: properties: - type: - type: string - const: uri - title: Type - default: uri - uri: - type: string - title: Uri + completed: + type: integer + title: Completed + failed: + type: integer + title: Failed + total: + type: integer + title: Total + additionalProperties: true type: object required: - - uri - title: URIDataSource - description: A dataset that can be obtained from a URI. - ListDatasetsResponse: + - completed + - failed + - total + title: BatchRequestCounts + BatchUsage: properties: - data: - items: - $ref: '#/components/schemas/Dataset' - type: array - title: Data + 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: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - Benchmark: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage + Body_openai_upload_file_v1_files_post: properties: - identifier: + file: type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + format: binary + title: File + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + expires_after: anyOf: - - type: string + - $ref: '#/components/schemas/ExpiresAfter' + title: ExpiresAfter - type: 'null' - description: Unique identifier for this resource in the provider - 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 + title: ExpiresAfter type: object required: - - identifier - - provider_id - - dataset_id - - scoring_functions - title: Benchmark - description: A benchmark resource for evaluating model performance. - ListBenchmarksResponse: - properties: - data: - items: - $ref: '#/components/schemas/Benchmark' - type: array - title: Data - type: object - required: - - data - title: ListBenchmarksResponse - BenchmarkConfig: - properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - scoring_params: - additionalProperties: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: object - title: Scoring Params - description: Map between scoring function id and parameters for each scoring function you want to run - num_examples: - anyOf: - - type: integer - - type: 'null' - description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated - type: object - required: - - eval_candidate - title: BenchmarkConfig - description: A benchmark configuration for evaluation. - 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. - ModelCandidate: - properties: - type: - type: string - const: model - title: Type - default: model - model: - type: string - title: Model - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: - anyOf: - - $ref: '#/components/schemas/SystemMessage' - title: SystemMessage - - type: 'null' - title: SystemMessage - type: object - required: - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - SamplingParams: - properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - max_tokens: - anyOf: - - type: integer - - type: 'null' - repetition_penalty: - anyOf: - - type: number - - type: 'null' - default: 1.0 - stop: - anyOf: - - items: - type: string - type: array - - type: 'null' - type: object - title: SamplingParams - description: Sampling parameters. - SystemMessage: + - file + - purpose + title: Body_openai_upload_file_v1_files_post + Chunk-Input: properties: - role: - type: string - const: system - title: Role - default: system content: anyOf: - type: string @@ -8905,2956 +8897,581 @@ components: type: array title: list[ImageContentItem-Input | TextContentItem] title: string | list[ImageContentItem-Input | TextContentItem] + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata type: object required: - content - title: SystemMessage - description: A system message providing instructions or context to the model. - TopKSamplingStrategy: + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + Chunk-Output: properties: - type: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + type: array + title: list[ImageContentItem-Output | TextContentItem] + title: string | list[ImageContentItem-Output | TextContentItem] + chunk_id: type: string - const: top_k - title: Type - default: top_k - top_k: - type: integer - minimum: 1.0 - title: Top K + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata type: object required: - - top_k - title: TopKSamplingStrategy - description: Top-k sampling strategy that restricts sampling to the k most likely tokens. - TopPSamplingStrategy: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + 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. + Errors: properties: - type: - type: string - const: top_p - title: Type - default: top_p - temperature: + data: anyOf: - - type: number - minimum: 0.0 + - items: + $ref: '#/components/schemas/BatchError' + type: array - type: 'null' - top_p: + object: anyOf: - - type: number + - type: string - type: 'null' - default: 0.95 + additionalProperties: true type: object - required: - - temperature - title: TopPSamplingStrategy - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. - EvaluateResponse: + title: Errors + HealthStatus: + type: string + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + ImageContentItem-Input: properties: - generations: - items: - additionalProperties: true - type: object - type: array - title: Generations - scores: - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - type: object - title: Scores + type: + type: string + const: image + title: Type + default: image + image: + $ref: '#/components/schemas/_URLOrData' type: object required: - - generations - - scores - title: EvaluateResponse - description: The response from an evaluation. - Job: + - image + title: ImageContentItem + description: A image content item + ImageContentItem-Output: properties: - job_id: + type: type: string - title: Job Id - status: - $ref: '#/components/schemas/JobStatus' + const: image + title: Type + default: image + image: + $ref: '#/components/schemas/_URLOrData' type: object required: - - job_id - - status - title: Job - description: A job execution instance with status tracking. - RerankData: + - image + title: ImageContentItem + description: A image content item + InputTokensDetails: properties: - index: + cached_tokens: type: integer - title: Index - relevance_score: - type: number - title: Relevance Score + title: Cached Tokens + additionalProperties: true type: object required: - - index - - relevance_score - title: RerankData - description: A single rerank result from a reranking response. - RerankResponse: + - cached_tokens + title: InputTokensDetails + MCPListToolsTool: properties: - data: - items: - $ref: '#/components/schemas/RerankData' - type: array - title: Data + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' type: object required: - - data - title: RerankResponse - description: Response from a reranking request. - Checkpoint: - properties: - identifier: - type: string - title: Identifier - created_at: - type: string - format: date-time - title: Created At - epoch: - type: integer - title: Epoch - post_training_job_id: - type: string - title: Post Training Job Id - path: - type: string - title: Path - training_metrics: - anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' - title: PostTrainingMetric - - type: 'null' - title: PostTrainingMetric - type: object - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - PostTrainingJobArtifactsResponse: - properties: - job_uuid: - type: string - title: Job Uuid - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints - type: object - required: - - job_uuid - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingMetric: - properties: - epoch: - type: integer - title: Epoch - train_loss: - type: number - title: Train Loss - validation_loss: - type: number - title: Validation Loss - perplexity: - type: number - title: Perplexity - type: object - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: Training metrics captured during post-training jobs. - PostTrainingJobStatusResponse: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + OpenAIAssistantMessageParam-Input: properties: - job_uuid: + role: type: string - title: Job Uuid - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: - anyOf: - - type: string - format: date-time - - type: 'null' - started_at: + const: assistant + title: Role + default: assistant + content: anyOf: - type: string - format: date-time + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - completed_at: + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: anyOf: - type: string - format: date-time - type: 'null' - resources_allocated: + tool_calls: anyOf: - - additionalProperties: true - type: object + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array - type: 'null' - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints - type: object - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - ListPostTrainingJobsResponse: - properties: - data: - items: - $ref: '#/components/schemas/PostTrainingJob' - type: array - title: Data type: object - required: - - data - title: ListPostTrainingJobsResponse - 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. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: properties: - dataset_id: + role: 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: + const: assistant + title: Role + default: assistant + content: anyOf: - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - packed: + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - train_on_input: + tool_calls: anyOf: - - type: boolean + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array - type: 'null' - default: false type: object - required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: Configuration for training data and data loading. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - EfficiencyConfig: + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIChatCompletionUsageCompletionTokensDetails: properties: - enable_activation_checkpointing: - anyOf: - - type: boolean - - type: 'null' - default: false - enable_activation_offloading: - anyOf: - - type: boolean - - type: 'null' - default: false - memory_efficient_fsdp_wrap: - anyOf: - - type: boolean - - type: 'null' - default: false - fsdp_cpu_offload: + reasoning_tokens: anyOf: - - type: boolean + - type: integer - type: 'null' - default: false - type: object - title: EfficiencyConfig - description: Configuration for memory and compute efficiency optimizations. - 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. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: Available optimizer algorithms for training. - TrainingConfig: + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: 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: + cached_tokens: anyOf: - type: integer - type: 'null' - default: 1 - data_config: - anyOf: - - $ref: '#/components/schemas/DataConfig' - title: DataConfig - - type: 'null' - title: DataConfig - optimizer_config: - anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - title: OptimizerConfig - - type: 'null' - title: OptimizerConfig - efficiency_config: - anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - title: EfficiencyConfig - - type: 'null' - title: EfficiencyConfig - dtype: - anyOf: - - type: string - - type: 'null' - default: bf16 type: object - required: - - n_epochs - title: TrainingConfig - description: Comprehensive configuration for the training process. - PostTrainingJob: + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + OpenAIResponseMessage-Input: properties: - job_uuid: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role type: string - title: Job Uuid - type: object - required: - - job_uuid - title: PostTrainingJob - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig - LoraFinetuningConfig: - properties: + enum: + - system + - developer + - user + - assistant + default: system type: type: string - const: LoRA + const: message title: Type - default: LoRA - lora_attn_modules: - items: - type: string - type: array - title: Lora Attn Modules - apply_lora_to_mlp: - type: boolean - title: Apply Lora To Mlp - apply_lora_to_output: - type: boolean - title: Apply Lora To Output - rank: - type: integer - title: Rank - alpha: - type: integer - title: Alpha - use_dora: + default: message + id: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - quantize_base: + status: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - type: object - required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - QATFinetuningConfig: - properties: - type: - type: string - const: QAT - title: Type - default: QAT - quantizer_name: - type: string - title: Quantizer Name - group_size: - type: integer - title: Group Size type: object required: - - quantizer_name - - group_size - title: QATFinetuningConfig - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - AllowedToolsFilter: + - 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. + OpenAIResponseMessage-Output: properties: - tool_names: + content: anyOf: + - type: string - items: - type: string - type: array - - type: 'null' - type: object - title: AllowedToolsFilter - description: Filter configuration for restricting which MCP tools can be used. - ApprovalFilter: - properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - never: - anyOf: - - items: - type: string - type: array - - type: 'null' - type: object - title: ApprovalFilter - description: Filter configuration for MCP tool approval requirements. - BatchError: - properties: - code: - anyOf: - - type: string - - type: 'null' - line: - anyOf: - - type: integer - - type: 'null' - message: - anyOf: - - type: string - - type: 'null' - param: - anyOf: - - type: string - - type: 'null' - 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 - BatchesPostRequest: - properties: - input_file_id: - type: string - title: Input File Id - endpoint: - type: string - title: Endpoint - completion_window: - type: string - const: 24h - title: Completion Window - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - idempotency_key: - anyOf: - - type: string - - type: 'null' - type: object - required: - - input_file_id - - endpoint - - completion_window - title: BatchesPostRequest - Body_openai_upload_file_v1_files_post: - properties: - file: - type: string - format: binary - title: File - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' - expires_after: - anyOf: - - $ref: '#/components/schemas/ExpiresAfter' - title: ExpiresAfter - - type: 'null' - title: ExpiresAfter - type: object - required: - - file - - purpose - title: Body_openai_upload_file_v1_files_post - Chunk-Input: - properties: - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - chunk_id: - type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - title: ChunkMetadata - type: object - required: - - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - Chunk-Output: - properties: - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - type: array - title: list[ImageContentItem-Output | TextContentItem] - title: string | list[ImageContentItem-Output | TextContentItem] - chunk_id: - type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - title: ChunkMetadata - type: object - required: - - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - 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. - ConversationsByConversationIdItemsPostRequest: - properties: - items: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) - type: array - title: Items - type: object - required: - - items - title: ConversationsByConversationIdItemsPostRequest - ConversationsByConversationIdPostRequest: - properties: - metadata: - additionalProperties: - type: string - type: object - title: Metadata - type: object - required: - - metadata - title: ConversationsByConversationIdPostRequest - ConversationsPostRequest: - properties: - items: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) - type: array - - type: 'null' - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - type: object - title: ConversationsPostRequest - 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. - Errors: - properties: - data: - anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array - - type: 'null' - object: - anyOf: - - type: string - - type: 'null' - additionalProperties: true - type: object - title: Errors - 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 - 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 - InputTokensDetails: - properties: - cached_tokens: - type: integer - title: Cached Tokens - additionalProperties: true - type: object - required: - - cached_tokens - title: InputTokensDetails - JobStatus: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - description: Status of a job execution. - MCPListToolsTool: - properties: - input_schema: - additionalProperties: true - type: object - title: Input Schema - name: - type: string - title: Name - description: - anyOf: - - type: string - - type: 'null' - type: object - required: - - input_schema - - name - title: MCPListToolsTool - description: Tool definition returned by MCP list tools operation. - ModerationsPostRequest: - properties: - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - model: - anyOf: - - type: string - - type: 'null' - type: object - required: - - input - title: ModerationsPostRequest - OpenAIAssistantMessageParam-Input: - properties: - role: - type: string - const: assistant - title: Role - default: assistant - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIAssistantMessageParam-Output: - properties: - role: - type: string - const: assistant - title: Role - default: assistant - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: - anyOf: - - type: string - - type: 'null' - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIChatCompletionUsageCompletionTokensDetails: - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - type: object - title: OpenAIChatCompletionUsageCompletionTokensDetails - description: Token details for output tokens in OpenAI chat completion usage. - OpenAIChatCompletionUsagePromptTokensDetails: - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - type: object - title: OpenAIChatCompletionUsagePromptTokensDetails - description: Token details for prompt tokens in OpenAI chat completion usage. - OpenAIResponseMessage-Input: - properties: - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - type: string - const: message - title: Type - default: message - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' - 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. - OpenAIResponseMessage-Output: - properties: - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - type: string - const: message - title: Type - default: message - id: - anyOf: - - type: string - - type: 'null' - status: - anyOf: - - type: string - - type: 'null' - 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. - 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. - OpenAIResponseTextFormat: - properties: - type: - title: Type - type: string - enum: - - text - - json_schema - - json_object - default: text - name: - anyOf: - - type: string - - type: 'null' - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - description: - anyOf: - - type: string - - type: 'null' - strict: - anyOf: - - type: boolean - - type: 'null' - type: object - title: OpenAIResponseTextFormat - description: Configuration for Responses API text format. - OpenAIResponseUsageInputTokensDetails: - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - type: object - title: OpenAIResponseUsageInputTokensDetails - description: Token details for input tokens in OpenAI response usage. - OpenAIResponseUsageOutputTokensDetails: - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - type: object - title: OpenAIResponseUsageOutputTokensDetails - description: Token details for output tokens in OpenAI response usage. - OpenAIUserMessageParam-Input: - properties: - role: - type: string - const: user - title: Role - default: user - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: - anyOf: - - type: string - - type: 'null' - type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - OpenAIUserMessageParam-Output: - properties: - role: - type: string - const: user - title: Role - default: user - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: - anyOf: - - type: string - - type: 'null' - type: object - required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - OutputTokensDetails: - properties: - reasoning_tokens: - type: integer - title: Reasoning Tokens - additionalProperties: true - type: object - required: - - reasoning_tokens - title: OutputTokensDetails - PromptsByPromptIdPostRequest: - properties: - prompt: - type: string - title: Prompt - version: - type: integer - title: Version - variables: - anyOf: - - items: - type: string - type: array - - type: 'null' - set_as_default: - type: boolean - title: Set As Default - default: true - type: object - required: - - prompt - - version - title: PromptsByPromptIdPostRequest - PromptsByPromptIdSetDefaultVersionPostRequest: - properties: - version: - type: integer - title: Version - type: object - required: - - version - title: PromptsByPromptIdSetDefaultVersionPostRequest - PromptsPostRequest: - properties: - prompt: - type: string - title: Prompt - variables: - anyOf: - - items: - type: string - type: array - - type: 'null' - type: object - required: - - prompt - title: PromptsPostRequest - ResponsesPostRequest: - properties: - input: - anyOf: - - type: string - - items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input - type: array - title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] - title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] - model: - type: string - title: Model - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - - type: 'null' - title: OpenAIResponsePrompt - instructions: - anyOf: - - type: string - - type: 'null' - previous_response_id: - anyOf: - - type: string - - type: 'null' - conversation: - anyOf: - - type: string - - type: 'null' - store: - anyOf: - - type: boolean - - type: 'null' - default: true - stream: - anyOf: - - type: boolean - - type: 'null' - default: false - temperature: - anyOf: - - type: number - - type: 'null' - text: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseText' - title: OpenAIResponseText - - type: 'null' - title: OpenAIResponseText - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - discriminator: - propertyName: type - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - include: - anyOf: - - items: - type: string - type: array - - type: 'null' - max_infer_iters: - anyOf: - - type: integer - - type: 'null' - default: 10 - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - type: object - required: - - input - - model - title: ResponsesPostRequest - SafetyRunShieldPostRequest: - properties: - shield_id: - type: string - title: Shield Id - messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' - title: OpenAIUserMessageParam-Input - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' - title: OpenAIAssistantMessageParam-Input - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: 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' - title: OpenAIUserMessageParam-Input | ... (5 variants) - type: array - title: Messages - params: - additionalProperties: true - type: object - title: Params - type: object - required: - - shield_id - - messages - - params - title: SafetyRunShieldPostRequest - ScoringScoreBatchPostRequest: - properties: - dataset_id: - type: string - title: Dataset Id - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - title: Scoring Functions - save_results_dataset: - type: boolean - title: Save Results Dataset - default: false - type: object - required: - - dataset_id - - scoring_functions - title: ScoringScoreBatchPostRequest - ScoringScorePostRequest: - properties: - input_rows: - items: - additionalProperties: true - type: object - type: array - title: Input Rows - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - title: Scoring Functions - type: object - required: - - input_rows - - scoring_functions - title: ScoringScorePostRequest - SearchRankingOptions: - properties: - ranker: - anyOf: - - type: string - - type: 'null' - score_threshold: - anyOf: - - type: number - - type: 'null' - default: 0.0 - type: object - title: SearchRankingOptions - description: Options for ranking and filtering search results. - ToolRuntimeInvokePostRequest: - properties: - tool_name: - type: string - title: Tool Name - kwargs: - additionalProperties: true - type: object - title: Kwargs - authorization: - anyOf: - - type: string - - type: 'null' - type: object - required: - - tool_name - - kwargs - title: ToolRuntimeInvokePostRequest - VectorIoQueryPostRequest: - properties: - vector_store_id: - type: string - title: Vector Store Id - query: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - vector_store_id - - query - title: VectorIoQueryPostRequest - VectorStoresByVectorStoreIdFilesByFileIdPostRequest: - properties: - attributes: - additionalProperties: true - type: object - title: Attributes - type: object - required: - - attributes - title: VectorStoresByVectorStoreIdFilesByFileIdPostRequest - VectorStoresByVectorStoreIdFilesPostRequest: - properties: - file_id: - type: string - title: File Id - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - type: object - required: - - file_id - title: VectorStoresByVectorStoreIdFilesPostRequest - VectorStoresByVectorStoreIdPostRequest: - properties: - name: - anyOf: - - type: string - - type: 'null' - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - title: VectorStoresByVectorStoreIdPostRequest - VectorStoresByVectorStoreIdSearchPostRequest: - properties: - query: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - max_num_results: - anyOf: - - type: integer - - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - title: SearchRankingOptions - rewrite_query: - anyOf: - - type: boolean - - type: 'null' - default: false - search_mode: - anyOf: - - type: string - - type: 'null' - default: vector - type: object - required: - - query - title: VectorStoresByVectorStoreIdSearchPostRequest - _URLOrData: - properties: - url: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - type: object - title: _URLOrData - description: A URL or a base64 encoded string - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat - type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. - 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 - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - SpanEndPayload: - description: Payload for a span end event. - properties: - type: - const: span_end - default: span_end - title: Type - type: string - status: - $ref: '#/components/schemas/SpanStatus' - required: - - status - title: SpanEndPayload - type: object - SpanStartPayload: - description: Payload for a span start event. - properties: - type: - const: span_start - default: span_start - title: Type - type: string - name: - title: Name - type: string - parent_span_id: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - name - title: SpanStartPayload - type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string - required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent - type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent - type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message - type: string - severity: - $ref: '#/components/schemas/LogSeverity' - required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent - type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ImageDelta: - description: An image content delta for streaming responses. - properties: - type: - const: image - default: image - title: Type - type: string - image: - format: binary - title: Image - type: string - required: - - image - title: ImageDelta - type: object - TextDelta: - description: A text content delta for streaming responses. - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: TextDelta - type: object - MetricInResponse: - description: A metric value included in API responses. - properties: - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - metric - - value - title: MetricInResponse - type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. - properties: - type: - const: dialog - default: dialog - title: Type - type: string - title: DialogType - type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. - properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array - required: - - items - title: ConversationItemCreateRequest - type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. - properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] role: - description: message role title: Role type: string - status: - description: message status - title: Status - type: string + enum: + - system + - developer + - user + - assistant + default: system type: - const: message - default: message - title: Type type: string - object: const: message + title: Type default: message - title: Object - type: string - required: - - id - - content - - role - - status - title: ConversationMessage - type: object - Api: - description: Enumeration of all available APIs in the Llama Stack system. - enum: - - providers - - inference - - safety - - agents - - batches - - vector_io - - datasetio - - scoring - - eval - - post_training - - tool_runtime - - models - - shields - - vector_stores - - datasets - - scoring_functions - - benchmarks - - tool_groups - - files - - prompts - - conversations - - inspect - title: Api - type: string - InlineProviderSpec: - properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class - type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - container_image: + id: anyOf: - type: string - type: 'null' - description: |2 - - The container image to use for this implementation. If one is provided, pip_packages will be ignored. - If a provider depends on other providers, the dependencies MUST NOT specify a container image. - nullable: true - description: + status: anyOf: - type: string - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true - required: - - api - - provider_type - - config_class - title: InlineProviderSpec type: object - ProviderSpec: - properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class - type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array required: - - api - - provider_type - - config_class - title: ProviderSpec - type: object - RemoteProviderSpec: + - 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. + OpenAIResponseOutputMessageFileSearchToolCallResults: properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class + attributes: + additionalProperties: true + type: object + title: Attributes + file_id: type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - adapter_type: - description: Unique identifier for this adapter - title: Adapter Type + title: File Id + filename: type: string - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true - required: - - api - - provider_type - - config_class - - adapter_type - title: RemoteProviderSpec - type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). - properties: - type: - const: bf16 - default: bf16 - title: Type + title: Filename + score: + type: number + title: Score + text: type: string - title: Bf16QuantizationConfig + title: Text type: object - EmbeddingsResponse: - description: Response containing generated embeddings. - properties: - embeddings: - items: - items: - type: number - type: array - title: Embeddings - type: array required: - - embeddings - title: EmbeddingsResponse - type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. - properties: - type: - const: fp8_mixed - default: fp8_mixed - title: Type - type: string - title: Fp8QuantizationConfig - type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. + - attributes + - file_id + - filename + - score + - text + title: OpenAIResponseOutputMessageFileSearchToolCallResults + description: Search results returned by the file search operation. + OpenAIResponseTextFormat: properties: type: - const: int4_mixed - default: int4_mixed title: Type type: string - scheme: + enum: + - text + - json_schema + - json_object + default: text + name: anyOf: - type: string - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig - type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens - properties: - text_offset: + schema: anyOf: - - items: - type: integer - type: array + - additionalProperties: true + type: object - type: 'null' - nullable: true - token_logprobs: - anyOf: - - items: - type: number - type: array + description: + anyOf: + - type: string - type: 'null' - nullable: true - tokens: + strict: anyOf: - - items: - type: string - type: array + - type: boolean - type: 'null' - nullable: true - top_logprobs: + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: anyOf: - - items: - additionalProperties: - type: number - type: object - type: array + - type: integer - type: 'null' - nullable: true - title: OpenAICompletionLogprobs type: object - TokenLogProbs: - description: Log probabilities for generated tokens. + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + OpenAIUserMessageParam-Input: properties: role: - const: tool - default: tool - title: Role - type: string - call_id: - title: Call Id type: string + const: user + title: Role + default: user content: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object required: - - call_id - content - title: ToolResponseMessage - type: object - UserMessage: - description: A message from the user in a chat conversation. + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OpenAIUserMessageParam-Output: properties: role: + type: string const: user - default: user title: Role - type: string + default: user content: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: anyOf: - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true + type: object required: - content - title: UserMessage - type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OutputTokensDetails: properties: - job_uuid: - title: Job Uuid - type: string - log_lines: - items: - type: string - title: Log Lines - type: array - required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream + reasoning_tokens: + type: integer + title: Reasoning Tokens + additionalProperties: true type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. - properties: - job_uuid: - title: Job Uuid - type: string - finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id - type: string - validation_dataset_id: - title: Validation Dataset Id - type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - title: Hyperparam Search Config - type: object - logger_config: - additionalProperties: true - title: Logger Config - type: object - required: - - job_uuid - - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - - algorithm_config - - optimizer_config - - training_config - - hyperparam_search_config - - logger_config - title: PostTrainingRLHFRequest - type: object - ToolGroupInput: - description: Input data for registering a tool group. - properties: - toolgroup_id: - title: Toolgroup Id - type: string - provider_id: - title: Provider Id - type: string - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - nullable: true - title: URL required: - - toolgroup_id - - provider_id - title: ToolGroupInput - type: object - VectorStoreCreateRequest: - description: Request to create a vector store. + - reasoning_tokens + title: OutputTokensDetails + SearchRankingOptions: properties: - name: + ranker: anyOf: - type: string - type: 'null' - nullable: true - file_ids: - items: - type: string - title: File Ids - type: array - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - chunking_strategy: + score_threshold: anyOf: - - additionalProperties: true - type: object + - type: number - type: 'null' - nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - title: VectorStoreCreateRequest + default: 0.0 type: object - VectorStoreModifyRequest: - description: Request to modify a vector store. + title: SearchRankingOptions + description: Options for ranking and filtering search results. + _URLOrData: properties: - name: - anyOf: - - type: string - - type: 'null' - nullable: true - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - metadata: + url: anyOf: - - additionalProperties: true - type: object + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - nullable: true - title: VectorStoreModifyRequest - type: object - VectorStoreSearchRequest: - description: Request to search a vector store. - properties: - query: + title: URL + data: anyOf: - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - max_num_results: - default: 10 - title: Max Num Results - type: integer - ranking_options: - anyOf: - - additionalProperties: true - type: object - type: 'null' - nullable: true - rewrite_query: - default: false - title: Rewrite Query - type: boolean - required: - - query - title: VectorStoreSearchRequest + contentEncoding: base64 type: object + title: _URLOrData + description: A URL or a base64 encoded string 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 1a55e80b60..580decb3da 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -86,7 +86,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BatchesPostRequest' + $ref: '#/components/schemas/CreateBatchRequest' /v1/batches/{batch_id}: get: responses: @@ -355,7 +355,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ConversationsPostRequest' + $ref: '#/components/schemas/CreateConversationRequest' required: true /v1/conversations/{conversation_id}: get: @@ -432,7 +432,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ConversationsByConversationIdPostRequest' + $ref: '#/components/schemas/UpdateConversationRequest' required: true delete: responses: @@ -582,7 +582,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ConversationsByConversationIdItemsPostRequest' + $ref: '#/components/schemas/AddItemsRequest' /v1/conversations/{conversation_id}/items/{item_id}: get: responses: @@ -1038,7 +1038,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ModelsPostRequest' + $ref: '#/components/schemas/RegisterModelRequest' required: true deprecated: true /v1/models/{model_id}: @@ -1145,7 +1145,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ModerationsPostRequest' + $ref: '#/components/schemas/RunModerationRequest' required: true /v1/prompts: get: @@ -1205,7 +1205,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PromptsPostRequest' + $ref: '#/components/schemas/CreatePromptRequest' required: true /v1/prompts/{prompt_id}: get: @@ -1291,7 +1291,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PromptsByPromptIdPostRequest' + $ref: '#/components/schemas/UpdatePromptRequest' delete: responses: '200': @@ -1366,7 +1366,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PromptsByPromptIdSetDefaultVersionPostRequest' + $ref: '#/components/schemas/SetDefaultVersionRequest' required: true /v1/prompts/{prompt_id}/versions: get: @@ -1563,7 +1563,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ResponsesPostRequest' + $ref: '#/components/schemas/CreateOpenaiResponseRequest' x-llama-stack-extra-body-params: guardrails: $defs: @@ -1763,7 +1763,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SafetyRunShieldPostRequest' + $ref: '#/components/schemas/RunShieldRequest' required: true /v1/scoring-functions: get: @@ -1775,17 +1775,17 @@ paths: schema: $ref: '#/components/schemas/ListScoringFunctionsResponse' '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' tags: - Scoring Functions summary: List Scoring Functions @@ -1799,28 +1799,28 @@ paths: application/json: schema: {} '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' tags: - Scoring Functions summary: Register Scoring Function description: Register a scoring function. operationId: register_scoring_function_v1_scoring_functions_post requestBody: - required: true content: application/json: schema: - $ref: '#/components/schemas/Body_register_scoring_function_v1_scoring_functions_post' + $ref: '#/components/schemas/RegisterScoringFunctionRequestLoose' + required: true deprecated: true /v1/scoring-functions/{scoring_fn_id}: get: @@ -1917,7 +1917,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ScoringScorePostRequest' + $ref: '#/components/schemas/ScoreRequest' required: true /v1/scoring/score-batch: post: @@ -1949,7 +1949,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ScoringScoreBatchPostRequest' + $ref: '#/components/schemas/ScoreBatchRequest' required: true /v1/shields: get: @@ -2006,7 +2006,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ShieldsPostRequest' + $ref: '#/components/schemas/RegisterShieldRequest' required: true deprecated: true /v1/shields/{identifier}: @@ -2104,7 +2104,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ToolRuntimeInvokePostRequest' + $ref: '#/components/schemas/InvokeToolRequest' required: true /v1/tool-runtime/list-tools: get: @@ -2167,17 +2167,17 @@ paths: schema: $ref: '#/components/schemas/ListToolGroupsResponse' '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' tags: - Tool Groups summary: List Tool Groups @@ -2191,17 +2191,17 @@ paths: application/json: schema: {} '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' tags: - Tool Groups summary: Register Tool Group @@ -2211,7 +2211,8 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Body_register_tool_group_v1_toolgroups_post' + $ref: '#/components/schemas/RegisterToolGroupRequest' + required: true deprecated: true /v1/toolgroups/{toolgroup_id}: get: @@ -2355,31 +2356,28 @@ paths: application/json: schema: {} '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' tags: - Vector Io summary: Insert Chunks description: Insert chunks into a vector database. operationId: insert_chunks_v1_vector_io_insert_post requestBody: - required: true content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Chunk-Input' - title: Chunks + $ref: '#/components/schemas/InsertChunksRequest' + required: true /v1/vector-io/query: post: responses: @@ -2410,7 +2408,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorIoQueryPostRequest' + $ref: '#/components/schemas/QueryChunksRequest' required: true /v1/vector_stores: get: @@ -2576,7 +2574,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorStoresByVectorStoreIdPostRequest' + $ref: '#/components/schemas/OpenaiUpdateVectorStoreRequest' required: true delete: responses: @@ -2928,7 +2926,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorStoresByVectorStoreIdFilesPostRequest' + $ref: '#/components/schemas/OpenaiAttachFileToVectorStoreRequest' /v1/vector_stores/{vector_store_id}/files/{file_id}: get: responses: @@ -3010,7 +3008,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorStoresByVectorStoreIdFilesByFileIdPostRequest' + $ref: '#/components/schemas/OpenaiUpdateVectorStoreFileRequest' required: true delete: responses: @@ -3147,7 +3145,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VectorStoresByVectorStoreIdSearchPostRequest' + $ref: '#/components/schemas/OpenaiSearchVectorStoreRequest' required: true /v1/version: get: @@ -3214,11 +3212,7 @@ paths: content: application/json: schema: - items: - additionalProperties: true - type: object - type: array - title: Rows + $ref: '#/components/schemas/AppendRowsRequest' required: true /v1beta/datasetio/iterrows/{dataset_id}: get: @@ -3333,7 +3327,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1BetaDatasetsPostRequestLoose' + $ref: '#/components/schemas/RegisterDatasetRequestLoose' required: true deprecated: true /v1beta/datasets/{dataset_id}: @@ -3411,17 +3405,17 @@ paths: schema: $ref: '#/components/schemas/ListBenchmarksResponse' '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' tags: - Benchmarks summary: List Benchmarks @@ -3435,28 +3429,28 @@ paths: application/json: schema: {} '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' tags: - Benchmarks summary: Register Benchmark description: Register a benchmark. operationId: register_benchmark_v1alpha_eval_benchmarks_post requestBody: - required: true content: application/json: schema: - $ref: '#/components/schemas/Body_register_benchmark_v1alpha_eval_benchmarks_post' + $ref: '#/components/schemas/RegisterBenchmarkRequest' + required: true deprecated: true /v1alpha/eval/benchmarks/{benchmark_id}: get: @@ -3560,7 +3554,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest' + $ref: '#/components/schemas/EvaluateRowsRequest' required: true /v1alpha/eval/benchmarks/{benchmark_id}/jobs: post: @@ -3746,7 +3740,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1AlphaInferenceRerankPostRequest' + $ref: '#/components/schemas/RerankRequest' required: true /v1alpha/post-training/job/artifacts: get: @@ -3790,29 +3784,28 @@ paths: application/json: schema: {} '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' tags: - Post Training summary: Cancel Training Job description: Cancel a training job. operationId: cancel_training_job_v1alpha_post_training_job_cancel_post - parameters: - - name: job_uuid - in: query + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CancelTrainingJobRequest' required: true - schema: - type: string - title: Job Uuid /v1alpha/post-training/job/status: get: responses: @@ -3902,7 +3895,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1AlphaPostTrainingPreferenceOptimizePostRequest' + $ref: '#/components/schemas/PreferenceOptimizeRequest' required: true /v1alpha/post-training/supervised-fine-tune: post: @@ -3934,7 +3927,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V1AlphaPostTrainingSupervisedFineTunePostRequest' + $ref: '#/components/schemas/SupervisedFineTuneRequest' required: true components: schemas: @@ -3994,6 +3987,34 @@ components: - data title: ListBatchesResponse description: Response containing a list of batch objects. + CreateBatchRequest: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + const: 24h + title: Completion Window + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + idempotency_key: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_file_id + - endpoint + - completion_window + title: CreateBatchRequest Batch: properties: id: @@ -4142,38 +4163,6 @@ components: - last_id title: ListOpenAIChatCompletionResponse description: Response from listing OpenAI-compatible chat completions. - OpenAIAssistantMessageParam: - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - nullable: true - name: - anyOf: - - type: string - - type: 'null' - nullable: true - tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - nullable: true - title: OpenAIAssistantMessageParam - type: object OpenAIChatCompletionContentPartImageParam: properties: type: @@ -4188,21 +4177,6 @@ components: - image_url title: OpenAIChatCompletionContentPartImageParam description: Image content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionContentPartParam: - discriminator: - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: properties: type: @@ -4411,27 +4385,6 @@ components: - url title: OpenAIImageURL description: Image URL specification for OpenAI-compatible chat completion messages. - OpenAIMessageParam: - 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' - title: OpenAIUserMessageParam - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - title: OpenAIAssistantMessageParam - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: OpenAIDeveloperMessageParam - title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: properties: role: @@ -4537,44 +4490,6 @@ components: :token: The token :bytes: (Optional) The bytes for the token :logprob: The log probability of the token - OpenAIUserMessageParam: - description: A message from the user in an OpenAI-compatible chat completion request. - 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' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - content - title: OpenAIUserMessageParam - type: object OpenAIJSONSchema: properties: name: @@ -4620,21 +4535,6 @@ components: - json_schema title: OpenAIResponseFormatJSONSchema description: JSON schema response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatParam: - discriminator: - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - title: OpenAIResponseFormatText - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - title: OpenAIResponseFormatJSONSchema - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - title: OpenAIResponseFormatJSONObject - title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject OpenAIResponseFormatText: properties: type: @@ -5154,39 +5054,6 @@ components: :text: The text of the choice :index: The index of the choice :logprobs: (Optional) The log probabilities for the tokens in the choice - ConversationItem: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) OpenAIResponseAnnotationCitation: properties: type: @@ -5285,24 +5152,6 @@ components: - file_id - index title: OpenAIResponseAnnotationFilePath - OpenAIResponseAnnotations: - discriminator: - mapping: - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - title: OpenAIResponseAnnotationFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - title: OpenAIResponseAnnotationCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - title: OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - title: OpenAIResponseAnnotationFilePath - title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseContentPartRefusal: properties: type: @@ -5345,21 +5194,6 @@ components: - output title: OpenAIResponseInputFunctionToolCallOutput description: This represents the output of a function call that gets passed back to the model. - OpenAIResponseInputMessageContent: - discriminator: - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseInputMessageContentFile: properties: type: @@ -5552,18 +5386,6 @@ components: - role title: OpenAIResponseMessage type: object - OpenAIResponseOutputMessageContent: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal OpenAIResponseOutputMessageContentOutputText: properties: text: @@ -5740,6 +5562,53 @@ components: - status title: OpenAIResponseOutputMessageWebSearchToolCall description: Web search tool call output message for OpenAI responses. + CreateConversationRequest: + properties: + items: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + - type: 'null' + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + type: object + title: CreateConversationRequest Conversation: properties: id: @@ -5777,11 +5646,22 @@ components: - created_at title: Conversation description: OpenAI-compatible conversation object. - ConversationDeletedResource: + UpdateConversationRequest: properties: - id: - type: string - title: Id + metadata: + additionalProperties: + type: string + type: object + title: Metadata + type: object + required: + - metadata + title: UpdateConversationRequest + ConversationDeletedResource: + properties: + id: + type: string + title: Id description: The deleted conversation identifier object: type: string @@ -5862,6 +5742,48 @@ components: - data title: ConversationItemList description: List of conversation items with pagination. + AddItemsRequest: + properties: + items: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (9 variants) + type: array + title: Items + type: object + required: + - items + title: AddItemsRequest ConversationItemDeletedResource: properties: id: @@ -6221,6 +6143,24 @@ components: - rerank title: ModelType description: Enumeration of supported model types in Llama Stack. + RunModerationRequest: + properties: + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + model: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input + title: RunModerationRequest ModerationObject: properties: id: @@ -6324,6 +6264,53 @@ components: - data title: ListPromptsResponse description: Response model to list prompts. + CreatePromptRequest: + properties: + prompt: + type: string + title: Prompt + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + required: + - prompt + title: CreatePromptRequest + UpdatePromptRequest: + properties: + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + anyOf: + - items: + type: string + type: array + - type: 'null' + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt + - version + title: UpdatePromptRequest + SetDefaultVersionRequest: + properties: + version: + type: integer + title: Version + type: object + required: + - version + title: SetDefaultVersionRequest ProviderInfo: properties: api: @@ -6407,41 +6394,6 @@ components: - message title: OpenAIResponseError description: Error details for failed OpenAI response requests. - OpenAIResponseInput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage OpenAIResponseInputToolFileSearch: properties: type: @@ -6699,33 +6651,6 @@ components: - input title: OpenAIResponseObjectWithInput description: OpenAI response object extended with input context information. - OpenAIResponseOutput: - 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' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - title: OpenAIResponseMessage | ... (7 variants) OpenAIResponsePrompt: properties: id: @@ -6770,27 +6695,6 @@ components: type: object title: OpenAIResponseText description: Text response configuration for OpenAI responses. - OpenAIResponseTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - title: OpenAIResponseToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseToolMCP: properties: type: @@ -6856,27 +6760,6 @@ components: - type title: ResponseGuardrailSpec type: object - OpenAIResponseInputTool: - discriminator: - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/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' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseInputToolMCP: properties: type: @@ -6925,6 +6808,135 @@ components: - server_url title: OpenAIResponseInputToolMCP description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + CreateOpenaiResponseRequest: + properties: + input: + anyOf: + - type: string + - items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseMessage-Input | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + title: OpenAIResponseMessage-Input + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input + type: array + title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] + model: + type: string + title: Model + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + title: OpenAIResponsePrompt + instructions: + anyOf: + - type: string + - type: 'null' + previous_response_id: + anyOf: + - type: string + - type: 'null' + conversation: + anyOf: + - type: string + - type: 'null' + store: + anyOf: + - type: boolean + - type: 'null' + default: true + stream: + anyOf: + - type: boolean + - type: 'null' + default: false + temperature: + anyOf: + - type: number + - type: 'null' + text: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseText' + title: OpenAIResponseText + - type: 'null' + title: OpenAIResponseText + tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + include: + anyOf: + - items: + type: string + type: array + - type: 'null' + max_infer_iters: + anyOf: + - type: integer + - type: 'null' + default: 10 + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - input + - model + title: CreateOpenaiResponseRequest OpenAIResponseObject: properties: created_at: @@ -8290,14 +8302,53 @@ components: - data title: ListOpenAIResponseInputItem description: List container for OpenAI response input items. - RunShieldResponse: + RunShieldRequest: properties: - violation: - anyOf: - - $ref: '#/components/schemas/SafetyViolation' - title: SafetyViolation - - type: 'null' - title: SafetyViolation + shield_id: + type: string + title: Shield Id + messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) + type: array + title: Messages + params: + additionalProperties: true + type: object + title: Params + type: object + required: + - shield_id + - messages + - params + title: RunShieldRequest + RunShieldResponse: + properties: + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation + - type: 'null' + title: SafetyViolation type: object title: RunShieldResponse description: Response from running a safety shield. @@ -8564,21 +8615,6 @@ components: - return_type title: ScoringFn description: A scoring function resource for evaluating model outputs. - ScoringFnParams: - discriminator: - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams StringType: properties: type: @@ -8610,6 +8646,40 @@ components: required: - data title: ListScoringFunctionsResponse + ScoreRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + type: object + required: + - input_rows + - scoring_functions + title: ScoreRequest ScoreResponse: properties: results: @@ -8640,6 +8710,41 @@ components: - aggregated_results title: ScoringResult description: A scoring result for a single row. + ScoreBatchRequest: + properties: + dataset_id: + type: string + title: Dataset Id + scoring_functions: + additionalProperties: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: AdditionalpropertiesUnion + type: object + title: Scoring Functions + save_results_dataset: + type: boolean + title: Save Results Dataset + default: false + type: object + required: + - dataset_id + - scoring_functions + title: ScoreBatchRequest ScoreBatchResponse: properties: dataset_id: @@ -8698,61 +8803,24 @@ components: required: - data title: ListShieldsResponse - ImageContentItem: - description: A image content item + InvokeToolRequest: properties: - type: - const: image - default: image - title: Type + tool_name: type: string - image: - $ref: '#/components/schemas/_URLOrData' - required: - - image - title: ImageContentItem + title: Tool Name + kwargs: + additionalProperties: true + type: object + title: Kwargs + authorization: + anyOf: + - type: string + - type: 'null' type: object - InterleavedContent: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - InterleavedContentItem: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem + required: + - tool_name + - kwargs + title: InvokeToolRequest TextContentItem: properties: type: @@ -8920,64 +8988,6 @@ components: - data title: ListToolGroupsResponse description: Response containing a list of tool groups. - Chunk: - description: A chunk of content that can be inserted into a vector database. - properties: - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - chunk_id: - title: Chunk Id - type: string - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - nullable: true - title: ChunkMetadata - required: - - content - - chunk_id - title: Chunk - type: object ChunkMetadata: properties: chunk_id: @@ -9031,6 +9041,69 @@ components: 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. + InsertChunksRequest: + properties: + vector_store_id: + type: string + title: Vector Store Id + chunks: + items: + $ref: '#/components/schemas/Chunk-Input' + type: array + title: Chunks + ttl_seconds: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - vector_store_id + - chunks + title: InsertChunksRequest + QueryChunksRequest: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - vector_store_id + - query + title: QueryChunksRequest QueryChunksResponse: properties: chunks: @@ -9153,18 +9226,6 @@ components: - file_counts title: VectorStoreObject description: OpenAI Vector Store object. - VectorStoreChunkingStrategy: - discriminator: - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - propertyName: type - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreChunkingStrategyAuto: properties: type: @@ -9245,12 +9306,30 @@ components: type: object title: OpenAICreateVectorStoreRequestWithExtraBody description: Request to create a vector store with extra_body support. - VectorStoreDeleteResponse: + OpenaiUpdateVectorStoreRequest: properties: - id: - type: string - title: Id - object: + name: + anyOf: + - type: string + - type: 'null' + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + title: OpenaiUpdateVectorStoreRequest + VectorStoreDeleteResponse: + properties: + id: + type: string + title: Id + object: type: string title: Object default: vector_store.deleted @@ -9331,14 +9410,6 @@ components: - file_counts title: VectorStoreFileBatchObject description: OpenAI Vector Store File Batch object. - VectorStoreFileStatus: - type: string - enum: - - completed - - in_progress - - cancelled - - failed - default: completed VectorStoreFileLastError: properties: code: @@ -9472,6 +9543,45 @@ components: - data title: VectorStoreListFilesResponse description: Response from listing files in a vector store. + OpenaiAttachFileToVectorStoreRequest: + properties: + file_id: + type: string + title: File Id + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + chunking_strategy: + anyOf: + - oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + type: object + required: + - file_id + title: OpenaiAttachFileToVectorStoreRequest + OpenaiUpdateVectorStoreFileRequest: + properties: + attributes: + additionalProperties: true + type: object + title: Attributes + type: object + required: + - attributes + title: OpenaiUpdateVectorStoreFileRequest VectorStoreFileDeleteResponse: properties: id: @@ -9547,6 +9657,46 @@ components: - data title: VectorStoreFileContentResponse description: Represents the parsed content of a vector store file. + OpenaiSearchVectorStoreRequest: + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + max_num_results: + anyOf: + - type: integer + - type: 'null' + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + title: SearchRankingOptions + rewrite_query: + anyOf: + - type: boolean + - type: 'null' + default: false + search_mode: + anyOf: + - type: string + - type: 'null' + default: vector + type: object + required: + - query + title: OpenaiSearchVectorStoreRequest VectorStoreSearchResponse: properties: file_id: @@ -9621,6 +9771,18 @@ components: - version title: VersionInfo description: Version information for the service. + AppendRowsRequest: + properties: + rows: + items: + additionalProperties: true + type: object + type: array + title: Rows + type: object + required: + - rows + title: AppendRowsRequest PaginatedResponse: properties: data: @@ -9967,6 +10129,27 @@ components: - temperature title: TopPSamplingStrategy description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. + EvaluateRowsRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + type: object + required: + - input_rows + - scoring_functions + - benchmark_config + title: EvaluateRowsRequest EvaluateResponse: properties: generations: @@ -9999,6 +10182,40 @@ components: - status title: Job description: A job execution instance with status tracking. + RerankRequest: + properties: + model: + type: string + title: Model + query: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + items: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + type: array + title: Items + max_num_results: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - model + - query + - items + title: RerankRequest RerankData: properties: index: @@ -10095,6 +10312,15 @@ components: - perplexity title: PostTrainingMetric description: Training metrics captured during post-training jobs. + CancelTrainingJobRequest: + properties: + job_uuid: + type: string + title: Job Uuid + type: object + required: + - job_uuid + title: CancelTrainingJobRequest PostTrainingJobStatusResponse: properties: job_uuid: @@ -10307,6 +10533,35 @@ components: - n_epochs title: TrainingConfig description: Comprehensive configuration for the training process. + PreferenceOptimizeRequest: + properties: + job_uuid: + type: string + title: Job Uuid + finetuned_model: + type: string + title: Finetuned Model + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: PreferenceOptimizeRequest PostTrainingJob: properties: job_uuid: @@ -10316,18 +10571,6 @@ components: required: - job_uuid title: PostTrainingJob - AlgorithmConfig: - discriminator: - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - propertyName: type - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - title: LoraFinetuningConfig | QATFinetuningConfig LoraFinetuningConfig: properties: type: @@ -10390,75 +10633,182 @@ components: - group_size title: QATFinetuningConfig description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - ParamType: - discriminator: - mapping: - 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' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - DataSource: - discriminator: - mapping: - rows: '#/components/schemas/RowsDataSource' - uri: '#/components/schemas/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - AllowedToolsFilter: + SupervisedFineTuneRequest: properties: - tool_names: + job_uuid: + type: string + title: Job Uuid + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + model: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' - type: object - title: AllowedToolsFilter - description: Filter configuration for restricting which MCP tools can be used. - ApprovalFilter: - properties: - always: + description: Model descriptor for training if not in provider config` + checkpoint_dir: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' - never: + algorithm_config: anyOf: - - items: - type: string - type: array + - oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + title: LoraFinetuningConfig | QATFinetuningConfig + - type: 'null' + title: Algorithm Config + type: object + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: SupervisedFineTuneRequest + RegisterModelRequest: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + model_type: + anyOf: + - $ref: '#/components/schemas/ModelType' + title: ModelType + - type: 'null' + title: ModelType + type: object + required: + - model_id + title: RegisterModelRequest + RegisterShieldRequest: + properties: + shield_id: + type: string + title: Shield Id + provider_shield_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + params: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - shield_id + title: RegisterShieldRequest + RegisterToolGroupRequest: + properties: + toolgroup_id: + type: string + title: Toolgroup Id + provider_id: + type: string + title: Provider Id + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + title: URL + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - toolgroup_id + - provider_id + title: RegisterToolGroupRequest + RegisterBenchmarkRequest: + properties: + benchmark_id: + type: string + title: Benchmark Id + dataset_id: + type: string + title: Dataset Id + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + provider_benchmark_id: + anyOf: + - type: string + - type: 'null' + provider_id: + anyOf: + - type: string + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - benchmark_id + - dataset_id + - scoring_functions + title: RegisterBenchmarkRequest + AllowedToolsFilter: + properties: + tool_names: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + never: + anyOf: + - items: + type: string + type: array - type: 'null' type: object title: ApprovalFilter @@ -10526,34 +10876,6 @@ components: - output_tokens_details - total_tokens title: BatchUsage - BatchesPostRequest: - properties: - input_file_id: - type: string - title: Input File Id - endpoint: - type: string - title: Endpoint - completion_window: - type: string - const: 24h - title: Completion Window - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - idempotency_key: - anyOf: - - type: string - - type: 'null' - type: object - required: - - input_file_id - - endpoint - - completion_window - title: BatchesPostRequest Body_openai_upload_file_v1_files_post: properties: file: @@ -10573,82 +10895,6 @@ components: - file - purpose title: Body_openai_upload_file_v1_files_post - Body_register_benchmark_v1alpha_eval_benchmarks_post: - properties: - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - scoring_functions - title: Body_register_benchmark_v1alpha_eval_benchmarks_post - Body_register_scoring_function_v1_scoring_functions_post: - properties: - return_type: - anyOf: - - $ref: '#/components/schemas/StringType' - title: StringType - - $ref: '#/components/schemas/NumberType' - title: NumberType - - $ref: '#/components/schemas/BooleanType' - title: BooleanType - - $ref: '#/components/schemas/ArrayType' - title: ArrayType - - $ref: '#/components/schemas/ObjectType' - title: ObjectType - - $ref: '#/components/schemas/JsonType' - title: JsonType - - $ref: '#/components/schemas/UnionType' - title: UnionType - - $ref: '#/components/schemas/ChatCompletionInputType' - title: ChatCompletionInputType - - $ref: '#/components/schemas/CompletionInputType' - title: CompletionInputType - title: StringType | ... (9 variants) - params: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: Params - type: object - required: - - return_type - title: Body_register_scoring_function_v1_scoring_functions_post - Body_register_tool_group_v1_toolgroups_post: - properties: - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - title: Body_register_tool_group_v1_toolgroups_post Chunk-Input: properties: content: @@ -10773,115 +11019,15 @@ components: - reasoning.encrypted_content title: ConversationItemInclude description: Specify additional output data to include in the model response. - ConversationsByConversationIdItemsPostRequest: - properties: - items: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) - type: array - title: Items - type: object - required: - - items - title: ConversationsByConversationIdItemsPostRequest - ConversationsByConversationIdPostRequest: - properties: - metadata: - additionalProperties: - type: string - type: object - title: Metadata - type: object - required: - - metadata - title: ConversationsByConversationIdPostRequest - ConversationsPostRequest: - properties: - items: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (9 variants) - type: array - - type: 'null' - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - type: object - title: ConversationsPostRequest - 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. - Errors: + 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. + Errors: properties: data: anyOf: @@ -10970,52 +11116,6 @@ components: - name title: MCPListToolsTool description: Tool definition returned by MCP list tools operation. - ModelsPostRequest: - properties: - model_id: - type: string - title: Model Id - provider_model_id: - anyOf: - - type: string - - type: 'null' - provider_id: - anyOf: - - type: string - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - model_type: - anyOf: - - $ref: '#/components/schemas/ModelType' - title: ModelType - - type: 'null' - title: ModelType - type: object - required: - - model_id - title: ModelsPostRequest - ModerationsPostRequest: - properties: - input: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - model: - anyOf: - - type: string - - type: 'null' - type: object - required: - - input - title: ModerationsPostRequest OpenAIAssistantMessageParam-Input: properties: role: @@ -11389,1765 +11489,71 @@ components: required: - reasoning_tokens title: OutputTokensDetails - PromptsByPromptIdPostRequest: - properties: - prompt: - type: string - title: Prompt - version: - type: integer - title: Version - variables: - anyOf: - - items: - type: string - type: array - - type: 'null' - set_as_default: - type: boolean - title: Set As Default - default: true - type: object - required: - - prompt - - version - title: PromptsByPromptIdPostRequest - PromptsByPromptIdSetDefaultVersionPostRequest: + RegisterDatasetRequestLoose: properties: - version: - type: integer - title: Version + purpose: + title: Purpose + source: + title: Source + metadata: + title: Metadata + dataset_id: + title: Dataset Id type: object required: - - version - title: PromptsByPromptIdSetDefaultVersionPostRequest - PromptsPostRequest: + - purpose + - source + title: RegisterDatasetRequestLoose + RegisterScoringFunctionRequestLoose: properties: - prompt: - type: string - title: Prompt - variables: - anyOf: - - items: - type: string - type: array - - type: 'null' + scoring_fn_id: + title: Scoring Fn Id + description: + title: Description + return_type: + title: Return Type + provider_scoring_fn_id: + title: Provider Scoring Fn Id + provider_id: + title: Provider Id + params: + title: Params type: object required: - - prompt - title: PromptsPostRequest - ResponsesPostRequest: + - scoring_fn_id + - description + - return_type + title: RegisterScoringFunctionRequestLoose + SearchRankingOptions: properties: - input: + ranker: anyOf: - type: string - - items: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: 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-Input' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseMessage-Input | ... (7 variants) - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseMessage-Input' - title: OpenAIResponseMessage-Input - title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Input - type: array - title: list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] - title: string | list[OpenAIResponseMessageUnion | OpenAIResponseInputFunctionToolCallOutput | ...] - model: - type: string - title: Model - prompt: - anyOf: - - $ref: '#/components/schemas/OpenAIResponsePrompt' - title: OpenAIResponsePrompt - type: 'null' - title: OpenAIResponsePrompt - instructions: + score_threshold: anyOf: - - type: string + - type: number - type: 'null' - previous_response_id: + default: 0.0 + type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + _URLOrData: + properties: + url: anyOf: - - type: string + - $ref: '#/components/schemas/URL' + title: URL - type: 'null' - conversation: + title: URL + data: anyOf: - type: string - type: 'null' - store: - anyOf: - - type: boolean - - type: 'null' - default: true - stream: - anyOf: - - type: boolean - - type: 'null' - default: false - temperature: - anyOf: - - type: number - - type: 'null' - text: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseText' - title: OpenAIResponseText - - type: 'null' - title: OpenAIResponseText - tools: - anyOf: - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - title: OpenAIResponseInputToolFileSearch - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - title: OpenAIResponseInputToolFunction - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: OpenAIResponseInputToolMCP - discriminator: - propertyName: type - mapping: - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' - title: OpenAIResponseInputToolWebSearch | ... (4 variants) - type: array - - type: 'null' - include: - anyOf: - - items: - type: string - type: array - - type: 'null' - max_infer_iters: - anyOf: - - type: integer - - type: 'null' - default: 10 - max_tool_calls: - anyOf: - - type: integer - - type: 'null' - type: object - required: - - input - - model - title: ResponsesPostRequest - SafetyRunShieldPostRequest: - properties: - shield_id: - type: string - title: Shield Id - messages: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' - title: OpenAIUserMessageParam-Input - - $ref: '#/components/schemas/OpenAISystemMessageParam' - title: OpenAISystemMessageParam - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' - title: OpenAIAssistantMessageParam-Input - - $ref: '#/components/schemas/OpenAIToolMessageParam' - title: OpenAIToolMessageParam - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: 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' - title: OpenAIUserMessageParam-Input | ... (5 variants) - type: array - title: Messages - params: - additionalProperties: true - type: object - title: Params - type: object - required: - - shield_id - - messages - - params - title: SafetyRunShieldPostRequest - ScoringScoreBatchPostRequest: - properties: - dataset_id: - type: string - title: Dataset Id - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - title: Scoring Functions - save_results_dataset: - type: boolean - title: Save Results Dataset - default: false - type: object - required: - - dataset_id - - scoring_functions - title: ScoringScoreBatchPostRequest - ScoringScorePostRequest: - properties: - input_rows: - items: - additionalProperties: true - type: object - type: array - title: Input Rows - scoring_functions: - additionalProperties: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - - type: 'null' - title: AdditionalpropertiesUnion - type: object - title: Scoring Functions - type: object - required: - - input_rows - - scoring_functions - title: ScoringScorePostRequest - SearchRankingOptions: - properties: - ranker: - anyOf: - - type: string - - type: 'null' - score_threshold: - anyOf: - - type: number - - type: 'null' - default: 0.0 - type: object - title: SearchRankingOptions - description: Options for ranking and filtering search results. - ShieldsPostRequest: - properties: - shield_id: - type: string - title: Shield Id - provider_shield_id: - anyOf: - - type: string - - type: 'null' - provider_id: - anyOf: - - type: string - - type: 'null' - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - shield_id - title: ShieldsPostRequest - ToolRuntimeInvokePostRequest: - properties: - tool_name: - type: string - title: Tool Name - kwargs: - additionalProperties: true - type: object - title: Kwargs - authorization: - anyOf: - - type: string - - type: 'null' - type: object - required: - - tool_name - - kwargs - title: ToolRuntimeInvokePostRequest - V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest: - properties: - input_rows: - items: - additionalProperties: true - type: object - type: array - title: Input Rows - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - type: object - required: - - input_rows - - scoring_functions - - benchmark_config - title: V1AlphaEvalBenchmarksByBenchmarkIdEvaluationsPostRequest - V1AlphaInferenceRerankPostRequest: - properties: - model: - type: string - title: Model - query: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - items: - items: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - type: array - title: Items - max_num_results: - anyOf: - - type: integer - - type: 'null' - type: object - required: - - model - - query - - items - title: V1AlphaInferenceRerankPostRequest - V1AlphaPostTrainingPreferenceOptimizePostRequest: - properties: - job_uuid: - type: string - title: Job Uuid - finetuned_model: - type: string - title: Finetuned Model - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - type: object - required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: V1AlphaPostTrainingPreferenceOptimizePostRequest - V1AlphaPostTrainingSupervisedFineTunePostRequest: - properties: - job_uuid: - type: string - title: Job Uuid - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - model: - anyOf: - - type: string - - type: 'null' - description: Model descriptor for training if not in provider config` - checkpoint_dir: - anyOf: - - type: string - - type: 'null' - algorithm_config: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - discriminator: - propertyName: type - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - title: LoraFinetuningConfig | QATFinetuningConfig - - type: 'null' - title: Algorithm Config - type: object - required: - - job_uuid - - training_config - - hyperparam_search_config - - logger_config - title: V1AlphaPostTrainingSupervisedFineTunePostRequest - V1BetaDatasetsPostRequestLoose: - properties: - purpose: - title: Purpose - source: - title: Source - metadata: - title: Metadata - dataset_id: - title: Dataset Id - type: object - required: - - purpose - - source - title: V1BetaDatasetsPostRequestLoose - VectorIoQueryPostRequest: - properties: - vector_store_id: - type: string - title: Vector Store Id - query: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem - type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] - params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - required: - - vector_store_id - - query - title: VectorIoQueryPostRequest - VectorStoresByVectorStoreIdFilesByFileIdPostRequest: - properties: - attributes: - additionalProperties: true - type: object - title: Attributes - type: object - required: - - attributes - title: VectorStoresByVectorStoreIdFilesByFileIdPostRequest - VectorStoresByVectorStoreIdFilesPostRequest: - properties: - file_id: - type: string - title: File Id - attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - title: VectorStoreChunkingStrategyAuto - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyStatic - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic - - type: 'null' - title: Chunking Strategy - type: object - required: - - file_id - title: VectorStoresByVectorStoreIdFilesPostRequest - VectorStoresByVectorStoreIdPostRequest: - properties: - name: - anyOf: - - type: string - - type: 'null' - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - type: object - title: VectorStoresByVectorStoreIdPostRequest - VectorStoresByVectorStoreIdSearchPostRequest: - properties: - query: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - max_num_results: - anyOf: - - type: integer - - type: 'null' - default: 10 - ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - title: SearchRankingOptions - - type: 'null' - title: SearchRankingOptions - rewrite_query: - anyOf: - - type: boolean - - type: 'null' - default: false - search_mode: - anyOf: - - type: string - - type: 'null' - default: vector - type: object - required: - - query - title: VectorStoresByVectorStoreIdSearchPostRequest - _URLOrData: - properties: - url: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - type: object - title: _URLOrData - description: A URL or a base64 encoded string - SamplingStrategy: - discriminator: - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - propertyName: type - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - GrammarResponseFormat: - description: Configuration for grammar-guided response generation. - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat - type: object - JsonSchemaResponseFormat: - description: Configuration for JSON schema-guided response generation. - 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 - ResponseFormat: - discriminator: - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - title: JsonSchemaResponseFormat - - $ref: '#/components/schemas/GrammarResponseFormat' - title: GrammarResponseFormat - title: JsonSchemaResponseFormat | GrammarResponseFormat - OpenAIResponseContentPart: - discriminator: - mapping: - output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' - reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' - title: OpenAIResponseContentPartOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' - title: OpenAIResponseContentPartReasoningText - title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText - SpanEndPayload: - description: Payload for a span end event. - properties: - type: - const: span_end - default: span_end - title: Type - type: string - status: - $ref: '#/components/schemas/SpanStatus' - required: - - status - title: SpanEndPayload - type: object - SpanStartPayload: - description: Payload for a span start event. - properties: - type: - const: span_start - default: span_start - title: Type - type: string - name: - title: Name - type: string - parent_span_id: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - name - title: SpanStartPayload - type: object - SpanStatus: - description: The status of a span indicating whether it completed successfully or with an error. - enum: - - ok - - error - title: SpanStatus - type: string - StructuredLogPayload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - LogSeverity: - description: The severity level of a log message. - enum: - - verbose - - debug - - info - - warn - - error - - critical - title: LogSeverity - type: string - MetricEvent: - description: A metric event containing a measured value. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: metric - default: metric - title: Type - type: string - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - title: Unit - type: string - required: - - trace_id - - span_id - - timestamp - - metric - - value - - unit - title: MetricEvent - type: object - StructuredLogEvent: - description: A structured log event containing typed payload data. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: structured_log - default: structured_log - title: Type - type: string - payload: - discriminator: - mapping: - span_end: '#/components/schemas/SpanEndPayload' - span_start: '#/components/schemas/SpanStartPayload' - propertyName: type - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - title: SpanStartPayload - - $ref: '#/components/schemas/SpanEndPayload' - title: SpanEndPayload - title: SpanStartPayload | SpanEndPayload - required: - - trace_id - - span_id - - timestamp - - payload - title: StructuredLogEvent - type: object - UnstructuredLogEvent: - description: An unstructured log event containing a simple text message. - properties: - trace_id: - title: Trace Id - type: string - span_id: - title: Span Id - type: string - timestamp: - format: date-time - title: Timestamp - type: string - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - title: string | ... (4 variants) - type: object - - type: 'null' - type: - const: unstructured_log - default: unstructured_log - title: Type - type: string - message: - title: Message - type: string - severity: - $ref: '#/components/schemas/LogSeverity' - required: - - trace_id - - span_id - - timestamp - - message - - severity - title: UnstructuredLogEvent - type: object - Event: - discriminator: - mapping: - metric: '#/components/schemas/MetricEvent' - structured_log: '#/components/schemas/StructuredLogEvent' - unstructured_log: '#/components/schemas/UnstructuredLogEvent' - propertyName: type - oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - title: UnstructuredLogEvent - - $ref: '#/components/schemas/MetricEvent' - title: MetricEvent - - $ref: '#/components/schemas/StructuredLogEvent' - title: StructuredLogEvent - title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent - ImageDelta: - description: An image content delta for streaming responses. - properties: - type: - const: image - default: image - title: Type - type: string - image: - format: binary - title: Image - type: string - required: - - image - title: ImageDelta - type: object - TextDelta: - description: A text content delta for streaming responses. - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: TextDelta - type: object - MetricInResponse: - description: A metric value included in API responses. - properties: - metric: - title: Metric - type: string - value: - anyOf: - - type: integer - - type: number - title: integer | number - unit: - anyOf: - - type: string - - type: 'null' - nullable: true - required: - - metric - - value - title: MetricInResponse - type: object - DialogType: - description: Parameter type for dialog data with semantic output labels. - properties: - type: - const: dialog - default: dialog - title: Type - type: string - title: DialogType - type: object - ConversationItemCreateRequest: - description: Request body for creating conversation items. - properties: - items: - description: Items to include in the conversation context. You may add up to 20 items at a time. - items: - discriminator: - 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' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - title: OpenAIResponseMessage - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - title: OpenAIResponseOutputMessageWebSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - title: OpenAIResponseOutputMessageFileSearchToolCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - title: OpenAIResponseOutputMessageFunctionToolCall - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - title: OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - title: OpenAIResponseMCPApprovalRequest - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - title: OpenAIResponseMCPApprovalResponse - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - title: OpenAIResponseOutputMessageMCPCall - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: OpenAIResponseOutputMessageMCPListTools - title: OpenAIResponseMessage | ... (9 variants) - maxItems: 20 - title: Items - type: array - required: - - items - title: ConversationItemCreateRequest - type: object - ConversationMessage: - description: OpenAI-compatible message item for conversations. - properties: - id: - description: unique identifier for this message - title: Id - type: string - content: - description: message content - items: - additionalProperties: true - type: object - title: Content - type: array - role: - description: message role - title: Role - type: string - status: - description: message status - title: Status - type: string - type: - const: message - default: message - title: Type - type: string - object: - const: message - default: message - title: Object - type: string - required: - - id - - content - - role - - status - title: ConversationMessage - type: object - Api: - description: Enumeration of all available APIs in the Llama Stack system. - enum: - - providers - - inference - - safety - - agents - - batches - - vector_io - - datasetio - - scoring - - eval - - post_training - - tool_runtime - - models - - shields - - vector_stores - - datasets - - scoring_functions - - benchmarks - - tool_groups - - files - - prompts - - conversations - - inspect - title: Api - type: string - InlineProviderSpec: - properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class - type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - container_image: - anyOf: - - type: string - - type: 'null' - description: |2 - - The container image to use for this implementation. If one is provided, pip_packages will be ignored. - If a provider depends on other providers, the dependencies MUST NOT specify a container image. - nullable: true - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true - required: - - api - - provider_type - - config_class - title: InlineProviderSpec - type: object - ProviderSpec: - properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class - type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - required: - - api - - provider_type - - config_class - title: ProviderSpec - type: object - RemoteProviderSpec: - properties: - api: - $ref: '#/components/schemas/Api' - provider_type: - title: Provider Type - type: string - config_class: - description: Fully-qualified classname of the config for this provider - title: Config Class - type: string - api_dependencies: - description: Higher-level API surfaces may depend on other providers to provide their functionality - items: - $ref: '#/components/schemas/Api' - title: Api Dependencies - type: array - optional_api_dependencies: - items: - $ref: '#/components/schemas/Api' - title: Optional Api Dependencies - type: array - deprecation_warning: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated, specify the warning message here - nullable: true - deprecation_error: - anyOf: - - type: string - - type: 'null' - description: If this provider is deprecated and does NOT work, specify the error message here - nullable: true - module: - anyOf: - - type: string - - type: 'null' - description: |2- - - Fully-qualified name of the module to import. The module is expected to have: - - - `get_adapter_impl(config, deps)`: returns the adapter implementation - - Example: `module: ramalama_stack` - - nullable: true - pip_packages: - description: The pip dependencies needed for this implementation - items: - type: string - title: Pip Packages - type: array - provider_data_validator: - anyOf: - - type: string - - type: 'null' - nullable: true - is_external: - default: false - description: Notes whether this provider is an external provider. - title: Is External - type: boolean - deps__: - items: - type: string - title: Deps - type: array - adapter_type: - description: Unique identifier for this adapter - title: Adapter Type - type: string - description: - anyOf: - - type: string - - type: 'null' - description: |2 - - A description of the provider. This is used to display in the documentation. - nullable: true - required: - - api - - provider_type - - config_class - - adapter_type - title: RemoteProviderSpec - type: object - Bf16QuantizationConfig: - description: Configuration for BFloat16 precision (typically no quantization). - properties: - type: - const: bf16 - default: bf16 - title: Type - type: string - title: Bf16QuantizationConfig - type: object - EmbeddingsResponse: - description: Response containing generated embeddings. - properties: - embeddings: - items: - items: - type: number - type: array - title: Embeddings - type: array - required: - - embeddings - title: EmbeddingsResponse - type: object - Fp8QuantizationConfig: - description: Configuration for 8-bit floating point quantization. - properties: - type: - const: fp8_mixed - default: fp8_mixed - title: Type - type: string - title: Fp8QuantizationConfig - type: object - Int4QuantizationConfig: - description: Configuration for 4-bit integer quantization. - properties: - type: - const: int4_mixed - default: int4_mixed - title: Type - type: string - scheme: - anyOf: - - type: string - - type: 'null' - default: int4_weight_int8_dynamic_activation - title: Int4QuantizationConfig - type: object - OpenAICompletionLogprobs: - description: |- - The log probabilities for the tokens in the message from an OpenAI-compatible completion response. - - :text_offset: (Optional) The offset of the token in the text - :token_logprobs: (Optional) The log probabilities for the tokens - :tokens: (Optional) The tokens - :top_logprobs: (Optional) The top log probabilities for the tokens - properties: - text_offset: - anyOf: - - items: - type: integer - type: array - - type: 'null' - nullable: true - token_logprobs: - anyOf: - - items: - type: number - type: array - - type: 'null' - nullable: true - tokens: - anyOf: - - items: - type: string - type: array - - type: 'null' - nullable: true - top_logprobs: - anyOf: - - items: - additionalProperties: - type: number - type: object - type: array - - type: 'null' - nullable: true - title: OpenAICompletionLogprobs - type: object - TokenLogProbs: - description: Log probabilities for generated tokens. - properties: - logprobs_by_token: - additionalProperties: - type: number - title: Logprobs By Token - type: object - required: - - logprobs_by_token - title: TokenLogProbs - type: object - ToolResponseMessage: - description: A message representing the result of a tool invocation. - properties: - role: - const: tool - default: tool - title: Role - type: string - call_id: - title: Call Id - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - required: - - call_id - - content - title: ToolResponseMessage - type: object - UserMessage: - description: A message from the user in a chat conversation. - properties: - role: - const: user - default: user - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - title: string | list[ImageContentItem | TextContentItem] - context: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - - items: - discriminator: - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - title: ImageContentItem - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - title: ImageContentItem | TextContentItem - type: array - title: list[ImageContentItem | TextContentItem] - - type: 'null' - title: string | list[ImageContentItem | TextContentItem] - nullable: true - required: - - content - title: UserMessage - type: object - PostTrainingJobLogStream: - description: Stream of logs from a finetuning job. - properties: - job_uuid: - title: Job Uuid - type: string - log_lines: - items: - type: string - title: Log Lines - type: array - required: - - job_uuid - - log_lines - title: PostTrainingJobLogStream - type: object - RLHFAlgorithm: - description: Available reinforcement learning from human feedback algorithms. - enum: - - dpo - title: RLHFAlgorithm - type: string - PostTrainingRLHFRequest: - description: Request to finetune a model using reinforcement learning from human feedback. - properties: - job_uuid: - title: Job Uuid - type: string - finetuned_model: - $ref: '#/components/schemas/URL' - dataset_id: - title: Dataset Id - type: string - validation_dataset_id: - title: Validation Dataset Id - type: string - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - title: Hyperparam Search Config - type: object - logger_config: - additionalProperties: true - title: Logger Config - type: object - required: - - job_uuid - - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - - algorithm_config - - optimizer_config - - training_config - - hyperparam_search_config - - logger_config - title: PostTrainingRLHFRequest - type: object - ToolGroupInput: - description: Input data for registering a tool group. - properties: - toolgroup_id: - title: Toolgroup Id - type: string - provider_id: - title: Provider Id - type: string - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - nullable: true - title: URL - required: - - toolgroup_id - - provider_id - title: ToolGroupInput - type: object - VectorStoreCreateRequest: - description: Request to create a vector store. - properties: - name: - anyOf: - - type: string - - type: 'null' - nullable: true - file_ids: - items: - type: string - title: File Ids - type: array - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - chunking_strategy: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - metadata: - additionalProperties: true - title: Metadata - type: object - title: VectorStoreCreateRequest - type: object - VectorStoreModifyRequest: - description: Request to modify a vector store. - properties: - name: - anyOf: - - type: string - - type: 'null' - nullable: true - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - title: VectorStoreModifyRequest - type: object - VectorStoreSearchRequest: - description: Request to search a vector store. - properties: - query: - anyOf: - - type: string - - items: - type: string - type: array - title: list[string] - title: string | list[string] - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - max_num_results: - default: 10 - title: Max Num Results - type: integer - ranking_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - nullable: true - rewrite_query: - default: false - title: Rewrite Query - type: boolean - required: - - query - title: VectorStoreSearchRequest + contentEncoding: base64 type: object + title: _URLOrData + description: A URL or a base64 encoded string responses: BadRequest400: description: The request was invalid or malformed diff --git a/scripts/openapi_generator/_legacy_order.py b/scripts/openapi_generator/_legacy_order.py index be0c379fd2..c0a83c7dfa 100644 --- a/scripts/openapi_generator/_legacy_order.py +++ b/scripts/openapi_generator/_legacy_order.py @@ -12,462 +12,492 @@ remain readable while we debug schema content regressions. Remove once stable. """ -LEGACY_PATH_ORDER = ['/v1/batches', - '/v1/batches/{batch_id}', - '/v1/batches/{batch_id}/cancel', - '/v1/chat/completions', - '/v1/chat/completions/{completion_id}', - '/v1/completions', - '/v1/conversations', - '/v1/conversations/{conversation_id}', - '/v1/conversations/{conversation_id}/items', - '/v1/conversations/{conversation_id}/items/{item_id}', - '/v1/embeddings', - '/v1/files', - '/v1/files/{file_id}', - '/v1/files/{file_id}/content', - '/v1/health', - '/v1/inspect/routes', - '/v1/models', - '/v1/models/{model_id}', - '/v1/moderations', - '/v1/prompts', - '/v1/prompts/{prompt_id}', - '/v1/prompts/{prompt_id}/set-default-version', - '/v1/prompts/{prompt_id}/versions', - '/v1/providers', - '/v1/providers/{provider_id}', - '/v1/responses', - '/v1/responses/{response_id}', - '/v1/responses/{response_id}/input_items', - '/v1/safety/run-shield', - '/v1/scoring-functions', - '/v1/scoring-functions/{scoring_fn_id}', - '/v1/scoring/score', - '/v1/scoring/score-batch', - '/v1/shields', - '/v1/shields/{identifier}', - '/v1/tool-runtime/invoke', - '/v1/tool-runtime/list-tools', - '/v1/toolgroups', - '/v1/toolgroups/{toolgroup_id}', - '/v1/tools', - '/v1/tools/{tool_name}', - '/v1/vector-io/insert', - '/v1/vector-io/query', - '/v1/vector_stores', - '/v1/vector_stores/{vector_store_id}', - '/v1/vector_stores/{vector_store_id}/file_batches', - '/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}', - '/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel', - '/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files', - '/v1/vector_stores/{vector_store_id}/files', - '/v1/vector_stores/{vector_store_id}/files/{file_id}', - '/v1/vector_stores/{vector_store_id}/files/{file_id}/content', - '/v1/vector_stores/{vector_store_id}/search', - '/v1/version', - '/v1beta/datasetio/append-rows/{dataset_id}', - '/v1beta/datasetio/iterrows/{dataset_id}', - '/v1beta/datasets', - '/v1beta/datasets/{dataset_id}', - '/v1alpha/eval/benchmarks', - '/v1alpha/eval/benchmarks/{benchmark_id}', - '/v1alpha/eval/benchmarks/{benchmark_id}/evaluations', - '/v1alpha/eval/benchmarks/{benchmark_id}/jobs', - '/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}', - '/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result', - '/v1alpha/inference/rerank', - '/v1alpha/post-training/job/artifacts', - '/v1alpha/post-training/job/cancel', - '/v1alpha/post-training/job/status', - '/v1alpha/post-training/jobs', - '/v1alpha/post-training/preference-optimize', - '/v1alpha/post-training/supervised-fine-tune'] +LEGACY_PATH_ORDER = [ + "/v1/batches", + "/v1/batches/{batch_id}", + "/v1/batches/{batch_id}/cancel", + "/v1/chat/completions", + "/v1/chat/completions/{completion_id}", + "/v1/completions", + "/v1/conversations", + "/v1/conversations/{conversation_id}", + "/v1/conversations/{conversation_id}/items", + "/v1/conversations/{conversation_id}/items/{item_id}", + "/v1/embeddings", + "/v1/files", + "/v1/files/{file_id}", + "/v1/files/{file_id}/content", + "/v1/health", + "/v1/inspect/routes", + "/v1/models", + "/v1/models/{model_id}", + "/v1/moderations", + "/v1/prompts", + "/v1/prompts/{prompt_id}", + "/v1/prompts/{prompt_id}/set-default-version", + "/v1/prompts/{prompt_id}/versions", + "/v1/providers", + "/v1/providers/{provider_id}", + "/v1/responses", + "/v1/responses/{response_id}", + "/v1/responses/{response_id}/input_items", + "/v1/safety/run-shield", + "/v1/scoring-functions", + "/v1/scoring-functions/{scoring_fn_id}", + "/v1/scoring/score", + "/v1/scoring/score-batch", + "/v1/shields", + "/v1/shields/{identifier}", + "/v1/tool-runtime/invoke", + "/v1/tool-runtime/list-tools", + "/v1/toolgroups", + "/v1/toolgroups/{toolgroup_id}", + "/v1/tools", + "/v1/tools/{tool_name}", + "/v1/vector-io/insert", + "/v1/vector-io/query", + "/v1/vector_stores", + "/v1/vector_stores/{vector_store_id}", + "/v1/vector_stores/{vector_store_id}/file_batches", + "/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}", + "/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel", + "/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files", + "/v1/vector_stores/{vector_store_id}/files", + "/v1/vector_stores/{vector_store_id}/files/{file_id}", + "/v1/vector_stores/{vector_store_id}/files/{file_id}/content", + "/v1/vector_stores/{vector_store_id}/search", + "/v1/version", + "/v1beta/datasetio/append-rows/{dataset_id}", + "/v1beta/datasetio/iterrows/{dataset_id}", + "/v1beta/datasets", + "/v1beta/datasets/{dataset_id}", + "/v1alpha/eval/benchmarks", + "/v1alpha/eval/benchmarks/{benchmark_id}", + "/v1alpha/eval/benchmarks/{benchmark_id}/evaluations", + "/v1alpha/eval/benchmarks/{benchmark_id}/jobs", + "/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}", + "/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result", + "/v1alpha/inference/rerank", + "/v1alpha/post-training/job/artifacts", + "/v1alpha/post-training/job/cancel", + "/v1alpha/post-training/job/status", + "/v1alpha/post-training/jobs", + "/v1alpha/post-training/preference-optimize", + "/v1alpha/post-training/supervised-fine-tune", +] -LEGACY_SCHEMA_ORDER = ['Error', - 'ListBatchesResponse', - 'CreateBatchRequest', - 'Batch', - 'Order', - 'ListOpenAIChatCompletionResponse', - 'OpenAIAssistantMessageParam', - 'OpenAIChatCompletionContentPartImageParam', - 'OpenAIChatCompletionContentPartParam', - 'OpenAIChatCompletionContentPartTextParam', - 'OpenAIChatCompletionToolCall', - 'OpenAIChatCompletionToolCallFunction', - 'OpenAIChatCompletionUsage', - 'OpenAIChoice', - 'OpenAIChoiceLogprobs', - 'OpenAIDeveloperMessageParam', - 'OpenAIFile', - 'OpenAIFileFile', - 'OpenAIImageURL', - 'OpenAIMessageParam', - 'OpenAISystemMessageParam', - 'OpenAITokenLogProb', - 'OpenAIToolMessageParam', - 'OpenAITopLogProb', - 'OpenAIUserMessageParam', - 'OpenAIJSONSchema', - 'OpenAIResponseFormatJSONObject', - 'OpenAIResponseFormatJSONSchema', - 'OpenAIResponseFormatParam', - 'OpenAIResponseFormatText', - 'OpenAIChatCompletionRequestWithExtraBody', - 'OpenAIChatCompletion', - 'OpenAIChatCompletionChunk', - 'OpenAIChoiceDelta', - 'OpenAIChunkChoice', - 'OpenAICompletionWithInputMessages', - 'OpenAICompletionRequestWithExtraBody', - 'OpenAICompletion', - 'OpenAICompletionChoice', - 'ConversationItem', - 'OpenAIResponseAnnotationCitation', - 'OpenAIResponseAnnotationContainerFileCitation', - 'OpenAIResponseAnnotationFileCitation', - 'OpenAIResponseAnnotationFilePath', - 'OpenAIResponseAnnotations', - 'OpenAIResponseContentPartRefusal', - 'OpenAIResponseInputFunctionToolCallOutput', - 'OpenAIResponseInputMessageContent', - 'OpenAIResponseInputMessageContentFile', - 'OpenAIResponseInputMessageContentImage', - 'OpenAIResponseInputMessageContentText', - 'OpenAIResponseMCPApprovalRequest', - 'OpenAIResponseMCPApprovalResponse', - 'OpenAIResponseMessage', - 'OpenAIResponseOutputMessageContent', - 'OpenAIResponseOutputMessageContentOutputText', - 'OpenAIResponseOutputMessageFileSearchToolCall', - 'OpenAIResponseOutputMessageFunctionToolCall', - 'OpenAIResponseOutputMessageMCPCall', - 'OpenAIResponseOutputMessageMCPListTools', - 'OpenAIResponseOutputMessageWebSearchToolCall', - 'CreateConversationRequest', - 'Conversation', - 'UpdateConversationRequest', - 'ConversationDeletedResource', - 'ConversationItemList', - 'AddItemsRequest', - 'ConversationItemDeletedResource', - 'OpenAIEmbeddingsRequestWithExtraBody', - 'OpenAIEmbeddingData', - 'OpenAIEmbeddingUsage', - 'OpenAIEmbeddingsResponse', - 'OpenAIFilePurpose', - 'ListOpenAIFileResponse', - 'OpenAIFileObject', - 'ExpiresAfter', - 'OpenAIFileDeleteResponse', - 'Response', - 'HealthInfo', - 'RouteInfo', - 'ListRoutesResponse', - 'OpenAIModel', - 'OpenAIListModelsResponse', - 'Model', - 'ModelType', - 'RunModerationRequest', - 'ModerationObject', - 'ModerationObjectResults', - 'Prompt', - 'ListPromptsResponse', - 'CreatePromptRequest', - 'UpdatePromptRequest', - 'SetDefaultVersionRequest', - 'ProviderInfo', - 'ListProvidersResponse', - 'ListOpenAIResponseObject', - 'OpenAIResponseError', - 'OpenAIResponseInput', - 'OpenAIResponseInputToolFileSearch', - 'OpenAIResponseInputToolFunction', - 'OpenAIResponseInputToolWebSearch', - 'OpenAIResponseObjectWithInput', - 'OpenAIResponseOutput', - 'OpenAIResponsePrompt', - 'OpenAIResponseText', - 'OpenAIResponseTool', - 'OpenAIResponseToolMCP', - 'OpenAIResponseUsage', - 'ResponseGuardrailSpec', - 'OpenAIResponseInputTool', - 'OpenAIResponseInputToolMCP', - 'CreateOpenaiResponseRequest', - 'OpenAIResponseObject', - 'OpenAIResponseContentPartOutputText', - 'OpenAIResponseContentPartReasoningSummary', - 'OpenAIResponseContentPartReasoningText', - 'OpenAIResponseObjectStream', - 'OpenAIResponseObjectStreamResponseCompleted', - 'OpenAIResponseObjectStreamResponseContentPartAdded', - 'OpenAIResponseObjectStreamResponseContentPartDone', - 'OpenAIResponseObjectStreamResponseCreated', - 'OpenAIResponseObjectStreamResponseFailed', - 'OpenAIResponseObjectStreamResponseFileSearchCallCompleted', - 'OpenAIResponseObjectStreamResponseFileSearchCallInProgress', - 'OpenAIResponseObjectStreamResponseFileSearchCallSearching', - 'OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta', - 'OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone', - 'OpenAIResponseObjectStreamResponseInProgress', - 'OpenAIResponseObjectStreamResponseIncomplete', - 'OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta', - 'OpenAIResponseObjectStreamResponseMcpCallArgumentsDone', - 'OpenAIResponseObjectStreamResponseMcpCallCompleted', - 'OpenAIResponseObjectStreamResponseMcpCallFailed', - 'OpenAIResponseObjectStreamResponseMcpCallInProgress', - 'OpenAIResponseObjectStreamResponseMcpListToolsCompleted', - 'OpenAIResponseObjectStreamResponseMcpListToolsFailed', - 'OpenAIResponseObjectStreamResponseMcpListToolsInProgress', - 'OpenAIResponseObjectStreamResponseOutputItemAdded', - 'OpenAIResponseObjectStreamResponseOutputItemDone', - 'OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded', - 'OpenAIResponseObjectStreamResponseOutputTextDelta', - 'OpenAIResponseObjectStreamResponseOutputTextDone', - 'OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded', - 'OpenAIResponseObjectStreamResponseReasoningSummaryPartDone', - 'OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta', - 'OpenAIResponseObjectStreamResponseReasoningSummaryTextDone', - 'OpenAIResponseObjectStreamResponseReasoningTextDelta', - 'OpenAIResponseObjectStreamResponseReasoningTextDone', - 'OpenAIResponseObjectStreamResponseRefusalDelta', - 'OpenAIResponseObjectStreamResponseRefusalDone', - 'OpenAIResponseObjectStreamResponseWebSearchCallCompleted', - 'OpenAIResponseObjectStreamResponseWebSearchCallInProgress', - 'OpenAIResponseObjectStreamResponseWebSearchCallSearching', - 'OpenAIDeleteResponseObject', - 'ListOpenAIResponseInputItem', - 'RunShieldRequest', - 'RunShieldResponse', - 'SafetyViolation', - 'ViolationLevel', - 'AggregationFunctionType', - 'ArrayType', - 'BasicScoringFnParams', - 'BooleanType', - 'ChatCompletionInputType', - 'CompletionInputType', - 'JsonType', - 'LLMAsJudgeScoringFnParams', - 'NumberType', - 'ObjectType', - 'RegexParserScoringFnParams', - 'ScoringFn', - 'ScoringFnParams', - 'ScoringFnParamsType', - 'StringType', - 'UnionType', - 'ListScoringFunctionsResponse', - 'ScoreRequest', - 'ScoreResponse', - 'ScoringResult', - 'ScoreBatchRequest', - 'ScoreBatchResponse', - 'Shield', - 'ListShieldsResponse', - 'InvokeToolRequest', - 'ImageContentItem', - 'InterleavedContent', - 'InterleavedContentItem', - 'TextContentItem', - 'ToolInvocationResult', - 'URL', - 'ToolDef', - 'ListToolDefsResponse', - 'ToolGroup', - 'ListToolGroupsResponse', - 'Chunk', - 'ChunkMetadata', - 'InsertChunksRequest', - 'QueryChunksRequest', - 'QueryChunksResponse', - 'VectorStoreFileCounts', - 'VectorStoreListResponse', - 'VectorStoreObject', - 'VectorStoreChunkingStrategy', - 'VectorStoreChunkingStrategyAuto', - 'VectorStoreChunkingStrategyStatic', - 'VectorStoreChunkingStrategyStaticConfig', - 'OpenAICreateVectorStoreRequestWithExtraBody', - 'OpenaiUpdateVectorStoreRequest', - 'VectorStoreDeleteResponse', - 'OpenAICreateVectorStoreFileBatchRequestWithExtraBody', - 'VectorStoreFileBatchObject', - 'VectorStoreFileStatus', - 'VectorStoreFileLastError', - 'VectorStoreFileObject', - 'VectorStoreFilesListInBatchResponse', - 'VectorStoreListFilesResponse', - 'OpenaiAttachFileToVectorStoreRequest', - 'OpenaiUpdateVectorStoreFileRequest', - 'VectorStoreFileDeleteResponse', - 'bool', - 'VectorStoreContent', - 'VectorStoreFileContentResponse', - 'OpenaiSearchVectorStoreRequest', - 'VectorStoreSearchResponse', - 'VectorStoreSearchResponsePage', - 'VersionInfo', - 'AppendRowsRequest', - 'PaginatedResponse', - 'Dataset', - 'RowsDataSource', - 'URIDataSource', - 'ListDatasetsResponse', - 'Benchmark', - 'ListBenchmarksResponse', - 'BenchmarkConfig', - 'GreedySamplingStrategy', - 'ModelCandidate', - 'SamplingParams', - 'SystemMessage', - 'TopKSamplingStrategy', - 'TopPSamplingStrategy', - 'EvaluateRowsRequest', - 'EvaluateResponse', - 'RunEvalRequest', - 'Job', - 'RerankRequest', - 'RerankData', - 'RerankResponse', - 'Checkpoint', - 'PostTrainingJobArtifactsResponse', - 'PostTrainingMetric', - 'CancelTrainingJobRequest', - 'PostTrainingJobStatusResponse', - 'ListPostTrainingJobsResponse', - 'DPOAlignmentConfig', - 'DPOLossType', - 'DataConfig', - 'DatasetFormat', - 'EfficiencyConfig', - 'OptimizerConfig', - 'OptimizerType', - 'TrainingConfig', - 'PreferenceOptimizeRequest', - 'PostTrainingJob', - 'AlgorithmConfig', - 'LoraFinetuningConfig', - 'QATFinetuningConfig', - 'SupervisedFineTuneRequest', - 'RegisterModelRequest', - 'ParamType', - 'RegisterScoringFunctionRequest', - 'RegisterShieldRequest', - 'RegisterToolGroupRequest', - 'DataSource', - 'RegisterDatasetRequest', - 'RegisterBenchmarkRequest'] +LEGACY_SCHEMA_ORDER = [ + "Error", + "ListBatchesResponse", + "CreateBatchRequest", + "Batch", + "Order", + "ListOpenAIChatCompletionResponse", + "OpenAIAssistantMessageParam", + "OpenAIChatCompletionContentPartImageParam", + "OpenAIChatCompletionContentPartParam", + "OpenAIChatCompletionContentPartTextParam", + "OpenAIChatCompletionToolCall", + "OpenAIChatCompletionToolCallFunction", + "OpenAIChatCompletionUsage", + "OpenAIChoice", + "OpenAIChoiceLogprobs", + "OpenAIDeveloperMessageParam", + "OpenAIFile", + "OpenAIFileFile", + "OpenAIImageURL", + "OpenAIMessageParam", + "OpenAISystemMessageParam", + "OpenAITokenLogProb", + "OpenAIToolMessageParam", + "OpenAITopLogProb", + "OpenAIUserMessageParam", + "OpenAIJSONSchema", + "OpenAIResponseFormatJSONObject", + "OpenAIResponseFormatJSONSchema", + "OpenAIResponseFormatParam", + "OpenAIResponseFormatText", + "OpenAIChatCompletionRequestWithExtraBody", + "OpenAIChatCompletion", + "OpenAIChatCompletionChunk", + "OpenAIChoiceDelta", + "OpenAIChunkChoice", + "OpenAICompletionWithInputMessages", + "OpenAICompletionRequestWithExtraBody", + "OpenAICompletion", + "OpenAICompletionChoice", + "ConversationItem", + "OpenAIResponseAnnotationCitation", + "OpenAIResponseAnnotationContainerFileCitation", + "OpenAIResponseAnnotationFileCitation", + "OpenAIResponseAnnotationFilePath", + "OpenAIResponseAnnotations", + "OpenAIResponseContentPartRefusal", + "OpenAIResponseInputFunctionToolCallOutput", + "OpenAIResponseInputMessageContent", + "OpenAIResponseInputMessageContentFile", + "OpenAIResponseInputMessageContentImage", + "OpenAIResponseInputMessageContentText", + "OpenAIResponseMCPApprovalRequest", + "OpenAIResponseMCPApprovalResponse", + "OpenAIResponseMessage", + "OpenAIResponseOutputMessageContent", + "OpenAIResponseOutputMessageContentOutputText", + "OpenAIResponseOutputMessageFileSearchToolCall", + "OpenAIResponseOutputMessageFunctionToolCall", + "OpenAIResponseOutputMessageMCPCall", + "OpenAIResponseOutputMessageMCPListTools", + "OpenAIResponseOutputMessageWebSearchToolCall", + "CreateConversationRequest", + "Conversation", + "UpdateConversationRequest", + "ConversationDeletedResource", + "ConversationItemList", + "AddItemsRequest", + "ConversationItemDeletedResource", + "OpenAIEmbeddingsRequestWithExtraBody", + "OpenAIEmbeddingData", + "OpenAIEmbeddingUsage", + "OpenAIEmbeddingsResponse", + "OpenAIFilePurpose", + "ListOpenAIFileResponse", + "OpenAIFileObject", + "ExpiresAfter", + "OpenAIFileDeleteResponse", + "Response", + "HealthInfo", + "RouteInfo", + "ListRoutesResponse", + "OpenAIModel", + "OpenAIListModelsResponse", + "Model", + "ModelType", + "RunModerationRequest", + "ModerationObject", + "ModerationObjectResults", + "Prompt", + "ListPromptsResponse", + "CreatePromptRequest", + "UpdatePromptRequest", + "SetDefaultVersionRequest", + "ProviderInfo", + "ListProvidersResponse", + "ListOpenAIResponseObject", + "OpenAIResponseError", + "OpenAIResponseInput", + "OpenAIResponseInputToolFileSearch", + "OpenAIResponseInputToolFunction", + "OpenAIResponseInputToolWebSearch", + "OpenAIResponseObjectWithInput", + "OpenAIResponseOutput", + "OpenAIResponsePrompt", + "OpenAIResponseText", + "OpenAIResponseTool", + "OpenAIResponseToolMCP", + "OpenAIResponseUsage", + "ResponseGuardrailSpec", + "OpenAIResponseInputTool", + "OpenAIResponseInputToolMCP", + "CreateOpenaiResponseRequest", + "OpenAIResponseObject", + "OpenAIResponseContentPartOutputText", + "OpenAIResponseContentPartReasoningSummary", + "OpenAIResponseContentPartReasoningText", + "OpenAIResponseObjectStream", + "OpenAIResponseObjectStreamResponseCompleted", + "OpenAIResponseObjectStreamResponseContentPartAdded", + "OpenAIResponseObjectStreamResponseContentPartDone", + "OpenAIResponseObjectStreamResponseCreated", + "OpenAIResponseObjectStreamResponseFailed", + "OpenAIResponseObjectStreamResponseFileSearchCallCompleted", + "OpenAIResponseObjectStreamResponseFileSearchCallInProgress", + "OpenAIResponseObjectStreamResponseFileSearchCallSearching", + "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta", + "OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone", + "OpenAIResponseObjectStreamResponseInProgress", + "OpenAIResponseObjectStreamResponseIncomplete", + "OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta", + "OpenAIResponseObjectStreamResponseMcpCallArgumentsDone", + "OpenAIResponseObjectStreamResponseMcpCallCompleted", + "OpenAIResponseObjectStreamResponseMcpCallFailed", + "OpenAIResponseObjectStreamResponseMcpCallInProgress", + "OpenAIResponseObjectStreamResponseMcpListToolsCompleted", + "OpenAIResponseObjectStreamResponseMcpListToolsFailed", + "OpenAIResponseObjectStreamResponseMcpListToolsInProgress", + "OpenAIResponseObjectStreamResponseOutputItemAdded", + "OpenAIResponseObjectStreamResponseOutputItemDone", + "OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded", + "OpenAIResponseObjectStreamResponseOutputTextDelta", + "OpenAIResponseObjectStreamResponseOutputTextDone", + "OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded", + "OpenAIResponseObjectStreamResponseReasoningSummaryPartDone", + "OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta", + "OpenAIResponseObjectStreamResponseReasoningSummaryTextDone", + "OpenAIResponseObjectStreamResponseReasoningTextDelta", + "OpenAIResponseObjectStreamResponseReasoningTextDone", + "OpenAIResponseObjectStreamResponseRefusalDelta", + "OpenAIResponseObjectStreamResponseRefusalDone", + "OpenAIResponseObjectStreamResponseWebSearchCallCompleted", + "OpenAIResponseObjectStreamResponseWebSearchCallInProgress", + "OpenAIResponseObjectStreamResponseWebSearchCallSearching", + "OpenAIDeleteResponseObject", + "ListOpenAIResponseInputItem", + "RunShieldRequest", + "RunShieldResponse", + "SafetyViolation", + "ViolationLevel", + "AggregationFunctionType", + "ArrayType", + "BasicScoringFnParams", + "BooleanType", + "ChatCompletionInputType", + "CompletionInputType", + "JsonType", + "LLMAsJudgeScoringFnParams", + "NumberType", + "ObjectType", + "RegexParserScoringFnParams", + "ScoringFn", + "ScoringFnParams", + "ScoringFnParamsType", + "StringType", + "UnionType", + "ListScoringFunctionsResponse", + "ScoreRequest", + "ScoreResponse", + "ScoringResult", + "ScoreBatchRequest", + "ScoreBatchResponse", + "Shield", + "ListShieldsResponse", + "InvokeToolRequest", + "ImageContentItem", + "InterleavedContent", + "InterleavedContentItem", + "TextContentItem", + "ToolInvocationResult", + "URL", + "ToolDef", + "ListToolDefsResponse", + "ToolGroup", + "ListToolGroupsResponse", + "Chunk", + "ChunkMetadata", + "InsertChunksRequest", + "QueryChunksRequest", + "QueryChunksResponse", + "VectorStoreFileCounts", + "VectorStoreListResponse", + "VectorStoreObject", + "VectorStoreChunkingStrategy", + "VectorStoreChunkingStrategyAuto", + "VectorStoreChunkingStrategyStatic", + "VectorStoreChunkingStrategyStaticConfig", + "OpenAICreateVectorStoreRequestWithExtraBody", + "OpenaiUpdateVectorStoreRequest", + "VectorStoreDeleteResponse", + "OpenAICreateVectorStoreFileBatchRequestWithExtraBody", + "VectorStoreFileBatchObject", + "VectorStoreFileStatus", + "VectorStoreFileLastError", + "VectorStoreFileObject", + "VectorStoreFilesListInBatchResponse", + "VectorStoreListFilesResponse", + "OpenaiAttachFileToVectorStoreRequest", + "OpenaiUpdateVectorStoreFileRequest", + "VectorStoreFileDeleteResponse", + "bool", + "VectorStoreContent", + "VectorStoreFileContentResponse", + "OpenaiSearchVectorStoreRequest", + "VectorStoreSearchResponse", + "VectorStoreSearchResponsePage", + "VersionInfo", + "AppendRowsRequest", + "PaginatedResponse", + "Dataset", + "RowsDataSource", + "URIDataSource", + "ListDatasetsResponse", + "Benchmark", + "ListBenchmarksResponse", + "BenchmarkConfig", + "GreedySamplingStrategy", + "ModelCandidate", + "SamplingParams", + "SystemMessage", + "TopKSamplingStrategy", + "TopPSamplingStrategy", + "EvaluateRowsRequest", + "EvaluateResponse", + "RunEvalRequest", + "Job", + "RerankRequest", + "RerankData", + "RerankResponse", + "Checkpoint", + "PostTrainingJobArtifactsResponse", + "PostTrainingMetric", + "CancelTrainingJobRequest", + "PostTrainingJobStatusResponse", + "ListPostTrainingJobsResponse", + "DPOAlignmentConfig", + "DPOLossType", + "DataConfig", + "DatasetFormat", + "EfficiencyConfig", + "OptimizerConfig", + "OptimizerType", + "TrainingConfig", + "PreferenceOptimizeRequest", + "PostTrainingJob", + "AlgorithmConfig", + "LoraFinetuningConfig", + "QATFinetuningConfig", + "SupervisedFineTuneRequest", + "RegisterModelRequest", + "ParamType", + "RegisterScoringFunctionRequest", + "RegisterShieldRequest", + "RegisterToolGroupRequest", + "DataSource", + "RegisterDatasetRequest", + "RegisterBenchmarkRequest", +] -LEGACY_RESPONSE_ORDER = ['BadRequest400', 'TooManyRequests429', 'InternalServerError500', 'DefaultError'] +LEGACY_RESPONSE_ORDER = ["BadRequest400", "TooManyRequests429", "InternalServerError500", "DefaultError"] -LEGACY_TAGS = [{'description': 'APIs for creating and interacting with agentic systems.', - 'name': 'Agents', - 'x-displayName': 'Agents'}, - {'description': 'The API is designed to allow use of openai client libraries for seamless integration.\n' - '\n' - 'This API provides the following extensions:\n' - ' - idempotent batch creation\n' - '\n' - 'Note: This API is currently under active development and may undergo changes.', - 'name': 'Batches', - 'x-displayName': 'The Batches API enables efficient processing of multiple requests in a single operation, ' - 'particularly useful for processing large datasets, batch evaluation workflows, and cost-effective ' - 'inference at scale.'}, - {'description': '', 'name': 'Benchmarks'}, - {'description': 'Protocol for conversation management operations.', - 'name': 'Conversations', - 'x-displayName': 'Conversations'}, - {'description': '', 'name': 'DatasetIO'}, - {'description': '', 'name': 'Datasets'}, - {'description': 'Llama Stack Evaluation API for running evaluations on model and agent candidates.', - 'name': 'Eval', - 'x-displayName': 'Evaluations'}, - {'description': 'This API is used to upload documents that can be used with other Llama Stack APIs.', - 'name': 'Files', - 'x-displayName': 'Files'}, - {'description': 'Llama Stack Inference API for generating completions, chat completions, and embeddings.\n' - '\n' - 'This API provides the raw interface to the underlying models. Three kinds of models are supported:\n' - '- LLM models: these models generate "raw" and "chat" (conversational) completions.\n' - '- Embedding models: these models generate embeddings to be used for semantic search.\n' - '- Rerank models: these models reorder the documents based on their relevance to a query.', - 'name': 'Inference', - 'x-displayName': 'Inference'}, - {'description': 'APIs for inspecting the Llama Stack service, including health status, available API routes with ' - 'methods and implementing providers.', - 'name': 'Inspect', - 'x-displayName': 'Inspect'}, - {'description': '', 'name': 'Models'}, - {'description': '', 'name': 'PostTraining (Coming Soon)'}, - {'description': 'Protocol for prompt management operations.', 'name': 'Prompts', 'x-displayName': 'Prompts'}, - {'description': 'Providers API for inspecting, listing, and modifying providers and their configurations.', - 'name': 'Providers', - 'x-displayName': 'Providers'}, - {'description': 'OpenAI-compatible Moderations API.', 'name': 'Safety', 'x-displayName': 'Safety'}, - {'description': '', 'name': 'Scoring'}, - {'description': '', 'name': 'ScoringFunctions'}, - {'description': '', 'name': 'Shields'}, - {'description': '', 'name': 'ToolGroups'}, - {'description': '', 'name': 'ToolRuntime'}, - {'description': '', 'name': 'VectorIO'}] +LEGACY_TAGS = [ + { + "description": "APIs for creating and interacting with agentic systems.", + "name": "Agents", + "x-displayName": "Agents", + }, + { + "description": "The API is designed to allow use of openai client libraries for seamless integration.\n" + "\n" + "This API provides the following extensions:\n" + " - idempotent batch creation\n" + "\n" + "Note: This API is currently under active development and may undergo changes.", + "name": "Batches", + "x-displayName": "The Batches API enables efficient processing of multiple requests in a single operation, " + "particularly useful for processing large datasets, batch evaluation workflows, and cost-effective " + "inference at scale.", + }, + {"description": "", "name": "Benchmarks"}, + { + "description": "Protocol for conversation management operations.", + "name": "Conversations", + "x-displayName": "Conversations", + }, + {"description": "", "name": "DatasetIO"}, + {"description": "", "name": "Datasets"}, + { + "description": "Llama Stack Evaluation API for running evaluations on model and agent candidates.", + "name": "Eval", + "x-displayName": "Evaluations", + }, + { + "description": "This API is used to upload documents that can be used with other Llama Stack APIs.", + "name": "Files", + "x-displayName": "Files", + }, + { + "description": "Llama Stack Inference API for generating completions, chat completions, and embeddings.\n" + "\n" + "This API provides the raw interface to the underlying models. Three kinds of models are supported:\n" + '- LLM models: these models generate "raw" and "chat" (conversational) completions.\n' + "- Embedding models: these models generate embeddings to be used for semantic search.\n" + "- Rerank models: these models reorder the documents based on their relevance to a query.", + "name": "Inference", + "x-displayName": "Inference", + }, + { + "description": "APIs for inspecting the Llama Stack service, including health status, available API routes with " + "methods and implementing providers.", + "name": "Inspect", + "x-displayName": "Inspect", + }, + {"description": "", "name": "Models"}, + {"description": "", "name": "PostTraining (Coming Soon)"}, + {"description": "Protocol for prompt management operations.", "name": "Prompts", "x-displayName": "Prompts"}, + { + "description": "Providers API for inspecting, listing, and modifying providers and their configurations.", + "name": "Providers", + "x-displayName": "Providers", + }, + {"description": "OpenAI-compatible Moderations API.", "name": "Safety", "x-displayName": "Safety"}, + {"description": "", "name": "Scoring"}, + {"description": "", "name": "ScoringFunctions"}, + {"description": "", "name": "Shields"}, + {"description": "", "name": "ToolGroups"}, + {"description": "", "name": "ToolRuntime"}, + {"description": "", "name": "VectorIO"}, +] -LEGACY_TAG_ORDER = ['Agents', - 'Batches', - 'Benchmarks', - 'Conversations', - 'DatasetIO', - 'Datasets', - 'Eval', - 'Files', - 'Inference', - 'Inspect', - 'Models', - 'PostTraining (Coming Soon)', - 'Prompts', - 'Providers', - 'Safety', - 'Scoring', - 'ScoringFunctions', - 'Shields', - 'ToolGroups', - 'ToolRuntime', - 'VectorIO'] +LEGACY_TAG_ORDER = [ + "Agents", + "Batches", + "Benchmarks", + "Conversations", + "DatasetIO", + "Datasets", + "Eval", + "Files", + "Inference", + "Inspect", + "Models", + "PostTraining (Coming Soon)", + "Prompts", + "Providers", + "Safety", + "Scoring", + "ScoringFunctions", + "Shields", + "ToolGroups", + "ToolRuntime", + "VectorIO", +] -LEGACY_TAG_GROUPS = [{'name': 'Operations', - 'tags': ['Agents', - 'Batches', - 'Benchmarks', - 'Conversations', - 'DatasetIO', - 'Datasets', - 'Eval', - 'Files', - 'Inference', - 'Inspect', - 'Models', - 'PostTraining (Coming Soon)', - 'Prompts', - 'Providers', - 'Safety', - 'Scoring', - 'ScoringFunctions', - 'Shields', - 'ToolGroups', - 'ToolRuntime', - 'VectorIO']}] +LEGACY_TAG_GROUPS = [ + { + "name": "Operations", + "tags": [ + "Agents", + "Batches", + "Benchmarks", + "Conversations", + "DatasetIO", + "Datasets", + "Eval", + "Files", + "Inference", + "Inspect", + "Models", + "PostTraining (Coming Soon)", + "Prompts", + "Providers", + "Safety", + "Scoring", + "ScoringFunctions", + "Shields", + "ToolGroups", + "ToolRuntime", + "VectorIO", + ], + } +] -LEGACY_SECURITY = [{'Default': []}] +LEGACY_SECURITY = [{"Default": []}] LEGACY_OPERATION_KEYS = [ - 'responses', - 'tags', - 'summary', - 'description', - 'operationId', - 'parameters', - 'requestBody', - 'deprecated', + "responses", + "tags", + "summary", + "description", + "operationId", + "parameters", + "requestBody", + "deprecated", ] diff --git a/scripts/openapi_generator/endpoints.py b/scripts/openapi_generator/endpoints.py index 5e51520495..39086f47f9 100644 --- a/scripts/openapi_generator/endpoints.py +++ b/scripts/openapi_generator/endpoints.py @@ -19,6 +19,7 @@ from llama_stack.log import get_logger from llama_stack_api import Api +from llama_stack_api.schema_utils import get_registered_schema_info from . import app as app_module from .state import _extra_body_fields, register_dynamic_model @@ -31,23 +32,16 @@ def _to_pascal_case(segment: str) -> str: return "".join(token.capitalize() for token in tokens if token) -def _compose_request_model_name(webmethod, http_method: str, variant: str | None = None) -> str: - segments = [] - level = (webmethod.level or "").lower() - if level and level != "v1": - segments.append(_to_pascal_case(str(webmethod.level))) - for part in filter(None, webmethod.route.split("/")): - lower_part = part.lower() - if lower_part in {"v1", "v1alpha", "v1beta"}: - continue - if part.startswith("{"): - param = part[1:].split(":", 1)[0] - segments.append(f"By{_to_pascal_case(param)}") - else: - segments.append(_to_pascal_case(part)) - if not segments: - segments.append("Root") - base_name = "".join(segments) + http_method.title() + "Request" +def _compose_request_model_name(api: Api, method_name: str, variant: str | None = None) -> str: + """Generate a deterministic model name from the protocol method.""" + + def _to_pascal_from_snake(value: str) -> str: + return "".join(segment.capitalize() for segment in value.split("_") if segment) + + base_name = _to_pascal_from_snake(method_name) + if not base_name: + base_name = _to_pascal_case(api.value) + base_name = f"{base_name}Request" if variant: base_name = f"{base_name}{variant}" return base_name @@ -130,6 +124,7 @@ def _build_field_definitions(query_parameters: list[tuple[str, type, Any]], use_ def _create_dynamic_request_model( api: Api, webmethod, + method_name: str, http_method: str, query_parameters: list[tuple[str, type, Any]], use_any: bool = False, @@ -140,7 +135,7 @@ def _create_dynamic_request_model( field_definitions = _build_field_definitions(query_parameters, use_any) if not field_definitions: return None - model_name = _compose_request_model_name(webmethod, http_method, variant_suffix) + model_name = _compose_request_model_name(api, method_name, variant_suffix or None) request_model = create_model(model_name, **field_definitions) return register_dynamic_model(model_name, request_model) except Exception: @@ -261,9 +256,7 @@ def _extract_response_models_from_union(union_type: Any) -> tuple[type | None, t streaming_model = inner_type else: # Might be a registered schema - check if it's registered - from llama_stack_api.schema_utils import _registered_schemas - - if inner_type in _registered_schemas: + if get_registered_schema_info(inner_type): # We'll need to look this up later, but for now store the type streaming_model = inner_type elif hasattr(arg, "model_json_schema"): @@ -427,17 +420,28 @@ def _find_models_for_endpoint( try: from fastapi import Response as FastAPIResponse except ImportError: - FastAPIResponse = None + fastapi_response_cls = None + else: + fastapi_response_cls = FastAPIResponse try: from starlette.responses import Response as StarletteResponse except ImportError: - StarletteResponse = None + starlette_response_cls = None + else: + starlette_response_cls = StarletteResponse - response_types = tuple(t for t in (FastAPIResponse, StarletteResponse) if t is not None) + response_types = tuple(t for t in (fastapi_response_cls, starlette_response_cls) if t is not None) if response_types and any(return_annotation is t for t in response_types): response_schema_name = "Response" - return request_model, response_model, query_parameters, file_form_params, streaming_response_model, response_schema_name + return ( + request_model, + response_model, + query_parameters, + file_form_params, + streaming_response_model, + response_schema_name, + ) except Exception as exc: logger.warning( @@ -465,9 +469,7 @@ def _create_fastapi_endpoint(app: FastAPI, route, webmethod, api: Api): file_form_params, streaming_response_model, response_schema_name, - ) = ( - _find_models_for_endpoint(webmethod, api, name, is_post_put) - ) + ) = _find_models_for_endpoint(webmethod, api, name, is_post_put) operation_description = _extract_operation_description_from_docstring(api, name) response_description = _extract_response_description_from_docstring(webmethod, response_model, api, name) @@ -479,6 +481,17 @@ def _create_fastapi_endpoint(app: FastAPI, route, webmethod, api: Api): key = (fastapi_path, method.upper()) _extra_body_fields[key] = extra_body_params + if is_post_put and not request_model and not file_form_params and query_parameters: + request_model = _create_dynamic_request_model( + api, webmethod, name, primary_method, query_parameters, use_any=False + ) + if not request_model: + request_model = _create_dynamic_request_model( + api, webmethod, name, primary_method, query_parameters, use_any=True, variant_suffix="Loose" + ) + if request_model: + query_parameters = [] + if file_form_params and is_post_put: signature_params = list(file_form_params) param_annotations = {param.name: param.annotation for param in file_form_params} @@ -503,12 +516,16 @@ async def file_form_endpoint(): endpoint_func = file_form_endpoint elif request_model and response_model: endpoint_func = _create_endpoint_with_request_model(request_model, response_model, operation_description) + elif request_model: + endpoint_func = _create_endpoint_with_request_model(request_model, None, operation_description) elif response_model and query_parameters: if is_post_put: - request_model = _create_dynamic_request_model(api, webmethod, primary_method, query_parameters, use_any=False) + request_model = _create_dynamic_request_model( + api, webmethod, name, primary_method, query_parameters, use_any=False + ) if not request_model: request_model = _create_dynamic_request_model( - api, webmethod, primary_method, query_parameters, use_any=True, variant_suffix="Loose" + api, webmethod, name, primary_method, query_parameters, use_any=True, variant_suffix="Loose" ) if request_model: @@ -600,10 +617,8 @@ async def no_params_endpoint(): streaming_schema_name = None # Check if it's a registered schema first (before checking __name__) # because registered schemas might be Annotated types - from llama_stack_api.schema_utils import _registered_schemas - - if streaming_response_model in _registered_schemas: - streaming_schema_name = _registered_schemas[streaming_response_model]["name"] + if schema_info := get_registered_schema_info(streaming_response_model): + streaming_schema_name = schema_info.name elif hasattr(streaming_response_model, "__name__"): streaming_schema_name = streaming_response_model.__name__ diff --git a/scripts/openapi_generator/schema_collection.py b/scripts/openapi_generator/schema_collection.py index 465fe06927..51a70c62ad 100644 --- a/scripts/openapi_generator/schema_collection.py +++ b/scripts/openapi_generator/schema_collection.py @@ -9,11 +9,8 @@ """ import importlib -import pkgutil from typing import Any -from .state import _dynamic_models - def _ensure_components_schemas(openapi_schema: dict[str, Any]) -> None: """Ensure components.schemas exists in the schema.""" @@ -23,54 +20,21 @@ def _ensure_components_schemas(openapi_schema: dict[str, Any]) -> None: openapi_schema["components"]["schemas"] = {} -def _import_all_modules_in_package(package_name: str) -> list[Any]: +def _load_extra_schema_modules() -> None: """ - Dynamically import all modules in a package to trigger register_schema calls. - - This walks through all modules in the package and imports them, ensuring - that any register_schema() calls at module level are executed. + Import modules outside llama_stack_api that use schema_utils to register schemas. - Args: - package_name: The fully qualified package name (e.g., 'llama_stack_api') - - Returns: - List of imported module objects + The API package already imports its submodules via __init__, but server-side modules + like telemetry need to be imported explicitly so their decorator side effects run. """ - modules = [] - try: - package = importlib.import_module(package_name) - except ImportError: - return modules - - package_path = getattr(package, "__path__", None) - if not package_path: - return modules - - # Walk packages and modules recursively - for _, modname, ispkg in pkgutil.walk_packages(package_path, prefix=f"{package_name}."): - if not modname.startswith("_"): - try: - module = importlib.import_module(modname) - modules.append(module) - - # If this is a package, also try to import any .py files directly - # (e.g., llama_stack_api.scoring_functions.scoring_functions) - if ispkg: - try: - # Try importing the module file with the same name as the package - # This handles cases like scoring_functions/scoring_functions.py - module_file_name = f"{modname}.{modname.split('.')[-1]}" - module_file = importlib.import_module(module_file_name) - if module_file not in modules: - modules.append(module_file) - except (ImportError, AttributeError, TypeError): - # It's okay if this fails - not all packages have a module file with the same name - pass - except (ImportError, AttributeError, TypeError): - # Skip modules that can't be imported (e.g., missing dependencies) - continue - - return modules + extra_modules = [ + "llama_stack.core.telemetry.telemetry", + ] + for module_name in extra_modules: + try: + importlib.import_module(module_name) + except ImportError: + continue def _extract_and_fix_defs(schema: dict[str, Any], openapi_schema: dict[str, Any]) -> None: @@ -102,82 +66,66 @@ def fix_refs_in_schema(obj: Any) -> None: def _ensure_json_schema_types_included(openapi_schema: dict[str, Any]) -> dict[str, Any]: """ - Ensure all @json_schema_type decorated models and registered schemas are included in the OpenAPI schema. - This finds all models with the _llama_stack_schema_type attribute and schemas registered via register_schema. + Ensure all registered schemas (decorated, explicit, and dynamic) are included in the OpenAPI schema. + Relies on llama_stack_api's registry instead of recursively importing every module. """ _ensure_components_schemas(openapi_schema) - # Import TypeAdapter for handling union types and other non-model types from pydantic import TypeAdapter - # Dynamically import all modules in packages that might register schemas - # This ensures register_schema() calls execute and populate _registered_schemas - # Also collect the modules for later scanning of @json_schema_type decorated classes - apis_modules = _import_all_modules_in_package("llama_stack_api") - _import_all_modules_in_package("llama_stack.core.telemetry") + from llama_stack_api.schema_utils import ( + iter_dynamic_schema_types, + iter_json_schema_types, + iter_registered_schema_types, + ) - # First, handle registered schemas (union types, etc.) - from llama_stack_api.schema_utils import _registered_schemas + # Import extra modules (e.g., telemetry) whose schema registrations live outside llama_stack_api + _load_extra_schema_modules() - for schema_type, registration_info in _registered_schemas.items(): - schema_name = registration_info["name"] + # Handle explicitly registered schemas first (union types, Annotated structs, etc.) + for registration_info in iter_registered_schema_types(): + schema_type = registration_info.type + schema_name = registration_info.name if schema_name not in openapi_schema["components"]["schemas"]: try: - # Use TypeAdapter for union types and other non-model types - # Use ref_template to generate references in the format we need adapter = TypeAdapter(schema_type) schema = adapter.json_schema(ref_template="#/components/schemas/{model}") - - # Extract and fix $defs if present _extract_and_fix_defs(schema, openapi_schema) - openapi_schema["components"]["schemas"][schema_name] = schema except Exception as e: - # Skip if we can't generate the schema print(f"Warning: Failed to generate schema for registered type {schema_name}: {e}") import traceback traceback.print_exc() continue - # Find all classes with the _llama_stack_schema_type attribute - # Use the modules we already imported above - for module in apis_modules: - for attr_name in dir(module): + # Add @json_schema_type decorated models + for model in iter_json_schema_types(): + schema_name = getattr(model, "_llama_stack_schema_name", None) or getattr(model, "__name__", None) + if not schema_name: + continue + if schema_name not in openapi_schema["components"]["schemas"]: 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: - # Use ref_template to ensure consistent reference format and $defs handling - schema = attr.model_json_schema(ref_template="#/components/schemas/{model}") - # Extract and fix $defs if present (model_json_schema can also generate $defs) - _extract_and_fix_defs(schema, openapi_schema) - openapi_schema["components"]["schemas"][schema_name] = schema - except Exception as e: - # Skip if we can't generate the schema - print(f"Warning: Failed to generate schema for {schema_name}: {e}") - continue - except (AttributeError, TypeError): + if hasattr(model, "model_json_schema"): + schema = model.model_json_schema(ref_template="#/components/schemas/{model}") + else: + adapter = TypeAdapter(model) + schema = adapter.json_schema(ref_template="#/components/schemas/{model}") + _extract_and_fix_defs(schema, openapi_schema) + openapi_schema["components"]["schemas"][schema_name] = schema + except Exception as e: + print(f"Warning: Failed to generate schema for {schema_name}: {e}") continue - # Also include any dynamic models that were created during endpoint generation - # This is a workaround to ensure dynamic models appear in the schema - for model in _dynamic_models: + # Include any dynamic models generated while building endpoints + for model in iter_dynamic_schema_types(): try: schema_name = model.__name__ if schema_name not in openapi_schema["components"]["schemas"]: schema = model.model_json_schema(ref_template="#/components/schemas/{model}") - # Extract and fix $defs if present _extract_and_fix_defs(schema, openapi_schema) openapi_schema["components"]["schemas"][schema_name] = schema except Exception: - # Skip if we can't generate the schema continue return openapi_schema diff --git a/scripts/openapi_generator/schema_filtering.py b/scripts/openapi_generator/schema_filtering.py index 223e5758eb..d72a64779a 100644 --- a/scripts/openapi_generator/schema_filtering.py +++ b/scripts/openapi_generator/schema_filtering.py @@ -16,39 +16,6 @@ LLAMA_STACK_API_V1BETA, ) -from . import schema_collection - - -def _get_all_json_schema_type_names() -> set[str]: - """ - Get all schema names from @json_schema_type decorated models. - This ensures they are included in filtered schemas even if not directly referenced by paths. - """ - schema_names = set() - apis_modules = schema_collection._import_all_modules_in_package("llama_stack_api") - 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_names.add(attr.__name__) - except (AttributeError, TypeError): - continue - return schema_names - - -def _get_explicit_schema_names(openapi_schema: dict[str, Any]) -> set[str]: - """Get all registered schema names and @json_schema_type decorated model names.""" - from llama_stack_api.schema_utils import _registered_schemas - - registered_schema_names = {info["name"] for info in _registered_schemas.values()} - json_schema_type_names = _get_all_json_schema_type_names() - return registered_schema_names | json_schema_type_names - def _find_schema_refs_in_object(obj: Any) -> set[str]: """ @@ -70,21 +37,12 @@ def _find_schema_refs_in_object(obj: Any) -> set[str]: return refs -def _add_transitive_references( - referenced_schemas: set[str], all_schemas: dict[str, Any], initial_schemas: set[str] | None = None -) -> set[str]: +def _add_transitive_references(referenced_schemas: set[str], all_schemas: dict[str, Any]) -> set[str]: """Add transitive references for given schemas.""" - if initial_schemas: - referenced_schemas.update(initial_schemas) - additional_schemas = set() - for schema_name in initial_schemas: - if schema_name in all_schemas: - additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) - else: - additional_schemas = set() - for schema_name in referenced_schemas: - if schema_name in all_schemas: - additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + additional_schemas = set() + for schema_name in referenced_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) while additional_schemas: new_schemas = additional_schemas - referenced_schemas @@ -155,8 +113,7 @@ def _filter_schemas_by_references( referenced_schemas = _find_schemas_referenced_by_paths(filtered_paths, openapi_schema) all_schemas = openapi_schema.get("components", {}).get("schemas", {}) - explicit_schema_names = _get_explicit_schema_names(openapi_schema) - referenced_schemas = _add_transitive_references(referenced_schemas, all_schemas, explicit_schema_names) + referenced_schemas = _add_transitive_references(referenced_schemas, all_schemas) filtered_schemas = { name: schema for name, schema in filtered_schema["components"]["schemas"].items() if name in referenced_schemas diff --git a/scripts/openapi_generator/schema_transforms.py b/scripts/openapi_generator/schema_transforms.py index 420a3dcc9f..bda5decb8f 100644 --- a/scripts/openapi_generator/schema_transforms.py +++ b/scripts/openapi_generator/schema_transforms.py @@ -19,14 +19,13 @@ from . import endpoints, schema_collection from ._legacy_order import ( + LEGACY_OPERATION_KEYS, LEGACY_PATH_ORDER, LEGACY_RESPONSE_ORDER, LEGACY_SCHEMA_ORDER, - LEGACY_OPERATION_KEYS, LEGACY_SECURITY, - LEGACY_TAGS, LEGACY_TAG_GROUPS, - LEGACY_TAG_ORDER, + LEGACY_TAGS, ) from .state import _extra_body_fields @@ -864,7 +863,15 @@ def order_mapping(data: dict[str, Any], priority: list[str]) -> OrderedDict[str, ordered_path_item[method] = order_mapping(path_item[method], LEGACY_OPERATION_KEYS) for key, value in path_item.items(): if key not in ordered_path_item: - if isinstance(value, dict) and key.lower() in {"get", "post", "put", "delete", "patch", "head", "options"}: + if isinstance(value, dict) and key.lower() in { + "get", + "post", + "put", + "delete", + "patch", + "head", + "options", + }: ordered_path_item[key] = order_mapping(value, LEGACY_OPERATION_KEYS) else: ordered_path_item[key] = value diff --git a/scripts/openapi_generator/state.py b/scripts/openapi_generator/state.py index 84bba1b456..babd1451a4 100644 --- a/scripts/openapi_generator/state.py +++ b/scripts/openapi_generator/state.py @@ -11,9 +11,8 @@ from typing import Any from llama_stack_api import Api +from llama_stack_api.schema_utils import clear_dynamic_schema_types, register_dynamic_schema_type -# Global list to store dynamic models created during endpoint generation -_dynamic_models: list[Any] = [] _dynamic_model_registry: dict[str, type] = {} # Cache for protocol methods to avoid repeated lookups @@ -28,14 +27,15 @@ def register_dynamic_model(name: str, model: type) -> type: """Register and deduplicate dynamically generated request models.""" existing = _dynamic_model_registry.get(name) if existing is not None: + register_dynamic_schema_type(existing) return existing _dynamic_model_registry[name] = model - _dynamic_models.append(model) + register_dynamic_schema_type(model) return model def reset_generator_state() -> None: """Clear per-run caches so repeated generations stay deterministic.""" - _dynamic_models.clear() _dynamic_model_registry.clear() _extra_body_fields.clear() + clear_dynamic_schema_types() diff --git a/src/llama_stack_api/__init__.py b/src/llama_stack_api/__init__.py index fed486cb7b..b7efcc543f 100644 --- a/src/llama_stack_api/__init__.py +++ b/src/llama_stack_api/__init__.py @@ -353,8 +353,15 @@ from .schema_utils import ( CallableT, ExtraBodyField, + SchemaInfo, WebMethod, + clear_dynamic_schema_types, + get_registered_schema_info, + iter_dynamic_schema_types, + iter_json_schema_types, + iter_registered_schema_types, json_schema_type, + register_dynamic_schema_type, register_schema, webmethod, ) @@ -516,6 +523,7 @@ "ExtraBodyField", "Files", "Fp8QuantizationConfig", + "clear_dynamic_schema_types", "get_schema_identifier", "get_signature", "GrammarResponseFormat", @@ -536,6 +544,10 @@ "is_type_optional", "is_type_union", "is_unwrapped_body_param", + "iter_dynamic_schema_types", + "iter_json_schema_types", + "iter_registered_schema_types", + "get_registered_schema_info", "Job", "JobStatus", "json_dump_string", @@ -738,6 +750,7 @@ "RAGQueryGeneratorConfig", "RAGQueryResult", "RAGSearchMode", + "register_dynamic_schema_type", "register_schema", "RLHFAlgorithm", "RRFRanker", @@ -775,6 +788,7 @@ "ScoringResult", "ScoringResultRow", "Schema", + "SchemaInfo", "SchemaOptions", "SearchRankingOptions", "Shield", diff --git a/src/llama_stack_api/schema_utils.py b/src/llama_stack_api/schema_utils.py index 8760988d40..162ef63fb7 100644 --- a/src/llama_stack_api/schema_utils.py +++ b/src/llama_stack_api/schema_utils.py @@ -4,9 +4,9 @@ # This source code is licensed under the terms described in the LICENSE file in # the root directory of this source tree. -from collections.abc import Callable +from collections.abc import Callable, Iterable from dataclasses import dataclass -from typing import Any, TypeVar +from typing import Any, Literal, TypeVar class ExtraBodyField[T]: @@ -46,6 +46,21 @@ def __init__(self, description: str | None = None): self.description = description +SchemaSource = Literal["json_schema_type", "registered_schema", "dynamic_schema"] + + +@dataclass(frozen=True) +class SchemaInfo: + """Metadata describing a schema entry exposed to OpenAPI generation.""" + + name: str + type: Any + source: SchemaSource + + +_json_schema_types: dict[type, SchemaInfo] = {} + + def json_schema_type(cls): """ Decorator to mark a Pydantic model for top-level component registration. @@ -57,11 +72,15 @@ def json_schema_type(cls): for simple one-off types while keeping complex reusable types as components. """ cls._llama_stack_schema_type = True + schema_name = getattr(cls, "__name__", f"Anonymous_{id(cls)}") + cls._llama_stack_schema_name = schema_name + _json_schema_types.setdefault(cls, SchemaInfo(name=schema_name, type=cls, source="json_schema_type")) return cls -# Global registry for registered schemas -_registered_schemas = {} +# Global registries for schemas discoverable by the generator +_registered_schemas: dict[Any, SchemaInfo] = {} +_dynamic_schema_types: dict[type, SchemaInfo] = {} def register_schema(schema_type, name: str | None = None): @@ -82,11 +101,43 @@ def register_schema(schema_type, name: str | None = None): # Store the registration information in a global registry # since union types don't allow setting attributes - _registered_schemas[schema_type] = {"name": name, "type": schema_type} + _registered_schemas[schema_type] = SchemaInfo(name=name, type=schema_type, source="registered_schema") + + return schema_type + +def get_registered_schema_info(schema_type: Any) -> SchemaInfo | None: + """Return the registration metadata for a schema type if present.""" + return _registered_schemas.get(schema_type) + + +def iter_registered_schema_types() -> Iterable[SchemaInfo]: + """Iterate over all explicitly registered schema entries.""" + return tuple(_registered_schemas.values()) + + +def iter_json_schema_types() -> Iterable[type]: + """Iterate over all Pydantic models decorated with @json_schema_type.""" + return tuple(info.type for info in _json_schema_types.values()) + + +def iter_dynamic_schema_types() -> Iterable[type]: + """Iterate over dynamic models registered at generation time.""" + return tuple(info.type for info in _dynamic_schema_types.values()) + + +def register_dynamic_schema_type(schema_type: type, name: str | None = None) -> type: + """Register a dynamic model generated at runtime for schema inclusion.""" + schema_name = name if name is not None else getattr(schema_type, "__name__", f"Anonymous_{id(schema_type)}") + _dynamic_schema_types[schema_type] = SchemaInfo(name=schema_name, type=schema_type, source="dynamic_schema") return schema_type +def clear_dynamic_schema_types() -> None: + """Clear dynamic schema registrations.""" + _dynamic_schema_types.clear() + + @dataclass class WebMethod: level: str | None = None diff --git a/tests/unit/server/test_schema_registry.py b/tests/unit/server/test_schema_registry.py new file mode 100644 index 0000000000..548b43a29d --- /dev/null +++ b/tests/unit/server/test_schema_registry.py @@ -0,0 +1,48 @@ +# 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. + +from pydantic import BaseModel + +from llama_stack_api import Conversation, SamplingStrategy +from llama_stack_api.schema_utils import ( + clear_dynamic_schema_types, + get_registered_schema_info, + iter_dynamic_schema_types, + iter_json_schema_types, + iter_registered_schema_types, + register_dynamic_schema_type, +) + + +def test_json_schema_registry_contains_known_model() -> None: + assert Conversation in iter_json_schema_types() + + +def test_registered_schema_registry_contains_sampling_strategy() -> None: + registered_names = {info.name for info in iter_registered_schema_types()} + assert "SamplingStrategy" in registered_names + + schema_info = get_registered_schema_info(SamplingStrategy) + assert schema_info is not None + assert schema_info.name == "SamplingStrategy" + + +def test_dynamic_schema_registration_round_trip() -> None: + existing_models = tuple(iter_dynamic_schema_types()) + clear_dynamic_schema_types() + try: + + class TemporaryModel(BaseModel): + foo: str + + register_dynamic_schema_type(TemporaryModel) + assert TemporaryModel in iter_dynamic_schema_types() + + clear_dynamic_schema_types() + assert TemporaryModel not in iter_dynamic_schema_types() + finally: + for model in existing_models: + register_dynamic_schema_type(model) From 0c9ffff1b8a2c5f7b911df97cb3d58326286610b Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Fri, 14 Nov 2025 14:55:26 -0800 Subject: [PATCH 44/46] precommit --- .github/workflows/conformance.yml | 22 +--------------------- scripts/openapi_generator/_legacy_order.py | 1 - 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 718cd12616..73e9678b21 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -129,32 +129,12 @@ jobs: echo "Will compare: ${BASE_SPEC} -> ${CURRENT_SPEC}" - - name: Write ignore file - run: | - cat < ignore-oasdiff - response-property-became-nullable none - response-property-list-of-types-widened none - request-parameter-default-value-added none - request-property-min-items-increased none - response-property-became-optional none - response-required-property-removed none - response-property-one-of-added none - response-property-type-changed none - request-property-one-of-removed none - request-parameter-enum-value-removed none - request-property-enum-value-removed none - request-property-type-changed none - response-body-type-changed none - response-media-type-removed none - request-body-type-changed none - EOF - # Run oasdiff to detect breaking changes in the API specification # This step will fail if incompatible changes are detected, preventing breaking changes from being merged - name: Run OpenAPI Breaking Change Diff if: steps.skip-check.outputs.skip != 'true' run: | - oasdiff breaking --fail-on ERR --severity-levels ignore-oasdiff $BASE_SPEC $CURRENT_SPEC --match-path '^/v1/' + oasdiff breaking --fail-on ERR $BASE_SPEC $CURRENT_SPEC --match-path '^/v1/' # Report when test is skipped - name: Report skip reason diff --git a/scripts/openapi_generator/_legacy_order.py b/scripts/openapi_generator/_legacy_order.py index c0a83c7dfa..72863c8fc2 100644 --- a/scripts/openapi_generator/_legacy_order.py +++ b/scripts/openapi_generator/_legacy_order.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # From e3e8272bbea45f99055df2119514ce976baaaff8 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Fri, 14 Nov 2025 15:03:36 -0800 Subject: [PATCH 45/46] restore some types we had erased --- client-sdks/stainless/openapi.yml | 1865 ++++ .../static/experimental-llama-stack-spec.yaml | 9091 +++++++++++++++-- docs/static/llama-stack-spec.yaml | 3699 ++++++- docs/static/stainless-llama-stack-spec.yaml | 1865 ++++ scripts/openapi_generator/schema_filtering.py | 40 +- 5 files changed, 15192 insertions(+), 1368 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index 580decb3da..bbae4d01a7 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -4163,6 +4163,38 @@ components: - last_id title: ListOpenAIChatCompletionResponse description: Response from listing OpenAI-compatible chat completions. + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + nullable: true + name: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + title: OpenAIAssistantMessageParam + type: object OpenAIChatCompletionContentPartImageParam: properties: type: @@ -4177,6 +4209,21 @@ components: - image_url title: OpenAIChatCompletionContentPartImageParam description: Image content part for OpenAI-compatible chat completion messages. + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: properties: type: @@ -4385,6 +4432,27 @@ components: - url title: OpenAIImageURL description: Image URL specification for OpenAI-compatible chat completion messages. + OpenAIMessageParam: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: properties: role: @@ -4490,6 +4558,44 @@ components: :token: The token :bytes: (Optional) The bytes for the token :logprob: The log probability of the token + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. + 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' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object OpenAIJSONSchema: properties: name: @@ -4535,6 +4641,21 @@ components: - json_schema title: OpenAIResponseFormatJSONSchema description: JSON schema response format for OpenAI-compatible chat completion requests. + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject OpenAIResponseFormatText: properties: type: @@ -5054,6 +5175,39 @@ components: :text: The text of the choice :index: The index of the choice :logprobs: (Optional) The log probabilities for the tokens in the choice + ConversationItem: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) OpenAIResponseAnnotationCitation: properties: type: @@ -5152,6 +5306,24 @@ components: - file_id - index title: OpenAIResponseAnnotationFilePath + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseContentPartRefusal: properties: type: @@ -5194,6 +5366,21 @@ components: - output title: OpenAIResponseInputFunctionToolCallOutput description: This represents the output of a function call that gets passed back to the model. + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseInputMessageContentFile: properties: type: @@ -5386,6 +5573,18 @@ components: - role title: OpenAIResponseMessage type: object + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal OpenAIResponseOutputMessageContentOutputText: properties: text: @@ -6394,6 +6593,41 @@ components: - message title: OpenAIResponseError description: Error details for failed OpenAI response requests. + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage OpenAIResponseInputToolFileSearch: properties: type: @@ -6651,6 +6885,33 @@ components: - input title: OpenAIResponseObjectWithInput description: OpenAI response object extended with input context information. + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) OpenAIResponsePrompt: properties: id: @@ -6695,6 +6956,27 @@ components: type: object title: OpenAIResponseText description: Text response configuration for OpenAI responses. + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseToolMCP: properties: type: @@ -6760,6 +7042,27 @@ components: - type title: ResponseGuardrailSpec type: object + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseInputToolMCP: properties: type: @@ -8615,6 +8918,29 @@ components: - return_type title: ScoringFn description: A scoring function resource for evaluating model outputs. + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + ScoringFnParamsType: + description: Types of scoring function parameter configurations. + enum: + - llm_as_judge + - regex_parser + - basic + title: ScoringFnParamsType + type: string StringType: properties: type: @@ -8821,6 +9147,61 @@ components: - tool_name - kwargs title: InvokeToolRequest + ImageContentItem: + description: A image content item + properties: + type: + const: image + default: image + title: Type + type: string + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem TextContentItem: properties: type: @@ -8988,6 +9369,64 @@ components: - data title: ListToolGroupsResponse description: Response containing a list of tool groups. + Chunk: + description: A chunk of content that can be inserted into a vector database. + properties: + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + nullable: true + title: ChunkMetadata + required: + - content + - chunk_id + title: Chunk + type: object ChunkMetadata: properties: chunk_id: @@ -9226,6 +9665,18 @@ components: - file_counts title: VectorStoreObject description: OpenAI Vector Store object. + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreChunkingStrategyAuto: properties: type: @@ -9410,6 +9861,14 @@ components: - file_counts title: VectorStoreFileBatchObject description: OpenAI Vector Store File Batch object. + VectorStoreFileStatus: + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed VectorStoreFileLastError: properties: code: @@ -10571,6 +11030,18 @@ components: required: - job_uuid title: PostTrainingJob + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig LoraFinetuningConfig: properties: type: @@ -10707,6 +11178,39 @@ components: required: - model_id title: RegisterModelRequest + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) RegisterShieldRequest: properties: shield_id: @@ -10753,6 +11257,18 @@ components: - toolgroup_id - provider_id title: RegisterToolGroupRequest + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource RegisterBenchmarkRequest: properties: benchmark_id: @@ -11554,6 +12070,1355 @@ components: type: object title: _URLOrData description: A URL or a base64 encoded string + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + SpanEndPayload: + description: Payload for a span end event. + properties: + type: + const: span_end + default: span_end + title: Type + type: string + status: + $ref: '#/components/schemas/SpanStatus' + required: + - status + title: SpanEndPayload + type: object + SpanStartPayload: + description: Payload for a span start event. + properties: + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - name + title: SpanStartPayload + type: object + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: unstructured_log + default: unstructured_log + title: Type + type: string + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' + required: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent + type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + MetricInResponse: + description: A metric value included in API responses. + properties: + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - metric + - value + title: MetricInResponse + type: object + TextDelta: + description: A text content delta for streaming responses. + properties: + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: TextDelta + type: object + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string + required: + - image + title: ImageDelta + type: object + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. + properties: + type: + const: fp8_mixed + default: fp8_mixed + title: Type + type: string + title: Fp8QuantizationConfig + type: object + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). + properties: + type: + const: bf16 + default: bf16 + title: Type + type: string + title: Bf16QuantizationConfig + type: object + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. + properties: + type: + const: int4_mixed + default: int4_mixed + title: Type + type: string + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig + type: object + UserMessage: + description: A message from the user in a chat conversation. + properties: + role: + const: user + default: user + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true + required: + - content + title: UserMessage + type: object + ToolResponseMessage: + description: A message representing the result of a tool invocation. + properties: + role: + const: tool + default: tool + title: Role + type: string + call_id: + title: Call Id + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + required: + - call_id + - content + title: ToolResponseMessage + type: object + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object + required: + - logprobs_by_token + title: TokenLogProbs + type: object + EmbeddingsResponse: + description: Response containing generated embeddings. + properties: + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array + required: + - embeddings + title: EmbeddingsResponse + type: object + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens + properties: + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs + type: object + VectorStoreCreateRequest: + description: Request to create a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object + title: VectorStoreCreateRequest + type: object + VectorStoreModifyRequest: + description: Request to modify a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: VectorStoreModifyRequest + type: object + VectorStoreSearchRequest: + description: Request to search a vector store. + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + max_num_results: + default: 10 + title: Max Num Results + type: integer + ranking_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + rewrite_query: + default: false + title: Rewrite Query + type: boolean + required: + - query + title: VectorStoreSearchRequest + type: object + DialogType: + description: Parameter type for dialog data with semantic output labels. + properties: + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true + type: object + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array + required: + - items + title: ConversationItemCreateRequest + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id + type: string + provider_id: + title: Provider Id + type: string + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL + required: + - toolgroup_id + - provider_id + title: ToolGroupInput + type: object + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + ProviderSpec: + properties: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: + anyOf: + - type: string + - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: + anyOf: + - type: string + - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + required: + - api + - provider_type + - config_class + title: ProviderSpec + type: object + InlineProviderSpec: + properties: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: + anyOf: + - type: string + - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: + anyOf: + - type: string + - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: + anyOf: + - type: string + - type: 'null' + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. + nullable: true + description: + anyOf: + - type: string + - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true + required: + - api + - provider_type + - config_class + title: InlineProviderSpec + type: object + RemoteProviderSpec: + properties: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: + anyOf: + - type: string + - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: + anyOf: + - type: string + - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type + type: string + description: + anyOf: + - type: string + - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true + required: + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec + type: object + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. + properties: + job_uuid: + title: Job Uuid + type: string + log_lines: + items: + type: string + title: Log Lines + type: array + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream + type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. + properties: + job_uuid: + title: Job Uuid + type: string + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest + type: object + Span: + description: A span representing a single operation within a trace. + properties: + span_id: + title: Span Id + type: string + trace_id: + title: Trace Id + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true + name: + title: Name + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + required: + - span_id + - trace_id + - name + - start_time + title: Span + type: object + Trace: + description: A trace representing the complete execution path of a request across multiple operations. + properties: + trace_id: + title: Trace Id + type: string + root_span_id: + title: Root Span Id + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + required: + - trace_id + - root_span_id + - start_time + title: Trace + type: object + EventType: + description: The type of telemetry event being logged. + enum: + - unstructured_log + - structured_log + - metric + title: EventType + type: string + StructuredLogType: + description: The type of structured log event payload. + enum: + - span_start + - span_end + title: StructuredLogType + type: string + EvalTrace: + description: A trace record for evaluation purposes. + properties: + session_id: + title: Session Id + type: string + step: + title: Step + type: string + input: + title: Input + type: string + output: + title: Output + type: string + expected_output: + title: Expected Output + type: string + required: + - session_id + - step + - input + - output + - expected_output + title: EvalTrace + type: object + SpanWithStatus: + description: A span that includes status information. + properties: + span_id: + title: Span Id + type: string + trace_id: + title: Trace Id + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true + name: + title: Name + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + status: + anyOf: + - $ref: '#/components/schemas/SpanStatus' + title: SpanStatus + - type: 'null' + nullable: true + title: SpanStatus + required: + - span_id + - trace_id + - name + - start_time + title: SpanWithStatus + type: object + QueryConditionOp: + description: Comparison operators for query conditions. + enum: + - eq + - ne + - gt + - lt + title: QueryConditionOp + type: string + QueryCondition: + description: A condition for filtering query results. + properties: + key: + title: Key + type: string + op: + $ref: '#/components/schemas/QueryConditionOp' + value: + title: Value + required: + - key + - op + - value + title: QueryCondition + type: object + MetricLabel: + description: A label associated with a metric. + properties: + name: + title: Name + type: string + value: + title: Value + type: string + required: + - name + - value + title: MetricLabel + type: object + MetricDataPoint: + description: A single data point in a metric time series. + properties: + timestamp: + title: Timestamp + type: integer + value: + title: Value + type: number + unit: + title: Unit + type: string + required: + - timestamp + - value + - unit + title: MetricDataPoint + type: object + MetricSeries: + description: A time series of metric data points. + properties: + metric: + title: Metric + type: string + labels: + items: + $ref: '#/components/schemas/MetricLabel' + title: Labels + type: array + values: + items: + $ref: '#/components/schemas/MetricDataPoint' + title: Values + type: array + required: + - metric + - labels + - values + title: MetricSeries + type: object responses: BadRequest400: description: The request was invalid or malformed diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index 6174e4c36f..aaafc3ce25 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -664,6 +664,212 @@ components: - detail title: Error type: object + ListBatchesResponse: + properties: + object: + type: string + const: list + title: Object + default: list + data: + items: + $ref: '#/components/schemas/Batch' + type: array + title: Data + description: List of batch objects + first_id: + anyOf: + - type: string + - type: 'null' + description: ID of the first batch in the list + last_id: + anyOf: + - type: string + - type: 'null' + description: ID of the last batch in the list + has_more: + type: boolean + title: Has More + description: Whether there are more batches available + default: false + type: object + required: + - data + title: ListBatchesResponse + description: Response containing a list of batch objects. + 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: + anyOf: + - type: integer + - type: 'null' + cancelling_at: + anyOf: + - type: integer + - type: 'null' + completed_at: + anyOf: + - type: integer + - type: 'null' + error_file_id: + anyOf: + - type: string + - type: 'null' + errors: + anyOf: + - $ref: '#/components/schemas/Errors' + title: Errors + - type: 'null' + title: Errors + expired_at: + anyOf: + - type: integer + - type: 'null' + expires_at: + anyOf: + - type: integer + - type: 'null' + failed_at: + anyOf: + - type: integer + - type: 'null' + finalizing_at: + anyOf: + - type: integer + - type: 'null' + in_progress_at: + anyOf: + - type: integer + - type: 'null' + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + model: + anyOf: + - type: string + - type: 'null' + output_file_id: + anyOf: + - type: string + - type: 'null' + request_counts: + anyOf: + - $ref: '#/components/schemas/BatchRequestCounts' + title: BatchRequestCounts + - type: 'null' + title: BatchRequestCounts + usage: + anyOf: + - $ref: '#/components/schemas/BatchUsage' + title: BatchUsage + - type: 'null' + title: BatchUsage + additionalProperties: true + type: object + required: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + ListOpenAIChatCompletionResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse + description: Response from listing OpenAI-compatible chat completions. + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + nullable: true + name: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + title: OpenAIAssistantMessageParam + type: object OpenAIChatCompletionContentPartImageParam: properties: type: @@ -678,6 +884,21 @@ components: - image_url title: OpenAIChatCompletionContentPartImageParam description: Image content part for OpenAI-compatible chat completion messages. + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: properties: type: @@ -693,1098 +914,8306 @@ components: - text title: OpenAIChatCompletionContentPartTextParam description: Text content part for OpenAI-compatible chat completion messages. - OpenAIImageURL: + OpenAIChatCompletionToolCall: properties: - url: + index: + anyOf: + - type: integer + - type: 'null' + id: + anyOf: + - type: string + - type: 'null' + type: type: string - title: Url - detail: + const: function + title: Type + default: function + function: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + title: OpenAIChatCompletionToolCallFunction + - type: 'null' + title: OpenAIChatCompletionToolCallFunction + type: object + title: OpenAIChatCompletionToolCall + description: Tool call specification for OpenAI-compatible chat completion responses. + OpenAIChatCompletionToolCallFunction: + properties: + name: + anyOf: + - type: string + - type: 'null' + arguments: anyOf: - type: string - type: 'null' type: object + title: OpenAIChatCompletionToolCallFunction + description: Function call details for OpenAI-compatible tool calls. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + title: OpenAIChatCompletionUsagePromptTokensDetails + - type: 'null' + title: OpenAIChatCompletionUsagePromptTokensDetails + completion_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + title: OpenAIChatCompletionUsageCompletionTokensDetails + - type: 'null' + title: OpenAIChatCompletionUsageCompletionTokensDetails + type: object required: - - url - title: OpenAIImageURL - description: Image URL specification for OpenAI-compatible chat completion messages. - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: Types of aggregation functions for scoring results. - BasicScoringFnParams: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage + description: Usage information for OpenAI chat completion. + OpenAIChoice: properties: - type: + message: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam-Output | ... (5 variants) + 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 - 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 + title: Finish Reason + index: + type: integer + title: Index + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + title: OpenAIChoiceLogprobs type: object - title: BasicScoringFnParams - description: Parameters for basic scoring function configuration. - LLMAsJudgeScoringFnParams: + required: + - message + - finish_reason + - index + title: OpenAIChoice + description: A choice from an OpenAI-compatible chat completion response. + OpenAIChoiceLogprobs: properties: - type: - type: string - const: llm_as_judge - title: Type - default: llm_as_judge - judge_model: + content: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + refusal: + anyOf: + - items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + - type: 'null' + type: object + title: OpenAIChoiceLogprobs + description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. + OpenAIDeveloperMessageParam: + properties: + role: type: string - title: Judge Model - prompt_template: + const: developer + title: Role + default: developer + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: anyOf: - type: string - type: 'null' - 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. - RegexParserScoringFnParams: + - content + title: OpenAIDeveloperMessageParam + description: A message from the developer in an OpenAI-compatible chat completion request. + OpenAIFile: properties: type: type: string - const: regex_parser + const: file 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. - ScoringResult: - properties: - score_rows: - items: - additionalProperties: true - type: object - type: array - title: Score Rows - aggregated_results: - additionalProperties: true - type: object - title: Aggregated Results + default: file + file: + $ref: '#/components/schemas/OpenAIFileFile' type: object required: - - score_rows - - aggregated_results - title: ScoringResult - description: A scoring result for a single row. - TextContentItem: + - file + title: OpenAIFile + OpenAIFileFile: properties: - type: - type: string - const: text - title: Type - default: text - text: + file_data: + anyOf: + - type: string + - type: 'null' + file_id: + anyOf: + - type: string + - type: 'null' + filename: + anyOf: + - type: string + - type: 'null' + type: object + title: OpenAIFileFile + OpenAIImageURL: + properties: + url: type: string - title: Text + title: Url + detail: + anyOf: + - type: string + - type: 'null' type: object required: - - text - title: TextContentItem - description: A text content item - URL: + - url + title: OpenAIImageURL + description: Image URL specification for OpenAI-compatible chat completion messages. + OpenAIMessageParam: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) + OpenAISystemMessageParam: properties: - uri: + role: type: string - title: Uri + const: system + title: Role + default: system + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' type: object required: - - uri - title: URL - description: A URL reference to external content. - AppendRowsRequest: + - content + title: OpenAISystemMessageParam + description: A system message providing instructions or context to the model. + OpenAITokenLogProb: properties: - rows: + token: + type: string + title: Token + bytes: + anyOf: + - items: + type: integer + type: array + - type: 'null' + logprob: + type: number + title: Logprob + top_logprobs: items: - additionalProperties: true - type: object + $ref: '#/components/schemas/OpenAITopLogProb' type: array - title: Rows + title: Top Logprobs type: object required: - - rows - title: AppendRowsRequest - PaginatedResponse: + - token + - logprob + - top_logprobs + title: 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 + OpenAIToolMessageParam: properties: - data: - items: - additionalProperties: true - type: object - type: array - title: Data - has_more: - type: boolean - title: Has More - url: + 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: list[OpenAIChatCompletionContentPartTextParam] + title: string | list[OpenAIChatCompletionContentPartTextParam] + 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. + OpenAITopLogProb: + properties: + token: + type: string + title: Token + bytes: + anyOf: + - items: + type: integer + type: array - type: 'null' + logprob: + type: number + title: Logprob type: object required: - - data - - has_more - title: PaginatedResponse - description: A generic paginated response that follows a simple format. - Dataset: + - token + - logprob + title: 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 + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. properties: - identifier: + role: + const: user + default: user + title: Role type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + 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' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: anyOf: - type: string - type: 'null' - description: Unique identifier for this resource in the provider - provider_id: + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object + OpenAIJSONSchema: + properties: + name: type: string - title: Provider Id - description: ID of the provider that owns this resource + title: Name + description: + anyOf: + - type: string + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + title: OpenAIJSONSchema + description: JSON schema specification for OpenAI-compatible structured response format. + OpenAIResponseFormatJSONObject: + properties: type: type: string - const: dataset + const: json_object title: Type - default: dataset - purpose: - $ref: '#/components/schemas/DatasetPurpose' - source: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - title: URIDataSource - - $ref: '#/components/schemas/RowsDataSource' - title: RowsDataSource - title: URIDataSource | RowsDataSource - 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 + default: json_object type: object - required: - - identifier - - provider_id - - purpose - - source - title: Dataset - description: Dataset resource for storing and accessing training or evaluation data. - RowsDataSource: + title: OpenAIResponseFormatJSONObject + description: JSON object response format for OpenAI-compatible chat completion requests. + OpenAIResponseFormatJSONSchema: properties: type: type: string - const: rows + const: json_schema title: Type - default: rows - rows: - items: - additionalProperties: true - type: object - type: array - title: Rows + default: json_schema + json_schema: + $ref: '#/components/schemas/OpenAIJSONSchema' type: object required: - - rows - title: RowsDataSource - description: A dataset stored in rows. - URIDataSource: + - json_schema + title: OpenAIResponseFormatJSONSchema + description: JSON schema response format for OpenAI-compatible chat completion requests. + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + OpenAIResponseFormatText: properties: type: type: string - const: uri + const: text title: Type - default: uri - uri: - type: string - title: Uri + default: text type: object - required: - - uri - title: URIDataSource - description: A dataset that can be obtained from a URI. - ListDatasetsResponse: + title: OpenAIResponseFormatText + description: Text response format for OpenAI-compatible chat completion requests. + OpenAIChatCompletionRequestWithExtraBody: properties: - data: + model: + type: string + title: Model + messages: items: - $ref: '#/components/schemas/Dataset' + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + title: OpenAIUserMessageParam-Input + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + title: OpenAIAssistantMessageParam-Input + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: 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' + title: OpenAIUserMessageParam-Input | ... (5 variants) type: array - title: Data - type: object - required: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - Benchmark: - properties: - identifier: - type: string - title: Identifier - description: Unique identifier for this resource in llama stack - provider_resource_id: + minItems: 1 + title: Messages + frequency_penalty: + anyOf: + - type: number + - type: 'null' + function_call: anyOf: - type: string + - additionalProperties: true + type: object - type: 'null' - description: Unique identifier for this resource in the provider - 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. - ListBenchmarksResponse: - properties: - data: - items: - $ref: '#/components/schemas/Benchmark' - type: array - title: Data - type: object - required: - - data - title: ListBenchmarksResponse - BenchmarkConfig: - properties: - eval_candidate: - $ref: '#/components/schemas/ModelCandidate' - scoring_params: - additionalProperties: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - title: LLMAsJudgeScoringFnParams - - $ref: '#/components/schemas/RegexParserScoringFnParams' - title: RegexParserScoringFnParams - - $ref: '#/components/schemas/BasicScoringFnParams' - title: BasicScoringFnParams + title: string | object + functions: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + logprobs: + anyOf: + - type: boolean + - type: 'null' + max_completion_tokens: + anyOf: + - type: integer + - type: 'null' + max_tokens: + anyOf: + - type: integer + - type: 'null' + n: + anyOf: + - type: integer + - type: 'null' + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' + presence_penalty: + anyOf: + - type: number + - type: 'null' + response_format: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject discriminator: propertyName: type mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams - type: object - title: Scoring Params - description: Map between scoring function id and parameters for each scoring function you want to run - num_examples: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject + - type: 'null' + title: Response Format + seed: anyOf: - type: integer - type: 'null' - description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + stream: + anyOf: + - type: boolean + - type: 'null' + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + temperature: + anyOf: + - type: number + - type: 'null' + tool_choice: + anyOf: + - type: string + - additionalProperties: true + type: object + - type: 'null' + title: string | object + tools: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + top_logprobs: + anyOf: + - type: integer + - type: 'null' + top_p: + anyOf: + - type: number + - type: 'null' + user: + anyOf: + - type: string + - type: 'null' + additionalProperties: true type: object required: - - eval_candidate - title: BenchmarkConfig - description: A benchmark configuration for evaluation. - GreedySamplingStrategy: + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible chat completion endpoint. + OpenAIChatCompletion: properties: - type: + id: 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. - ModelCandidate: - properties: - type: + title: Id + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + type: array + title: Choices + object: type: string - const: model - title: Type - default: model + const: chat.completion + title: Object + default: chat.completion + created: + type: integer + title: Created model: type: string title: Model - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: + usage: anyOf: - - $ref: '#/components/schemas/SystemMessage' - title: SystemMessage + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' - title: SystemMessage + title: OpenAIChatCompletionUsage type: object required: + - id + - choices + - created - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - SamplingParams: + title: OpenAIChatCompletion + description: Response from an OpenAI-compatible chat completion request. + OpenAIChatCompletionChunk: + description: Chunk from a streaming response to an OpenAI-compatible chat completion request. properties: - strategy: - oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - title: GreedySamplingStrategy - - $ref: '#/components/schemas/TopPSamplingStrategy' - title: TopPSamplingStrategy - - $ref: '#/components/schemas/TopKSamplingStrategy' - title: TopKSamplingStrategy - title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - max_tokens: + id: + title: Id + type: string + choices: + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + title: Choices + type: array + object: + const: chat.completion.chunk + default: chat.completion.chunk + title: Object + type: string + created: + title: Created + type: integer + model: + title: Model + type: string + usage: anyOf: - - type: integer + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage - type: 'null' - repetition_penalty: + nullable: true + title: OpenAIChatCompletionUsage + required: + - id + - choices + - created + - model + title: OpenAIChatCompletionChunk + type: object + OpenAIChoiceDelta: + description: A delta from an OpenAI-compatible chat completion streaming response. + properties: + content: anyOf: - - type: number + - type: string - type: 'null' - default: 1.0 - stop: + nullable: true + refusal: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' - type: object - title: SamplingParams - description: Sampling parameters. - SystemMessage: - properties: + nullable: true role: - type: string - const: system - title: Role - default: system - content: anyOf: - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem + - type: 'null' + nullable: true + tool_calls: + anyOf: - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Input' - title: ImageContentItem-Input - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Input' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Input | TextContentItem + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' type: array - title: list[ImageContentItem-Input | TextContentItem] - title: string | list[ImageContentItem-Input | TextContentItem] + - type: 'null' + nullable: true + reasoning_content: + anyOf: + - type: string + - type: 'null' + nullable: true + title: OpenAIChoiceDelta type: object - required: - - content - title: SystemMessage - description: A system message providing instructions or context to the model. - TopKSamplingStrategy: + OpenAIChunkChoice: + description: A chunk choice from an OpenAI-compatible chat completion streaming response. properties: - type: + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + finish_reason: + title: Finish Reason type: string - const: top_k - title: Type - default: top_k - top_k: + index: + title: Index 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. - TopPSamplingStrategy: - properties: - type: - type: string - const: top_p - title: Type - default: top_p - temperature: - anyOf: - - type: number - minimum: 0.0 - - type: 'null' - top_p: + logprobs: anyOf: - - type: number + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs - type: 'null' - default: 0.95 - type: object + nullable: true + title: OpenAIChoiceLogprobs required: - - temperature - title: TopPSamplingStrategy - description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. - EvaluateRowsRequest: + - delta + - finish_reason + - index + title: OpenAIChunkChoice + type: object + OpenAICompletionWithInputMessages: properties: - input_rows: + id: + type: string + title: Id + choices: items: - additionalProperties: true - type: object + $ref: '#/components/schemas/OpenAIChoice' type: array - title: Input Rows - scoring_functions: - items: - type: string - type: array - title: Scoring Functions - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - type: object - required: - - input_rows - - scoring_functions - - benchmark_config - title: EvaluateRowsRequest - EvaluateResponse: - properties: - generations: + title: Choices + object: + type: string + const: chat.completion + title: Object + default: chat.completion + created: + type: integer + title: Created + model: + type: string + title: Model + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIChatCompletionUsage' + title: OpenAIChatCompletionUsage + - type: 'null' + title: OpenAIChatCompletionUsage + input_messages: items: - additionalProperties: true - type: object + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + title: OpenAIUserMessageParam-Output + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + title: OpenAIAssistantMessageParam-Output + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + 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' + title: OpenAIUserMessageParam-Output | ... (5 variants) 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. - Job: - properties: - job_id: - type: string - title: Job Id - status: - $ref: '#/components/schemas/JobStatus' + title: Input Messages type: object required: - - job_id - - status - title: Job - description: A job execution instance with status tracking. - RerankRequest: + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + OpenAICompletionRequestWithExtraBody: properties: model: type: string title: Model - query: + prompt: anyOf: - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - items: - items: - anyOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam - type: array - title: Items - max_num_results: + - items: + type: string + type: array + title: list[string] + - items: + type: integer + type: array + title: list[integer] + - items: + items: + type: integer + type: array + type: array + title: list[array] + title: string | ... (4 variants) + best_of: + anyOf: + - type: integer + - type: 'null' + echo: + anyOf: + - type: boolean + - type: 'null' + frequency_penalty: + anyOf: + - type: number + - type: 'null' + logit_bias: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + logprobs: + anyOf: + - type: boolean + - type: 'null' + max_tokens: + anyOf: + - type: integer + - type: 'null' + n: + anyOf: + - type: integer + - type: 'null' + presence_penalty: + anyOf: + - type: number + - type: 'null' + seed: anyOf: - type: integer - type: 'null' + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + - type: 'null' + title: string | list[string] + stream: + anyOf: + - type: boolean + - type: 'null' + stream_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + temperature: + anyOf: + - type: number + - type: 'null' + top_p: + anyOf: + - type: number + - type: 'null' + user: + anyOf: + - type: string + - type: 'null' + suffix: + anyOf: + - type: string + - type: 'null' + additionalProperties: true type: object required: - model - - query - - items - title: RerankRequest - RerankData: + - prompt + title: OpenAICompletionRequestWithExtraBody + description: Request parameters for OpenAI-compatible completion endpoint. + OpenAICompletion: + properties: + id: + type: string + title: Id + choices: + items: + $ref: '#/components/schemas/OpenAICompletionChoice' + 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. + + :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" + OpenAICompletionChoice: properties: + finish_reason: + type: string + title: Finish Reason + text: + type: string + title: Text index: type: integer title: Index - relevance_score: - type: number - title: Relevance Score + logprobs: + anyOf: + - $ref: '#/components/schemas/OpenAIChoiceLogprobs' + title: OpenAIChoiceLogprobs + - type: 'null' + title: OpenAIChoiceLogprobs type: object required: + - finish_reason + - text - index - - relevance_score - title: RerankData - description: A single rerank result from a reranking response. - RerankResponse: + title: 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 + ConversationItem: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + OpenAIResponseAnnotationCitation: properties: - data: - items: - $ref: '#/components/schemas/RerankData' - type: array - title: Data + 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: - - data - title: RerankResponse - description: Response from a reranking request. - Checkpoint: + - end_index + - start_index + - title + - url + title: OpenAIResponseAnnotationCitation + description: URL citation annotation for referencing external web resources. + OpenAIResponseAnnotationContainerFileCitation: properties: - identifier: + type: type: string - title: Identifier - created_at: + const: container_file_citation + title: Type + default: container_file_citation + container_id: type: string - format: date-time - title: Created At - epoch: + title: Container Id + end_index: type: integer - title: Epoch - post_training_job_id: + title: End Index + file_id: type: string - title: Post Training Job Id - path: + title: File Id + filename: type: string - title: Path - training_metrics: - anyOf: - - $ref: '#/components/schemas/PostTrainingMetric' - title: PostTrainingMetric - - type: 'null' - title: PostTrainingMetric + title: Filename + start_index: + type: integer + title: Start Index type: object required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - PostTrainingJobArtifactsResponse: + - container_id + - end_index + - file_id + - filename + - start_index + title: OpenAIResponseAnnotationContainerFileCitation + OpenAIResponseAnnotationFileCitation: properties: - job_uuid: + type: type: string - title: Job Uuid - checkpoints: - items: - $ref: '#/components/schemas/Checkpoint' - type: array - title: Checkpoints + 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: - - job_uuid - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingMetric: + - file_id + - filename + - index + title: OpenAIResponseAnnotationFileCitation + description: File citation annotation for referencing specific files in response content. + OpenAIResponseAnnotationFilePath: properties: - epoch: + type: + type: string + const: file_path + title: Type + default: file_path + file_id: + type: string + title: File Id + index: type: integer - title: Epoch - train_loss: - type: number - title: Train Loss - validation_loss: - type: number - title: Validation Loss - perplexity: - type: number - title: Perplexity + title: Index type: object required: - - epoch - - train_loss + - file_id + - index + title: OpenAIResponseAnnotationFilePath + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + 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. + 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: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + type: object + required: + - call_id + - output + title: OpenAIResponseInputFunctionToolCallOutput + description: This represents the output of a function call that gets passed back to the model. + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + OpenAIResponseInputMessageContentFile: + properties: + type: + type: string + const: input_file + title: Type + default: input_file + file_data: + anyOf: + - type: string + - type: 'null' + file_id: + anyOf: + - type: string + - type: 'null' + file_url: + anyOf: + - type: string + - type: 'null' + filename: + anyOf: + - type: string + - type: 'null' + type: object + title: OpenAIResponseInputMessageContentFile + description: File content for input messages in OpenAI response format. + OpenAIResponseInputMessageContentImage: + properties: + detail: + title: Detail + default: auto + type: string + enum: + - low + - high + - auto + type: + type: string + const: input_image + title: Type + default: input_image + file_id: + anyOf: + - type: string + - type: 'null' + image_url: + anyOf: + - type: string + - type: 'null' + type: object + title: OpenAIResponseInputMessageContentImage + description: Image content for input messages in OpenAI response format. + 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. + 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: + anyOf: + - type: string + - type: 'null' + reason: + anyOf: + - type: string + - type: 'null' + type: object + required: + - approval_request_id + - approve + title: OpenAIResponseMCPApprovalResponse + description: A response to an MCP approval request. + 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' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + const: message + default: message + title: Type + type: string + id: + anyOf: + - type: string + - type: 'null' + nullable: true + status: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - content + - role + title: OpenAIResponseMessage + type: object + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + 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' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: 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' + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + 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: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array + - type: 'null' + type: object + required: + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall + description: File search tool call output message for OpenAI responses. + 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: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + type: object + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + description: Function tool call output message for OpenAI responses. + 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: + anyOf: + - type: string + - type: 'null' + output: + anyOf: + - type: string + - type: 'null' + type: object + required: + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + description: Model Context Protocol (MCP) call output message for OpenAI responses. + 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. + 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. + 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: + 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. + 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. + type: object + required: + - id + - created_at + title: Conversation + description: OpenAI-compatible conversation object. + ConversationDeletedResource: + properties: + id: + type: string + title: Id + description: The deleted conversation identifier + object: + type: string + title: Object + description: Object type + default: conversation.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object + required: + - id + title: ConversationDeletedResource + description: Response for deleted conversation. + ConversationItemList: + properties: + object: + type: string + title: Object + description: Object type + default: list + data: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: 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' + title: OpenAIResponseMessage-Output | ... (9 variants) + type: array + title: Data + description: List of conversation items + first_id: + anyOf: + - type: string + - type: 'null' + description: The ID of the first item in the list + last_id: + anyOf: + - type: string + - type: 'null' + description: The ID of the last item in the list + 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. + ConversationItemDeletedResource: + properties: + id: + type: string + title: Id + description: The deleted item identifier + object: + type: string + title: Object + description: Object type + default: conversation.item.deleted + deleted: + type: boolean + title: Deleted + description: Whether the object was deleted + default: true + type: object + required: + - id + title: ConversationItemDeletedResource + description: Response for deleted conversation item. + OpenAIEmbeddingsRequestWithExtraBody: + properties: + model: + type: string + title: Model + input: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + encoding_format: + anyOf: + - type: string + - type: 'null' + default: float + dimensions: + anyOf: + - type: integer + - type: 'null' + user: + anyOf: + - type: string + - type: 'null' + additionalProperties: true + type: object + required: + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody + description: Request parameters for OpenAI-compatible embeddings endpoint. + OpenAIEmbeddingData: + properties: + object: + type: string + const: embedding + title: Object + default: embedding + embedding: + anyOf: + - items: + type: number + type: array + title: list[number] + - type: string + title: list[number] | string + index: + type: integer + title: Index + type: object + required: + - embedding + - index + title: OpenAIEmbeddingData + description: A single embedding data object from an OpenAI-compatible embeddings response. + 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. + 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. + OpenAIFilePurpose: + type: string + enum: + - assistants + - batch + title: OpenAIFilePurpose + description: Valid purpose values for OpenAI Files API. + ListOpenAIFileResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse + description: Response for listing files in OpenAI Files API. + 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. + ExpiresAfter: + properties: + anchor: + type: string + const: created_at + title: Anchor + seconds: + type: integer + maximum: 2592000.0 + minimum: 3600.0 + title: Seconds + type: object + required: + - anchor + - seconds + title: 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) + OpenAIFileDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + const: file + title: Object + default: file + deleted: + type: boolean + title: Deleted + type: object + required: + - id + - deleted + title: OpenAIFileDeleteResponse + description: Response for deleting a file in OpenAI Files API. + HealthInfo: + properties: + status: + $ref: '#/components/schemas/HealthStatus' + type: object + required: + - status + title: HealthInfo + description: Health status information for the service. + 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. + 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. + OpenAIModel: + properties: + id: + type: string + title: Id + object: + type: string + const: model + title: Object + default: model + created: + type: integer + title: Created + owned_by: + type: string + title: Owned By + custom_metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - id + - created + - owned_by + title: OpenAIModel + description: |- + A model from OpenAI. + + :id: The ID of the model + :object: The object type, which will be "model" + :created: The Unix timestamp in seconds when the model was created + :owned_by: The owner of the model + :custom_metadata: Llama Stack-specific metadata including model_type, provider info, and additional metadata + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + type: array + title: Data + type: object + required: + - data + title: OpenAIListModelsResponse + Model: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + 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. + ModelType: + type: string + enum: + - llm + - embedding + - rerank + title: ModelType + description: Enumeration of supported model types in Llama Stack. + 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. + ModerationObjectResults: + properties: + flagged: + type: boolean + title: Flagged + categories: + anyOf: + - additionalProperties: + type: boolean + type: object + - type: 'null' + category_applied_input_types: + anyOf: + - additionalProperties: + items: + type: string + type: array + type: object + - type: 'null' + category_scores: + anyOf: + - additionalProperties: + type: number + type: object + - type: 'null' + user_message: + anyOf: + - type: string + - type: 'null' + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - flagged + title: ModerationObjectResults + description: A moderation object. + Prompt: + properties: + prompt: + anyOf: + - type: string + - type: 'null' + description: The system prompt with variable placeholders + 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. + ListPromptsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + type: array + title: Data + type: object + required: + - data + title: ListPromptsResponse + description: Response model to list prompts. + 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. + 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. + ListOpenAIResponseObject: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' + type: array + title: Data + has_more: + type: boolean + title: Has More + first_id: + type: string + title: First Id + last_id: + type: string + title: Last Id + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject + description: Paginated list of OpenAI response objects with navigation metadata. + 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. + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + max_num_results: + anyOf: + - type: integer + maximum: 50.0 + minimum: 1.0 + - type: 'null' + default: 10 + ranking_options: + anyOf: + - $ref: '#/components/schemas/SearchRankingOptions' + title: SearchRankingOptions + - type: 'null' + title: SearchRankingOptions + type: object + required: + - vector_store_ids + title: OpenAIResponseInputToolFileSearch + description: File search tool configuration for OpenAI response inputs. + OpenAIResponseInputToolFunction: + properties: + type: + type: string + const: function + title: Type + default: function + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + parameters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + type: object + required: + - name + - parameters + title: OpenAIResponseInputToolFunction + description: Function tool configuration for OpenAI response inputs. + OpenAIResponseInputToolWebSearch: + properties: + type: + title: Type + default: web_search + type: string + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + search_context_size: + anyOf: + - type: string + pattern: ^low|medium|high$ + - type: 'null' + default: medium + type: object + title: OpenAIResponseInputToolWebSearch + description: Web search tool configuration for OpenAI response inputs. + OpenAIResponseObjectWithInput: + properties: + created_at: + type: integer + title: Created At + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + title: 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' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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' + title: OpenAIResponseMessage-Output | ... (7 variants) + type: array + title: Output + parallel_tool_calls: + type: boolean + title: Parallel Tool Calls + default: false + previous_response_id: + anyOf: + - type: string + - type: 'null' + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + title: OpenAIResponsePrompt + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + truncation: + anyOf: + - type: string + - type: 'null' + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage + - type: 'null' + title: OpenAIResponseUsage + instructions: + anyOf: + - type: string + - type: 'null' + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + input: + items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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' + title: OpenAIResponseMessage-Output | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + type: array + title: Input + type: object + required: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput + description: OpenAI response object extended with input context information. + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + OpenAIResponsePrompt: + properties: + id: + type: string + title: Id + variables: + anyOf: + - additionalProperties: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: object + - type: 'null' + version: + anyOf: + - type: string + - type: 'null' + type: object + required: + - id + title: OpenAIResponsePrompt + description: OpenAI compatible Prompt object that is used in OpenAI responses. + OpenAIResponseText: + properties: + format: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseTextFormat' + title: OpenAIResponseTextFormat + - type: 'null' + title: OpenAIResponseTextFormat + type: object + title: OpenAIResponseText + description: Text response configuration for OpenAI responses. + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + 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 + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter + - type: 'null' + title: list[string] | AllowedToolsFilter + type: object + required: + - server_label + title: OpenAIResponseToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response object. + 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: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + title: OpenAIResponseUsageInputTokensDetails + - type: 'null' + title: OpenAIResponseUsageInputTokensDetails + output_tokens_details: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + title: OpenAIResponseUsageOutputTokensDetails + - type: 'null' + title: OpenAIResponseUsageOutputTokensDetails + type: object + required: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage + description: Usage information for OpenAI response. + ResponseGuardrailSpec: + description: Specification for a guardrail to apply during response generation. + properties: + type: + title: Type + type: string + required: + - type + title: ResponseGuardrailSpec + type: object + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + authorization: + anyOf: + - type: string + - type: 'null' + require_approval: + anyOf: + - type: string + const: always + - type: string + const: never + - $ref: '#/components/schemas/ApprovalFilter' + title: ApprovalFilter + title: string | ApprovalFilter + default: never + allowed_tools: + anyOf: + - items: + type: string + type: array + title: list[string] + - $ref: '#/components/schemas/AllowedToolsFilter' + title: AllowedToolsFilter + - type: 'null' + title: list[string] | AllowedToolsFilter + type: object + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + description: Model Context Protocol (MCP) tool configuration for OpenAI response inputs. + OpenAIResponseObject: + properties: + created_at: + type: integer + title: Created At + error: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseError' + title: OpenAIResponseError + - type: 'null' + title: 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' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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' + title: OpenAIResponseMessage-Output | ... (7 variants) + type: array + title: Output + parallel_tool_calls: + type: boolean + title: Parallel Tool Calls + default: false + previous_response_id: + anyOf: + - type: string + - type: 'null' + prompt: + anyOf: + - $ref: '#/components/schemas/OpenAIResponsePrompt' + title: OpenAIResponsePrompt + - type: 'null' + title: OpenAIResponsePrompt + status: + type: string + title: Status + temperature: + anyOf: + - type: number + - type: 'null' + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + anyOf: + - type: number + - type: 'null' + tools: + anyOf: + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: 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_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + title: OpenAIResponseInputToolWebSearch | ... (4 variants) + type: array + - type: 'null' + truncation: + anyOf: + - type: string + - type: 'null' + usage: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseUsage' + title: OpenAIResponseUsage + - type: 'null' + title: OpenAIResponseUsage + instructions: + anyOf: + - type: string + - type: 'null' + max_tool_calls: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject + description: Complete OpenAI response object containing generation results and metadata. + OpenAIResponseContentPartOutputText: + description: Text content within a streamed response part. + properties: + type: + const: output_text + default: output_text + title: Type + type: string + text: + title: Text + type: string + annotations: + items: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + title: Annotations + type: array + logprobs: + anyOf: + - items: + additionalProperties: true + type: object + type: array + - type: 'null' + nullable: true + required: + - text + title: OpenAIResponseContentPartOutputText + type: object + OpenAIResponseContentPartReasoningSummary: + description: Reasoning summary part in a streamed response. + properties: + type: + const: summary_text + default: summary_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningSummary + type: object + OpenAIResponseContentPartReasoningText: + description: Reasoning text emitted as part of a streamed response. + properties: + type: + const: reasoning_text + default: reasoning_text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: OpenAIResponseContentPartReasoningText + type: object + OpenAIResponseObjectStream: + discriminator: + mapping: + response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + response.created: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + response.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + response.file_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + response.file_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + response.file_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + response.function_call_arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + response.function_call_arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + response.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + response.incomplete: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + response.mcp_call.arguments.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + response.mcp_call.arguments.done: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + response.mcp_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + response.mcp_call.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + response.mcp_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + response.mcp_list_tools.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + response.mcp_list_tools.failed: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + response.mcp_list_tools.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + response.output_item.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + response.output_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + response.output_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + response.reasoning_summary_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + response.reasoning_summary_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + response.reasoning_summary_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + response.reasoning_summary_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + response.reasoning_text.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + response.reasoning_text.done: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + response.refusal.delta: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + response.refusal.done: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + response.web_search_call.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + response.web_search_call.in_progress: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + response.web_search_call.searching: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated' + title: OpenAIResponseObjectStreamResponseCreated + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseInProgress' + title: OpenAIResponseObjectStreamResponseInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemAdded' + title: OpenAIResponseObjectStreamResponseOutputItemAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputItemDone' + title: OpenAIResponseObjectStreamResponseOutputItemDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDelta' + title: OpenAIResponseObjectStreamResponseOutputTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextDone' + title: OpenAIResponseObjectStreamResponseOutputTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallSearching' + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseWebSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsInProgress' + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsFailed' + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpListToolsCompleted' + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallArgumentsDone' + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallInProgress' + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallFailed' + title: OpenAIResponseObjectStreamResponseMcpCallFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseMcpCallCompleted' + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded' + title: OpenAIResponseObjectStreamResponseContentPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone' + title: OpenAIResponseObjectStreamResponseContentPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningTextDone' + title: OpenAIResponseObjectStreamResponseReasoningTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryPartDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseReasoningSummaryTextDone' + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDelta' + title: OpenAIResponseObjectStreamResponseRefusalDelta + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseRefusalDone' + title: OpenAIResponseObjectStreamResponseRefusalDone + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded' + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallInProgress' + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallSearching' + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFileSearchCallCompleted' + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseIncomplete' + title: OpenAIResponseObjectStreamResponseIncomplete + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseFailed' + title: OpenAIResponseObjectStreamResponseFailed + - $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted' + title: OpenAIResponseObjectStreamResponseCompleted + title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants) + OpenAIResponseObjectStreamResponseCompleted: + description: Streaming event indicating a response has been completed. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.completed + default: response.completed + title: Type + type: string + required: + - response + title: OpenAIResponseObjectStreamResponseCompleted + type: object + OpenAIResponseObjectStreamResponseContentPartAdded: + description: Streaming event for when a new content part is added to a response item. + properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.added + default: response.content_part.added + title: Type + type: string + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartAdded + type: object + OpenAIResponseObjectStreamResponseContentPartDone: + description: Streaming event for when a content part is completed. + properties: + content_index: + title: Content Index + type: integer + response_id: + title: Response Id + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + sequence_number: + title: Sequence Number + type: integer + type: + const: response.content_part.done + default: response.content_part.done + title: Type + type: string + required: + - content_index + - response_id + - item_id + - output_index + - part + - sequence_number + title: OpenAIResponseObjectStreamResponseContentPartDone + type: object + OpenAIResponseObjectStreamResponseCreated: + description: Streaming event indicating a new response has been created. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + type: + const: response.created + default: response.created + title: Type + type: string + required: + - response + title: OpenAIResponseObjectStreamResponseCreated + type: object + OpenAIResponseObjectStreamResponseFailed: + description: Streaming event emitted when a response fails. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.failed + default: response.failed + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseFailed + type: object + OpenAIResponseObjectStreamResponseFileSearchCallCompleted: + description: Streaming event for completed file search calls. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.completed + default: response.file_search_call.completed + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseFileSearchCallInProgress: + description: Streaming event for file search calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.in_progress + default: response.file_search_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseFileSearchCallSearching: + description: Streaming event for file search currently searching. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.file_search_call.searching + default: response.file_search_call.searching + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFileSearchCallSearching + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta: + description: Streaming event for incremental function call argument updates. + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.delta + default: response.function_call_arguments.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone: + description: Streaming event for when function call arguments are completed. + properties: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.function_call_arguments.done + default: response.function_call_arguments.done + title: Type + type: string + required: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseInProgress: + description: Streaming event indicating the response remains in progress. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.in_progress + default: response.in_progress + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseInProgress + type: object + OpenAIResponseObjectStreamResponseIncomplete: + description: Streaming event emitted when a response ends in an incomplete state. + properties: + response: + $ref: '#/components/schemas/OpenAIResponseObject' + sequence_number: + title: Sequence Number + type: integer + type: + const: response.incomplete + default: response.incomplete + title: Type + type: string + required: + - response + - sequence_number + title: OpenAIResponseObjectStreamResponseIncomplete + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta: + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.delta + default: response.mcp_call.arguments.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta + type: object + OpenAIResponseObjectStreamResponseMcpCallArgumentsDone: + properties: + arguments: + title: Arguments + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.arguments.done + default: response.mcp_call.arguments.done + title: Type + type: string + required: + - arguments + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallArgumentsDone + type: object + OpenAIResponseObjectStreamResponseMcpCallCompleted: + description: Streaming event for completed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.completed + default: response.mcp_call.completed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallCompleted + type: object + OpenAIResponseObjectStreamResponseMcpCallFailed: + description: Streaming event for failed MCP calls. + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.failed + default: response.mcp_call.failed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallFailed + type: object + OpenAIResponseObjectStreamResponseMcpCallInProgress: + description: Streaming event for MCP calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_call.in_progress + default: response.mcp_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpCallInProgress + type: object + OpenAIResponseObjectStreamResponseMcpListToolsCompleted: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.completed + default: response.mcp_list_tools.completed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsCompleted + type: object + OpenAIResponseObjectStreamResponseMcpListToolsFailed: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.failed + default: response.mcp_list_tools.failed + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsFailed + type: object + OpenAIResponseObjectStreamResponseMcpListToolsInProgress: + properties: + sequence_number: + title: Sequence Number + type: integer + type: + const: response.mcp_list_tools.in_progress + default: response.mcp_list_tools.in_progress + title: Type + type: string + required: + - sequence_number + title: OpenAIResponseObjectStreamResponseMcpListToolsInProgress + type: object + OpenAIResponseObjectStreamResponseOutputItemAdded: + description: Streaming event for when a new output item is added to the response. + properties: + response_id: + title: Response Id + type: string + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.added + default: response.output_item.added + title: Type + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemAdded + type: object + OpenAIResponseObjectStreamResponseOutputItemDone: + description: Streaming event for when an output item is completed. + properties: + response_id: + title: Response Id + type: string + item: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_item.done + default: response.output_item.done + title: Type + type: string + required: + - response_id + - item + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputItemDone + type: object + OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded: + description: Streaming event for when an annotation is added to output text. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + content_index: + title: Content Index + type: integer + annotation_index: + title: Annotation Index + type: integer + annotation: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.annotation.added + default: response.output_text.annotation.added + title: Type + type: string + required: + - item_id + - output_index + - content_index + - annotation_index + - annotation + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded + type: object + OpenAIResponseObjectStreamResponseOutputTextDelta: + description: Streaming event for incremental text content updates. + properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.delta + default: response.output_text.delta + title: Type + type: string + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDelta + type: object + OpenAIResponseObjectStreamResponseOutputTextDone: + description: Streaming event for when text output is completed. + properties: + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.output_text.done + default: response.output_text.done + title: Type + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseOutputTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded: + description: Streaming event for when a new reasoning summary part is added. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.added + default: response.reasoning_summary_part.added + title: Type + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryPartDone: + description: Streaming event for when a reasoning summary part is completed. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + part: + $ref: '#/components/schemas/OpenAIResponseContentPartReasoningSummary' + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_part.done + default: response.reasoning_summary_part.done + title: Type + type: string + required: + - item_id + - output_index + - part + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta: + description: Streaming event for incremental reasoning summary text updates. + properties: + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.delta + default: response.reasoning_summary_text.delta + title: Type + type: string + required: + - delta + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningSummaryTextDone: + description: Streaming event for when reasoning summary text is completed. + properties: + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + summary_index: + title: Summary Index + type: integer + type: + const: response.reasoning_summary_text.done + default: response.reasoning_summary_text.done + title: Type + type: string + required: + - text + - item_id + - output_index + - sequence_number + - summary_index + title: OpenAIResponseObjectStreamResponseReasoningSummaryTextDone + type: object + OpenAIResponseObjectStreamResponseReasoningTextDelta: + description: Streaming event for incremental reasoning text updates. + properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.delta + default: response.reasoning_text.delta + title: Type + type: string + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDelta + type: object + OpenAIResponseObjectStreamResponseReasoningTextDone: + description: Streaming event for when reasoning text is completed. + properties: + content_index: + title: Content Index + type: integer + text: + title: Text + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.reasoning_text.done + default: response.reasoning_text.done + title: Type + type: string + required: + - content_index + - text + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseReasoningTextDone + type: object + OpenAIResponseObjectStreamResponseRefusalDelta: + description: Streaming event for incremental refusal text updates. + properties: + content_index: + title: Content Index + type: integer + delta: + title: Delta + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.delta + default: response.refusal.delta + title: Type + type: string + required: + - content_index + - delta + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDelta + type: object + OpenAIResponseObjectStreamResponseRefusalDone: + description: Streaming event for when refusal text is completed. + properties: + content_index: + title: Content Index + type: integer + refusal: + title: Refusal + type: string + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.refusal.done + default: response.refusal.done + title: Type + type: string + required: + - content_index + - refusal + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseRefusalDone + type: object + OpenAIResponseObjectStreamResponseWebSearchCallCompleted: + description: Streaming event for completed web search calls. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.completed + default: response.web_search_call.completed + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallCompleted + type: object + OpenAIResponseObjectStreamResponseWebSearchCallInProgress: + description: Streaming event for web search calls in progress. + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.in_progress + default: response.web_search_call.in_progress + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallInProgress + type: object + OpenAIResponseObjectStreamResponseWebSearchCallSearching: + properties: + item_id: + title: Item Id + type: string + output_index: + title: Output Index + type: integer + sequence_number: + title: Sequence Number + type: integer + type: + const: response.web_search_call.searching + default: response.web_search_call.searching + title: Type + type: string + required: + - item_id + - output_index + - sequence_number + title: OpenAIResponseObjectStreamResponseWebSearchCallSearching + type: object + OpenAIDeleteResponseObject: + properties: + id: + type: string + title: Id + object: + type: string + const: response + title: Object + default: response + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: OpenAIDeleteResponseObject + description: Response object confirming deletion of an OpenAI response. + ListOpenAIResponseInputItem: + properties: + data: + items: + anyOf: + - oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: 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' + title: OpenAIResponseMessage-Output | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + title: OpenAIResponseMessage-Output + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage-Output + type: array + title: Data + object: + type: string + const: list + title: Object + default: list + type: object + required: + - data + title: ListOpenAIResponseInputItem + description: List container for OpenAI response input items. + RunShieldResponse: + properties: + violation: + anyOf: + - $ref: '#/components/schemas/SafetyViolation' + title: SafetyViolation + - type: 'null' + title: SafetyViolation + type: object + title: RunShieldResponse + description: Response from running a safety shield. + SafetyViolation: + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + anyOf: + - type: string + - type: 'null' + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - violation_level + title: SafetyViolation + description: Details of a safety violation detected by content moderation. + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: Severity level of a safety violation. + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: Types of aggregation functions for scoring results. + ArrayType: + properties: + type: + type: string + const: array + title: Type + default: array + type: object + title: ArrayType + description: Parameter type for array values. + 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. + BooleanType: + properties: + type: + type: string + const: boolean + title: Type + default: boolean + type: object + title: BooleanType + description: Parameter type for boolean values. + 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. + CompletionInputType: + properties: + type: + type: string + const: completion_input + title: Type + default: completion_input + type: object + title: CompletionInputType + description: Parameter type for completion input. + JsonType: + properties: + type: + type: string + const: json + title: Type + default: json + type: object + title: JsonType + description: Parameter type for JSON values. + LLMAsJudgeScoringFnParams: + properties: + type: + type: string + const: llm_as_judge + title: Type + default: llm_as_judge + judge_model: + type: string + title: Judge Model + prompt_template: + anyOf: + - type: string + - type: 'null' + 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. + NumberType: + properties: + type: + type: string + const: number + title: Type + default: number + type: object + title: NumberType + description: Parameter type for numeric values. + ObjectType: + properties: + type: + type: string + const: object + title: Type + default: object + type: object + title: ObjectType + description: Parameter type for object values. + 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. + ScoringFn: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + 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: + anyOf: + - type: string + - type: 'null' + metadata: + additionalProperties: true + type: object + title: Metadata + description: Any additional metadata for this definition + return_type: + oneOf: + - $ref: '#/components/schemas/StringType' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + 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: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + - type: 'null' + title: Params + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + type: object + required: + - identifier + - provider_id + - return_type + title: ScoringFn + description: A scoring function resource for evaluating model outputs. + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + ScoringFnParamsType: + description: Types of scoring function parameter configurations. + enum: + - llm_as_judge + - regex_parser + - basic + title: ScoringFnParamsType + type: string + StringType: + properties: + type: + type: string + const: string + title: Type + default: string + type: object + title: StringType + description: Parameter type for string values. + UnionType: + properties: + type: + type: string + const: union + title: Type + default: union + type: object + title: UnionType + description: Parameter type for union values. + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + type: array + title: Data + type: object + required: + - data + title: ListScoringFunctionsResponse + ScoreResponse: + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreResponse + description: The response from scoring. + 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. + ScoreBatchResponse: + properties: + dataset_id: + anyOf: + - type: string + - type: 'null' + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreBatchResponse + description: Response from batch scoring operations on datasets. + Shield: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + 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: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - identifier + - provider_id + title: Shield + description: A safety shield resource that can be used to check content. + ListShieldsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Shield' + type: array + title: Data + type: object + required: + - data + title: ListShieldsResponse + ImageContentItem: + description: A image content item + properties: + type: + const: image + default: image + title: Type + type: string + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + 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 + ToolInvocationResult: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + type: array + title: list[ImageContentItem-Output | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem-Output | TextContentItem] + error_message: + anyOf: + - type: string + - type: 'null' + error_code: + anyOf: + - type: integer + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + title: ToolInvocationResult + description: Result of a tool invocation. + URL: + properties: + uri: + type: string + title: Uri + type: object + required: + - uri + title: URL + description: A URL reference to external content. + ToolDef: + properties: + toolgroup_id: + anyOf: + - type: string + - type: 'null' + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + input_schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + output_schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - name + title: ToolDef + description: Tool definition used in runtime contexts. + ListToolDefsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ToolDef' + type: array + title: Data + type: object + required: + - data + title: ListToolDefsResponse + description: Response containing a list of tool definitions. + ToolGroup: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + 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: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + title: URL + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - identifier + - provider_id + title: ToolGroup + description: A group of related tools managed together. + 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. + Chunk: + description: A chunk of content that can be inserted into a vector database. + properties: + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + nullable: true + title: ChunkMetadata + required: + - content + - chunk_id + title: Chunk + type: object + ChunkMetadata: + properties: + chunk_id: + anyOf: + - type: string + - type: 'null' + document_id: + anyOf: + - type: string + - type: 'null' + source: + anyOf: + - type: string + - type: 'null' + created_timestamp: + anyOf: + - type: integer + - type: 'null' + updated_timestamp: + anyOf: + - type: integer + - type: 'null' + chunk_window: + anyOf: + - type: string + - type: 'null' + chunk_tokenizer: + anyOf: + - type: string + - type: 'null' + chunk_embedding_model: + anyOf: + - type: string + - type: 'null' + chunk_embedding_dimension: + anyOf: + - type: integer + - type: 'null' + content_token_count: + anyOf: + - type: integer + - type: 'null' + metadata_token_count: + anyOf: + - type: integer + - type: 'null' + type: object + title: 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. + 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. + 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. + VectorStoreListResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + last_id: + anyOf: + - type: string + - type: 'null' + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreListResponse + description: Response from listing vector stores. + VectorStoreObject: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store + created_at: + type: integer + title: Created At + name: + anyOf: + - type: string + - type: 'null' + usage_bytes: + type: integer + title: Usage Bytes + default: 0 + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + type: string + title: Status + default: completed + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + expires_at: + anyOf: + - type: integer + - type: 'null' + last_active_at: + anyOf: + - type: integer + - type: 'null' + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - id + - created_at + - file_counts + title: VectorStoreObject + description: OpenAI Vector Store object. + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + VectorStoreChunkingStrategyAuto: + properties: + type: + type: string + const: auto + title: Type + default: auto + type: object + title: VectorStoreChunkingStrategyAuto + description: Automatic chunking strategy for vector store files. + 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. + 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. + OpenAICreateVectorStoreRequestWithExtraBody: + properties: + name: + anyOf: + - type: string + - type: 'null' + file_ids: + anyOf: + - items: + type: string + type: array + - type: 'null' + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + chunking_strategy: + anyOf: + - oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + additionalProperties: true + type: object + title: OpenAICreateVectorStoreRequestWithExtraBody + description: Request to create a vector store with extra_body support. + VectorStoreDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.deleted + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: VectorStoreDeleteResponse + description: Response from deleting a vector store. + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + properties: + file_ids: + items: + type: string + type: array + title: File Ids + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + chunking_strategy: + anyOf: + - oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + - type: 'null' + title: Chunking Strategy + additionalProperties: true + type: object + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + description: Request to create a vector store file batch with extra_body support. + 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: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + 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. + VectorStoreFileStatus: + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + VectorStoreFileLastError: + properties: + code: + title: Code + type: string + enum: + - server_error + - rate_limit_exceeded + default: server_error + message: + type: string + title: Message + type: object + required: + - code + - message + title: VectorStoreFileLastError + description: Error information for failed vector store file processing. + 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' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + created_at: + type: integer + title: Created At + last_error: + anyOf: + - $ref: '#/components/schemas/VectorStoreFileLastError' + title: VectorStoreFileLastError + - type: 'null' + title: VectorStoreFileLastError + status: + title: Status + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed + 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. + VectorStoreFilesListInBatchResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + last_id: + anyOf: + - type: string + - type: 'null' + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreFilesListInBatchResponse + description: Response from listing files in a vector store file batch. + VectorStoreListFilesResponse: + properties: + object: + type: string + title: Object + default: list + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + type: array + title: Data + first_id: + anyOf: + - type: string + - type: 'null' + last_id: + anyOf: + - type: string + - type: 'null' + has_more: + type: boolean + title: Has More + default: false + type: object + required: + - data + title: VectorStoreListFilesResponse + description: Response from listing files in a vector store. + VectorStoreFileDeleteResponse: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.file.deleted + deleted: + type: boolean + title: Deleted + default: true + type: object + required: + - id + title: VectorStoreFileDeleteResponse + description: Response from deleting a vector store file. + VectorStoreContent: + properties: + type: + type: string + const: text + title: Type + text: + type: string + title: Text + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + type: object + required: + - type + - text + title: VectorStoreContent + description: Content item from a vector store file or search result. + VectorStoreFileContentResponse: + properties: + object: + type: string + const: vector_store.file_content.page + title: Object + default: vector_store.file_content.page + data: + items: + $ref: '#/components/schemas/VectorStoreContent' + type: array + title: Data + has_more: + type: boolean + title: Has More + default: false + next_page: + anyOf: + - type: string + - type: 'null' + type: object + required: + - data + title: VectorStoreFileContentResponse + description: Represents the parsed content of a vector store file. + VectorStoreSearchResponse: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + score: + type: number + title: Score + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + title: string | number | boolean + type: object + - type: 'null' + 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. + VectorStoreSearchResponsePage: + properties: + object: + type: string + title: Object + default: vector_store.search_results.page + search_query: + items: + type: string + type: array + title: Search Query + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + type: array + title: Data + has_more: + type: boolean + title: Has More + default: false + next_page: + anyOf: + - type: string + - type: 'null' + type: object + required: + - search_query + - data + title: VectorStoreSearchResponsePage + description: Paginated response from searching a vector store. + VersionInfo: + properties: + version: + type: string + title: Version + type: object + required: + - version + title: VersionInfo + description: Version information for the service. + AppendRowsRequest: + properties: + rows: + items: + additionalProperties: true + type: object + type: array + title: Rows + type: object + required: + - rows + title: AppendRowsRequest + PaginatedResponse: + properties: + data: + items: + additionalProperties: true + type: object + type: array + title: Data + has_more: + type: boolean + title: Has More + url: + anyOf: + - type: string + - type: 'null' + type: object + required: + - data + - has_more + title: PaginatedResponse + description: A generic paginated response that follows a simple format. + Dataset: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + 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' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + 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. + 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. + 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. + ListDatasetsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + type: array + title: Data + type: object + required: + - data + title: ListDatasetsResponse + description: Response from listing datasets. + Benchmark: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + anyOf: + - type: string + - type: 'null' + description: Unique identifier for this resource in the provider + 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. + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + type: array + title: Data + type: object + required: + - data + title: ListBenchmarksResponse + BenchmarkConfig: + properties: + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + type: object + title: Scoring Params + description: Map between scoring function id and parameters for each scoring function you want to run + num_examples: + anyOf: + - type: integer + - type: 'null' + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + type: object + required: + - eval_candidate + title: BenchmarkConfig + description: A benchmark configuration for evaluation. + 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. + ModelCandidate: + properties: + type: + type: string + const: model + title: Type + default: model + model: + type: string + title: Model + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + anyOf: + - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage + - type: 'null' + title: SystemMessage + type: object + required: + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + SamplingParams: + properties: + strategy: + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + max_tokens: + anyOf: + - type: integer + - type: 'null' + repetition_penalty: + anyOf: + - type: number + - type: 'null' + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + title: SamplingParams + description: Sampling parameters. + SystemMessage: + properties: + role: + type: string + const: system + title: Role + default: system + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + type: object + required: + - content + title: SystemMessage + description: A system message providing instructions or context to the model. + 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. + TopPSamplingStrategy: + properties: + type: + type: string + const: top_p + title: Type + default: top_p + temperature: + anyOf: + - type: number + minimum: 0.0 + - type: 'null' + top_p: + anyOf: + - type: number + - type: 'null' + default: 0.95 + type: object + required: + - temperature + title: TopPSamplingStrategy + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. + EvaluateRowsRequest: + properties: + input_rows: + items: + additionalProperties: true + type: object + type: array + title: Input Rows + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + type: object + required: + - input_rows + - scoring_functions + - benchmark_config + title: EvaluateRowsRequest + 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. + 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. + RerankRequest: + properties: + model: + type: string + title: Model + query: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + items: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + title: string | OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam + type: array + title: Items + max_num_results: + anyOf: + - type: integer + - type: 'null' + type: object + required: + - model + - query + - items + title: RerankRequest + 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. + RerankResponse: + properties: + data: + items: + $ref: '#/components/schemas/RerankData' + type: array + title: Data + type: object + required: + - data + title: RerankResponse + description: Response from a reranking request. + Checkpoint: + properties: + identifier: + type: string + title: Identifier + created_at: + type: string + format: date-time + title: Created At + epoch: + type: integer + title: Epoch + post_training_job_id: + type: string + title: Post Training Job Id + path: + type: string + title: Path + training_metrics: + anyOf: + - $ref: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric + - type: 'null' + title: PostTrainingMetric + type: object + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. + PostTrainingJobArtifactsResponse: + properties: + job_uuid: + type: string + title: Job Uuid + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints + type: object + required: + - job_uuid + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingMetric: + properties: + epoch: + type: integer + title: Epoch + train_loss: + type: number + title: Train Loss + validation_loss: + type: number + title: Validation Loss + perplexity: + type: number + title: Perplexity + type: object + required: + - epoch + - train_loss - validation_loss - perplexity title: PostTrainingMetric description: Training metrics captured during post-training jobs. CancelTrainingJobRequest: properties: - job_uuid: + job_uuid: + type: string + title: Job Uuid + type: object + required: + - job_uuid + title: CancelTrainingJobRequest + PostTrainingJobStatusResponse: + properties: + job_uuid: + type: string + title: Job Uuid + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + anyOf: + - type: string + format: date-time + - type: 'null' + started_at: + anyOf: + - type: string + format: date-time + - type: 'null' + completed_at: + anyOf: + - type: string + format: date-time + - type: 'null' + resources_allocated: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints + type: object + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + type: array + title: Data + type: object + required: + - data + title: ListPostTrainingJobsResponse + 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. + 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: + anyOf: + - type: string + - type: 'null' + packed: + anyOf: + - type: boolean + - type: 'null' + default: false + train_on_input: + anyOf: + - type: boolean + - type: 'null' + default: false + type: object + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: Configuration for training data and data loading. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + EfficiencyConfig: + properties: + enable_activation_checkpointing: + anyOf: + - type: boolean + - type: 'null' + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean + - type: 'null' + default: false + type: object + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. + 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. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: Available optimizer algorithms for training. + 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: + anyOf: + - type: integer + - type: 'null' + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + title: DataConfig + - type: 'null' + title: DataConfig + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig + - type: 'null' + title: OptimizerConfig + efficiency_config: + anyOf: + - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig + - type: 'null' + title: EfficiencyConfig + dtype: + anyOf: + - type: string + - type: 'null' + default: bf16 + type: object + required: + - n_epochs + title: TrainingConfig + description: Comprehensive configuration for the training process. + PreferenceOptimizeRequest: + properties: + job_uuid: + type: string + title: Job Uuid + finetuned_model: + type: string + title: Finetuned Model + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: PreferenceOptimizeRequest + PostTrainingJob: + properties: + job_uuid: + type: string + title: Job Uuid + type: object + required: + - job_uuid + title: PostTrainingJob + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + LoraFinetuningConfig: + properties: + type: + type: string + const: LoRA + title: Type + default: LoRA + lora_attn_modules: + items: + type: string + type: array + title: Lora Attn Modules + apply_lora_to_mlp: + type: boolean + title: Apply Lora To Mlp + apply_lora_to_output: + type: boolean + title: Apply Lora To Output + rank: + type: integer + title: Rank + alpha: + type: integer + title: Alpha + use_dora: + anyOf: + - type: boolean + - type: 'null' + default: false + quantize_base: + anyOf: + - type: boolean + - type: 'null' + default: false + type: object + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + QATFinetuningConfig: + properties: + type: + type: string + const: QAT + title: Type + default: QAT + quantizer_name: + type: string + title: Quantizer Name + group_size: + type: integer + title: Group Size + type: object + required: + - quantizer_name + - group_size + title: QATFinetuningConfig + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. + SupervisedFineTuneRequest: + properties: + job_uuid: + type: string + title: Job Uuid + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + type: object + title: Hyperparam Search Config + logger_config: + additionalProperties: true + type: object + title: Logger Config + model: + anyOf: + - type: string + - type: 'null' + description: Model descriptor for training if not in provider config` + checkpoint_dir: + anyOf: + - type: string + - type: 'null' + algorithm_config: + anyOf: + - oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + title: LoraFinetuningConfig | QATFinetuningConfig + - type: 'null' + title: Algorithm Config + type: object + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: SupervisedFineTuneRequest + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + AllowedToolsFilter: + properties: + tool_names: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: + properties: + always: + anyOf: + - items: + type: string + type: array + - type: 'null' + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. + BatchError: + properties: + code: + anyOf: + - type: string + - type: 'null' + line: + anyOf: + - type: integer + - type: 'null' + message: + anyOf: + - type: string + - type: 'null' + param: + anyOf: + - type: string + - type: 'null' + 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 + Chunk-Output: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + type: array + title: list[ImageContentItem-Output | TextContentItem] + title: string | list[ImageContentItem-Output | TextContentItem] + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + 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. + Errors: + properties: + data: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + object: + anyOf: + - type: string + - type: 'null' + additionalProperties: true + type: object + title: Errors + 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 + 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 + InputTokensDetails: + properties: + cached_tokens: + type: integer + title: Cached Tokens + additionalProperties: true + type: object + required: + - cached_tokens + title: InputTokensDetails + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + OpenAIAssistantMessageParam-Input: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + OpenAIResponseMessage-Output: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + type: string + const: message + title: Type + default: message + id: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + 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. + 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. + OpenAIResponseTextFormat: + properties: + type: + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text + name: + anyOf: + - type: string + - type: 'null' + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + description: + anyOf: + - type: string + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + OpenAIUserMessageParam-Input: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OpenAIUserMessageParam-Output: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OutputTokensDetails: + properties: + reasoning_tokens: + type: integer + title: Reasoning Tokens + additionalProperties: true + type: object + required: + - reasoning_tokens + title: OutputTokensDetails + SearchRankingOptions: + properties: + ranker: + anyOf: + - type: string + - type: 'null' + score_threshold: + anyOf: + - type: number + - type: 'null' + default: 0.0 + type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + _URLOrData: + properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + title: URL + data: + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + type: object + title: _URLOrData + description: A URL or a base64 encoded string + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + SpanEndPayload: + description: Payload for a span end event. + properties: + type: + const: span_end + default: span_end + title: Type + type: string + status: + $ref: '#/components/schemas/SpanStatus' + required: + - status + title: SpanEndPayload + type: object + SpanStartPayload: + description: Payload for a span start event. + properties: + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - name + title: SpanStartPayload + type: object + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: unstructured_log + default: unstructured_log + title: Type + type: string + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' + required: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent + type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + MetricInResponse: + description: A metric value included in API responses. + properties: + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - metric + - value + title: MetricInResponse + type: object + TextDelta: + description: A text content delta for streaming responses. + properties: + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: TextDelta + type: object + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string + required: + - image + title: ImageDelta + type: object + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. + properties: + type: + const: fp8_mixed + default: fp8_mixed + title: Type + type: string + title: Fp8QuantizationConfig + type: object + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). + properties: + type: + const: bf16 + default: bf16 + title: Type + type: string + title: Bf16QuantizationConfig + type: object + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. + properties: + type: + const: int4_mixed + default: int4_mixed + title: Type + type: string + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig + type: object + UserMessage: + description: A message from the user in a chat conversation. + properties: + role: + const: user + default: user + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true + required: + - content + title: UserMessage + type: object + ToolResponseMessage: + description: A message representing the result of a tool invocation. + properties: + role: + const: tool + default: tool + title: Role + type: string + call_id: + title: Call Id + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + required: + - call_id + - content + title: ToolResponseMessage + type: object + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object + required: + - logprobs_by_token + title: TokenLogProbs + type: object + EmbeddingsResponse: + description: Response containing generated embeddings. + properties: + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array + required: + - embeddings + title: EmbeddingsResponse + type: object + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens + properties: + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs + type: object + VectorStoreCreateRequest: + description: Request to create a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object + title: VectorStoreCreateRequest + type: object + VectorStoreModifyRequest: + description: Request to modify a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: VectorStoreModifyRequest + type: object + VectorStoreSearchRequest: + description: Request to search a vector store. + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + max_num_results: + default: 10 + title: Max Num Results + type: integer + ranking_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + rewrite_query: + default: false + title: Rewrite Query + type: boolean + required: + - query + title: VectorStoreSearchRequest + type: object + DialogType: + description: Parameter type for dialog data with semantic output labels. + properties: + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true + type: object + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status type: string - title: Job Uuid + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array required: - - job_uuid - title: CancelTrainingJobRequest - PostTrainingJobStatusResponse: + - items + title: ConversationItemCreateRequest + type: object + ToolGroupInput: + description: Input data for registering a tool group. properties: - job_uuid: + toolgroup_id: + title: Toolgroup Id type: string - title: Job Uuid - status: - $ref: '#/components/schemas/JobStatus' - scheduled_at: + provider_id: + title: Provider Id + type: string + args: anyOf: - - type: string - format: date-time + - additionalProperties: true + type: object - type: 'null' - started_at: + nullable: true + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL + required: + - toolgroup_id + - provider_id + title: ToolGroupInput + type: object + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + ProviderSpec: + properties: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - format: date-time - type: 'null' - completed_at: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - type: string - format: date-time - type: 'null' - resources_allocated: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - checkpoints: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation items: - $ref: '#/components/schemas/Checkpoint' + type: string + title: Pip Packages type: array - title: Checkpoints - type: object - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - ListPostTrainingJobsResponse: - properties: - data: + provider_data_validator: + anyOf: + - type: string + - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: items: - $ref: '#/components/schemas/PostTrainingJob' + type: string + title: Deps type: array - title: Data - type: object required: - - data - title: ListPostTrainingJobsResponse - DPOAlignmentConfig: - properties: - beta: - type: number - title: Beta - loss_type: - $ref: '#/components/schemas/DPOLossType' - default: sigmoid + - api + - provider_type + - config_class + title: ProviderSpec type: object - required: - - beta - title: DPOAlignmentConfig - description: Configuration for Direct Preference Optimization (DPO) alignment. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: + InlineProviderSpec: properties: - dataset_id: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type 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: + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' - packed: - anyOf: - - type: boolean - - type: 'null' - default: false - train_on_input: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - type: object - required: - - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: Configuration for training data and data loading. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - EfficiencyConfig: - properties: - enable_activation_checkpointing: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - enable_activation_offloading: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - type: boolean + - type: string - type: 'null' + nullable: true + is_external: default: false - memory_efficient_fsdp_wrap: + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - fsdp_cpu_offload: + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. + nullable: true + description: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - type: object - title: EfficiencyConfig - description: Configuration for memory and compute efficiency optimizations. - 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 + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: Configuration parameters for the optimization algorithm. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: Available optimizer algorithms for training. - TrainingConfig: + - api + - provider_type + - config_class + title: InlineProviderSpec + type: object + RemoteProviderSpec: 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: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - - type: integer + - type: string - type: 'null' - default: 1 - data_config: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - - $ref: '#/components/schemas/DataConfig' - title: DataConfig + - type: string - type: 'null' - title: DataConfig - optimizer_config: - anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - title: OptimizerConfig + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: + anyOf: + - type: string - type: 'null' - title: OptimizerConfig - efficiency_config: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - title: EfficiencyConfig + - type: string - type: 'null' - title: EfficiencyConfig - dtype: + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type + type: string + description: anyOf: - type: string - type: 'null' - default: bf16 - type: object + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true required: - - n_epochs - title: TrainingConfig - description: Comprehensive configuration for the training process. - PreferenceOptimizeRequest: + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec + type: object + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: job_uuid: + title: Job Uuid type: string + log_lines: + items: + type: string + title: Log Lines + type: array + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream + type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. + properties: + job_uuid: title: Job Uuid + type: string finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id type: string - title: Finetuned Model + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' algorithm_config: $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' training_config: $ref: '#/components/schemas/TrainingConfig' hyperparam_search_config: additionalProperties: true - type: object title: Hyperparam Search Config + type: object logger_config: additionalProperties: true - type: object title: Logger Config - type: object + type: object required: - job_uuid - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm - algorithm_config + - optimizer_config - training_config - hyperparam_search_config - logger_config - title: PreferenceOptimizeRequest - PostTrainingJob: - properties: - job_uuid: - type: string - title: Job Uuid + title: PostTrainingRLHFRequest type: object - required: - - job_uuid - title: PostTrainingJob - LoraFinetuningConfig: + Span: + description: A span representing a single operation within a trace. properties: - type: + span_id: + title: Span Id type: string - const: LoRA - title: Type - default: LoRA - lora_attn_modules: - items: - type: string - type: array - title: Lora Attn Modules - apply_lora_to_mlp: - type: boolean - title: Apply Lora To Mlp - apply_lora_to_output: - type: boolean - title: Apply Lora To Output - rank: - type: integer - title: Rank - alpha: - type: integer - title: Alpha - use_dora: + trace_id: + title: Trace Id + type: string + parent_span_id: anyOf: - - type: boolean + - type: string - type: 'null' - default: false - quantize_base: + nullable: true + name: + title: Name + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: anyOf: - - type: boolean + - format: date-time + type: string + - type: 'null' + nullable: true + attributes: + anyOf: + - additionalProperties: true + type: object - type: 'null' - default: false - type: object required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig - description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - QATFinetuningConfig: + - span_id + - trace_id + - name + - start_time + title: Span + type: object + Trace: + description: A trace representing the complete execution path of a request across multiple operations. properties: - type: + trace_id: + title: Trace Id type: string - const: QAT - title: Type - default: QAT - quantizer_name: + root_span_id: + title: Root Span Id type: string - title: Quantizer Name - group_size: - type: integer - title: Group Size + start_time: + format: date-time + title: Start Time + type: string + end_time: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + required: + - trace_id + - root_span_id + - start_time + title: Trace type: object + EventType: + description: The type of telemetry event being logged. + enum: + - unstructured_log + - structured_log + - metric + title: EventType + type: string + StructuredLogType: + description: The type of structured log event payload. + enum: + - span_start + - span_end + title: StructuredLogType + type: string + EvalTrace: + description: A trace record for evaluation purposes. + properties: + session_id: + title: Session Id + type: string + step: + title: Step + type: string + input: + title: Input + type: string + output: + title: Output + type: string + expected_output: + title: Expected Output + type: string required: - - quantizer_name - - group_size - title: QATFinetuningConfig - description: Configuration for Quantization-Aware Training (QAT) fine-tuning. - SupervisedFineTuneRequest: + - session_id + - step + - input + - output + - expected_output + title: EvalTrace + type: object + SpanWithStatus: + description: A span that includes status information. properties: - job_uuid: + span_id: + title: Span Id type: string - title: Job Uuid - training_config: - $ref: '#/components/schemas/TrainingConfig' - hyperparam_search_config: - additionalProperties: true - type: object - title: Hyperparam Search Config - logger_config: - additionalProperties: true - type: object - title: Logger Config - model: + trace_id: + title: Trace Id + type: string + parent_span_id: anyOf: - type: string - type: 'null' - description: Model descriptor for training if not in provider config` - checkpoint_dir: + nullable: true + name: + title: Name + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: anyOf: - - type: string + - format: date-time + type: string - type: 'null' - algorithm_config: + nullable: true + attributes: anyOf: - - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - title: LoraFinetuningConfig - - $ref: '#/components/schemas/QATFinetuningConfig' - title: QATFinetuningConfig - discriminator: - propertyName: type - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - title: LoraFinetuningConfig | QATFinetuningConfig + - additionalProperties: true + type: object - type: 'null' - title: Algorithm Config - type: object + status: + anyOf: + - $ref: '#/components/schemas/SpanStatus' + title: SpanStatus + - type: 'null' + nullable: true + title: SpanStatus required: - - job_uuid - - training_config - - hyperparam_search_config - - logger_config - title: SupervisedFineTuneRequest - DatasetPurpose: - type: string + - span_id + - trace_id + - name + - start_time + title: SpanWithStatus + type: object + QueryConditionOp: + description: Comparison operators for query conditions. 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. - ImageContentItem-Input: + - eq + - ne + - gt + - lt + title: QueryConditionOp + type: string + QueryCondition: + description: A condition for filtering query results. properties: - type: + key: + title: Key type: string - const: image - title: Type - default: image - image: - $ref: '#/components/schemas/_URLOrData' + op: + $ref: '#/components/schemas/QueryConditionOp' + value: + title: Value + required: + - key + - op + - value + title: QueryCondition type: object + MetricLabel: + description: A label associated with a metric. + properties: + name: + title: Name + type: string + value: + title: Value + type: string required: - - image - title: ImageContentItem - description: A image content item - JobStatus: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - description: Status of a job execution. - _URLOrData: + - name + - value + title: MetricLabel + type: object + MetricDataPoint: + description: A single data point in a metric time series. properties: - url: - anyOf: - - $ref: '#/components/schemas/URL' - title: URL - - type: 'null' - title: URL - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 + timestamp: + title: Timestamp + type: integer + value: + title: Value + type: number + unit: + title: Unit + type: string + required: + - timestamp + - value + - unit + title: MetricDataPoint + type: object + MetricSeries: + description: A time series of metric data points. + properties: + metric: + title: Metric + type: string + labels: + items: + $ref: '#/components/schemas/MetricLabel' + title: Labels + type: array + values: + items: + $ref: '#/components/schemas/MetricDataPoint' + title: Values + type: array + required: + - metric + - labels + - values + title: MetricSeries type: object - title: _URLOrData - description: A URL or a base64 encoded string 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 2d7329533e..24f43ab7da 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -3148,6 +3148,38 @@ components: - last_id title: ListOpenAIChatCompletionResponse description: Response from listing OpenAI-compatible chat completions. + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + nullable: true + name: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + title: OpenAIAssistantMessageParam + type: object OpenAIChatCompletionContentPartImageParam: properties: type: @@ -3162,6 +3194,21 @@ components: - image_url title: OpenAIChatCompletionContentPartImageParam description: Image content part for OpenAI-compatible chat completion messages. + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: properties: type: @@ -3370,6 +3417,27 @@ components: - url title: OpenAIImageURL description: Image URL specification for OpenAI-compatible chat completion messages. + OpenAIMessageParam: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: properties: role: @@ -3475,6 +3543,44 @@ components: :token: The token :bytes: (Optional) The bytes for the token :logprob: The log probability of the token + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. + 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' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object OpenAIJSONSchema: properties: name: @@ -3520,6 +3626,21 @@ components: - json_schema title: OpenAIResponseFormatJSONSchema description: JSON schema response format for OpenAI-compatible chat completion requests. + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject OpenAIResponseFormatText: properties: type: @@ -4039,6 +4160,39 @@ components: :text: The text of the choice :index: The index of the choice :logprobs: (Optional) The log probabilities for the tokens in the choice + ConversationItem: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) OpenAIResponseAnnotationCitation: properties: type: @@ -4137,6 +4291,24 @@ components: - file_id - index title: OpenAIResponseAnnotationFilePath + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseContentPartRefusal: properties: type: @@ -4179,6 +4351,21 @@ components: - output title: OpenAIResponseInputFunctionToolCallOutput description: This represents the output of a function call that gets passed back to the model. + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseInputMessageContentFile: properties: type: @@ -4371,6 +4558,18 @@ components: - role title: OpenAIResponseMessage type: object + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal OpenAIResponseOutputMessageContentOutputText: properties: text: @@ -5379,6 +5578,41 @@ components: - message title: OpenAIResponseError description: Error details for failed OpenAI response requests. + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage OpenAIResponseInputToolFileSearch: properties: type: @@ -5636,6 +5870,33 @@ components: - input title: OpenAIResponseObjectWithInput description: OpenAI response object extended with input context information. + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) OpenAIResponsePrompt: properties: id: @@ -5680,6 +5941,27 @@ components: type: object title: OpenAIResponseText description: Text response configuration for OpenAI responses. + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseToolMCP: properties: type: @@ -5745,6 +6027,27 @@ components: - type title: ResponseGuardrailSpec type: object + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseInputToolMCP: properties: type: @@ -7600,6 +7903,29 @@ components: - return_type title: ScoringFn description: A scoring function resource for evaluating model outputs. + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + ScoringFnParamsType: + description: Types of scoring function parameter configurations. + enum: + - llm_as_judge + - regex_parser + - basic + title: ScoringFnParamsType + type: string StringType: properties: type: @@ -7806,6 +8132,61 @@ components: - tool_name - kwargs title: InvokeToolRequest + ImageContentItem: + description: A image content item + properties: + type: + const: image + default: image + title: Type + type: string + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem TextContentItem: properties: type: @@ -7973,6 +8354,64 @@ components: - data title: ListToolGroupsResponse description: Response containing a list of tool groups. + Chunk: + description: A chunk of content that can be inserted into a vector database. + properties: + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + nullable: true + title: ChunkMetadata + required: + - content + - chunk_id + title: Chunk + type: object ChunkMetadata: properties: chunk_id: @@ -8211,6 +8650,18 @@ components: - file_counts title: VectorStoreObject description: OpenAI Vector Store object. + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreChunkingStrategyAuto: properties: type: @@ -8395,6 +8846,14 @@ components: - file_counts title: VectorStoreFileBatchObject description: OpenAI Vector Store File Batch object. + VectorStoreFileStatus: + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed VectorStoreFileLastError: properties: code: @@ -8756,118 +9215,280 @@ components: - version title: VersionInfo description: Version information for the service. - AllowedToolsFilter: + PaginatedResponse: properties: - tool_names: + data: + items: + additionalProperties: true + type: object + type: array + title: Data + has_more: + type: boolean + title: Has More + url: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' type: object - title: AllowedToolsFilter - description: Filter configuration for restricting which MCP tools can be used. - ApprovalFilter: + required: + - data + - has_more + title: PaginatedResponse + description: A generic paginated response that follows a simple format. + Dataset: properties: - always: - anyOf: - - items: - type: string - type: array - - type: 'null' - never: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: anyOf: - - items: - type: string - type: array + - type: string - type: 'null' + description: Unique identifier for this resource in the provider + 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' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + 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 - title: ApprovalFilter - description: Filter configuration for MCP tool approval requirements. - BatchError: + required: + - identifier + - provider_id + - purpose + - source + title: Dataset + description: Dataset resource for storing and accessing training or evaluation data. + RowsDataSource: properties: - code: - anyOf: - - type: string - - type: 'null' - line: - anyOf: - - type: integer - - type: 'null' - message: - anyOf: - - type: string - - type: 'null' - param: + 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. + 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. + ListDatasetsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + type: array + title: Data + type: object + required: + - data + title: ListDatasetsResponse + description: Response from listing datasets. + Benchmark: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: anyOf: - type: string - type: 'null' - additionalProperties: true + description: Unique identifier for this resource in the provider + 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 - title: BatchError - BatchRequestCounts: + required: + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark + description: A benchmark resource for evaluating model performance. + ListBenchmarksResponse: properties: - completed: - type: integer - title: Completed - failed: - type: integer - title: Failed - total: - type: integer - title: Total - additionalProperties: true + data: + items: + $ref: '#/components/schemas/Benchmark' + type: array + title: Data type: object required: - - completed - - failed - - total - title: BatchRequestCounts - BatchUsage: + - data + title: ListBenchmarksResponse + BenchmarkConfig: 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 + eval_candidate: + $ref: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + type: object + title: Scoring Params + description: Map between scoring function id and parameters for each scoring function you want to run + num_examples: + anyOf: + - type: integer + - type: 'null' + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated type: object required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage - Body_openai_upload_file_v1_files_post: + - eval_candidate + title: BenchmarkConfig + description: A benchmark configuration for evaluation. + GreedySamplingStrategy: properties: - file: + type: type: string - format: binary - title: File - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' - expires_after: + const: greedy + title: Type + default: greedy + type: object + title: GreedySamplingStrategy + description: Greedy sampling strategy that selects the highest probability token at each step. + ModelCandidate: + properties: + type: + type: string + const: model + title: Type + default: model + model: + type: string + title: Model + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: anyOf: - - $ref: '#/components/schemas/ExpiresAfter' - title: ExpiresAfter + - $ref: '#/components/schemas/SystemMessage' + title: SystemMessage - type: 'null' - title: ExpiresAfter + title: SystemMessage type: object required: - - file - - purpose - title: Body_openai_upload_file_v1_files_post - Chunk-Input: + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + SamplingParams: + properties: + strategy: + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + max_tokens: + anyOf: + - type: integer + - type: 'null' + repetition_penalty: + anyOf: + - type: number + - type: 'null' + default: 1.0 + stop: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + title: SamplingParams + description: Sampling parameters. + SystemMessage: properties: + role: + type: string + const: system + title: Role + default: system content: anyOf: - type: string @@ -8897,581 +9518,2597 @@ components: type: array title: list[ImageContentItem-Input | TextContentItem] title: string | list[ImageContentItem-Input | TextContentItem] - chunk_id: + type: object + required: + - content + title: SystemMessage + description: A system message providing instructions or context to the model. + TopKSamplingStrategy: + properties: + type: type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: + 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. + TopPSamplingStrategy: + properties: + type: + type: string + const: top_p + title: Type + default: top_p + temperature: anyOf: - - items: - type: number - type: array + - type: number + minimum: 0.0 - type: 'null' - chunk_metadata: + top_p: anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata + - type: number - type: 'null' - title: ChunkMetadata + default: 0.95 type: object required: - - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - Chunk-Output: + - temperature + title: TopPSamplingStrategy + description: Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. + EvaluateResponse: properties: - content: - anyOf: - - type: string - - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - - items: - oneOf: - - $ref: '#/components/schemas/ImageContentItem-Output' - title: ImageContentItem-Output - - $ref: '#/components/schemas/TextContentItem' - title: TextContentItem - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem-Output' - text: '#/components/schemas/TextContentItem' - title: ImageContentItem-Output | TextContentItem - type: array - title: list[ImageContentItem-Output | TextContentItem] - title: string | list[ImageContentItem-Output | TextContentItem] - chunk_id: - type: string - title: Chunk Id - metadata: - additionalProperties: true - type: object - title: Metadata - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - chunk_metadata: - anyOf: - - $ref: '#/components/schemas/ChunkMetadata' - title: ChunkMetadata - - type: 'null' - title: ChunkMetadata + generations: + items: + additionalProperties: true + type: object + type: array + title: Generations + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Scores type: object required: - - content - - chunk_id - title: Chunk - description: A chunk of content that can be inserted into a vector database. - 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. - Errors: + - generations + - scores + title: EvaluateResponse + description: The response from an evaluation. + 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. + 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. + RerankResponse: properties: data: - anyOf: - - items: - $ref: '#/components/schemas/BatchError' - type: array - - type: 'null' - object: - anyOf: - - type: string - - type: 'null' - additionalProperties: true + items: + $ref: '#/components/schemas/RerankData' + type: array + title: Data type: object - title: Errors - HealthStatus: - type: string - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - ImageContentItem-Input: + required: + - data + title: RerankResponse + description: Response from a reranking request. + Checkpoint: properties: - type: + identifier: type: string - const: image - title: Type - default: image - image: - $ref: '#/components/schemas/_URLOrData' + title: Identifier + created_at: + type: string + format: date-time + title: Created At + epoch: + type: integer + title: Epoch + post_training_job_id: + type: string + title: Post Training Job Id + path: + type: string + title: Path + training_metrics: + anyOf: + - $ref: '#/components/schemas/PostTrainingMetric' + title: PostTrainingMetric + - type: 'null' + title: PostTrainingMetric type: object required: - - image - title: ImageContentItem - description: A image content item - ImageContentItem-Output: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. + PostTrainingJobArtifactsResponse: properties: - type: + job_uuid: type: string - const: image - title: Type - default: image - image: - $ref: '#/components/schemas/_URLOrData' + title: Job Uuid + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints type: object required: - - image - title: ImageContentItem - description: A image content item - InputTokensDetails: + - job_uuid + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingMetric: properties: - cached_tokens: + epoch: type: integer - title: Cached Tokens - additionalProperties: true + title: Epoch + train_loss: + type: number + title: Train Loss + validation_loss: + type: number + title: Validation Loss + perplexity: + type: number + title: Perplexity type: object required: - - cached_tokens - title: InputTokensDetails - MCPListToolsTool: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: Training metrics captured during post-training jobs. + PostTrainingJobStatusResponse: properties: - input_schema: - additionalProperties: true - type: object - title: Input Schema - name: + job_uuid: type: string - title: Name - description: + title: Job Uuid + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: anyOf: - type: string + format: date-time - type: 'null' - type: object - required: - - input_schema - - name - title: MCPListToolsTool - description: Tool definition returned by MCP list tools operation. - OpenAIAssistantMessageParam-Input: - properties: - role: - type: string - const: assistant - title: Role - default: assistant - content: + started_at: anyOf: - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] + format: date-time - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: + completed_at: anyOf: - type: string + format: date-time - type: 'null' - tool_calls: + resources_allocated: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - additionalProperties: true + type: object - type: 'null' + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + type: array + title: Checkpoints type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIAssistantMessageParam-Output: + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + ListPostTrainingJobsResponse: properties: - role: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + type: array + title: Data + type: object + required: + - data + title: ListPostTrainingJobsResponse + 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. + DPOLossType: + type: string + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + DataConfig: + properties: + dataset_id: type: string - const: assistant - title: Role - default: assistant - content: + title: Dataset Id + batch_size: + type: integer + title: Batch Size + shuffle: + type: boolean + title: Shuffle + data_format: + $ref: '#/components/schemas/DatasetFormat' + validation_dataset_id: anyOf: - type: string - - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - type: array - title: list[OpenAIChatCompletionContentPartTextParam] - type: 'null' - title: string | list[OpenAIChatCompletionContentPartTextParam] - name: + packed: anyOf: - - type: string + - type: boolean - type: 'null' - tool_calls: + default: false + train_on_input: anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array + - type: boolean - type: 'null' + default: false type: object - title: OpenAIAssistantMessageParam - description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. - OpenAIChatCompletionUsageCompletionTokensDetails: + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: Configuration for training data and data loading. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + EfficiencyConfig: properties: - reasoning_tokens: + enable_activation_checkpointing: anyOf: - - type: integer + - type: boolean + - type: 'null' + default: false + enable_activation_offloading: + anyOf: + - type: boolean + - type: 'null' + default: false + memory_efficient_fsdp_wrap: + anyOf: + - type: boolean + - type: 'null' + default: false + fsdp_cpu_offload: + anyOf: + - type: boolean - type: 'null' + default: false type: object - title: OpenAIChatCompletionUsageCompletionTokensDetails - description: Token details for output tokens in OpenAI chat completion usage. - OpenAIChatCompletionUsagePromptTokensDetails: + title: EfficiencyConfig + description: Configuration for memory and compute efficiency optimizations. + OptimizerConfig: properties: - cached_tokens: + 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. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: Available optimizer algorithms for training. + 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: anyOf: - type: integer - type: 'null' - type: object - title: OpenAIChatCompletionUsagePromptTokensDetails - description: Token details for prompt tokens in OpenAI chat completion usage. - OpenAIResponseMessage-Input: - properties: - content: + default: 1 + data_config: + anyOf: + - $ref: '#/components/schemas/DataConfig' + title: DataConfig + - type: 'null' + title: DataConfig + optimizer_config: + anyOf: + - $ref: '#/components/schemas/OptimizerConfig' + title: OptimizerConfig + - type: 'null' + title: OptimizerConfig + efficiency_config: + anyOf: + - $ref: '#/components/schemas/EfficiencyConfig' + title: EfficiencyConfig + - type: 'null' + title: EfficiencyConfig + dtype: anyOf: - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile - type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal - type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role + - type: 'null' + default: bf16 + type: object + required: + - n_epochs + title: TrainingConfig + description: Comprehensive configuration for the training process. + PostTrainingJob: + properties: + job_uuid: type: string - enum: - - system - - developer - - user - - assistant - default: system + title: Job Uuid + type: object + required: + - job_uuid + title: PostTrainingJob + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig + LoraFinetuningConfig: + properties: type: type: string - const: message + const: LoRA title: Type - default: message - id: + default: LoRA + lora_attn_modules: + items: + type: string + type: array + title: Lora Attn Modules + apply_lora_to_mlp: + type: boolean + title: Apply Lora To Mlp + apply_lora_to_output: + type: boolean + title: Apply Lora To Output + rank: + type: integer + title: Rank + alpha: + type: integer + title: Alpha + use_dora: anyOf: - - type: string + - type: boolean - type: 'null' - status: + default: false + quantize_base: anyOf: - - type: string + - type: boolean - type: 'null' + default: false 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. - OpenAIResponseMessage-Output: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + description: Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + QATFinetuningConfig: properties: - content: + type: + type: string + const: QAT + title: Type + default: QAT + quantizer_name: + type: string + title: Quantizer Name + group_size: + type: integer + title: Group Size + type: object + required: + - quantizer_name + - group_size + title: QATFinetuningConfig + description: Configuration for Quantization-Aware Training (QAT) fine-tuning. + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource + AllowedToolsFilter: + properties: + tool_names: anyOf: - - type: string - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - title: OpenAIResponseInputMessageContentImage - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - title: OpenAIResponseInputMessageContentFile - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: string type: array - title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - type: 'null' + type: object + title: AllowedToolsFilter + description: Filter configuration for restricting which MCP tools can be used. + ApprovalFilter: + properties: + always: + anyOf: - items: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - title: OpenAIResponseOutputMessageContentOutputText - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseContentPartRefusal - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: string type: array - title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] - role: - title: Role - type: string - enum: - - system - - developer - - user - - assistant - default: system - type: - type: string - const: message - title: Type - default: message - id: + - type: 'null' + never: + anyOf: + - items: + type: string + type: array + - type: 'null' + type: object + title: ApprovalFilter + description: Filter configuration for MCP tool approval requirements. + BatchError: + properties: + code: anyOf: - type: string - type: 'null' - status: + line: + anyOf: + - type: integer + - type: 'null' + message: + anyOf: + - type: string + - type: 'null' + param: anyOf: - type: string - type: 'null' + 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: - - 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. - OpenAIResponseOutputMessageFileSearchToolCallResults: + - completed + - failed + - total + title: BatchRequestCounts + BatchUsage: 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: + 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 + Body_openai_upload_file_v1_files_post: + properties: + file: type: string - title: Text + format: binary + title: File + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + expires_after: + anyOf: + - $ref: '#/components/schemas/ExpiresAfter' + title: ExpiresAfter + - type: 'null' + title: ExpiresAfter type: object required: - - attributes - - file_id - - filename - - score - - text - title: OpenAIResponseOutputMessageFileSearchToolCallResults - description: Search results returned by the file search operation. - OpenAIResponseTextFormat: + - file + - purpose + title: Body_openai_upload_file_v1_files_post + Chunk-Input: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + title: ImageContentItem-Input + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Input | TextContentItem + type: array + title: list[ImageContentItem-Input | TextContentItem] + title: string | list[ImageContentItem-Input | TextContentItem] + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + Chunk-Output: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + title: ImageContentItem-Output + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + title: ImageContentItem-Output | TextContentItem + type: array + title: list[ImageContentItem-Output | TextContentItem] + title: string | list[ImageContentItem-Output | TextContentItem] + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + title: ChunkMetadata + type: object + required: + - content + - chunk_id + title: Chunk + description: A chunk of content that can be inserted into a vector database. + 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. + 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. + Errors: + properties: + data: + anyOf: + - items: + $ref: '#/components/schemas/BatchError' + type: array + - type: 'null' + object: + anyOf: + - type: string + - type: 'null' + additionalProperties: true + type: object + title: Errors + 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 + 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 + InputTokensDetails: + properties: + cached_tokens: + type: integer + title: Cached Tokens + additionalProperties: true + type: object + required: + - cached_tokens + title: InputTokensDetails + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: Status of a job execution. + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + anyOf: + - type: string + - type: 'null' + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: Tool definition returned by MCP list tools operation. + OpenAIAssistantMessageParam-Input: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIAssistantMessageParam-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + name: + anyOf: + - type: string + - type: 'null' + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + type: object + title: OpenAIAssistantMessageParam + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: Token details for output tokens in OpenAI chat completion usage. + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: Token details for prompt tokens in OpenAI chat completion usage. + OpenAIResponseMessage-Input: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + type: string + const: message + title: Type + default: message + id: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + 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. + OpenAIResponseMessage-Output: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile + type: array + title: list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal + type: array + title: list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + title: string | list[OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile] | list[OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal] + role: + title: Role + type: string + enum: + - system + - developer + - user + - assistant + default: system + type: + type: string + const: message + title: Type + default: message + id: + anyOf: + - type: string + - type: 'null' + status: + anyOf: + - type: string + - type: 'null' + 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. + 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. + OpenAIResponseTextFormat: + properties: + type: + title: Type + type: string + enum: + - text + - json_schema + - json_object + default: text + name: + anyOf: + - type: string + - type: 'null' + schema: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + description: + anyOf: + - type: string + - type: 'null' + strict: + anyOf: + - type: boolean + - type: 'null' + type: object + title: OpenAIResponseTextFormat + description: Configuration for Responses API text format. + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageInputTokensDetails + description: Token details for input tokens in OpenAI response usage. + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + anyOf: + - type: integer + - type: 'null' + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: Token details for output tokens in OpenAI response usage. + OpenAIUserMessageParam-Input: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OpenAIUserMessageParam-Output: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + type: object + required: + - content + title: OpenAIUserMessageParam + description: A message from the user in an OpenAI-compatible chat completion request. + OutputTokensDetails: + properties: + reasoning_tokens: + type: integer + title: Reasoning Tokens + additionalProperties: true + type: object + required: + - reasoning_tokens + title: OutputTokensDetails + SearchRankingOptions: + properties: + ranker: + anyOf: + - type: string + - type: 'null' + score_threshold: + anyOf: + - type: number + - type: 'null' + default: 0.0 + type: object + title: SearchRankingOptions + description: Options for ranking and filtering search results. + _URLOrData: + properties: + url: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + title: URL + data: + anyOf: + - type: string + - type: 'null' + contentEncoding: base64 + type: object + title: _URLOrData + description: A URL or a base64 encoded string + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + SpanEndPayload: + description: Payload for a span end event. + properties: + type: + const: span_end + default: span_end + title: Type + type: string + status: + $ref: '#/components/schemas/SpanStatus' + required: + - status + title: SpanEndPayload + type: object + SpanStartPayload: + description: Payload for a span start event. + properties: + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - name + title: SpanStartPayload + type: object + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: unstructured_log + default: unstructured_log + title: Type + type: string + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' + required: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent + type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + MetricInResponse: + description: A metric value included in API responses. + properties: + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - metric + - value + title: MetricInResponse + type: object + TextDelta: + description: A text content delta for streaming responses. + properties: + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: TextDelta + type: object + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string + required: + - image + title: ImageDelta + type: object + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. + properties: + type: + const: fp8_mixed + default: fp8_mixed + title: Type + type: string + title: Fp8QuantizationConfig + type: object + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). + properties: + type: + const: bf16 + default: bf16 + title: Type + type: string + title: Bf16QuantizationConfig + type: object + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. + properties: + type: + const: int4_mixed + default: int4_mixed + title: Type + type: string + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig + type: object + UserMessage: + description: A message from the user in a chat conversation. + properties: + role: + const: user + default: user + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true + required: + - content + title: UserMessage + type: object + ToolResponseMessage: + description: A message representing the result of a tool invocation. + properties: + role: + const: tool + default: tool + title: Role + type: string + call_id: + title: Call Id + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + required: + - call_id + - content + title: ToolResponseMessage + type: object + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object + required: + - logprobs_by_token + title: TokenLogProbs + type: object + EmbeddingsResponse: + description: Response containing generated embeddings. + properties: + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array + required: + - embeddings + title: EmbeddingsResponse + type: object + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens + properties: + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs + type: object + VectorStoreCreateRequest: + description: Request to create a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object + title: VectorStoreCreateRequest + type: object + VectorStoreModifyRequest: + description: Request to modify a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: VectorStoreModifyRequest + type: object + VectorStoreSearchRequest: + description: Request to search a vector store. + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + max_num_results: + default: 10 + title: Max Num Results + type: integer + ranking_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + rewrite_query: + default: false + title: Rewrite Query + type: boolean + required: + - query + title: VectorStoreSearchRequest + type: object + DialogType: + description: Parameter type for dialog data with semantic output labels. + properties: + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true + type: object + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array + required: + - items + title: ConversationItemCreateRequest + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id + type: string + provider_id: + title: Provider Id + type: string + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL + required: + - toolgroup_id + - provider_id + title: ToolGroupInput + type: object + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + ProviderSpec: + properties: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: + anyOf: + - type: string + - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: + anyOf: + - type: string + - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + required: + - api + - provider_type + - config_class + title: ProviderSpec + type: object + InlineProviderSpec: + properties: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: + anyOf: + - type: string + - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: + anyOf: + - type: string + - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: + anyOf: + - type: string + - type: 'null' + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. + nullable: true + description: + anyOf: + - type: string + - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true + required: + - api + - provider_type + - config_class + title: InlineProviderSpec + type: object + RemoteProviderSpec: properties: - type: - title: Type + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type type: string - enum: - - text - - json_schema - - json_object - default: text - name: + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: anyOf: - type: string - type: 'null' - schema: + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: anyOf: - - additionalProperties: true - type: object + - type: string - type: 'null' - description: + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: anyOf: - type: string - type: 'null' - strict: + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: anyOf: - - type: boolean + - type: string - type: 'null' - type: object - title: OpenAIResponseTextFormat - description: Configuration for Responses API text format. - OpenAIResponseUsageInputTokensDetails: - properties: - cached_tokens: + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type + type: string + description: anyOf: - - type: integer + - type: string - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true + required: + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec type: object - title: OpenAIResponseUsageInputTokensDetails - description: Token details for input tokens in OpenAI response usage. - OpenAIResponseUsageOutputTokensDetails: + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' + job_uuid: + title: Job Uuid + type: string + log_lines: + items: + type: string + title: Log Lines + type: array + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream type: object - title: OpenAIResponseUsageOutputTokensDetails - description: Token details for output tokens in OpenAI response usage. - OpenAIUserMessageParam-Input: + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. properties: - role: + job_uuid: + title: Job Uuid type: string - const: user - title: Role - default: user - content: + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest + type: object + Span: + description: A span representing a single operation within a trace. + properties: + span_id: + title: Span Id + type: string + trace_id: + title: Trace Id + type: string + parent_span_id: anyOf: - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + - type: 'null' + nullable: true name: + title: Name + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: anyOf: - - type: string + - format: date-time + type: string + - type: 'null' + nullable: true + attributes: + anyOf: + - additionalProperties: true + type: object - type: 'null' - type: object required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - OpenAIUserMessageParam-Output: + - span_id + - trace_id + - name + - start_time + title: Span + type: object + Trace: + description: A trace representing the complete execution path of a request across multiple operations. properties: - role: + trace_id: + title: Trace Id type: string - const: user - title: Role - default: user - content: - anyOf: - - type: string - - items: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - title: OpenAIChatCompletionContentPartImageParam - - $ref: '#/components/schemas/OpenAIFile' - title: OpenAIFile - discriminator: - propertyName: type - mapping: - file: '#/components/schemas/OpenAIFile' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile - type: array - title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] - name: + root_span_id: + title: Root Span Id + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: anyOf: - - type: string + - format: date-time + type: string - type: 'null' - type: object + nullable: true required: - - content - title: OpenAIUserMessageParam - description: A message from the user in an OpenAI-compatible chat completion request. - OutputTokensDetails: - properties: - reasoning_tokens: - type: integer - title: Reasoning Tokens - additionalProperties: true + - trace_id + - root_span_id + - start_time + title: Trace type: object + EventType: + description: The type of telemetry event being logged. + enum: + - unstructured_log + - structured_log + - metric + title: EventType + type: string + StructuredLogType: + description: The type of structured log event payload. + enum: + - span_start + - span_end + title: StructuredLogType + type: string + EvalTrace: + description: A trace record for evaluation purposes. + properties: + session_id: + title: Session Id + type: string + step: + title: Step + type: string + input: + title: Input + type: string + output: + title: Output + type: string + expected_output: + title: Expected Output + type: string required: - - reasoning_tokens - title: OutputTokensDetails - SearchRankingOptions: + - session_id + - step + - input + - output + - expected_output + title: EvalTrace + type: object + SpanWithStatus: + description: A span that includes status information. properties: - ranker: + span_id: + title: Span Id + type: string + trace_id: + title: Trace Id + type: string + parent_span_id: anyOf: - type: string - type: 'null' - score_threshold: + nullable: true + name: + title: Name + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: anyOf: - - type: number + - format: date-time + type: string - type: 'null' - default: 0.0 - type: object - title: SearchRankingOptions - description: Options for ranking and filtering search results. - _URLOrData: - properties: - url: + nullable: true + attributes: anyOf: - - $ref: '#/components/schemas/URL' - title: URL + - additionalProperties: true + type: object - type: 'null' - title: URL - data: + status: anyOf: - - type: string + - $ref: '#/components/schemas/SpanStatus' + title: SpanStatus - type: 'null' - contentEncoding: base64 + nullable: true + title: SpanStatus + required: + - span_id + - trace_id + - name + - start_time + title: SpanWithStatus + type: object + QueryConditionOp: + description: Comparison operators for query conditions. + enum: + - eq + - ne + - gt + - lt + title: QueryConditionOp + type: string + QueryCondition: + description: A condition for filtering query results. + properties: + key: + title: Key + type: string + op: + $ref: '#/components/schemas/QueryConditionOp' + value: + title: Value + required: + - key + - op + - value + title: QueryCondition + type: object + MetricLabel: + description: A label associated with a metric. + properties: + name: + title: Name + type: string + value: + title: Value + type: string + required: + - name + - value + title: MetricLabel + type: object + MetricDataPoint: + description: A single data point in a metric time series. + properties: + timestamp: + title: Timestamp + type: integer + value: + title: Value + type: number + unit: + title: Unit + type: string + required: + - timestamp + - value + - unit + title: MetricDataPoint + type: object + MetricSeries: + description: A time series of metric data points. + properties: + metric: + title: Metric + type: string + labels: + items: + $ref: '#/components/schemas/MetricLabel' + title: Labels + type: array + values: + items: + $ref: '#/components/schemas/MetricDataPoint' + title: Values + type: array + required: + - metric + - labels + - values + title: MetricSeries type: object - title: _URLOrData - description: A URL or a base64 encoded string 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 580decb3da..bbae4d01a7 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -4163,6 +4163,38 @@ components: - last_id title: ListOpenAIChatCompletionResponse description: Response from listing OpenAI-compatible chat completions. + OpenAIAssistantMessageParam: + description: A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: list[OpenAIChatCompletionContentPartTextParam] + - type: 'null' + title: string | list[OpenAIChatCompletionContentPartTextParam] + nullable: true + name: + anyOf: + - type: string + - type: 'null' + nullable: true + tool_calls: + anyOf: + - items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + - type: 'null' + nullable: true + title: OpenAIAssistantMessageParam + type: object OpenAIChatCompletionContentPartImageParam: properties: type: @@ -4177,6 +4209,21 @@ components: - image_url title: OpenAIChatCompletionContentPartImageParam description: Image content part for OpenAI-compatible chat completion messages. + OpenAIChatCompletionContentPartParam: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile OpenAIChatCompletionContentPartTextParam: properties: type: @@ -4385,6 +4432,27 @@ components: - url title: OpenAIImageURL description: Image URL specification for OpenAI-compatible chat completion messages. + OpenAIMessageParam: + 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' + title: OpenAIUserMessageParam + - $ref: '#/components/schemas/OpenAISystemMessageParam' + title: OpenAISystemMessageParam + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + title: OpenAIAssistantMessageParam + - $ref: '#/components/schemas/OpenAIToolMessageParam' + title: OpenAIToolMessageParam + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: OpenAIDeveloperMessageParam + title: OpenAIUserMessageParam | ... (5 variants) OpenAISystemMessageParam: properties: role: @@ -4490,6 +4558,44 @@ components: :token: The token :bytes: (Optional) The bytes for the token :logprob: The log probability of the token + OpenAIUserMessageParam: + description: A message from the user in an OpenAI-compatible chat completion request. + 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' + title: OpenAIChatCompletionContentPartTextParam + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + title: OpenAIChatCompletionContentPartImageParam + - $ref: '#/components/schemas/OpenAIFile' + title: OpenAIFile + title: OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile + type: array + title: list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + title: string | list[OpenAIChatCompletionContentPartTextParam | OpenAIChatCompletionContentPartImageParam | OpenAIFile] + name: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object OpenAIJSONSchema: properties: name: @@ -4535,6 +4641,21 @@ components: - json_schema title: OpenAIResponseFormatJSONSchema description: JSON schema response format for OpenAI-compatible chat completion requests. + OpenAIResponseFormatParam: + discriminator: + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + title: OpenAIResponseFormatText + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + title: OpenAIResponseFormatJSONSchema + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + title: OpenAIResponseFormatJSONObject + title: OpenAIResponseFormatText | OpenAIResponseFormatJSONSchema | OpenAIResponseFormatJSONObject OpenAIResponseFormatText: properties: type: @@ -5054,6 +5175,39 @@ components: :text: The text of the choice :index: The index of the choice :logprobs: (Optional) The log probabilities for the tokens in the choice + ConversationItem: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) OpenAIResponseAnnotationCitation: properties: type: @@ -5152,6 +5306,24 @@ components: - file_id - index title: OpenAIResponseAnnotationFilePath + OpenAIResponseAnnotations: + discriminator: + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + title: OpenAIResponseAnnotationFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + title: OpenAIResponseAnnotationCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + title: OpenAIResponseAnnotationContainerFileCitation + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + title: OpenAIResponseAnnotationFilePath + title: OpenAIResponseAnnotationFileCitation | ... (4 variants) OpenAIResponseContentPartRefusal: properties: type: @@ -5194,6 +5366,21 @@ components: - output title: OpenAIResponseInputFunctionToolCallOutput description: This represents the output of a function call that gets passed back to the model. + OpenAIResponseInputMessageContent: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + title: OpenAIResponseInputMessageContentText + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + title: OpenAIResponseInputMessageContentImage + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + title: OpenAIResponseInputMessageContentFile + title: OpenAIResponseInputMessageContentText | OpenAIResponseInputMessageContentImage | OpenAIResponseInputMessageContentFile OpenAIResponseInputMessageContentFile: properties: type: @@ -5386,6 +5573,18 @@ components: - role title: OpenAIResponseMessage type: object + OpenAIResponseOutputMessageContent: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + title: OpenAIResponseOutputMessageContentOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + title: OpenAIResponseOutputMessageContentOutputText | OpenAIResponseContentPartRefusal OpenAIResponseOutputMessageContentOutputText: properties: text: @@ -6394,6 +6593,41 @@ components: - message title: OpenAIResponseError description: Error details for failed OpenAI response requests. + OpenAIResponseInput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + title: OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage OpenAIResponseInputToolFileSearch: properties: type: @@ -6651,6 +6885,33 @@ components: - input title: OpenAIResponseObjectWithInput description: OpenAI response object extended with input context information. + OpenAIResponseOutput: + 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' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + title: OpenAIResponseMessage | ... (7 variants) OpenAIResponsePrompt: properties: id: @@ -6695,6 +6956,27 @@ components: type: object title: OpenAIResponseText description: Text response configuration for OpenAI responses. + OpenAIResponseTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + title: OpenAIResponseToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseToolMCP: properties: type: @@ -6760,6 +7042,27 @@ components: - type title: ResponseGuardrailSpec type: object + OpenAIResponseInputTool: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_2025_08_26: '#/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' + title: OpenAIResponseInputToolWebSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + title: OpenAIResponseInputToolFileSearch + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + title: OpenAIResponseInputToolFunction + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: OpenAIResponseInputToolMCP + title: OpenAIResponseInputToolWebSearch | ... (4 variants) OpenAIResponseInputToolMCP: properties: type: @@ -8615,6 +8918,29 @@ components: - return_type title: ScoringFn description: A scoring function resource for evaluating model outputs. + ScoringFnParams: + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + title: LLMAsJudgeScoringFnParams + - $ref: '#/components/schemas/RegexParserScoringFnParams' + title: RegexParserScoringFnParams + - $ref: '#/components/schemas/BasicScoringFnParams' + title: BasicScoringFnParams + title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams + ScoringFnParamsType: + description: Types of scoring function parameter configurations. + enum: + - llm_as_judge + - regex_parser + - basic + title: ScoringFnParamsType + type: string StringType: properties: type: @@ -8821,6 +9147,61 @@ components: - tool_name - kwargs title: InvokeToolRequest + ImageContentItem: + description: A image content item + properties: + type: + const: image + default: image + title: Type + type: string + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + InterleavedContent: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + InterleavedContentItem: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem TextContentItem: properties: type: @@ -8988,6 +9369,64 @@ components: - data title: ListToolGroupsResponse description: Response containing a list of tool groups. + Chunk: + description: A chunk of content that can be inserted into a vector database. + properties: + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + chunk_id: + title: Chunk Id + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + embedding: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + chunk_metadata: + anyOf: + - $ref: '#/components/schemas/ChunkMetadata' + title: ChunkMetadata + - type: 'null' + nullable: true + title: ChunkMetadata + required: + - content + - chunk_id + title: Chunk + type: object ChunkMetadata: properties: chunk_id: @@ -9226,6 +9665,18 @@ components: - file_counts title: VectorStoreObject description: OpenAI Vector Store object. + VectorStoreChunkingStrategy: + discriminator: + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + propertyName: type + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + title: VectorStoreChunkingStrategyAuto + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: VectorStoreChunkingStrategyStatic + title: VectorStoreChunkingStrategyAuto | VectorStoreChunkingStrategyStatic VectorStoreChunkingStrategyAuto: properties: type: @@ -9410,6 +9861,14 @@ components: - file_counts title: VectorStoreFileBatchObject description: OpenAI Vector Store File Batch object. + VectorStoreFileStatus: + type: string + enum: + - completed + - in_progress + - cancelled + - failed + default: completed VectorStoreFileLastError: properties: code: @@ -10571,6 +11030,18 @@ components: required: - job_uuid title: PostTrainingJob + AlgorithmConfig: + discriminator: + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + title: LoraFinetuningConfig + - $ref: '#/components/schemas/QATFinetuningConfig' + title: QATFinetuningConfig + title: LoraFinetuningConfig | QATFinetuningConfig LoraFinetuningConfig: properties: type: @@ -10707,6 +11178,39 @@ components: required: - model_id title: RegisterModelRequest + ParamType: + discriminator: + mapping: + 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' + title: StringType + - $ref: '#/components/schemas/NumberType' + title: NumberType + - $ref: '#/components/schemas/BooleanType' + title: BooleanType + - $ref: '#/components/schemas/ArrayType' + title: ArrayType + - $ref: '#/components/schemas/ObjectType' + title: ObjectType + - $ref: '#/components/schemas/JsonType' + title: JsonType + - $ref: '#/components/schemas/UnionType' + title: UnionType + - $ref: '#/components/schemas/ChatCompletionInputType' + title: ChatCompletionInputType + - $ref: '#/components/schemas/CompletionInputType' + title: CompletionInputType + title: StringType | ... (9 variants) RegisterShieldRequest: properties: shield_id: @@ -10753,6 +11257,18 @@ components: - toolgroup_id - provider_id title: RegisterToolGroupRequest + DataSource: + discriminator: + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/URIDataSource' + title: URIDataSource + - $ref: '#/components/schemas/RowsDataSource' + title: RowsDataSource + title: URIDataSource | RowsDataSource RegisterBenchmarkRequest: properties: benchmark_id: @@ -11554,6 +12070,1355 @@ components: type: object title: _URLOrData description: A URL or a base64 encoded string + SamplingStrategy: + discriminator: + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + title: GreedySamplingStrategy + - $ref: '#/components/schemas/TopPSamplingStrategy' + title: TopPSamplingStrategy + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: TopKSamplingStrategy + title: GreedySamplingStrategy | TopPSamplingStrategy | TopKSamplingStrategy + GrammarResponseFormat: + description: Configuration for grammar-guided response generation. + properties: + type: + const: grammar + default: grammar + title: Type + type: string + bnf: + additionalProperties: true + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + type: object + JsonSchemaResponseFormat: + description: Configuration for JSON schema-guided response generation. + 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 + ResponseFormat: + discriminator: + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + propertyName: type + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + title: JsonSchemaResponseFormat + - $ref: '#/components/schemas/GrammarResponseFormat' + title: GrammarResponseFormat + title: JsonSchemaResponseFormat | GrammarResponseFormat + OpenAIResponseContentPart: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseContentPartOutputText' + reasoning_text: '#/components/schemas/OpenAIResponseContentPartReasoningText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseContentPartOutputText' + title: OpenAIResponseContentPartOutputText + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + title: OpenAIResponseContentPartRefusal + - $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText' + title: OpenAIResponseContentPartReasoningText + title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText + SpanEndPayload: + description: Payload for a span end event. + properties: + type: + const: span_end + default: span_end + title: Type + type: string + status: + $ref: '#/components/schemas/SpanStatus' + required: + - status + title: SpanEndPayload + type: object + SpanStartPayload: + description: Payload for a span start event. + properties: + type: + const: span_start + default: span_start + title: Type + type: string + name: + title: Name + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - name + title: SpanStartPayload + type: object + SpanStatus: + description: The status of a span indicating whether it completed successfully or with an error. + enum: + - ok + - error + title: SpanStatus + type: string + StructuredLogPayload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + LogSeverity: + description: The severity level of a log message. + enum: + - verbose + - debug + - info + - warn + - error + - critical + title: LogSeverity + type: string + MetricEvent: + description: A metric event containing a measured value. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: metric + default: metric + title: Type + type: string + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + title: Unit + type: string + required: + - trace_id + - span_id + - timestamp + - metric + - value + - unit + title: MetricEvent + type: object + StructuredLogEvent: + description: A structured log event containing typed payload data. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: structured_log + default: structured_log + title: Type + type: string + payload: + discriminator: + mapping: + span_end: '#/components/schemas/SpanEndPayload' + span_start: '#/components/schemas/SpanStartPayload' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SpanStartPayload' + title: SpanStartPayload + - $ref: '#/components/schemas/SpanEndPayload' + title: SpanEndPayload + title: SpanStartPayload | SpanEndPayload + required: + - trace_id + - span_id + - timestamp + - payload + title: StructuredLogEvent + type: object + UnstructuredLogEvent: + description: An unstructured log event containing a simple text message. + properties: + trace_id: + title: Trace Id + type: string + span_id: + title: Span Id + type: string + timestamp: + format: date-time + title: Timestamp + type: string + attributes: + anyOf: + - additionalProperties: + anyOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + title: string | ... (4 variants) + type: object + - type: 'null' + type: + const: unstructured_log + default: unstructured_log + title: Type + type: string + message: + title: Message + type: string + severity: + $ref: '#/components/schemas/LogSeverity' + required: + - trace_id + - span_id + - timestamp + - message + - severity + title: UnstructuredLogEvent + type: object + Event: + discriminator: + mapping: + metric: '#/components/schemas/MetricEvent' + structured_log: '#/components/schemas/StructuredLogEvent' + unstructured_log: '#/components/schemas/UnstructuredLogEvent' + propertyName: type + oneOf: + - $ref: '#/components/schemas/UnstructuredLogEvent' + title: UnstructuredLogEvent + - $ref: '#/components/schemas/MetricEvent' + title: MetricEvent + - $ref: '#/components/schemas/StructuredLogEvent' + title: StructuredLogEvent + title: UnstructuredLogEvent | MetricEvent | StructuredLogEvent + MetricInResponse: + description: A metric value included in API responses. + properties: + metric: + title: Metric + type: string + value: + anyOf: + - type: integer + - type: number + title: integer | number + unit: + anyOf: + - type: string + - type: 'null' + nullable: true + required: + - metric + - value + title: MetricInResponse + type: object + TextDelta: + description: A text content delta for streaming responses. + properties: + type: + const: text + default: text + title: Type + type: string + text: + title: Text + type: string + required: + - text + title: TextDelta + type: object + ImageDelta: + description: An image content delta for streaming responses. + properties: + type: + const: image + default: image + title: Type + type: string + image: + format: binary + title: Image + type: string + required: + - image + title: ImageDelta + type: object + Fp8QuantizationConfig: + description: Configuration for 8-bit floating point quantization. + properties: + type: + const: fp8_mixed + default: fp8_mixed + title: Type + type: string + title: Fp8QuantizationConfig + type: object + Bf16QuantizationConfig: + description: Configuration for BFloat16 precision (typically no quantization). + properties: + type: + const: bf16 + default: bf16 + title: Type + type: string + title: Bf16QuantizationConfig + type: object + Int4QuantizationConfig: + description: Configuration for 4-bit integer quantization. + properties: + type: + const: int4_mixed + default: int4_mixed + title: Type + type: string + scheme: + anyOf: + - type: string + - type: 'null' + default: int4_weight_int8_dynamic_activation + title: Int4QuantizationConfig + type: object + UserMessage: + description: A message from the user in a chat conversation. + properties: + role: + const: user + default: user + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + - type: 'null' + title: string | list[ImageContentItem | TextContentItem] + nullable: true + required: + - content + title: UserMessage + type: object + ToolResponseMessage: + description: A message representing the result of a tool invocation. + properties: + role: + const: tool + default: tool + title: Role + type: string + call_id: + title: Call Id + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + - items: + discriminator: + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + title: ImageContentItem + - $ref: '#/components/schemas/TextContentItem' + title: TextContentItem + title: ImageContentItem | TextContentItem + type: array + title: list[ImageContentItem | TextContentItem] + title: string | list[ImageContentItem | TextContentItem] + required: + - call_id + - content + title: ToolResponseMessage + type: object + TokenLogProbs: + description: Log probabilities for generated tokens. + properties: + logprobs_by_token: + additionalProperties: + type: number + title: Logprobs By Token + type: object + required: + - logprobs_by_token + title: TokenLogProbs + type: object + EmbeddingsResponse: + description: Response containing generated embeddings. + properties: + embeddings: + items: + items: + type: number + type: array + title: Embeddings + type: array + required: + - embeddings + title: EmbeddingsResponse + type: object + OpenAICompletionLogprobs: + description: |- + The log probabilities for the tokens in the message from an OpenAI-compatible completion response. + + :text_offset: (Optional) The offset of the token in the text + :token_logprobs: (Optional) The log probabilities for the tokens + :tokens: (Optional) The tokens + :top_logprobs: (Optional) The top log probabilities for the tokens + properties: + text_offset: + anyOf: + - items: + type: integer + type: array + - type: 'null' + nullable: true + token_logprobs: + anyOf: + - items: + type: number + type: array + - type: 'null' + nullable: true + tokens: + anyOf: + - items: + type: string + type: array + - type: 'null' + nullable: true + top_logprobs: + anyOf: + - items: + additionalProperties: + type: number + type: object + type: array + - type: 'null' + nullable: true + title: OpenAICompletionLogprobs + type: object + VectorStoreCreateRequest: + description: Request to create a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + file_ids: + items: + type: string + title: File Ids + type: array + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + chunking_strategy: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: + additionalProperties: true + title: Metadata + type: object + title: VectorStoreCreateRequest + type: object + VectorStoreModifyRequest: + description: Request to modify a vector store. + properties: + name: + anyOf: + - type: string + - type: 'null' + nullable: true + expires_after: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + metadata: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + title: VectorStoreModifyRequest + type: object + VectorStoreSearchRequest: + description: Request to search a vector store. + properties: + query: + anyOf: + - type: string + - items: + type: string + type: array + title: list[string] + title: string | list[string] + filters: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + max_num_results: + default: 10 + title: Max Num Results + type: integer + ranking_options: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + rewrite_query: + default: false + title: Rewrite Query + type: boolean + required: + - query + title: VectorStoreSearchRequest + type: object + DialogType: + description: Parameter type for dialog data with semantic output labels. + properties: + type: + const: dialog + default: dialog + title: Type + type: string + title: DialogType + type: object + ConversationMessage: + description: OpenAI-compatible message item for conversations. + properties: + id: + description: unique identifier for this message + title: Id + type: string + content: + description: message content + items: + additionalProperties: true + type: object + title: Content + type: array + role: + description: message role + title: Role + type: string + status: + description: message status + title: Status + type: string + type: + const: message + default: message + title: Type + type: string + object: + const: message + default: message + title: Object + type: string + required: + - id + - content + - role + - status + title: ConversationMessage + type: object + ConversationItemCreateRequest: + description: Request body for creating conversation items. + properties: + items: + description: Items to include in the conversation context. You may add up to 20 items at a time. + items: + discriminator: + 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' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: OpenAIResponseMessage + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + title: OpenAIResponseOutputMessageWebSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + title: OpenAIResponseOutputMessageFileSearchToolCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + title: OpenAIResponseOutputMessageFunctionToolCall + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + title: OpenAIResponseInputFunctionToolCallOutput + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: OpenAIResponseMCPApprovalRequest + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + title: OpenAIResponseMCPApprovalResponse + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + title: OpenAIResponseOutputMessageMCPCall + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: OpenAIResponseOutputMessageMCPListTools + title: OpenAIResponseMessage | ... (9 variants) + maxItems: 20 + title: Items + type: array + required: + - items + title: ConversationItemCreateRequest + type: object + ToolGroupInput: + description: Input data for registering a tool group. + properties: + toolgroup_id: + title: Toolgroup Id + type: string + provider_id: + title: Provider Id + type: string + args: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + nullable: true + mcp_endpoint: + anyOf: + - $ref: '#/components/schemas/URL' + title: URL + - type: 'null' + nullable: true + title: URL + required: + - toolgroup_id + - provider_id + title: ToolGroupInput + type: object + Api: + description: Enumeration of all available APIs in the Llama Stack system. + enum: + - providers + - inference + - safety + - agents + - batches + - vector_io + - datasetio + - scoring + - eval + - post_training + - tool_runtime + - models + - shields + - vector_stores + - datasets + - scoring_functions + - benchmarks + - tool_groups + - files + - prompts + - conversations + - inspect + title: Api + type: string + ProviderSpec: + properties: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: + anyOf: + - type: string + - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: + anyOf: + - type: string + - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + required: + - api + - provider_type + - config_class + title: ProviderSpec + type: object + InlineProviderSpec: + properties: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: + anyOf: + - type: string + - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: + anyOf: + - type: string + - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + container_image: + anyOf: + - type: string + - type: 'null' + description: |2 + + The container image to use for this implementation. If one is provided, pip_packages will be ignored. + If a provider depends on other providers, the dependencies MUST NOT specify a container image. + nullable: true + description: + anyOf: + - type: string + - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true + required: + - api + - provider_type + - config_class + title: InlineProviderSpec + type: object + RemoteProviderSpec: + properties: + api: + $ref: '#/components/schemas/Api' + provider_type: + title: Provider Type + type: string + config_class: + description: Fully-qualified classname of the config for this provider + title: Config Class + type: string + api_dependencies: + description: Higher-level API surfaces may depend on other providers to provide their functionality + items: + $ref: '#/components/schemas/Api' + title: Api Dependencies + type: array + optional_api_dependencies: + items: + $ref: '#/components/schemas/Api' + title: Optional Api Dependencies + type: array + deprecation_warning: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated, specify the warning message here + nullable: true + deprecation_error: + anyOf: + - type: string + - type: 'null' + description: If this provider is deprecated and does NOT work, specify the error message here + nullable: true + module: + anyOf: + - type: string + - type: 'null' + description: |2- + + Fully-qualified name of the module to import. The module is expected to have: + + - `get_adapter_impl(config, deps)`: returns the adapter implementation + + Example: `module: ramalama_stack` + + nullable: true + pip_packages: + description: The pip dependencies needed for this implementation + items: + type: string + title: Pip Packages + type: array + provider_data_validator: + anyOf: + - type: string + - type: 'null' + nullable: true + is_external: + default: false + description: Notes whether this provider is an external provider. + title: Is External + type: boolean + deps__: + items: + type: string + title: Deps + type: array + adapter_type: + description: Unique identifier for this adapter + title: Adapter Type + type: string + description: + anyOf: + - type: string + - type: 'null' + description: |2 + + A description of the provider. This is used to display in the documentation. + nullable: true + required: + - api + - provider_type + - config_class + - adapter_type + title: RemoteProviderSpec + type: object + PostTrainingJobLogStream: + description: Stream of logs from a finetuning job. + properties: + job_uuid: + title: Job Uuid + type: string + log_lines: + items: + type: string + title: Log Lines + type: array + required: + - job_uuid + - log_lines + title: PostTrainingJobLogStream + type: object + RLHFAlgorithm: + description: Available reinforcement learning from human feedback algorithms. + enum: + - dpo + title: RLHFAlgorithm + type: string + PostTrainingRLHFRequest: + description: Request to finetune a model using reinforcement learning from human feedback. + properties: + job_uuid: + title: Job Uuid + type: string + finetuned_model: + $ref: '#/components/schemas/URL' + dataset_id: + title: Dataset Id + type: string + validation_dataset_id: + title: Validation Dataset Id + type: string + algorithm: + $ref: '#/components/schemas/RLHFAlgorithm' + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + training_config: + $ref: '#/components/schemas/TrainingConfig' + hyperparam_search_config: + additionalProperties: true + title: Hyperparam Search Config + type: object + logger_config: + additionalProperties: true + title: Logger Config + type: object + required: + - job_uuid + - finetuned_model + - dataset_id + - validation_dataset_id + - algorithm + - algorithm_config + - optimizer_config + - training_config + - hyperparam_search_config + - logger_config + title: PostTrainingRLHFRequest + type: object + Span: + description: A span representing a single operation within a trace. + properties: + span_id: + title: Span Id + type: string + trace_id: + title: Trace Id + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true + name: + title: Name + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + required: + - span_id + - trace_id + - name + - start_time + title: Span + type: object + Trace: + description: A trace representing the complete execution path of a request across multiple operations. + properties: + trace_id: + title: Trace Id + type: string + root_span_id: + title: Root Span Id + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + required: + - trace_id + - root_span_id + - start_time + title: Trace + type: object + EventType: + description: The type of telemetry event being logged. + enum: + - unstructured_log + - structured_log + - metric + title: EventType + type: string + StructuredLogType: + description: The type of structured log event payload. + enum: + - span_start + - span_end + title: StructuredLogType + type: string + EvalTrace: + description: A trace record for evaluation purposes. + properties: + session_id: + title: Session Id + type: string + step: + title: Step + type: string + input: + title: Input + type: string + output: + title: Output + type: string + expected_output: + title: Expected Output + type: string + required: + - session_id + - step + - input + - output + - expected_output + title: EvalTrace + type: object + SpanWithStatus: + description: A span that includes status information. + properties: + span_id: + title: Span Id + type: string + trace_id: + title: Trace Id + type: string + parent_span_id: + anyOf: + - type: string + - type: 'null' + nullable: true + name: + title: Name + type: string + start_time: + format: date-time + title: Start Time + type: string + end_time: + anyOf: + - format: date-time + type: string + - type: 'null' + nullable: true + attributes: + anyOf: + - additionalProperties: true + type: object + - type: 'null' + status: + anyOf: + - $ref: '#/components/schemas/SpanStatus' + title: SpanStatus + - type: 'null' + nullable: true + title: SpanStatus + required: + - span_id + - trace_id + - name + - start_time + title: SpanWithStatus + type: object + QueryConditionOp: + description: Comparison operators for query conditions. + enum: + - eq + - ne + - gt + - lt + title: QueryConditionOp + type: string + QueryCondition: + description: A condition for filtering query results. + properties: + key: + title: Key + type: string + op: + $ref: '#/components/schemas/QueryConditionOp' + value: + title: Value + required: + - key + - op + - value + title: QueryCondition + type: object + MetricLabel: + description: A label associated with a metric. + properties: + name: + title: Name + type: string + value: + title: Value + type: string + required: + - name + - value + title: MetricLabel + type: object + MetricDataPoint: + description: A single data point in a metric time series. + properties: + timestamp: + title: Timestamp + type: integer + value: + title: Value + type: number + unit: + title: Unit + type: string + required: + - timestamp + - value + - unit + title: MetricDataPoint + type: object + MetricSeries: + description: A time series of metric data points. + properties: + metric: + title: Metric + type: string + labels: + items: + $ref: '#/components/schemas/MetricLabel' + title: Labels + type: array + values: + items: + $ref: '#/components/schemas/MetricDataPoint' + title: Values + type: array + required: + - metric + - labels + - values + title: MetricSeries + type: object responses: BadRequest400: description: The request was invalid or malformed diff --git a/scripts/openapi_generator/schema_filtering.py b/scripts/openapi_generator/schema_filtering.py index d72a64779a..4667d27a56 100644 --- a/scripts/openapi_generator/schema_filtering.py +++ b/scripts/openapi_generator/schema_filtering.py @@ -10,6 +10,7 @@ from typing import Any +from llama_stack_api.schema_utils import iter_json_schema_types, iter_registered_schema_types from llama_stack_api.version import ( LLAMA_STACK_API_V1, LLAMA_STACK_API_V1ALPHA, @@ -17,6 +18,23 @@ ) +def _get_all_json_schema_type_names() -> set[str]: + """Collect schema names from @json_schema_type-decorated models.""" + schema_names = set() + for model in iter_json_schema_types(): + schema_name = getattr(model, "_llama_stack_schema_name", None) or getattr(model, "__name__", None) + if schema_name: + schema_names.add(schema_name) + return schema_names + + +def _get_explicit_schema_names(openapi_schema: dict[str, Any]) -> set[str]: + """Schema names to keep even if not referenced by a path.""" + registered_schema_names = {info.name for info in iter_registered_schema_types()} + json_schema_type_names = _get_all_json_schema_type_names() + return registered_schema_names | json_schema_type_names + + def _find_schema_refs_in_object(obj: Any) -> set[str]: """ Recursively find all schema references ($ref) in an object. @@ -37,12 +55,21 @@ def _find_schema_refs_in_object(obj: Any) -> set[str]: return refs -def _add_transitive_references(referenced_schemas: set[str], all_schemas: dict[str, Any]) -> set[str]: +def _add_transitive_references( + referenced_schemas: set[str], all_schemas: dict[str, Any], initial_schemas: set[str] | None = None +) -> set[str]: """Add transitive references for given schemas.""" - additional_schemas = set() - for schema_name in referenced_schemas: - if schema_name in all_schemas: - additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + if initial_schemas: + referenced_schemas.update(initial_schemas) + additional_schemas = set() + for schema_name in initial_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) + else: + additional_schemas = set() + for schema_name in referenced_schemas: + if schema_name in all_schemas: + additional_schemas.update(_find_schema_refs_in_object(all_schemas[schema_name])) while additional_schemas: new_schemas = additional_schemas - referenced_schemas @@ -113,7 +140,8 @@ def _filter_schemas_by_references( referenced_schemas = _find_schemas_referenced_by_paths(filtered_paths, openapi_schema) all_schemas = openapi_schema.get("components", {}).get("schemas", {}) - referenced_schemas = _add_transitive_references(referenced_schemas, all_schemas) + explicit_names = _get_explicit_schema_names(openapi_schema) + referenced_schemas = _add_transitive_references(referenced_schemas, all_schemas, explicit_names) filtered_schemas = { name: schema for name, schema in filtered_schema["components"]["schemas"].items() if name in referenced_schemas From 277bec9c9a26c46f2e7020df9bcdf62b4c9c7ae1 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Fri, 14 Nov 2025 15:30:18 -0800 Subject: [PATCH 46/46] add 204s --- client-sdks/stainless/openapi.yml | 98 ++++++------------- docs/static/deprecated-llama-stack-spec.yaml | 63 ++++-------- .../static/experimental-llama-stack-spec.yaml | 21 ++-- docs/static/llama-stack-spec.yaml | 14 +-- docs/static/stainless-llama-stack-spec.yaml | 98 ++++++------------- scripts/openapi_generator/main.py | 1 + .../openapi_generator/schema_transforms.py | 27 +++++ 7 files changed, 112 insertions(+), 210 deletions(-) diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index bbae4d01a7..ff86e30e10 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -1079,11 +1079,6 @@ paths: description: 'Path parameter: model_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1096,6 +1091,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Models summary: Unregister Model @@ -1294,11 +1291,6 @@ paths: $ref: '#/components/schemas/UpdatePromptRequest' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -1311,6 +1303,8 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + '204': + description: Successful Response tags: - Prompts summary: Delete Prompt @@ -1793,11 +1787,6 @@ paths: operationId: list_scoring_functions_v1_scoring_functions_get post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1810,6 +1799,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Scoring Functions summary: Register Scoring Function @@ -1857,11 +1848,6 @@ paths: description: 'Path parameter: scoring_fn_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1874,6 +1860,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Scoring Functions summary: Unregister Scoring Function @@ -2044,11 +2032,6 @@ paths: description: 'Path parameter: identifier' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2061,6 +2044,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Shields summary: Unregister Shield @@ -2185,11 +2170,6 @@ paths: operationId: list_tool_groups_v1_toolgroups_get post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2202,6 +2182,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Tool Groups summary: Register Tool Group @@ -2249,11 +2231,6 @@ paths: description: 'Path parameter: toolgroup_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2266,6 +2243,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Tool Groups summary: Unregister Toolgroup @@ -2350,11 +2329,6 @@ paths: /v1/vector-io/insert: post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2367,6 +2341,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Vector Io summary: Insert Chunks @@ -3179,11 +3155,6 @@ paths: /v1beta/datasetio/append-rows/{dataset_id}: post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3196,6 +3167,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Datasetio summary: Append Rows @@ -3365,11 +3338,6 @@ paths: description: 'Path parameter: dataset_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3382,6 +3350,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Datasets summary: Unregister Dataset @@ -3423,11 +3393,6 @@ paths: operationId: list_benchmarks_v1alpha_eval_benchmarks_get post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3440,6 +3405,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Benchmarks summary: Register Benchmark @@ -3487,11 +3454,6 @@ paths: description: 'Path parameter: benchmark_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3504,6 +3466,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Benchmarks summary: Unregister Benchmark @@ -3636,11 +3600,6 @@ paths: description: 'Path parameter: job_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3653,6 +3612,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Eval summary: Job Cancel @@ -3778,11 +3739,6 @@ paths: /v1alpha/post-training/job/cancel: post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3795,6 +3751,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Post Training summary: Cancel Training Job diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index 5454874db7..3bc06d7d7e 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -112,11 +112,6 @@ paths: description: 'Path parameter: model_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -129,6 +124,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Models summary: Unregister Model @@ -173,11 +170,6 @@ paths: operationId: list_scoring_functions_v1_scoring_functions_get post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -190,6 +182,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Scoring Functions summary: Register Scoring Function @@ -237,11 +231,6 @@ paths: description: 'Path parameter: scoring_fn_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -254,6 +243,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Scoring Functions summary: Unregister Scoring Function @@ -360,11 +351,6 @@ paths: description: 'Path parameter: identifier' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -377,6 +363,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Shields summary: Unregister Shield @@ -418,11 +406,6 @@ paths: operationId: list_tool_groups_v1_toolgroups_get post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -435,6 +418,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Tool Groups summary: Register Tool Group @@ -482,11 +467,6 @@ paths: description: 'Path parameter: toolgroup_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -499,6 +479,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Tool Groups summary: Unregister Toolgroup @@ -605,11 +587,6 @@ paths: description: 'Path parameter: dataset_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -622,6 +599,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Datasets summary: Unregister Dataset @@ -663,11 +642,6 @@ paths: operationId: list_benchmarks_v1alpha_eval_benchmarks_get post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -680,6 +654,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Benchmarks summary: Register Benchmark @@ -727,11 +703,6 @@ paths: description: 'Path parameter: benchmark_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -744,6 +715,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Benchmarks summary: Unregister Benchmark diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index aaafc3ce25..2b36ebf473 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -16,11 +16,6 @@ paths: /v1beta/datasetio/append-rows/{dataset_id}: post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -33,6 +28,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Datasetio summary: Append Rows @@ -346,11 +343,6 @@ paths: description: 'Path parameter: job_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -363,6 +355,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Eval summary: Job Cancel @@ -488,11 +482,6 @@ paths: /v1alpha/post-training/job/cancel: post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -505,6 +494,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Post Training summary: Cancel Training Job diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index 24f43ab7da..a12ac342f9 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -1222,11 +1222,6 @@ paths: $ref: '#/components/schemas/UpdatePromptRequest' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -1239,6 +1234,8 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + '204': + description: Successful Response tags: - Prompts summary: Delete Prompt @@ -2088,11 +2085,6 @@ paths: /v1/vector-io/insert: post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2105,6 +2097,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Vector Io summary: Insert Chunks diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index bbae4d01a7..ff86e30e10 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -1079,11 +1079,6 @@ paths: description: 'Path parameter: model_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1096,6 +1091,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Models summary: Unregister Model @@ -1294,11 +1291,6 @@ paths: $ref: '#/components/schemas/UpdatePromptRequest' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -1311,6 +1303,8 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + '204': + description: Successful Response tags: - Prompts summary: Delete Prompt @@ -1793,11 +1787,6 @@ paths: operationId: list_scoring_functions_v1_scoring_functions_get post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1810,6 +1799,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Scoring Functions summary: Register Scoring Function @@ -1857,11 +1848,6 @@ paths: description: 'Path parameter: scoring_fn_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -1874,6 +1860,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Scoring Functions summary: Unregister Scoring Function @@ -2044,11 +2032,6 @@ paths: description: 'Path parameter: identifier' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2061,6 +2044,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Shields summary: Unregister Shield @@ -2185,11 +2170,6 @@ paths: operationId: list_tool_groups_v1_toolgroups_get post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2202,6 +2182,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Tool Groups summary: Register Tool Group @@ -2249,11 +2231,6 @@ paths: description: 'Path parameter: toolgroup_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2266,6 +2243,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Tool Groups summary: Unregister Toolgroup @@ -2350,11 +2329,6 @@ paths: /v1/vector-io/insert: post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -2367,6 +2341,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Vector Io summary: Insert Chunks @@ -3179,11 +3155,6 @@ paths: /v1beta/datasetio/append-rows/{dataset_id}: post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3196,6 +3167,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Datasetio summary: Append Rows @@ -3365,11 +3338,6 @@ paths: description: 'Path parameter: dataset_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3382,6 +3350,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Datasets summary: Unregister Dataset @@ -3423,11 +3393,6 @@ paths: operationId: list_benchmarks_v1alpha_eval_benchmarks_get post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3440,6 +3405,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Benchmarks summary: Register Benchmark @@ -3487,11 +3454,6 @@ paths: description: 'Path parameter: benchmark_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3504,6 +3466,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Benchmarks summary: Unregister Benchmark @@ -3636,11 +3600,6 @@ paths: description: 'Path parameter: job_id' delete: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3653,6 +3612,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Eval summary: Job Cancel @@ -3778,11 +3739,6 @@ paths: /v1alpha/post-training/job/cancel: post: responses: - '200': - description: Successful Response - content: - application/json: - schema: {} '400': description: Bad Request $ref: '#/components/responses/BadRequest400' @@ -3795,6 +3751,8 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + '204': + description: Successful Response tags: - Post Training summary: Cancel Training Job diff --git a/scripts/openapi_generator/main.py b/scripts/openapi_generator/main.py index e402d4d738..e881ff7262 100755 --- a/scripts/openapi_generator/main.py +++ b/scripts/openapi_generator/main.py @@ -62,6 +62,7 @@ def generate_openapi_spec(output_dir: str) -> dict[str, Any]: # Clean descriptions in schema definitions by removing docstring metadata openapi_schema = schema_transforms._clean_schema_descriptions(openapi_schema) + openapi_schema = schema_transforms._normalize_empty_responses(openapi_schema) # Remove query parameters from POST/PUT/PATCH endpoints that have a request body # FastAPI sometimes infers parameters as query params even when they should be in the request body diff --git a/scripts/openapi_generator/schema_transforms.py b/scripts/openapi_generator/schema_transforms.py index bda5decb8f..5821c99d58 100644 --- a/scripts/openapi_generator/schema_transforms.py +++ b/scripts/openapi_generator/schema_transforms.py @@ -51,6 +51,33 @@ def fix_refs(obj: Any) -> None: return openapi_schema +def _normalize_empty_responses(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """Convert empty 200 responses into 204 No Content.""" + + for path_item in openapi_schema.get("paths", {}).values(): + if not isinstance(path_item, dict): + continue + for method in list(path_item.keys()): + operation = path_item.get(method) + if not isinstance(operation, dict): + continue + responses = operation.get("responses") + if not isinstance(responses, dict): + continue + response_200 = responses.get("200") or responses.get(200) + if response_200 is None: + continue + content = response_200.get("content") + if content and any( + isinstance(media, dict) and media.get("schema") not in ({}, None) for media in content.values() + ): + continue + responses.pop("200", None) + responses.pop(200, None) + responses["204"] = {"description": response_200.get("description", "No Content")} + 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.